JP2013126114A - Stereo image processing method and stereo image processing apparatus - Google Patents
Stereo image processing method and stereo image processing apparatus Download PDFInfo
- Publication number
- JP2013126114A JP2013126114A JP2011273834A JP2011273834A JP2013126114A JP 2013126114 A JP2013126114 A JP 2013126114A JP 2011273834 A JP2011273834 A JP 2011273834A JP 2011273834 A JP2011273834 A JP 2011273834A JP 2013126114 A JP2013126114 A JP 2013126114A
- Authority
- JP
- Japan
- Prior art keywords
- frame
- disparity
- disparity information
- weight value
- predetermined frame
- 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.)
- Pending
Links
Landscapes
- Processing Or Creating Images (AREA)
- Image Processing (AREA)
- Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
- Image Analysis (AREA)
Abstract
【課題】演算量を抑制しながら、連続するフレーム間におけるディスパリティの揺らぎを低減するステレオ画像処理方法及びステレオ画像処理装置を提供する
【解決手段】所定フレームのステレオ画像が入力され、前記ステレオ画像の相違度を算出する相違度演算部と、所定フレームの直前フレームの視差情報に基づいて所定フレームの加重値を算出する加重値演算部と、相違度演算部から供給されたステレオ画像の相違度に加重値演算部から供給された加重値を重み付けする第1のフィルタと、第1のフィルタから供給された加重値によって重み付けされた相違度に基づいて所定フレームの視差情報を算出する最適化部と、最適化部から供給された所定フレームの視差情報を保存し、保存された視差情報を加重値演算部に出力する第1のメモリと、を具備するステレオ画像処理装置。
【選択図】図3The present invention provides a stereo image processing method and a stereo image processing apparatus that reduce fluctuations in disparity between successive frames while suppressing the amount of computation. A stereo image of a predetermined frame is input, and the stereo image is input. A dissimilarity calculating unit that calculates the dissimilarity of the stereo image, a weight value calculating unit that calculates a weighted value of the predetermined frame based on the disparity information of the frame immediately before the predetermined frame, and a dissimilarity between the stereo images supplied from the dissimilarity calculating unit A first filter that weights the weight value supplied from the weight value calculation unit, and an optimization unit that calculates disparity information of a predetermined frame based on the dissimilarity weighted by the weight value supplied from the first filter And a first method for storing the disparity information of the predetermined frame supplied from the optimization unit and outputting the stored disparity information to the weight value calculation unit. Stereo image processing apparatus including a re, a.
[Selection] Figure 3
Description
本発明は、ステレオ画像処理方法及びステレオ画像処理装置に関する。 The present invention relates to a stereo image processing method and a stereo image processing apparatus.
近年、3Dテレビなど、ステレオ画像を用いた機器が盛んに開発されている。ステレオ画像を表示するには、ステレオマッチングを行ってステレオ画像からdepth(奥行き情報)を抽出し、抽出したdepth画像と基準画像とを用いて表示装置に表示する視差画像を合成する。 In recent years, devices using stereo images such as 3D televisions have been actively developed. In order to display a stereo image, stereo matching is performed to extract depth (depth information) from the stereo image, and a parallax image to be displayed on the display device is synthesized using the extracted depth image and the reference image.
ステレオマッチングでは、ステレオ画像の左画像と右画像とで対応する画素のディスパリティ(disparity)を算出する。このとき、ステレオ画像の左画像と右画像との対応点が同一のスキャンライン上に存在するよう平行化されていることが必要である。 In stereo matching, disparity of corresponding pixels is calculated between the left image and the right image of the stereo image. At this time, it is necessary that the corresponding points of the left image and the right image of the stereo image are parallelized so that they exist on the same scan line.
一般的なステレオマッチングは、マッチングコスト計算及びオプティマイゼーション(最適化)からなる。マッチングコスト計算とは、ステレオ画像において同一のスキャンライン上に存在する基準画像、例えば、左画像の各画素に対する参照画像、例えば、右画像の各画素のマッチングコスト(相違度)を算出することである。オプティマイゼーションとは、基準画像の全画素に対する参照画像とのマッチングコストを小さくしつつ、3D画像が滑らかになるように基準画像と参照画像とにおける各画素の対応付けを行うことである。このオプティマイゼーションを行うことにより、基準画像と参照画像とのミスマッチによるノイズが除去され、良好な3D画像が視認されることができる。 General stereo matching consists of matching cost calculation and optimization (optimization). Matching cost calculation is to calculate a matching cost (difference) of a reference image for each pixel of a left image, for example, a reference image for each pixel of a left image, for example, a right image. is there. The optimization is to associate each pixel in the standard image and the reference image so that the 3D image becomes smooth while reducing the matching cost of the reference image with respect to all the pixels of the standard image. By performing this optimization, noise due to mismatch between the standard image and the reference image is removed, and a good 3D image can be visually recognized.
マッチングコスト計算手法としては、一般的にブロックマッチングが行われ、基準画像と参照画像との対応する所定の領域における輝度の差分の絶対値和(SAD:Sum of Absolute Difference)を用いる方法が知られている。オプティマイゼーション(最適化)手法としては、ダイナミックプログラミング(DP:Dynamic Programming)法、グラフカット(GC:Graph Cut)法、確率伝搬(BP:Belief Propagation)法などによる演算が一般的である。 As a method for calculating the matching cost, generally, block matching is performed, and a method using a sum of absolute differences (SAD) of luminance differences in a predetermined region corresponding to the base image and the reference image is known. ing. As an optimization (optimization) method, operations such as a dynamic programming (DP) method, a graph cut (GC) method, and a probability propagation (BP) method are generally used.
一般的なオプティマイゼーション手法のうち、ダイナミックプログラミング法では、スキャンライン毎に独立して最適化を行うため、オプティマイゼーション後の視認される3D画像に水平方向の筋状のラインノイズが発生する可能性があるとういう問題がある。さらに、ダイナミックプログラミング法では、フレーム毎に最適化を行うため、連続するフレーム間において、ディスパリティの揺らぎが発生する可能性があるという問題もある。グラフカット法及び確立伝搬法は、縦方向と横方向の2次元方向に最適化を行うため、ラインノイズは発生しないが、ダイナミックプログラミング法に比べて演算量が膨大になるという問題がある。 Among general optimization methods, the dynamic programming method performs optimization independently for each scan line, so horizontal line noise may occur in the 3D image that is visible after optimization. There is a problem that there is. Further, in the dynamic programming method, since optimization is performed for each frame, there is a problem that disparity fluctuation may occur between consecutive frames. Since the graph cut method and the established propagation method are optimized in the two-dimensional direction of the vertical direction and the horizontal direction, line noise does not occur, but there is a problem that the calculation amount becomes enormous as compared with the dynamic programming method.
ラインノイズの発生を抑制してラインアーティファクトを改善する方法として、ダイナミックプログラミング法と確率伝搬法とを組み合わせる方法がある(特許文献1)。この方法は、先ず、ダイナミックプログラミング法によって基準画像と参照画像とのディスパリティを算出し、その結果を確率伝搬法による演算の初期値とすることにより、演算量を抑え且つラインアーティファクトを改善する方法である。この方法では、ラインノイズの発生が抑制され、さらに通常の確率伝搬法よりも演算量が低減されるため、演算時間が短縮化される。しかしながら、この方法では、ダイナミックプログラミング法よりも多くの演算時間が必要となる。 As a method of improving the line artifact by suppressing the generation of line noise, there is a method of combining the dynamic programming method and the probability propagation method (Patent Document 1). In this method, first, the disparity between the standard image and the reference image is calculated by the dynamic programming method, and the result is used as the initial value of the calculation by the probability propagation method, thereby reducing the calculation amount and improving the line artifact. It is. In this method, the generation of line noise is suppressed, and the calculation amount is reduced as compared with the normal probability propagation method, so that the calculation time is shortened. However, this method requires more computation time than the dynamic programming method.
さらに、ダイナミックプログラミング法の演算量を低減する方法として、連続するフレーム間で対応する画素の輝度値の差が所定の閾値以下の領域については、前のフレームのディスパリティをそのまま継承して、オプティマイゼーションにおける演算を省略し、さらに、所定のフレームにおいて、互いに隣接するスキャンライン間で対応する画素に輝度値の差が所定の閾値以下の領域については、直上のスキャンラインのディスパリティを継承して、オプティマイゼーションにおける演算を省略する方法がある(特許文献2)。この方法では、オプティマイゼーションにおける演算量が低減されて演算時間が短縮化されるが、連続するフレーム間の変化を輝度値の差分に対する閾値で判定しているため、フレーム間で変化がない画像であっても、サンプリング誤差によってフレーム間で対応する画素の輝度値の差分が前記閾値よりも大きくなってしまった場合、ディスパリティが継承されず、フレーム間におけるディスパリティの揺らぎが発生するという問題がある。また、最初のフレームにおいて、ミスマッチによって誤ったディスパリティが算出された場合、この誤ったディスパリティが以降のフレームでも継承されてしまう虞がある。さらに、互いに隣接するスキャンライン間のディスパリティの継承についても、例えば、画面の上部に位置するスキャンラインにおいて、ミスマッチにより誤ったディスパリティが算出された場合、後に続くスキャンラインでもこの誤ったディスパリティが継承されてしまう虞がある。 Furthermore, as a method for reducing the amount of computation of the dynamic programming method, for regions where the difference in luminance value of corresponding pixels between consecutive frames is less than or equal to a predetermined threshold, the disparity of the previous frame is inherited as it is, and the The calculation in the initialization is omitted, and in the predetermined frame, the disparity of the immediately above scan line is inherited for the area where the difference in luminance value between the adjacent scan lines in the predetermined frame is equal to or less than the predetermined threshold. There is a method of omitting computation in optimization (Patent Document 2). In this method, the amount of computation in optimization is reduced and the computation time is shortened. However, since the change between successive frames is determined by the threshold value for the difference in luminance value, an image with no change between frames can be obtained. Even if there is a difference in luminance value of corresponding pixels between frames due to sampling error, disparity is not inherited and disparity fluctuation between frames occurs. is there. In addition, when an incorrect disparity is calculated due to a mismatch in the first frame, this incorrect disparity may be inherited in subsequent frames. Furthermore, with regard to inheritance of disparity between adjacent scan lines, for example, if an incorrect disparity is calculated due to a mismatch in the scan line located at the top of the screen, this incorrect disparity is also detected in the subsequent scan line. May be inherited.
また、以上に述べたオプティマイゼーション手法以外に、D. Minらの手法がある。この手法では、現フレームの基準画像から前フレームの基準画像へのモーションベクトルと前フレームのディスパリティを利用して現フレームのディスパリティを算出することで、フレーム間のディスパリティの揺らぎを改善するという効果を奏する。しかしながら、D. Minらの手法は、ダイナミックプログラミング法と同様にスキャンライン毎に独立して最適化を行うため、ラインノイズが発生する可能性があるという問題を有し、さらに、基準画像の全画素に対して前フレームとのモーションプロバビリティを求めるため演算量が多くなるという問題を有する。D. Minらの手法については、D. Min, S. Yeo, A Verto, “Temporally Consistent Stereo Matching Using Coherence Function”, Proc. IEEE 3DTV Coherence, Tampere, Finland , June 2010を参照されたい。 In addition to the optimization method described above, there is a method of D. Min et al. This method improves the disparity fluctuation between frames by calculating the disparity of the current frame using the motion vector from the reference image of the current frame to the reference image of the previous frame and the disparity of the previous frame. There is an effect. However, the method of D. Min et al. Has the problem that line noise may occur because optimization is performed independently for each scan line as in the dynamic programming method. There is a problem that the amount of calculation increases because the motion probability of the pixel with the previous frame is obtained. See D. Min, S. Yeo, A Verto, “Temporally Consistent Stereo Matching Using Coherence Function”, Proc. IEEE 3DTV Coherence, Tampere, Finland, June 2010.
本発明は、演算量を抑制しながら、連続するフレーム間におけるディスパリティの揺らぎを低減するステレオ画像処理方法及びステレオ画像処理装置を提供することを目的とする。 An object of the present invention is to provide a stereo image processing method and a stereo image processing apparatus that reduce fluctuations in disparity between consecutive frames while suppressing the amount of calculation.
本発明の一実施形態に係るステレオ画像処理装置は、所定フレームのステレオ画像が入力され、前記ステレオ画像の相違度を算出する相違度演算部と、所定フレームの直前フレームの視差情報に基づいて所定フレームの加重値を算出する加重値演算部と、相違度演算部から供給されたステレオ画像の相違度に加重値演算部から供給された加重値を重み付けする第1のフィルタと、第1のフィルタから供給された加重値によって重み付けされた相違度に基づいて所定フレームの視差情報を算出する最適化部と、最適化部から供給された所定フレームの視差情報を保存し、保存された視差情報を加重値演算部に出力する第1のメモリと、を具備することを特徴とする。 A stereo image processing apparatus according to an embodiment of the present invention receives a stereo image of a predetermined frame, calculates a difference between the stereo images, and performs a predetermined operation based on disparity information of a frame immediately before the predetermined frame. A weight calculation unit for calculating a weight value of the frame, a first filter for weighting the weight value supplied from the weight value calculation unit to the dissimilarity of the stereo image supplied from the difference degree calculation unit, and a first filter An optimization unit that calculates disparity information of a predetermined frame based on the dissimilarity weighted by the weight value supplied from, and stores the disparity information of the predetermined frame supplied from the optimization unit, and stores the stored disparity information And a first memory that outputs to a weight value calculation unit.
本発明の一実施形態に係るステレオ画像処理方法は、所定フレームのステレオ画像が入力され、ステレオ画像の相違度を算出し、直前に算出された視差情報に基づいて所定フレームの加重値を算出し、ステレオ画像の相違度に加重値を重み付けし、加重値によって重み付けされた相違度に基づいて所定フレームの視差情報を算出し、所定フレームの視差情報を保存し、保存された視差情報を次の加重値の算出に用いること、
を含むことを特徴とする。
In the stereo image processing method according to an embodiment of the present invention, a stereo image of a predetermined frame is input, a difference between the stereo images is calculated, and a weight value of the predetermined frame is calculated based on the parallax information calculated immediately before. The weighting value is weighted to the dissimilarity of the stereo image, the disparity information of the predetermined frame is calculated based on the dissimilarity weighted by the weighting value, the disparity information of the predetermined frame is stored, and the stored disparity information is Used to calculate weights,
It is characterized by including.
本発明の一実施形態に係るステレオ画像表示装置は、表示パネルと、ステレオ画像を含む映像信号が入力されるステレオ画像入力部と、ステレオ画像の高さ補正を行い、補正ステレオ画像を生成するステレオ画像平行化部と、補正ステレオ画像のステレオマッチングを行い、前記一方の画像の視差情報を生成するステレオ画像処理装置と、前記一方の画像及び前記視差情報を用いて、視差映像を作成する画像データを生成する視差画像合成部と、画像データを出力するタイミング制御部とを有し、ステレオ画像処理装置は、所定フレームのステレオ画像が入力され、ステレオ画像の相違度を算出する相違度演算部と、所定フレームの直前フレームの視差情報に基づいて所定フレームの加重値を算出する加重値演算部と、相違度演算部から供給されたステレオ画像の相違度に加重値演算部から供給された加重値を重み付けする第1のフィルタと、第1のフィルタから供給された加重値によって重み付けされた相違度に基づいて所定フレームの視差情報を算出する最適化部と、最適化部から供給された所定フレームの視差情報を保存し、保存された視差情報を加重値演算部に出力する第1のメモリと、を具備することを特徴とする。 A stereo image display device according to an embodiment of the present invention includes a display panel, a stereo image input unit to which a video signal including a stereo image is input, and a stereo that performs height correction of the stereo image and generates a corrected stereo image. An image parallelizing unit, a stereo image processing device that performs stereo matching of the corrected stereo image and generates parallax information of the one image, and image data that creates parallax video using the one image and the parallax information A stereo image processing unit, and a timing control unit that outputs image data. The stereo image processing apparatus receives a stereo image of a predetermined frame and calculates a dissimilarity calculation unit. Supplied from a weight value calculation unit that calculates a weight value of a predetermined frame based on disparity information of a frame immediately before the predetermined frame, and a difference degree calculation unit A first filter that weights the weighting value supplied from the weight value calculation unit to the degree of difference between the stereo images, and a disparity of a predetermined frame based on the degree of difference weighted by the weight value supplied from the first filter An optimization unit that calculates information; and a first memory that stores disparity information of a predetermined frame supplied from the optimization unit and outputs the stored disparity information to a weight value calculation unit. And
演算量を抑制しながら、連続するフレーム間におけるディスパリティの揺らぎを低減するステレオ画像処理方法及びステレオ画像処理装置を提供することができる。 It is possible to provide a stereo image processing method and a stereo image processing apparatus that reduce fluctuations in disparity between consecutive frames while suppressing the amount of calculation.
以下、本発明の一実施形態に係るステレオ画像処理装置について、図面を参照しながら説明する。 Hereinafter, a stereo image processing apparatus according to an embodiment of the present invention will be described with reference to the drawings.
(第1の実施形態)
図1は、本発明の一実施形態に係るステレオ画像表示装置100の構成を示すブロック図である。ステレオ画像表示装置100は、ステレオ画像入力部102と、ステレオ画像平行化部104と、ステレオマッチング部106と、視差画像合成部108と、タイミング制御部110とを備える。各構成は、それぞれ、FPGAやASICといったロジック回路により実装される。或いは、CPUやGPUといったプロセッサ、ROM、RAM、これらが組み込まれたシステムLSIにより実装される。
(First embodiment)
FIG. 1 is a block diagram showing a configuration of a stereo image display device 100 according to an embodiment of the present invention. The stereo image display apparatus 100 includes a stereo image input unit 102, a stereo image parallelization unit 104, a stereo matching unit 106, a parallax image synthesis unit 108, and a timing control unit 110. Each component is implemented by a logic circuit such as an FPGA or an ASIC. Alternatively, it is mounted by a processor such as a CPU or GPU, a ROM, a RAM, and a system LSI in which these are incorporated.
ステレオ画像入力部102には、ステレオ画像が入力される。ステレオ画像は2つの画像により構成され、2つの撮影装置でそれぞれ撮影された一方の画像、例えば左画像ILと、他方の画像、例えば、右画像IRから成る。左画像IL及び右画像IRのうちいずれか一方の画像は二次元画像として、他方の画像は該一方の画像とのステレオマッチングによるディスパリティ(視差情報)の抽出のために用いられる。 A stereo image is input to the stereo image input unit 102. The stereo image is composed of two images, and is composed of one image captured by two imaging devices, for example, a left image IL, and the other image, for example, a right image IR. One of the left image IL and the right image IR is used as a two-dimensional image, and the other image is used for extracting disparity (disparity information) by stereo matching with the one image.
ステレオ画像平行化部104は、ステレオ画像入力部102から供給された2つの画像のライン方向の高さを揃える。図2に示すように、ステレオ画像平行化部104は、基準画像、例えば左画像ILにおける代表点を設定し、参照画像、例えば右画像IRにおける該代表点に対応する対応点をブロックマッチング法などにより検出し、基準画像ILの代表点及び参照画像IRの対応点に基づき、基準画像ILと参照画像IRとの高さが一致するように基準画像IL及び参照画像IRのどちらか一方の画像全体について高さ補正、即ち平行化を行う。これにより、基準画像ILと参照画像IRとの高さのズレが解消される。ステレオ画像平行化部104は、高さを補正した基準画像IL及び参照画像IRをステレオマッチング106部に出力する。 The stereo image collimating unit 104 aligns the heights of the two images supplied from the stereo image input unit 102 in the line direction. As shown in FIG. 2, the stereo image collimating unit 104 sets a representative point in the base image, for example, the left image IL, and sets a corresponding point corresponding to the representative point in the reference image, for example, the right image IR, as a block matching method or the like And based on the representative point of the standard image IL and the corresponding point of the reference image IR, the entire image of either the standard image IL or the reference image IR so that the heights of the standard image IL and the reference image IR match. Is subjected to height correction, that is, parallelization. Thereby, the height deviation between the standard image IL and the reference image IR is eliminated. The stereo image collimating unit 104 outputs the standard image IL and the reference image IR whose height has been corrected to the stereo matching unit 106.
ステレオマッチング部106は、ステレオ画像平行化部104により高さ補正が行われたステレオ画像を用いてステレオマッチングを行って、基準画像IL又は参照画像IRのディスパリティ(視差情報)を求め、求めたディスパリティを視差画像合成部108に出力する。ステレオマッチング部106の各構成については後述する。 The stereo matching unit 106 performs stereo matching using the stereo image whose height has been corrected by the stereo image collimating unit 104 to obtain the disparity (parallax information) of the reference image IL or the reference image IR. The disparity is output to the parallax image synthesis unit 108. Each configuration of the stereo matching unit 106 will be described later.
視差画像合成部108は、ステレオマッチング部106から供給されたディスパリティ(視差情報)と該ディスパリティに対応する基準画像IL又は参照画像IRに基づき、多視点の視差画像を表示するための画像データを生成し、タイミング制御部110に出力する。 The parallax image combining unit 108 displays image data for displaying a multi-view parallax image based on the disparity (disparity information) supplied from the stereo matching unit 106 and the standard image IL or the reference image IR corresponding to the disparity. Is output to the timing control unit 110.
タイミング制御部110は、視差画像合成部108から供給された画像データをデータドライバ112に出力する。表示パネル114は、データドライバ112から供給された画像データに基づく画像を表示する。 The timing control unit 110 outputs the image data supplied from the parallax image synthesis unit 108 to the data driver 112. The display panel 114 displays an image based on the image data supplied from the data driver 112.
図3は、ステレオマッチング部106の構成を示すブロック図である。ステレオマッチング部106は、相違度演算部301と、加重値演算部303と、第1のフィルタ305と、最適化部307と、第2のフィルタ309と、第1のメモリ311とを備える。以下、相違度演算部301をマッチングコスト演算部301、第1のフィルタ305をDSIフィルタ305、最適化部307をオプティマイゼーション部307、第2のフィルタ309をディスパリティフィルタ309、第1のメモリ311をディスパリティメモリ311と呼ぶ。 FIG. 3 is a block diagram illustrating a configuration of the stereo matching unit 106. The stereo matching unit 106 includes a dissimilarity calculation unit 301, a weight value calculation unit 303, a first filter 305, an optimization unit 307, a second filter 309, and a first memory 311. Hereinafter, the dissimilarity calculation unit 301 is the matching cost calculation unit 301, the first filter 305 is the DSI filter 305, the optimization unit 307 is the optimization unit 307, the second filter 309 is the disparity filter 309, and the first memory 311. Is called a disparity memory 311.
図4は、図3に示したステレオマッチング部106における処理の流れの一例を示すフロー図である。図3及び図4を参照して、ステレオマッチング部106における処理の流れを簡単に説明する。 FIG. 4 is a flowchart showing an example of the flow of processing in the stereo matching unit 106 shown in FIG. With reference to FIGS. 3 and 4, the flow of processing in the stereo matching unit 106 will be briefly described.
マッチングコスト演算部301は、ステレオ画像平行化部104から供給された高さ補正が行われたt番目フレームの基準画像ILと参照画像IRとのマッチングコスト(相違度)MCtを算出して(S401)DSItを求める。マッチングコストMCtを算出する方法及びDSIについては、後述する。マッチングコスト演算部301は、求めたDSItをDSIフィルタ305に出力する。以下、DSItをマッチングコストDSItともいう。 The matching cost calculation unit 301 calculates a matching cost (difference) MCt between the reference image IR and the reference image IR of the t-th frame subjected to height correction supplied from the stereo image parallelization unit 104 (S401). ) Find DSIT. A method for calculating the matching cost MCt and DSI will be described later. The matching cost calculation unit 301 outputs the obtained DSIt to the DSI filter 305. Hereinafter, DSIt is also referred to as a matching cost DSIt.
加重値演算部303は、ディスパリティメモリから供給された直前フレームであるt−1番目フレームのディスパリティDFt−1を用いて現フレームであるt番目フレームの加重値Wtを算出し(S402)、DSIフィルタ305に出力する。加重値Wtの算出方法は、後述する。ここで、加重値演算部303における加重値の算出(S402)とマッチングコスト演算部301におけるマッチングコストMCtの算出(S401)との順序は逆であっても同時であってもよい。 The weight calculation unit 303 calculates the weight value Wt of the t-th frame that is the current frame using the disparity DFt-1 of the t-1 frame that is the previous frame supplied from the disparity memory (S402). Output to the DSI filter 305. A method for calculating the weight value Wt will be described later. Here, the order of calculation of the weight value in the weight value calculation unit 303 (S402) and calculation of the matching cost MCt in the matching cost calculation unit 301 (S401) may be reversed or simultaneous.
DSIフィルタ305は、マッチングコスト演算部301から供給されたマッチングコストDSItと加重値演算部303から供給された加重値Wtとを乗算して、重み付けされたマッチングコストDSIFtを算出(S403)する。DSIフィルタ305は、重み付けされたマッチングコストDSIFtをオプティマイゼーション部307に出力する。 The DSI filter 305 multiplies the matching cost DSIT supplied from the matching cost calculator 301 by the weight Wt supplied from the weight calculator 303 to calculate a weighted matching cost DSIFt (S403). The DSI filter 305 outputs the weighted matching cost DSIFt to the optimization unit 307.
オプティマイゼーション部307は、一般的なオプティマイゼーション手法を用いてDSIフィルタ305から供給された重み付けされたマッチングコストDSIFtを最適化し、t番目フレームの最適なディスパリティDt(視差情報)を算出する(S404)。オプティマイゼーション手法としては、既知のダイナミックプログラミング法やスキャンラインオプティマイゼーション法などが用いられてもよい。スキャンラインオプティマイゼーション法については、D. Scharstein and R. Szeliski. A taxonomy and evaluation of dense two-frame stereo correspondence algorithms. IJCV, 47(1-3):7-42, 2002.を参照されたい。オプティマイゼーション部307は、求めたt番目フレームのディスパリティDtをディスパリティフィルタ309に出力する。 The optimization unit 307 optimizes the weighted matching cost DSIFt supplied from the DSI filter 305 using a general optimization method, and calculates the optimal disparity Dt (disparity information) of the t-th frame (S404). ). As the optimization method, a known dynamic programming method, scan line optimization method, or the like may be used. For scanline optimization methods, see D. Scharstein and R. Szeliski. A taxonomy and evaluation of dense two-frame stereo correspondence algorithms. IJCV, 47 (1-3): 7-42, 2002. The optimization unit 307 outputs the calculated disparity Dt of the t-th frame to the disparity filter 309.
ディスパリティフィルタ309は、水平方向のノイズを除去するフィルタであって、例えば、平均値フィルタ、中間値フィルタなどが用いられてもよい。ディスパリティフィルタ309は、オプティマイゼーション部307から供給されたディスパリティDtから水平方向のノイズを除去する(S405)。ディスパリティフィルタ309は、水平方向のノイズが除去されたディスパリティDFtを視差画像合成部108及びディスパリティメモリ311に出力する。このディスパリティフィルタ309は、省略されてもよい。また、ディスパリティフィルタ309は、ディスパリティメモリ311の後段に配置されてもよい。 The disparity filter 309 is a filter that removes noise in the horizontal direction. For example, an average value filter, an intermediate value filter, or the like may be used. The disparity filter 309 removes horizontal noise from the disparity Dt supplied from the optimization unit 307 (S405). The disparity filter 309 outputs the disparity DFt from which the horizontal noise has been removed to the parallax image synthesis unit 108 and the disparity memory 311. The disparity filter 309 may be omitted. Further, the disparity filter 309 may be arranged at the subsequent stage of the disparity memory 311.
ディスパリティメモリ311は、ディスパリティフィルタ309から供給されたディスパリティDFtを一時的に保存し(S406)、保存したディスパリティDFtを加重値演算部303に出力する(S407)。ディスパリティメモリ311から出力されたディスパリティDFtは、加重値演算部303においてt+1番目フレームのマッチングコストDSIt+1にかかる加重値Wt+1を算出するために用いられる。ディスパリティフィルタ309が省略された場合、ディスパリティメモリ311は、オプティマイゼーション部307から供給されたディスパリティDtを保存し、ディスパリティDtを加重値演算部303に出力する。ディスパリティフィルタ309がディスパリティメモリ311の後段に配置されている場合、ディスパリティメモリ311から出力されたディスパリティDtは、ディスパリティフィルタ309によって水平方向のノイズを除去された後、加重値演算部303に出力される。 The disparity memory 311 temporarily stores the disparity DFt supplied from the disparity filter 309 (S406), and outputs the stored disparity DFt to the weight value calculation unit 303 (S407). The disparity DFt output from the disparity memory 311 is used by the weight value calculation unit 303 to calculate the weight value Wt + 1 related to the matching cost DSIt + 1 of the t + 1-th frame. When the disparity filter 309 is omitted, the disparity memory 311 stores the disparity Dt supplied from the optimization unit 307 and outputs the disparity Dt to the weight value calculation unit 303. When the disparity filter 309 is arranged at the subsequent stage of the disparity memory 311, the disparity Dt output from the disparity memory 311 is subjected to removal of horizontal noise by the disparity filter 309, and then a weight value calculation unit It is output to 303.
視差画像合成部108は、ディスパリティフィルタ309から供給されたディスパリティDFtに基づき、t番目フレームの多視点の視差画像を表示するための画像データを生成し、タイミング制御部110に出力する。ディスパリティフィルタ309が省略された場合、視差画像合成部108は、オプティマイゼーション部307から供給されたディスパリティDtに基づき、t番目フレームの多視点の視差画像を表示するための画像データを生成し、タイミング制御部110に出力する。 Based on the disparity DFt supplied from the disparity filter 309, the parallax image synthesis unit 108 generates image data for displaying a multi-view parallax image of the t-th frame and outputs the image data to the timing control unit 110. When the disparity filter 309 is omitted, the parallax image synthesis unit 108 generates image data for displaying the multi-view parallax image of the t-th frame based on the disparity Dt supplied from the optimization unit 307. And output to the timing control unit 110.
以下、図5〜図11を参照してステレオマッチング部106の各構成における処理を詳細に説明する。 Hereinafter, processing in each configuration of the stereo matching unit 106 will be described in detail with reference to FIGS.
マッチングコスト演算部
マッチングコスト演算部301は、ステレオ画像平行化部104において高さ補正が行われた基準画像ILと参照画像IRとのマッチングコスト(相違度)MCを算出する。基準画像ILと参照画像IRとのマッチングコストMCは、SAD、SSD、NCC、NSSDによるブロックマッチングなどを用いて求めることができる。ここでは、SADによるブロックマッチングを行って、現フレームであるt番目フレームの基準画像(ここでは左画像)ILtと参照画像(ここでは右画像)IRtとのマッチングコストMCtを算出する。以下では、SADのブロックサイズを1×1と設定した場合の基準画像ILと参照画像IRとのマッチングコストMCtSAD1×1の算出方法を例に挙げて説明する。
Matching Cost Calculation Unit The matching cost calculation unit 301 calculates a matching cost (difference) MC between the standard image IL and the reference image IR that have been subjected to height correction in the stereo image parallelization unit 104. The matching cost MC between the reference image IL and the reference image IR can be obtained using block matching using SAD, SSD, NCC, NSSD, or the like. Here, block matching by SAD is performed, and a matching cost MCt between the standard image (here, the left image) ILt and the reference image (here, the right image) IRt of the t-th frame which is the current frame is calculated. Hereinafter, a method of calculating the matching cost MCt SAD1 × 1 between the base image IL and the reference image IR when the SAD block size is set to 1 × 1 will be described as an example.
マッチングコスト演算部301は、基準画像ILt及び参照画像IRtから互いに対応する同一スキャンライン上の各画素の輝度を取り出す。図5は、SADのブロックサイズを1×1と設定した場合の基準画像ILt及び参照画像IRtの同一スキャンラインから取り出した各画素の輝度の一例を示す。 The matching cost calculation unit 301 extracts the luminance of each pixel on the same scan line corresponding to each other from the standard image ILt and the reference image IRt. FIG. 5 shows an example of the luminance of each pixel extracted from the same scan line of the base image ILt and the reference image IRt when the SAD block size is set to 1 × 1.
次に、マッチングコスト演算部301は、図6(a)に示すように、参照画像IRtの各画素を基準画像ILtの各画素に対して水平方向に1画素ずつずらしながら、即ち、ディスパリティを1つずつずらしながら、基準画像ILt及び参照画像IRtの1画素同士の輝度の差分の絶対値ABSを求める。図6(a)では、一例として、0〜(+)4までのディスパリティにおける輝度の差分の絶対値ABSの算出を示しているが、例えば、ディスパリティが(−)100〜(+)100までの基準画像ILt及び参照画像IRtの1画素同士の輝度の差分の絶対値ABSを算出してもよい。ディスパリティの数値範囲は、表示パネルの解像度や入力映像に応じて適宜変更可能である。尚、ディスパリティを1つずつずらして、基準画像IL及び参照画像IRの各画素の輝度の差分を求める際、基準画像IL及び参照画像IRにおいて対応する画素がない場合は、輝度の差分の絶対値ABSを∞とする。 Next, as shown in FIG. 6A, the matching cost calculation unit 301 shifts each pixel of the reference image IRt by one pixel in the horizontal direction with respect to each pixel of the base image ILt, that is, disparity is changed. The absolute value ABS of the luminance difference between the pixels of the base image ILt and the reference image IRt is obtained while shifting one by one. In FIG. 6A, as an example, the calculation of the absolute value ABS of the luminance difference in the disparity from 0 to (+) 4 is shown. For example, the disparity is (−) 100 to (+) 100. The absolute value ABS of the luminance difference between the pixels of the base image ILt and the reference image IRt up to may be calculated. The numerical range of disparity can be changed as appropriate according to the resolution of the display panel and the input video. When the disparity is shifted one by one and the luminance difference of each pixel of the standard image IL and the reference image IR is obtained, if there is no corresponding pixel in the standard image IL and the reference image IR, the absolute difference of the luminance is calculated. Let the value ABS be ∞.
SADのブロックサイズが1×1である場合、t番目フレームの基準画像ILtと参照画像IRtとのマッチングコストMCtSAD1×1は、基準画像IL及び参照画像IRの各画素を水平方向に1画素ずつずらしながら算出する基準画像IL及び参照画像IRの対応する1画素同士の輝度の差分の絶対値として求める。1画素同士のマッチングコストMC(x,y,d)は以下の式(1)を用いて求めることができる。
ここで、IL(x,y)は、基準画像ILである左側画像の(x,y座標)における輝度を示し、IR(x−d,y)は、参照画像IRである右側画像の(x−d,y座標)における輝度を示す。dは、ディスパリティの数値を示す。
When the block size of the SAD is 1 × 1, the matching cost MCt SAD1 × 1 between the standard image ILt and the reference image IRt of the t-th frame is one pixel in the horizontal direction for each pixel of the standard image IL and the reference image IR. The absolute value of the luminance difference between corresponding pixels of the base image IL and the reference image IR calculated while shifting is obtained. The matching cost MC (x, y, d) between one pixel can be obtained using the following equation (1).
Here, IL (x, y) indicates the luminance in the (x, y coordinate) of the left image that is the base image IL, and IR (x−d, y) indicates (x of the right image that is the reference image IR. -D, y coordinates). d represents a numerical value of disparity.
ここでは、SADブロックサイズを1×1としたが、SADブロックサイズは1×1に限定されず、例えば、3×3ブロック、5×5ブロック、15×15ブロックなど適宜設定することが可能である。所定のSADブロックにおける基準画像IL及び参照画像IRの対応する画素のマッチングコストMCSADI×J(x,y,d)は、基準画像IL及び参照画像IRの所定のSADブロックにおける対応する画素間の輝度の差分の絶対値の総和として、以下の式(2)及び(3)を用いて求める。
ここで、MCSADI×Jは、所定のSADブロックI×Jにおける基準画像IL及び参照画像IRの対応する画素間の輝度の差分の絶対値の総和であり、Wbは、SADブロックのブロックマッチングウィンドウ(Block Matching Window)を示す。例えば、図7に示すように、SADブロックサイズを5×5とした場合、(I,J)=(5,5)である。SADブロックサイズ1×1である場合、t番目フレームの基準画像ILt及び参照画像IRtの対応する画素同士のマッチングコストMCtSAD1×1は、
である。
Here, the SAD block size is 1 × 1, but the SAD block size is not limited to 1 × 1, and for example, 3 × 3 blocks, 5 × 5 blocks, and 15 × 15 blocks can be set as appropriate. is there. The matching cost MC SADI × J (x, y, d) of the corresponding pixels of the standard image IL and the reference image IR in the predetermined SAD block is determined between the corresponding pixels in the predetermined SAD block of the standard image IL and the reference image IR. The sum of absolute values of luminance differences is obtained using the following equations (2) and (3).
Here, MCSADI × J is a sum of absolute values of luminance differences between corresponding pixels of the base image IL and the reference image IR in a predetermined SAD block I × J, and Wb is a block matching window ( Block Matching Window). For example, as shown in FIG. 7, when the SAD block size is 5 × 5, (I, J) = (5, 5). When the SAD block size is 1 × 1, the matching cost MCt SAD1 × 1 between corresponding pixels of the standard image ILt and the reference image IRt of the t-th frame is
It is.
図6(b)は、横軸に基準画像の水平座標x、縦軸にディスパリティdをとって、図6(a)に示したディスパリティが(0)〜(+)4までのt番目フレームの基準画像ILtと参照画像IRtとのマッチングコストMCtSAD1×1、即ち基準画像ILt及び参照画像IRtの1画素同士の輝度の差分を表したものである。図6(b)に示したような、横軸に基準画像の水平座標x、縦軸にディスパリティdをとって、所定のSADブロックにおける基準画像IL及び参照画像IRの対応する画素間の輝度の差分の絶対値の総和を表したものをDSI(Disparity Space Image)と呼ぶ。 In FIG. 6B, the horizontal coordinate x of the reference image is taken on the horizontal axis and the disparity d is taken on the vertical axis, and the t-th disparity shown in FIG. 6A is (0) to (+) 4. This represents the matching cost MCt SAD1 × 1 between the standard image ILt of the frame and the reference image IRt, that is, the luminance difference between the pixels of the standard image ILt and the reference image IRt. As shown in FIG. 6B, the horizontal coordinate x of the reference image is taken on the horizontal axis and the disparity d is taken on the vertical axis, and the luminance between corresponding pixels of the reference image IL and the reference image IR in a predetermined SAD block. The sum of the absolute values of the differences is referred to as DSI (Disparity Space Image).
また、DSIの別の表現として横軸に基準画像の水平座標x、縦軸に参照画像の水平座標x´をとる方法もある。参照画像の水平座標x´は、x´=x−dであり、dはディスパリティの数値である。詳しくは、特開2006−331108号公報を参照されたい。以下では、図6(b)に示したものをDSIとして説明する。 As another representation of DSI, there is a method of taking the horizontal coordinate x of the reference image on the horizontal axis and the horizontal coordinate x ′ of the reference image on the vertical axis. The horizontal coordinate x ′ of the reference image is x ′ = x−d, and d is a numerical value of disparity. For details, refer to JP 2006-331108 A. Below, what is shown in FIG.6 (b) is demonstrated as DSI.
マッチングコスト演算部301は、t番目フレームの基準画像IL及び参照画像IRの所定のSADブロックにおける対応する画素間の輝度の差分の絶対値の総和を基準画像IL及び参照画像IRのマッチングコストMCtSADI×Jとして求めて、求めた基準画像IL及び参照画像IRのマッチングコストMCtSADI×JをDSIで表す。DSIは、基準画像ILの各y座標について、即ち、基準画像ILの1ラインごとにそれぞれ算出される。基準画像ILの各y座標についてのDSIをDSI(y)とする。以下、DSI(y)を基準画像IL及び参照画像IRのマッチングコストDSI(y)ともいう。マッチングコスト演算部301は、マッチングコストDSI(y)をフレーム単位でまとめ、基準画像IL及び参照画像IRのマッチングコスト(相違度)としてDSIフィルタ305に一括して出力する。ここでは、t番目フレームのマッチングコストDSI(y)をフレーム単位でまとめたものをt番目フレームのマッチングコストDSItとする。但し、ASICやFPGAなどハードウェアに実装する際は、処理の並列度を上げるために、基準画像ILの各y座標に対応するマッチングコストDSI(y)を順次出力してもよい。DSItに含まれるDSIの個数は、基準画像ILの垂直幅である。 The matching cost calculation unit 301 calculates the sum of absolute values of luminance differences between corresponding pixels in a predetermined SAD block of the standard image IL and the reference image IR of the t-th frame as a matching cost MCt SADI of the standard image IL and the reference image IR. The obtained matching cost MCt SADI × J of the standard image IL and the reference image IR is obtained by DSI. The DSI is calculated for each y coordinate of the reference image IL, that is, for each line of the reference image IL. Let DSI (y) be the DSI for each y coordinate of the reference image IL. Hereinafter, DSI (y) is also referred to as matching cost DSI (y) between the standard image IL and the reference image IR. The matching cost calculation unit 301 summarizes the matching costs DSI (y) in units of frames, and collectively outputs them to the DSI filter 305 as matching costs (differences) between the standard image IL and the reference image IR. Here, the matching cost DSIt of the t-th frame is a sum of the matching costs DSI (y) of the t-th frame in units of frames. However, when mounting on hardware such as an ASIC or FPGA, the matching cost DSI (y) corresponding to each y coordinate of the reference image IL may be sequentially output in order to increase the parallelism of processing. The number of DSI included in DSIt is the vertical width of the reference image IL.
加重値演算部
加重値演算部303は、ディスパリティメモリ311から供給された現フレームであるt番目フレームの基準画像ILの各y座標に対応するマッチングコストDSI(y)に対応する直前フレームであるt−1番目フレームのディスパリティDFt−1を用いて、t番目フレームの基準画像ILの各y座標に対応するマッチングコストDSI(y)における要素DSI(x,y,d)ごとの加重値W(x,y,d)を算出する。加重値W(x,y,d)は、以下の式(4)から求める。
ここで、α及びσは、実験値から求められる定数であり、dは、t番目フレームのマッチングコストDSI(y)の要素DSI(x,y,d)に対応するディスパリティの数値を示す。また、ディスパリティフィルタ309が省略されている場合は、t番目フレームの基準画像ILの各y座標についてのマッチングコストDSI(y)に対応する、水平方向のノイズが除去されたt−1番目フレームのディスパリティDFt−1に代わって、ディスパリティメモリ311から供給された水平方向のノイズが除去されていないt−1番目フレームのディスパリティDt−1を(式4)に代入すればよい。
The weight value calculation unit weight value calculation unit 303 is a previous frame corresponding to the matching cost DSI (y) corresponding to each y coordinate of the reference image IL of the t-th frame which is the current frame supplied from the disparity memory 311. Using the disparity DFt-1 of the (t-1) th frame, the weight value W for each element DSI (x, y, d) in the matching cost DSI (y) corresponding to each y coordinate of the reference image IL of the tth frame. (X, y, d) is calculated. The weight value W (x, y, d) is obtained from the following equation (4).
Here, α and σ are constants obtained from experimental values, and d indicates a disparity value corresponding to the element DSI (x, y, d) of the matching cost DSI (y) of the t-th frame. When the disparity filter 309 is omitted, the t−1th frame from which the horizontal noise corresponding to the matching cost DSI (y) for each y coordinate of the reference image IL of the tth frame is removed. Instead of the disparity DFt−1, the disparity Dt−1 of the (t−1) th frame from which the horizontal noise supplied from the disparity memory 311 is not removed may be substituted into (Expression 4).
(式4)を参照すると、ディスパリティの数値dが対応する直前フレームのディスパリティDFt−1(x,y)に近い値であるほど、即ち、直前フレームのディスパリティDFt−1(x,y)とディスパリティの数値dとの差分が小さいほど加重値W(x,y,d)の値が小さくなることが分かる。また、ディスパリティの数値dが対応する直前フレームのディスパリティDFt−1(x,y)に遠い値であるほど、即ち、直前フレームのディスパリティDFt−1(x,y)とディスパリティの数値dとの差分が大きいほど加重値W(x,y,d)の値が大きくなることが分かる。加重値演算部303は、(式4)を用いて算出した現フレームの所定のマッチングコストDSI(y)における要素DSI(x,y,d)ごとの加重値W(x,y,d)を全y座標に対応するマッチングコストDSI(y)について算出し、フレーム単位でまとめてt番目フレームの加重値WtとしてDSIフィルタ305に出力する。 Referring to (Equation 4), the closer the disparity value d is to the corresponding disparity DFt-1 (x, y) of the immediately preceding frame, that is, the disparity DFt-1 (x, y) of the immediately preceding frame. ) And the disparity value d is smaller, the smaller the weight value W (x, y, d) is. Further, the disparity value d is a value farther from the corresponding disparity DFt-1 (x, y) of the immediately preceding frame, that is, the disparity DFt-1 (x, y) of the immediately preceding frame and the disparity value. It can be seen that the weighted value W (x, y, d) increases as the difference from d increases. The weight value calculation unit 303 calculates the weight value W (x, y, d) for each element DSI (x, y, d) in the predetermined matching cost DSI (y) of the current frame calculated using (Equation 4). The matching cost DSI (y) corresponding to all y coordinates is calculated, and is output to the DSI filter 305 as a weighted value Wt of the t-th frame collectively in units of frames.
DSIフィルタ
DSIフィルタ305は、マッチングコスト演算部301から供給されたt番目フレームのマッチングコストDSItの所定のマッチングコストDSI(y)の要素DSI(x,y,d)と加重値演算部303から供給された前記所定のマッチングコストDSI(y)の要素DSI(x,y,d)に対応する加重値W(x,y,d)とを乗算して、重み付けされたマッチングコストDSIF(x,y,d)を算出する。
DSIフィルタ305は、t番目フレームのマッチングコストDSItに含まれる所定のマッチングコストDSI(y)の要素DSI(x,y,d)、即ち、t番目フレームの基準画像ILt及び参照画像IRtの所定のy座標において対応する画素間の輝度の差分の絶対値の総和にそれぞれ対応する加重値W(x、y,d)を乗算し、重み付けされた輝度の差分の絶対値の総和を求める。DSIと同様に、横軸に基準画像の水平座標x、縦軸にディスパリティdをとって、基準画像ILt及び参照画像IRtの対応する画素間の重み付けされた輝度の差分の絶対値の総和を表したものをDSIFとする。DSIフィルタ305は、基準画像ILの各y座標のマッチングコストDSI(y)それぞれについてのDSIF(y)を算出する。DSIフィルタ305は、基準画像ILの全y座標について重み付けされたマッチングコストDSIF(y)を算出し、フレーム単位でまとめ、t番目フレームの重み付けされたマッチングコストとしてオプティマイゼーション部307に一括して出力する。ここでは、t番目フレームの基準画像ILの各y座標に対応する重み付けされたマッチングコストDSIF(y)をフレーム単位でまとめたものをt番目フレームの重み付けされたマッチングコストDSIFtとする。但し、ASICやFPGAなどハードウェアに実装する際は、処理の並列度を上げるために、基準画像ILの各y座標に対応する重み付けされたマッチングコストDSIF(y)を順次出力してもよい。 The DSI filter 305 is a predetermined element DSI (x, y, d) of a predetermined matching cost DSI (y) included in the t-th frame matching cost DSIT, that is, a predetermined image of the reference image ILt and the reference image IRt of the t-th frame. The sum of the absolute values of the luminance differences between corresponding pixels in the y coordinate is multiplied by the corresponding weight value W (x, y, d) to obtain the sum of the absolute values of the weighted luminance differences. Similarly to DSI, the horizontal axis x of the standard image is taken on the horizontal axis and the disparity d is taken on the vertical axis, and the sum of absolute values of weighted luminance differences between corresponding pixels of the standard image ILt and the reference image IRt is obtained. The representation is DSIF. The DSI filter 305 calculates DSIF (y) for each matching cost DSI (y) of each y coordinate of the reference image IL. The DSI filter 305 calculates a weighted matching cost DSIF (y) for all y coordinates of the reference image IL, summarizes the results in units of frames, and outputs them collectively to the optimization unit 307 as weighted matching costs for the t-th frame. To do. Here, the weighted matching cost DSIF (y) corresponding to each y coordinate of the reference image IL of the t-th frame is defined as a weighted matching cost DSIFt of the t-th frame. However, when mounting on hardware such as ASIC or FPGA, the weighted matching cost DSIF (y) corresponding to each y coordinate of the reference image IL may be sequentially output in order to increase the degree of parallelism of processing.
例えば、t番目フレームの所定のy座標のマッチングコストDSI(y)の各要素DSI(x,y,d)、即ち、t番目フレームの基準画像ILt及び参照画像IRtの前記所定のy座標の1画素同士の輝度の差分のマッチングコストMCtSAD1×1が図8(a)のDSIに示す数値である場合における、マッチングコストDSI(y)に対する重み付けを説明する。t番目フレームの基準画像ILの所定のy座標のマッチングコストDSI(y)に対応するt−1番目フレームのディスパリティDFt−1(x,y)が図8(b)に示す数値であった場合、図8(b)に示したt−1番目フレームのディスパリティDFt−1(x,y)の数値を順次(式4)に代入する。ここで、定数α=0.5、定数σ=1とすると、前記所定のy座標のマッチングコストDSI(y)の各要素DSI(x,y,d)にかかる加重値は、図8(c)に示した加重値Wの各要素W(x,y,d)が示す数値となる。図8(a)に示した前記所定のy座標のマッチングコストDSI(y)の各要素DSI(x,y,d)の数値と図8(c)に示した加重値Wの各要素W(x,y,d)の数値を(式5)に代入して、t番目フレームの基準画像ILの所定のy座標の重み付けされたマッチングコストDSIF(y)を求める。重み付けされたマッチングコストDSIF(y)の各要素DSIF(x,y,d)の数値は、図8(d)に示すDSIFに示す数値となる。 For example, each element DSI (x, y, d) of the matching cost DSI (y) of a predetermined y coordinate of the t th frame, that is, 1 of the predetermined y coordinate of the base image ILt and the reference image IRt of the t th frame. The weighting for the matching cost DSI (y) in the case where the matching cost MCt SAD1 × 1 of the luminance difference between the pixels is a numerical value indicated by the DSI in FIG. The disparity DFt-1 (x, y) of the t-1th frame corresponding to the matching cost DSI (y) of the predetermined y coordinate of the reference image IL of the tth frame is the numerical value shown in FIG. 8B. In this case, the numerical value of the disparity DFt-1 (x, y) of the t-1st frame shown in FIG. 8B is sequentially substituted into (Expression 4). Here, assuming that constant α = 0.5 and constant σ = 1, the weight values applied to each element DSI (x, y, d) of the matching cost DSI (y) of the predetermined y coordinate are shown in FIG. ) Is a numerical value indicated by each element W (x, y, d) of the weight value W shown in FIG. The numerical value of each element DSI (x, y, d) of the matching cost DSI (y) of the predetermined y coordinate shown in FIG. 8A and each element W () of the weight W shown in FIG. The numerical value of x, y, d) is substituted into (Equation 5) to obtain a weighted matching cost DSIF (y) of a predetermined y coordinate of the reference image IL of the t-th frame. The numerical value of each element DSIF (x, y, d) of the weighted matching cost DSIF (y) is the numerical value shown in DSIF shown in FIG.
このように、DSIフィルタ305は、t番目フレームのマッチングコストDSItに含まれる各y座標に対応するDSI(y)それぞれについて、対応する加重値W(x、y、d)を用いて重み付けし、重み付けされたマッチングコストDSIF(y)を算出する。DSIフィルタ305は、各y座標についてのDSIF(y)をフレーム単位でまとめ、t番目フレームの重み付けされたマッチングコストDSIFtとしてオプティマイゼーション部307に一括して出力する。しかしながら、上述したように、ASICやFPGAなどハードウェアに実装する際は、基準画像の各y座標に対応する重み付けされたマッチングコストDSIF(y)を順次出力してもよい。 As described above, the DSI filter 305 weights each DSI (y) corresponding to each y coordinate included in the matching cost DSIT of the t-th frame using the corresponding weight value W (x, y, d), A weighted matching cost DSIF (y) is calculated. The DSI filter 305 collects DSIF (y) for each y coordinate in units of frames, and collectively outputs to the optimization unit 307 as a weighted matching cost DSIFt of the t-th frame. However, as described above, when mounted on hardware such as an ASIC or FPGA, the weighted matching cost DSIF (y) corresponding to each y coordinate of the reference image may be sequentially output.
図9は、連続するt−1番目フレーム、t番目フレーム、t+1番目フレームにおいてt番目フレームで表示される画像が切り替わった場合の、t−1番目フレーム、t番目フレーム、t+1番目フレームの所定のy座標のマッチングコストDSI(y)、対応する加重値W(x,y、d)、重み付けされたマッチングコストDSIF(y)の一例をイメージで表したものである。 FIG. 9 shows the predetermined t-1 frame, t frame, and t + 1 frame when the images displayed in the t frame in the continuous t-1 frame, t frame, and t + 1 frame are switched. An example of the y-coordinate matching cost DSI (y), the corresponding weight value W (x, y, d), and the weighted matching cost DSIF (y) is shown as an image.
オプティマイゼーション部
オプティマイゼーション部307は、DSIフィルタ305から供給されたt番目フレームの重み付けされたマッチングコストDSIFtを一般的なオプティマイゼーション手法を用いて最適化し、t番目フレームのディスパリティ(視差情報)を算出する。オプティマイゼーション手法としては、既知のダイナミックプログラミング法やスキャンラインオプティマイゼーション法などが用いられてもよい。ここでは、ダイナミックプログラミング法を用いた最適化を例として説明する。
The optimization unit The optimization unit 307 optimizes the weighted matching cost DSIFt of the t-th frame supplied from the DSI filter 305 using a general optimization method, and calculates the disparity (disparity information) of the t-th frame. calculate. As the optimization method, a known dynamic programming method, scan line optimization method, or the like may be used. Here, optimization using a dynamic programming method will be described as an example.
図8(d)に示した重み付けされたマッチングコストDSIF(y)の最適化を例として説明する。オプティマイゼーション部307は、先ず、図8(d)に示した重み付けされたマッチングコストDSIF(y)上の各要素DSIF(x,y,d)に対して隣接する3つの要素DSIF(x−1,y,d)、DSIF(x,y,d+1)、DSIF(x−1,y,d−1)の累積コストACのうち最も小さな数値を要素DSIF(x,y,d)の累積コストAC(x,y,d)として選択する。所定の要素DSIF(x,y,d)をs要素とし、s要素に隣接する3つの要素DSIF(x−1,y,d)、DSIF(x,y,d+1)、DSIF(x−1,y,d−1)をそれぞれa要素、b要素、c要素とすると、s要素とa要素、b要素及びc要素との位置関係は図10に示すとおりである。ここで、最小の累積コストACは、
であり、a要素の累積コストACMch、b要素の累積コストACLocc、c要素の累積コストACRoccは、以下の式(6)から求めることができる。
ここで、koccは定数である。
The optimization of the weighted matching cost DSIF (y) shown in FIG. 8D will be described as an example. First, the optimization unit 307 includes three elements DSIF (x−1) adjacent to each element DSIF (x, y, d) on the weighted matching cost DSIF (y) illustrated in FIG. , Y, d), DSIF (x, y, d + 1), and DSIF (x-1, y, d-1) accumulated cost AC, the smallest numerical value is the accumulated cost AC of element DSIF (x, y, d). Select as (x, y, d). A predetermined element DSIF (x, y, d) is an s element, and three elements DSIF (x-1, y, d), DSIF (x, y, d + 1), DSIF (x-1, x) adjacent to the s element If y, d-1) are a element, b element, and c element, respectively, the positional relationship between the s element and the a element, b element, and c element is as shown in FIG. Here, the minimum accumulated cost AC is
, And the cumulative cost AC Rocc the cumulative cost AC Locc, c component of accumulated cost AC Mch, b elements of a element can be determined from the following equation (6).
Here, k occ is a constant.
オプティマイゼーション部307は、式(6)を用いて基準画像ILの各y座標に対応する重み付けされたマッチングコストDSIF(y)の各要素DSIF(x,y,d)について最小の累積コストAC(x,y,d)を求める。図11は、kocc=2とした場合における、図8(d)に示した所定のy座標に対応する重み付けされたマッチングコストDSIF(y)における各要素DSIF(x,y,d)の累積コストAC(x,y,d)を示す。ここで、xの最大値がx=15である場合、x=15における累積コストが合計コスト(Total cost)となる。この合計コスト(Total cost)が最小となる要素(15,y,d)から左方向(図11において、破線で示す矢印方向)に向かって累積コストACが最小となる要素(x,y,d)を辿る。図11においては、太枠で示した要素(x,y,d)が累積コストACが最小となる要素であり、この太枠で示した要素(x,y,d)に対応するディスパリティdが、対応するDSIF(y)に対する最適なディスパリティDとなる。 The optimization unit 307 uses the expression (6) to calculate the minimum accumulated cost AC () for each element DSIF (x, y, d) of the weighted matching cost DSIF (y) corresponding to each y coordinate of the reference image IL. x, y, d) is obtained. FIG. 11 shows the accumulation of each element DSIF (x, y, d) in the weighted matching cost DSIF (y) corresponding to the predetermined y coordinate shown in FIG. 8 (d) when k occ = 2. The cost AC (x, y, d) is shown. Here, when the maximum value of x is x = 15, the accumulated cost at x = 15 is the total cost. An element (x, y, d) having a minimum accumulated cost AC from the element (15, y, d) having the minimum total cost to the left (in the direction indicated by the broken line in FIG. 11). ). In FIG. 11, the element (x, y, d) indicated by a thick frame is the element having the minimum accumulated cost AC, and the disparity d corresponding to the element (x, y, d) indicated by the thick frame Is the optimal disparity D for the corresponding DSIF (y).
オプティマイゼーション部307は、t番目フレームの基準画像ILの各y座標に対応する重み付けされたマッチングコストDSIF(y)について最適なディスパリティDを算出する。オプティマイゼーション部307は、求めたt番目フレームの基準画像ILの各y座標に対応するDSIF(y)に対する最適なディスパリティDをフレーム単位でまとめ、ディスパリティフィルタ309に一括して出力する。ここでは、t番目フレームの基準画像ILの各y座標に対応するDSIF(y)に対する最適なディスパリティDをフレーム単位でまとめたものをt番目フレームのディスパリティDtとする。 The optimization unit 307 calculates an optimum disparity D for the weighted matching cost DSIF (y) corresponding to each y coordinate of the reference image IL of the t-th frame. The optimization unit 307 collects the optimal disparity D for the DSIF (y) corresponding to each y coordinate of the obtained reference image IL of the t-th frame in units of frames, and outputs to the disparity filter 309 in a lump. Here, the disparity Dt of the t-th frame is the sum of the optimal disparities D for the DSIF (y) corresponding to each y coordinate of the reference image IL of the t-th frame in units of frames.
ディスパリティフィルタ
ディスパリティフィルタ309は、前述したように、水平方向のノイズを除去するフィルタであって、平均値フィルタ、中間値フィルタなどであってもよい。ディスパリティフィルタ309は、オプティマイゼーション部307から供給されたディスパリティDtから水平方向のノイズを除去する。ディスパリティフィルタ309は、水平方向のノイズが除去されたディスパリティDFtを視差画像合成部108及びディスパリティメモリ311に出力する。尚、ディスパリティフィルタ309は、ディスパリティメモリ311の後段に配置されてもよい。また、このディスパリティフィルタ309は、省略されてもよい。
Disparity Filter disparity filter 309, as described above, a filter for removing horizontal noise average filter, it may be a median filter. The disparity filter 309 removes horizontal noise from the disparity Dt supplied from the optimization unit 307. The disparity filter 309 outputs the disparity DFt from which the horizontal noise has been removed to the parallax image synthesis unit 108 and the disparity memory 311. Note that the disparity filter 309 may be arranged at the subsequent stage of the disparity memory 311. Further, the disparity filter 309 may be omitted.
ディスパリティフィルタ309がディスパリティメモリ311の後段に配置されている場合、及びディスパリティフィルタ309が省略されている場合、オプティマイゼーション部307は、t番目フレームのディスパリティDtをディスパリティメモリ311及び視差画像合成部108に出力する。 When the disparity filter 309 is arranged at the subsequent stage of the disparity memory 311 and when the disparity filter 309 is omitted, the optimization unit 307 converts the disparity Dt of the t-th frame into the disparity memory 311 and the disparity The image is output to the image composition unit 108.
ディスパリティメモリ311は、ディスパリティフィルタ309から供給されたディスパリティDFt、若しくはオプティマイゼーション部307から供給されたディスパリティDtを一時的に保存し、保存したディスパリティDFt又はDtを加重値演算部303に出力する。ディスパリティメモリ311から出力されたディスパリティDFt又はDtは、加重値演算部303においてt+1番目フレームのマッチングコストDSIt+1に対する加重値Wt+1を算出するために用いられる。ディスパリティフィルタ309がディスパリティメモリ311の後段に配置されている場合、ディスパリティメモリ311から出力されたディスパリティDtは、ディスパリティフィルタ309により水平方向のノイズが除去された後、加重値演算部303に供給される。 The disparity memory 311 temporarily stores the disparity DFt supplied from the disparity filter 309 or the disparity Dt supplied from the optimization unit 307, and the weighted value calculation unit 303 stores the stored disparity DFt or Dt. Output to. The disparity DFt or Dt output from the disparity memory 311 is used by the weight value calculation unit 303 to calculate the weight value Wt + 1 for the matching cost DSIt + 1 of the t + 1-th frame. When the disparity filter 309 is arranged at the subsequent stage of the disparity memory 311, the disparity Dt output from the disparity memory 311 is a weight value calculation unit after the noise in the horizontal direction is removed by the disparity filter 309. 303.
視差画像合成部108は、t番目フレームの基準画像IL及びディスパリティフィルタ309から供給されたt番目フレームのディスパリティDFtに基づき、t番目フレームの多視点の視差画像を表示するための画像データを生成し、タイミング制御部110に出力する。 The parallax image combining unit 108 displays image data for displaying a multi-view parallax image of the t-th frame based on the reference image IL of the t-th frame and the disparity DFt of the t-th frame supplied from the disparity filter 309. Generate and output to the timing control unit 110.
本発明の一実施形態に係るステレオ画像表示装置100のステレオマッチング部106においては、現フレームの直前フレームで算出したディスパリティを用いて現フレームの加重値を前述の(式4)を用いて算出し、算出した加重値と、現フレームの基準画像ILと参照画像IRとのマッチングコスト(相違度)MC、即ち、基準画像ILと参照画像IRの対応する画素間の輝度の差分の絶対値の総和とを乗算し、現フレームの基準画像ILと参照画像IRとのマッチングコストMCに重み付けし、重み付けした現フレームの基準画像ILと参照画像IRとのマッチングコストに基づいて現フレームのディスパリティを算出する。現フレームの画像と直前フレームの画像とにおいて、画像に大きな変更が無い場合は、現フレームのディスパリティが直前フレームのディスパリティに近いほど現フレームにかかる加重値が小さくなるため、現フレームのディスパリティが直前フレームのディスパリティと同一又は近い値となる。そのため、連続する直前フレームと現フレームとにおけるディスパリティの揺らぎを低減することが可能となる。 In the stereo matching unit 106 of the stereo image display apparatus 100 according to the embodiment of the present invention, the weight value of the current frame is calculated using the above-described (Equation 4) using the disparity calculated in the frame immediately before the current frame. Then, the calculated weight value and the matching cost (difference) MC between the standard image IL and the reference image IR of the current frame, that is, the absolute value of the luminance difference between corresponding pixels of the standard image IL and the reference image IR Multiplying the sum, weighting the matching cost MC between the current frame standard image IL and the reference image IR, and calculating the disparity of the current frame based on the weighted matching cost between the current frame standard image IL and the reference image IR. calculate. If there is no significant change between the current frame image and the previous frame image, the closer the current frame disparity is to the previous frame disparity, the smaller the weight applied to the current frame. The parity is the same as or close to the disparity of the previous frame. Therefore, it is possible to reduce the disparity fluctuation between the immediately preceding frame and the current frame.
本発明の一実施形態に係るステレオ画像表示装置100のステレオマッチング部106において、ディスパリティフィルタ309を設けて、オプティマイゼーション部307から出力されたディスパリティから水平方向のノイズを除去したディスパリティを用いて画像データを生成することにより、所定フレームにおけるラインノイズを低減することができる。同時にノイズが除去されたディスパリティを用いて次のフレームの加重値を算出することにより、現フレームと次フレームとにおけるディスパリティの揺らぎを低減することができるとともに現フレームの水平方向のノイズを低減することができる。 In the stereo matching unit 106 of the stereo image display apparatus 100 according to an embodiment of the present invention, a disparity filter 309 is provided, and disparity obtained by removing horizontal noise from the disparity output from the optimization unit 307 is used. By generating image data in this way, line noise in a predetermined frame can be reduced. At the same time, by calculating the weight of the next frame using the disparity from which noise has been removed, fluctuations in disparity between the current frame and the next frame can be reduced and the horizontal noise of the current frame can be reduced. can do.
以上の説明では、DSIフィルタ305において、所定フレームのマッチングコストDSIに加重値Wを1回のみ重み付けする例を説明したが、マッチングコストDSIに加重値Wを複数回重み付けする構成としてもよい。例えば、1回目の重み付けの場合は、t番目フレームのマッチングコストDSItにかかる第1の加重値Wt1は、ディスパリティメモリ311から供給されたt−1番目フレームのディスパリティDFt−1に基づき加重値演算部303において算出される。しかし、DSIフィルタ305において、t番目フレームのマッチングコストDSIにさらに加重値Wtを重み付けする場合、t番目フレームのマッチングコストDSIにかかる第2の加重値Wt2は、ディスパリティメモリ311から供給されたt番目フレームのディスパリティDFt1に基づき加重値演算部303において算出される。ディスパリティDFt1とは、t番目フレームのマッチングコストDSItに第1の加重値Wt1を重み付けしたt番目フレームのマッチングコストDSIFtから求めたディスパリティである。DSIフィルタ305において、t番目フレームのマッチングコストDSItにさらに加重値Wtを重み付けする場合、t番目フレームのマッチングコストDSItにかかる第3の加重値Wt3は、加重値演算部303においてディスパリティメモリ311から供給されたt番目フレームのディスパリティDFt2に基づき算出される。ディスパリティDFt2とは、t番目フレームのマッチングコストDSItに第2の加重値Wt2を重み付けしたt番目フレームのマッチングコストDSIFtから求めたディスパリティである。このように、所定フレームの基準画像ILのマッチングコストDSIに加重値を複数回重み付けする場合、2回目以降の重み付けで用いる加重値は、直前に算出された前記所定フレームのディスパリティに基づいて算出される。 In the above description, in the DSI filter 305, the weighting value W is weighted only once to the matching cost DSI of a predetermined frame. However, the weighting value W may be weighted to the matching cost DSI multiple times. For example, in the case of the first weighting, the first weight value Wt1 related to the matching cost DSIT of the t-th frame is a weight value based on the disparity DFt-1 of the t-1th frame supplied from the disparity memory 311. Calculated in the calculation unit 303. However, in the DSI filter 305, when the weighting value Wt is further weighted to the matching cost DSI of the t-th frame, the second weighting value Wt2 related to the matching cost DSI of the t-th frame is t from the disparity memory 311. Based on the disparity DFt1 of the th frame, the weight value calculation unit 303 calculates. The disparity DFt1 is a disparity obtained from the matching cost DSIFt of the tth frame obtained by weighting the first weighting value Wt1 to the matching cost DSIT of the tth frame. In the DSI filter 305, when the weighting value Wt is further weighted to the matching cost DSIT of the t-th frame, the third weight value Wt3 related to the matching cost DSIT of the t-th frame is obtained from the disparity memory 311 in the weight value calculation unit 303. It is calculated based on the supplied disparity DFt2 of the t-th frame. The disparity DFt2 is a disparity obtained from the matching cost DSIFt of the t-th frame obtained by weighting the matching weight DSIT of the t-th frame with the second weight value Wt2. As described above, when the weighting value is weighted a plurality of times to the matching cost DSI of the reference image IL of the predetermined frame, the weighting value used in the second and subsequent weighting is calculated based on the disparity of the predetermined frame calculated immediately before. Is done.
ディスパリティメモリ311は、オプティマイゼーション部307又はディスパリティフィルタ309から出力された直前に求めたディスパリティを保存し、保存したディスパリティを加重値演算部303に出力する。 The disparity memory 311 stores the disparity obtained immediately before being output from the optimization unit 307 or the disparity filter 309, and outputs the stored disparity to the weight calculation unit 303.
このように、同一フレームのディスパリティに基づいて加重値Wを更新し、更新した加重値Wを再度同一フレームのマッチングコストDSIに重み付けすることを繰り返すことにより、加重値演算部303において算出される加重値Wが安定し、より適切なディスパリティを算出することが可能となる。同一フレームのDSIに加重値Wを重み付けする回数は、適宜設定することができる。 In this way, the weight value calculation unit 303 calculates the weight value W based on the disparity of the same frame and repeats weighting the updated weight value W to the matching cost DSI of the same frame again. The weight value W is stabilized, and it becomes possible to calculate a more appropriate disparity. The number of times the weight value W is weighted to the DSI of the same frame can be set as appropriate.
(第2の実施形態)
以下、図12乃至図16を参照して、本発明の別の実施形態に係るステレオマッチング部について説明する。
(Second Embodiment)
Hereinafter, a stereo matching unit according to another embodiment of the present invention will be described with reference to FIGS. 12 to 16.
図12は、本発明の別の実施形態に係るステレオマッチング部1006の構成を示すブロック図である。ステレオマッチング部1006は、相違度演算部1201と、加重値演算部1203と、第1のフィルタ1205と、最適化部1207と、第2のフィルタ1209と、第1のメモリ1211と、第2のメモリ1213と、画像データ比較部1215と、フレーム類似性演算部1217と、係数演算部1219とを備える。以下、相違度演算部1201をマッチングコスト演算部1201、第1のフィルタ1205をDSIフィルタ1205、最適化部1207をオプティマイゼーション部1207、第2のフィルタ1209をディスパリティフィルタ1209、第1のメモリ1211をディスパリティメモリ1211、第2のメモリ1213をフレームメモリ1213と呼ぶ。 FIG. 12 is a block diagram showing a configuration of a stereo matching unit 1006 according to another embodiment of the present invention. The stereo matching unit 1006 includes a dissimilarity calculation unit 1201, a weight value calculation unit 1203, a first filter 1205, an optimization unit 1207, a second filter 1209, a first memory 1211, and a second memory A memory 1213, an image data comparison unit 1215, a frame similarity calculation unit 1217, and a coefficient calculation unit 1219 are provided. Hereinafter, the dissimilarity calculation unit 1201 is the matching cost calculation unit 1201, the first filter 1205 is the DSI filter 1205, the optimization unit 1207 is the optimization unit 1207, the second filter 1209 is the disparity filter 1209, and the first memory 1211. Is called a disparity memory 1211, and the second memory 1213 is called a frame memory 1213.
図13は、ステレオマッチング部1006における処理の流れの一例を示すフロー図である。図12及び図13を参照して、ステレオマッチング部のおける処理の流れを簡単に説明する。 FIG. 13 is a flowchart illustrating an example of a processing flow in the stereo matching unit 1006. With reference to FIG.12 and FIG.13, the flow of the process in a stereo matching part is demonstrated easily.
マッチングコスト演算部1201は、ステレオ画像平行化部104から供給された高さ補正が行われたt番目フレームの基準画像ILtと参照画像IRtとのマッチングコスト(相違度)MCtを算出して(S1301)DSItを求める。マッチングコスト演算部1201は、求めたDSItをDSIフィルタ1205に出力する。以下、DSItをマッチングコストDSItともいう。 The matching cost calculation unit 1201 calculates a matching cost (difference) MCt between the reference image IRt and the reference image IRt of the t-th frame subjected to height correction supplied from the stereo image parallelization unit 104 (S1301). ) Find DSIT. The matching cost calculation unit 1201 outputs the obtained DSIt to the DSI filter 1205. Hereinafter, DSIt is also referred to as a matching cost DSIt.
フレームメモリ1213は、ステレオ画像平行化部104から供給された基準画像ILtを一時的に保存し、保存した基準画像ILtを画像データ比較部1215に出力する。 The frame memory 1213 temporarily stores the reference image ILt supplied from the stereo image parallelization unit 104 and outputs the stored reference image ILt to the image data comparison unit 1215.
画像データ比較部1215は、ステレオ画像平行化部104から供給された現フレームであるt番目フレームの基準画像ILtとフレームメモリ1213から供給された直前フレームであるt−1番目フレームの基準画像ILt−1とを比較し、基準画像ILtとt−1番目フレームの基準画像ILt−1とにおける互いに対応する画素同士の輝度の差分DIFFtを算出(S1302)する。画像データ比較部1215は、算出したt番目フレームの基準画像ILtとt−1番目フレームの基準画像ILt−1との対応する画素同士の輝度の差分DIFFtをフレーム類似性演算部1217と係数演算部1219に出力する。 The image data comparison unit 1215 receives the t-th frame reference image ILt that is the current frame supplied from the stereo image parallelization unit 104 and the t−1-th frame reference image ILt− that is the immediately preceding frame supplied from the frame memory 1213. 1 is compared, and a luminance difference DIFFt between corresponding pixels in the reference image ILt and the reference image ILt-1 of the (t-1) th frame is calculated (S1302). The image data comparison unit 1215 uses the frame similarity calculation unit 1217 and the coefficient calculation unit to calculate the luminance difference DIFFt between corresponding pixels of the calculated reference image ILt of the t-th frame and the reference image ILt-1 of the t−1th frame. It outputs to 1219.
フレーム類似性演算部1217は、画像データ比較部1215から供給されたt番目フレームの基準画像ILtとt−1番目フレームの基準画像ILt−1とにおける互いに対応する画素同士の輝度の差分DIFFt基づいてt−1番目フレームとt番目フレームとの類似性を求め(S1303)、類似性SIMtを係数演算部1219に出力する。 The frame similarity calculation unit 1217 is based on the luminance difference DIFFt between pixels corresponding to each other in the reference image ILt of the t-th frame and the reference image ILt-1 of the t−1th frame supplied from the image data comparison unit 1215. The similarity between the (t-1) th frame and the tth frame is obtained (S1303), and the similarity SIMt is output to the coefficient calculation unit 1219.
係数演算部1219は、画像データ比較部1215からの供給されたt番目フレームの基準画像ILtとt−1番目フレームの基準画像ILt−1とにおける互いに対応する画素同士の輝度の差分DIFFtとフレーム類似性演算部1217から供給されたt−1番目フレームとt番目フレームとの類似性SIMtとに基づいて係数σtを算出(S1304)し、算出した係数σtを加重値演算部1203に出力する。 The coefficient calculation unit 1219 obtains the difference DIFFt in luminance between the pixels corresponding to each other in the reference image ILt of the t-th frame and the reference image ILt-1 of the t−1th frame supplied from the image data comparison unit 1215 and the frame similarity. The coefficient σt is calculated based on the similarity SIMt between the t−1th frame and the tth frame supplied from the sex calculation unit 1217 (S1304), and the calculated coefficient σt is output to the weight value calculation unit 1203.
加重値演算部1203は、係数演算部1219から供給された係数σtとディスパリティメモリ1211から供給された直前フレームであるt−1番目フレームのディスパリティDFt−1とを用いて現フレームであるt番目フレームの加重値Wtを算出し(S1305)、DSIフィルタ1205に出力する。 The weight value calculation unit 1203 uses the coefficient σt supplied from the coefficient calculation unit 1219 and the disparity DFt−1 of the t−1th frame, which is the previous frame supplied from the disparity memory 1211, to determine the current frame t. The weight value Wt of the th frame is calculated (S1305) and output to the DSI filter 1205.
ここで、マッチングコスト演算部1201における基準画像ILtと参照画像IRtとのマッチングコスト(相違度)MCtの算出(S1301)と、画像データ比較部1215におけるt番目フレームの基準画像ILtとt−1番目フレームの基準画像ILt−1とにおける互いに対応する画素同士の輝度の差分DIFFtの算出(S1302)、フレーム類似性演算部1217におけるt−1番目フレームとt番目フレームとの類似性の算出(S1303)、係数演算部1219における係数σtの算出(S1304)及び加重値演算部1203におけるt番目フレームの加重値Wtの算出(S1305)との順序は、逆であっても同時であってもよい。 Here, the matching cost (difference) MCt between the standard image ILt and the reference image IRt is calculated in the matching cost calculation unit 1201 (S1301), and the standard image ILt and the t−1th frame in the t-th frame in the image data comparison unit 1215. Calculation of luminance difference DIFFt between mutually corresponding pixels in frame reference image ILt-1 (S1302), and calculation of similarity between t-1th frame and tth frame in frame similarity calculation unit 1217 (S1303) The order of the calculation of the coefficient σt in the coefficient calculation unit 1219 (S1304) and the calculation of the weight value Wt of the t-th frame in the weight value calculation unit 1203 (S1305) may be reversed or simultaneous.
DSIフィルタ1205は、マッチングコスト演算部1201から供給されたマッチングコストDSItと加重値演算部1203から供給された加重値Wtとを乗算して、重み付けされたマッチングコストDSIFtを算出(S1306)する。DSIフィルタ1205は、重み付けされたマッチングコストDSIFtをオプティマイゼーション部1207に出力する。 The DSI filter 1205 multiplies the matching cost DSIt supplied from the matching cost calculation unit 1201 by the weight value Wt supplied from the weight value calculation unit 1203 to calculate a weighted matching cost DSIFt (S1306). The DSI filter 1205 outputs the weighted matching cost DSIFt to the optimization unit 1207.
オプティマイゼーション部1207は、一般的なオプティマイゼーション手法を用いてDSIフィルタ1205から供給された重み付けされたマッチングコストDSIFtを最適化し、t番目フレームの最適なディスパリティDtを算出する(S1307)。オプティマイゼーション手法としては、既知のダイナミックプログラミング法やスキャンラインオプティマイゼーション法などが用いられてもよい。オプティマイゼーション部1207は、求めたt番目フレームのディスパリティDtをディスパリティフィルタ1209に出力する。 The optimization unit 1207 optimizes the weighted matching cost DSIFt supplied from the DSI filter 1205 using a general optimization method, and calculates the optimal disparity Dt of the t-th frame (S1307). As the optimization method, a known dynamic programming method, scan line optimization method, or the like may be used. The optimization unit 1207 outputs the calculated disparity Dt of the t-th frame to the disparity filter 1209.
ディスパリティフィルタ1209は、水平方向のノイズを除去するフィルタであって、平均値フィルタ、中間値フィルタなどが用いられてもよい。ディスパリティフィルタ1209は、オプティマイゼーション部1207から供給されたディスパリティDtから水平方向のノイズを除去する(S1308)。ディスパリティフィルタ1209は、水平方向のノイズが除去されたディスパリティDFtを視差画像合成部108及びディスパリティメモリ1211に出力する。尚、ディスパリティフィルタ1209は、ディスパリティメモリ1211の後段に配置されてもよい。また、このディスパリティフィルタ1209は、省略されてもよい。 The disparity filter 1209 is a filter that removes noise in the horizontal direction, and an average value filter, an intermediate value filter, or the like may be used. The disparity filter 1209 removes horizontal noise from the disparity Dt supplied from the optimization unit 1207 (S1308). The disparity filter 1209 outputs the disparity DFt from which the horizontal noise has been removed to the parallax image synthesis unit 108 and the disparity memory 1211. Note that the disparity filter 1209 may be disposed at a subsequent stage of the disparity memory 1211. Further, the disparity filter 1209 may be omitted.
ディスパリティメモリ1211は、ディスパリティフィルタ1209から供給されたディスパリティDFtを一時的に保存(S1309)し、保存したディスパリティDFtを加重値演算部1203に出力(S1310)する。ディスパリティメモリ1211から出力されたディスパリティDFtは、加重値演算部1203においてt+1番目フレームのマッチングコストDSIt+1にかかる加重値Wt+1を算出するために用いられる。ディスパリティフィルタ1209がディスパリティメモリ1211の後段に配置されている場合、及びディスパリティフィルタ1209が省略された場合、ディスパリティメモリ1211は、オプティマイゼーション部1207から供給されたディスパリティDtを保存する。ディスパリティフィルタ1209がディスパリティメモリ1211の後段に配置されている場合、ディスパリティメモリ1211から出力されたディスパリティDtは、ディスパリティフィルタ1209により水平方向のノイズが除去された後、加重値演算部1203に供給される。 The disparity memory 1211 temporarily stores the disparity DFt supplied from the disparity filter 1209 (S1309), and outputs the stored disparity DFt to the weight value calculation unit 1203 (S1310). The disparity DFt output from the disparity memory 1211 is used by the weight value calculation unit 1203 to calculate the weight value Wt + 1 related to the matching cost DSIt + 1 of the t + 1-th frame. When the disparity filter 1209 is arranged at the subsequent stage of the disparity memory 1211 and when the disparity filter 1209 is omitted, the disparity memory 1211 stores the disparity Dt supplied from the optimization unit 1207. When the disparity filter 1209 is arranged at the subsequent stage of the disparity memory 1211, the disparity Dt output from the disparity memory 1211 is a weight value calculation unit after the noise in the horizontal direction is removed by the disparity filter 1209. 1203.
視差画像合成部108は、ディスパリティフィルタ1209から供給されたディスパリティDFtに基づき、t番目フレームの多視点の視差画像を表示するための画像データを生成し、タイミング制御部110に出力する。ディスパリティフィルタ1209が省略された場合、視差画像合成部108は、オプティマイゼーション部1207から供給されたディスパリティDtに基づき、t番目フレームの多視点の視差画像を表示するための画像データを生成し、タイミング制御部110に出力する。 Based on the disparity DFt supplied from the disparity filter 1209, the parallax image synthesis unit 108 generates image data for displaying a multi-view parallax image of the t-th frame and outputs the image data to the timing control unit 110. When the disparity filter 1209 is omitted, the parallax image synthesis unit 108 generates image data for displaying a multi-view parallax image of the t-th frame based on the disparity Dt supplied from the optimization unit 1207. And output to the timing control unit 110.
以下、図14及び図16を参照してステレオマッチング部1006の各構成における処理を詳細に説明する。但し、ステレオマッチング部1006の構成において、第1の実施形態に係るステレオマッチング部106と同一又は類似の構成については、重複する説明を省略する。 Hereinafter, the processing in each configuration of the stereo matching unit 1006 will be described in detail with reference to FIGS. 14 and 16. However, in the configuration of the stereo matching unit 1006, the same or similar configuration as the stereo matching unit 106 according to the first embodiment is not described repeatedly.
マッチングコスト演算部1201は、第1の実施形態に係るステレオマッチング部106のマッチングコスト演算部301と同一の構成であり、マッチングコスト演算部1201における基準画像ILと参照画像IRとのマッチングコスト(相違度)DSItの算出方法は、第1の実施形態に係るステレオマッチング部106のマッチングコスト演算部301における基準画像ILと参照画像IRとのマッチングコスト(相違度)DSItの算出方法と同様であるため、ここでの説明は省略する。 The matching cost calculation unit 1201 has the same configuration as the matching cost calculation unit 301 of the stereo matching unit 106 according to the first embodiment, and the matching cost (difference) between the reference image IL and the reference image IR in the matching cost calculation unit 1201. The calculation method of DSIt is similar to the calculation method of the matching cost (difference) DSIT between the base image IL and the reference image IR in the matching cost calculation unit 301 of the stereo matching unit 106 according to the first embodiment. Explanation here is omitted.
フレームメモリ
フレームメモリ1213は、ステレオ画像平行化部104から供給された基準画像(ここでは左画像)ILを一時的に保存し、保存した基準画像ILを画像データ比較部1215に出力する。ステレオマッチング部1006において、現フレームであるt番目フレームのディスパリティを算出する際、フレームメモリ1213は、保存されていた直前フレームであるt−1番目の基準画像ILt−1を画像データ比較部1215に出力する。
The frame memory frame memory 1213 temporarily stores the reference image (here, the left image) IL supplied from the stereo image parallelization unit 104, and outputs the stored reference image IL to the image data comparison unit 1215. When the stereo matching unit 1006 calculates the disparity of the t-th frame that is the current frame, the frame memory 1213 uses the t-1th reference image ILt-1 that is the previous frame stored as the image data comparison unit 1215. Output to.
画像データ比較部
画像データ比較部1215は、ステレオ画像平行化部104から供給された現フレームであるt番目フレームの基準画像ILtとフレームメモリ1213から供給された直前フレームであるt−1番目フレームの基準画像ILt−1とを比較し、基準画像ILt及び基準画像ILt−1における互いに対応する画素同士の輝度の差分DIFFtを算出する。画像データ比較部1215は、算出したt番目フレームの基準画像ILtとt−1番目フレームの基準画像ILt−1との対応する画素同士の輝度の差分DIFFtをフレーム類似性演算部1217と係数演算部1219に出力する。
Image data comparison unit The image data comparison unit 1215 receives the t-th frame reference image ILt that is the current frame supplied from the stereo image parallelization unit 104 and the t−1-th frame that is the previous frame supplied from the frame memory 1213. The reference image ILt-1 is compared, and a luminance difference DIFFt between pixels corresponding to each other in the reference image ILt and the reference image ILt-1 is calculated. The image data comparison unit 1215 uses the frame similarity calculation unit 1217 and the coefficient calculation unit to calculate the luminance difference DIFFt between corresponding pixels of the calculated reference image ILt of the t-th frame and the reference image ILt-1 of the t−1th frame. It outputs to 1219.
図14は、画像データ比較部1215の構成を示したブロック図である。画像データ比較部1215は、フィルタ1401a、1401b及び差分演算部1403を含む。フィルタ1401a、1401bは、平均値フィルタなどであってもよく、t番目フレームの基準画像ILt及びt−1番目フレームの基準画像ILt−1のそれぞれからノイズを除去し、ノイズが除去されたt番目フレームの基準画像ILFt及びt−1番目フレームの基準画像ILFt−1をそれぞれ差分演算部1403に出力する。 FIG. 14 is a block diagram showing the configuration of the image data comparison unit 1215. The image data comparison unit 1215 includes filters 1401a and 1401b and a difference calculation unit 1403. The filters 1401a and 1401b may be average value filters or the like, and remove noise from each of the reference image ILt of the t-th frame and the reference image ILt-1 of the t−1th frame, and the tth from which the noise has been removed. The reference image ILFt of the frame and the reference image ILFt-1 of the (t−1) th frame are output to the difference calculation unit 1403.
差分演算部1403は、以下の(式7)を用いて基準画像ILFt及び基準画像ILFt−1における互いに対応する画素同士の輝度の差分DIFFtを算出する。
ここで、DIFFt(x,y)は、基準画像ILFt−1の(x,y座標)と基準画像ILFt−1の(x,y座標)との相違性であり、ILFt−1(x,y)は、基準画像ILFt−1の(x,y座標)における輝度を示し、ILFt(x,y)は、基準画像ILFtの(x,y座標)における輝度を示し、Imaxは、基準画像ILFの輝度の最大値を示す。差分演算部1403は、(式7)を用いて算出した基準画像ILt及び基準画像ILt−1の互いに対応する画素同士の輝度の差分DIFFtをフレーム類似性演算部1217及び係数演算部1219に出力する。
The difference calculation unit 1403 calculates a luminance difference DIFFt between pixels corresponding to each other in the reference image ILFt and the reference image ILFt−1 using the following (Expression 7).
Here, DIFFt (x, y) is the difference between the (x, y coordinates) of the reference image ILFt-1 and the (x, y coordinates) of the reference image ILFt-1, and ILF t-1 (x, y). y) indicates the luminance at (x, y coordinates) of the reference image ILFt-1, ILF t (x, y) indicates the luminance at (x, y coordinates) of the reference image ILFt, and Imax indicates the reference image. The maximum value of ILF luminance is shown. The difference calculation unit 1403 outputs the luminance difference DIFFt between the corresponding pixels of the reference image ILt and the reference image ILt−1 calculated using (Expression 7) to the frame similarity calculation unit 1217 and the coefficient calculation unit 1219. .
フレーム類似性演算部
フレーム類似性演算部1217は、画像データ比較部1215の差分演算部1403から供給されたt番目フレームの基準画像ILFtとt−1番目フレームの基準画像ILFt−1とにおける互いに対応する画素同士の輝度の差分DIFFtに基づいてt−1番目フレームとt番目フレームとの類似性SIMtを求める。フレーム類似性演算部1217は、以下の(式8)を用いてt−1番目フレームとt番目フレームとの類似性SIMtを求める。
ここで、αは定数であり、X,Yは、入力された基準画像ILの水平幅、垂直幅をそれぞれ示す。フレーム類似性演算部1217は、算出したt−1番目フレームとt番目フレームとの類似性SIMtを係数演算部1219に出力する。
Frame similarity calculation unit The frame similarity calculation unit 1217 corresponds to each other in the reference image ILFt of the t-th frame and the reference image ILFt-1 of the t-1 frame supplied from the difference calculation unit 1403 of the image data comparison unit 1215. The similarity SIMt between the t−1th frame and the tth frame is obtained based on the luminance difference DIFFt between the pixels to be processed. The frame similarity calculation unit 1217 obtains the similarity SIMt between the t−1th frame and the tth frame using the following (Equation 8).
Here, α is a constant, and X and Y indicate the horizontal width and vertical width of the input reference image IL, respectively. The frame similarity calculation unit 1217 outputs the calculated similarity SIMt between the t−1th frame and the tth frame to the coefficient calculation unit 1219.
係数演算部
係数演算部1219は、画像データ比較部1215からの供給されたt番目フレームの基準画像ILFtとt−1番目フレームの基準画像ILFt−1とにおける互いに対応する画素同士の輝度の差分DIFFtとフレーム類似性演算部1217から供給されたt−1番目フレームとt番目フレームとの類似性SIMtとに基づいて係数σtを算出(S1304)し、求めた係数σtを加重値演算部1203に出力する。係数演算部1219は、以下の(式9)及び(式10)を用いて係数σtを求める。
ここで、σ0、σ1は定数であり、σ0>σ1である。σ0、σ1の関係は、図15に示すとおりである。係数演算部1219は、算出した係数σtを加重値演算部1203に出力する。
Coefficient calculation unit The coefficient calculation unit 1219 is a luminance difference DIFFt between pixels corresponding to each other in the reference image ILFt of the t-th frame and the reference image ILFt-1 of the t−1th frame supplied from the image data comparison unit 1215. The coefficient σt is calculated based on the similarity SIMt between the t−1th frame and the tth frame supplied from the frame similarity calculation unit 1217 (S1304), and the obtained coefficient σt is output to the weight value calculation unit 1203. To do. The coefficient calculation unit 1219 obtains the coefficient σt using the following (Expression 9) and (Expression 10).
Here, σ 0 and σ 1 are constants, and σ 0 > σ 1 . The relationship between σ 0 and σ 1 is as shown in FIG. The coefficient calculation unit 1219 outputs the calculated coefficient σt to the weight value calculation unit 1203.
加重値演算部1203は、係数演算部1219から供給された係数σtと、ディスパリティメモリ1211から供給された現フレームであるt番目フレームの基準画像ILの各y座標に対応するマッチングコストDSI(y)に対応する直前フレームであるt−1番目フレームのディスパリティDFt−1を用いて、t番目フレームの基準画像ILの各y座標に対応するマッチングコストDSI(y)の要素DSI(x,y,d)ごとの加重値W(x,y,d)を算出する。加重値W(x,y,d)は、以下の式(11)から求める。
ここで、αは、実験値から求められる定数であり、dは、t番目フレームのマッチングコストDSI(y)の要素DSI(x,y,d)に対応するディスパリティの数値を示す。ディスパリティフィルタ1209が省略されている場合は、t番目フレームの各y座標のDSI(y)に対応する、水平方向のノイズが除去されたt−1番目フレームのディスパリティDFt−1に代わって、ディスパリティメモリ1211から供給された水平方向のノイズが除去されていないt−1番目フレームのディスパリティDt−1を(式11)に代入すればよい。
The weight calculation unit 1203 matches the coefficient σt supplied from the coefficient calculation unit 1219 and the matching cost DSI (y) corresponding to each y coordinate of the reference image IL of the t-th frame which is the current frame supplied from the disparity memory 1211. ), The element DSI (x, y) of the matching cost DSI (y) corresponding to each y coordinate of the reference image IL of the tth frame, using the disparity DFt-1 of the t−1th frame which is the immediately preceding frame corresponding to , D), the weight value W (x, y, d) is calculated. The weight value W (x, y, d) is obtained from the following equation (11).
Here, α is a constant obtained from experimental values, and d indicates a disparity value corresponding to the element DSI (x, y, d) of the matching cost DSI (y) of the t-th frame. When the disparity filter 1209 is omitted, instead of the disparity DFt-1 of the (t-1) th frame from which the horizontal noise is removed, corresponding to the DSI (y) of each y coordinate of the tth frame. The disparity Dt-1 of the (t-1) th frame from which the horizontal noise is not removed supplied from the disparity memory 1211 may be substituted into (Equation 11).
(式11)を参照すると、ディスパリティの数値dが現フレームの各マッチングコストDSIに対応する直前フレームのディスパリティDFt−1(x,y)に近い値であるほど、即ち、直前フレームのディスパリティDFt−1(x,y)とディスパリティの数値dとの差分が小さいほど加重値W(x,y,d)の値が小さくなることが分かる。また、ディスパリティの数値dが現フレームの各マッチングコストDSIに対応する直前フレームのディスパリティDFt−1(x,y)に遠い値であるほど、即ち、直前フレームのディスパリティDFt−1(x,y)とディスパリティの数値dとの差分が大きいほど加重値W(x,y,d)の値が大きくなることが分かる。 Referring to (Equation 11), the closer the disparity value d is to the disparity DFt-1 (x, y) of the immediately preceding frame corresponding to each matching cost DSI of the current frame, that is, the disparity of the immediately preceding frame. It can be seen that the smaller the difference between the parity DFt-1 (x, y) and the disparity value d, the smaller the value of the weight value W (x, y, d). Further, the disparity value d is farther from the disparity DFt-1 (x, y) of the immediately preceding frame corresponding to each matching cost DSI of the current frame, that is, the disparity DFt-1 (x of the immediately preceding frame). , Y) and the value of the disparity value d increase, the weight value W (x, y, d) increases.
図16は、以下に示す(式12)において、一例として定数α=0.5とし、σ=2及びσ=10を代入した場合における加重値Wを示すグラフである。ここでは、縦軸に加重値W、横軸に直前フレームのディスパリティDFt−1(x,y)とディスパリティの数値dとの差分Δdを示している。図16において、σ=2を代入したときの加重値Wを曲線1601で示し、σ=10を代入したときの加重値Wを曲線1602で示した。
(式12)において、ΔdはDFt−1(x,y)−dの値を示す。図16の曲線1601に示すとおり、係数σtの値が小さいほど、即ち、t番目フレームとt−1番目フレームとの類似性が高いほど加重値W(x,y,d)の値が直前フレームのディスパリティDFt−1(x,y)との差分0を中心としたピークの幅が小さくなることが分かる。加重値演算部1203は、(式11)を用いて算出した現フレームの所定のマッチングコストDSI(y)における要素DSI(x,y,d)ごとの加重値W(x,y,d)をフレーム単位でまとめてt番目フレームの加重値WtとしてDSIフィルタ1205に出力する。
FIG. 16 is a graph showing the weight value W when (constant 12) shown below is set to a constant α = 0.5 and σ = 2 and σ = 10 are substituted as an example. Here, the vertical axis represents the weight value W, and the horizontal axis represents the difference Δd between the disparity DFt-1 (x, y) of the immediately preceding frame and the disparity value d. In FIG. 16, the weight value W when σ = 2 is substituted is shown by a curve 1601, and the weight value W when σ = 10 is substituted is shown by a curve 1602.
In (Expression 12), Δd represents the value of DFt−1 (x, y) −d. As indicated by a curve 1601 in FIG. 16, the smaller the value of the coefficient σt, that is, the higher the similarity between the t-th frame and the t−1-th frame, the more the weight value W (x, y, d) is the previous frame. It can be seen that the peak width centered on the difference 0 from the disparity DFt-1 (x, y) is small. The weight value calculation unit 1203 calculates the weight value W (x, y, d) for each element DSI (x, y, d) in the predetermined matching cost DSI (y) of the current frame calculated using (Equation 11). Collectively in units of frames, output to the DSI filter 1205 as the weight value Wt of the t-th frame.
DSIフィルタ
DSIフィルタ1205では、マッチングコスト演算部1201から供給されたt番目フレームのマッチングコストDSItの所定のマッチングコストDSI(y)の要素DSI(x,y,d)と加重値演算部1203から供給された所定のマッチングコストDSI(y)の要素DSI(x,y,d)に対応する加重値W(x、y,d)とを乗算して、重み付けされたマッチングコストDSIF(y)を算出する。DSIフィルタ1205は、算出した重み付けされたマッチングコストDSIF(y)をオプティマイゼーション部1207に出力する。DSIフィルタ1205における所定のマッチングコストDSI(y)と対応する加重値W(x、y,d)との乗算式は、第1の実施形態に係るステレオマッチング部106のDSIフィルタ305の説明において述べた(式5)と同一である。
DSIフィルタ1205は、t番目フレームのマッチングコストDSItに含まれる所定のマッチングコストDSI(x,y,d)の要素DSI(x,y,d)、即ち、t番目フレームの基準画像ILt及び参照画像IRtの所定のy座標において対応する画素間の輝度の差分の絶対値の総和にそれぞれ対応する加重値W(x、y,d)を乗算し、重み付けされた輝度の差分の絶対値の総和を求める。DSIフィルタ1205は、横軸に基準画像の水平座標x、縦軸にディスパリティdをとって、基準画像IL及び参照画像IRの対応する画素間の重み付けされた輝度の差分の絶対値の総和を表したDSIFをt番目フレームの基準画像ILの各y座標に対応するマッチングコストDSI(y)ごとに算出する。DSIフィルタ1205は、t番目フレームの基準画像ILの各y座標に対応する重み付けされたマッチングコストDSIF(y)をフレーム単位でまとめ、t番目フレームの重み付けされたマッチングコストDSIFtとしてオプティマイゼーション部1207に一括して出力する。ここで、ASICやFPGAなどハードウェアに実装する際は、処理の並列度を上げるために、基準画像ILの各y座標に対応する重み付けされたマッチングコストDSIF(y)を順次出力してもよい。 The DSI filter 1205 includes an element DSI (x, y, d) of a predetermined matching cost DSI (x, y, d) included in the matching cost DSIt of the t-th frame, that is, the reference image ILt and the reference image of the t-th frame. The sum of the absolute values of the luminance differences between the corresponding pixels at a predetermined y coordinate of IRt is multiplied by the corresponding weight value W (x, y, d), and the sum of the absolute values of the weighted luminance differences is obtained. Ask. The DSI filter 1205 takes the horizontal coordinate x of the reference image on the horizontal axis and the disparity d on the vertical axis, and calculates the sum of the absolute values of the weighted luminance differences between the corresponding pixels of the reference image IL and the reference image IR. The represented DSIF is calculated for each matching cost DSI (y) corresponding to each y coordinate of the reference image IL of the t-th frame. The DSI filter 1205 collects the weighted matching cost DSIF (y) corresponding to each y coordinate of the reference image IL of the t-th frame in units of frames, and sends it to the optimization unit 1207 as the weighted matching cost DSIFt of the t-th frame. Output all at once. Here, when mounting on hardware such as ASIC or FPGA, weighted matching costs DSIF (y) corresponding to each y coordinate of the reference image IL may be sequentially output in order to increase the degree of parallelism of processing. .
オプティマイゼーション部1207、ディスパリティフィルタ1209、ディスパリティメモリ1211の構成及び各構成における処理については、第1の実施形態に係るステレオマッチング部106におけるオプティマイゼーション部307、ディスパリティフィルタ309、ディスパリティメモリ311と同様であるため、ここでは説明を省略する。 Regarding the configuration of the optimization unit 1207, the disparity filter 1209, and the disparity memory 1211 and the processing in each configuration, the optimization unit 307, the disparity filter 309, and the disparity memory 311 in the stereo matching unit 106 according to the first embodiment. Therefore, the description is omitted here.
本発明の一実施形態に係るステレオ画像表示装置100のステレオマッチング部1006においては、現フレームと直前フレームとの類似性に基づく係数σを(式7)乃至(式10)を用いて算出し、係数σと現フレームの直前フレームのディスパリティとを用いて現フレームの加重値を前述の(式11)を用いて算出し、算出した加重値と、現フレームの基準画像と参照画像とのマッチングコスト(相違度)MC、即ち、基準画像IL及び参照画像IRの対応する画素間の輝度の差分の絶対値の総和とを乗算し、現フレームの基準画像ILと参照画像IRとのマッチングコストMCに重み付けし、重み付けした現フレームの基準画像と参照画像とのマッチングコストに基づいて現フレームのディスパリティを算出する。現フレームの画像と直前フレームの画像とにおいて、画像に大きな変更が無い場合は、現フレームのディスパリティが直前フレームのディスパリティに近いほど現フレームにかかる加重値が小さくなるため、現フレームのディスパリティが直前フレームのディスパリティと同一又は近い値となる。また、現フレームの画像と直前フレームの画像との全体的な類似性が高い場合、現フレームのディスパリティが直前フレームのディスパリティに近いほど現フレームにかかる加重値が小さくなるため、現フレームのディスパリティが直前フレームのディスパリティと同一又はより近い値となる。そのため、連続する直前フレームと現フレームとにおけるディスパリティの揺らぎを低減することが可能となる。 In the stereo matching unit 1006 of the stereo image display apparatus 100 according to the embodiment of the present invention, the coefficient σ based on the similarity between the current frame and the previous frame is calculated using (Expression 7) to (Expression 10), The weight value of the current frame is calculated using the above-described (Equation 11) using the coefficient σ and the disparity of the frame immediately before the current frame, and the calculated weight value is matched with the reference image and the reference image of the current frame Multiplying the cost (difference) MC, that is, the sum of absolute values of the luminance differences between corresponding pixels of the base image IL and the reference image IR, and the matching cost MC between the base image IL and the reference image IR of the current frame And the disparity of the current frame is calculated based on the matching cost between the weighted standard image of the current frame and the reference image. If there is no significant change between the current frame image and the previous frame image, the closer the current frame disparity is to the previous frame disparity, the smaller the weight applied to the current frame. The parity is the same as or close to the disparity of the previous frame. Also, if the overall similarity between the current frame image and the previous frame image is high, the closer the disparity of the current frame is to the disparity of the previous frame, the smaller the weight applied to the current frame. The disparity is equal to or closer to the disparity of the previous frame. Therefore, it is possible to reduce the disparity fluctuation between the immediately preceding frame and the current frame.
本発明の一実施形態に係るステレオ画像表示装置100のステレオマッチング部1006において、ディスパリティフィルタ1209を設けて、オプティマイゼーション部1207から出力されたディスパリティから水平方向のノイズを除去したディスパリティを用いて画像データを生成することにより、所定フレームにおけるラインノイズを低減することができる。同時にノイズが除去されたディスパリティを用いて次のフレームの加重値を算出することにより、現フレームと次フレームとにおけるディスパリティの揺らぎを低減することができるとともに現フレームの水平方向のノイズを低減することができる。 In the stereo matching unit 1006 of the stereo image display apparatus 100 according to an embodiment of the present invention, a disparity filter 1209 is provided, and disparity obtained by removing horizontal noise from the disparity output from the optimization unit 1207 is used. By generating image data in this way, line noise in a predetermined frame can be reduced. At the same time, by calculating the weight of the next frame using the disparity from which noise has been removed, fluctuations in disparity between the current frame and the next frame can be reduced and the horizontal noise of the current frame can be reduced. can do.
以上の説明では、DSIフィルタ1205において、所定フレームのマッチングコストDSIに加重値Wを1回のみ重み付けする例を説明したが、第1の実施形態に係るステレオマッチング部106の説明において述べたように、所定フレームのマッチングコストDSIに加重値Wを複数回重み付けする構成としてもよい。ステレオマッチング部1006において、同一フレームのディスパリティを算出する処理をしている間、ディスパリティメモリ1211は、オプティマイゼーション部1207又はディスパリティフィルタ1209から出力された直前に求めたディスパリティを保存し、保存したディスパリティを加重値演算部1203に出力する。 In the above description, the example in which the weighting value W is weighted only once to the matching cost DSI of the predetermined frame in the DSI filter 1205 has been described, but as described in the description of the stereo matching unit 106 according to the first embodiment. The weighting value W may be weighted a plurality of times to the matching cost DSI of a predetermined frame. During the process of calculating the disparity of the same frame in the stereo matching unit 1006, the disparity memory 1211 stores the disparity obtained immediately before being output from the optimization unit 1207 or the disparity filter 1209, The stored disparity is output to the weight value calculation unit 1203.
このように、同一フレームのディスパリティに基づいて加重値Wを更新し、更新した加重値Wを再度同一フレームのマッチングコストDSIに重み付けすることを繰り返すことにより、加重値演算部1203において算出される加重値Wが安定し、より適切なディスパリティを算出することが可能となる。同一フレームのマッチングコストDSIに加重値Wを重み付けする回数は、適宜設定することができる。 In this manner, the weight value calculation unit 1203 calculates the weight value W based on the disparity of the same frame and repeats the weighting of the updated weight value W to the matching cost DSI of the same frame again. The weight value W is stabilized, and it becomes possible to calculate a more appropriate disparity. The number of times the weighting value W is weighted to the matching cost DSI of the same frame can be set as appropriate.
100 ステレオ画像表示装置
102 ステレオ画像入力部
104 ステレオ画像平行化部
106 ステレオマッチング部
108 視差画像合成部
110 タイミング制御部
301 相違度演算部(マッチングコスト演算部)
303 加重値演算部
305 第1のフィルタ(DSIフィルタ)
307 最適化部(オプティマイゼーション部)
309 第2のフィルタ(ディスパリティフィルタ)
311 第1のメモリ(ディスパリティメモリ)
DESCRIPTION OF SYMBOLS 100 Stereo image display apparatus 102 Stereo image input part 104 Stereo image parallelizing part 106 Stereo matching part 108 Parallax image synthetic | combination part 110 Timing control part 301 Dissimilarity calculating part (matching cost calculating part)
303 Weight calculation unit 305 First filter (DSI filter)
307 Optimization section (optimization section)
309 Second filter (disparity filter)
311 First memory (disparity memory)
Claims (18)
前記所定フレームの直前フレームの視差情報に基づいて前記所定フレームの加重値を算出する加重値演算部と、
前記相違度演算部から供給された前記ステレオ画像の相違度に前記加重値演算部から供給された前記加重値を重み付けする第1のフィルタと、
前記第1のフィルタから供給された前記加重値によって重み付けされた相違度に基づいて前記所定フレームの視差情報を算出する最適化部と、
前記最適化部から供給された前記所定フレームの視差情報を保存し、保存された前記視差情報を前記加重値演算部に出力する第1のメモリと、
を具備するステレオ画像処理装置。 A stereo image of a predetermined frame is input, and a dissimilarity calculation unit that calculates the dissimilarity of the stereo image;
A weight value calculator that calculates a weight value of the predetermined frame based on disparity information of a frame immediately before the predetermined frame;
A first filter that weights the weight value supplied from the weight value calculation unit to the difference degree of the stereo image supplied from the difference value calculation unit;
An optimization unit that calculates disparity information of the predetermined frame based on a difference weighted by the weight value supplied from the first filter;
A first memory that stores the disparity information of the predetermined frame supplied from the optimization unit and outputs the stored disparity information to the weight calculation unit;
A stereo image processing apparatus comprising:
前記所定フレームのステレオ画像のうち、前記第2メモリに保存された画像データに対応する基準画像又は参照画像のいずれか一方の画像データが入力され、前記第2のメモリから供給された前記直前フレームの画像データと前記所定フレームの画像データとを対応する画素ごとに比較する画像データ比較部と、をさらに具備し、
前記加重値演算部は、前記画像データ比較部からの比較結果に基づいて前記所定フレームの加重値を算出することを特徴とする請求項1乃至3のいずれか一項に記載のステレオ画像処理装置。 A second memory for storing image data of either a standard image or a reference image among the stereo images immediately before the predetermined frame;
Of the stereo image of the predetermined frame, the image data of either the standard image or the reference image corresponding to the image data stored in the second memory is input, and the immediately preceding frame supplied from the second memory An image data comparison unit that compares the image data of the predetermined frame and the image data of the predetermined frame for each corresponding pixel,
4. The stereo image processing apparatus according to claim 1, wherein the weight calculation unit calculates a weight value of the predetermined frame based on a comparison result from the image data comparison unit. 5. .
前記加重値演算部は、前記フレーム類似性演算部からの比較結果に基づいて前記所定フレームの加重値を算出することを特徴とする請求項4又は5に記載のステレオ画像処理装置。 A frame similarity calculation unit for determining similarity between the immediately preceding frame and the predetermined frame;
The stereo image processing apparatus according to claim 4 or 5, wherein the weight calculation unit calculates a weight value of the predetermined frame based on a comparison result from the frame similarity calculation unit.
前記加重値が大きな値の場合、前記最適化部は前記直前フレームの視差情報とは異なる視差情報を前記所定フレームの視差情報として算出することを特徴とする請求項5又は7に記載のステレオ画像処理装置。 When the weight is a small value, the optimization unit calculates disparity information that is the same as or close to the disparity information of the immediately preceding frame as disparity information of the predetermined frame,
The stereo image according to claim 5 or 7, wherein when the weight value is a large value, the optimization unit calculates disparity information different from the disparity information of the immediately preceding frame as disparity information of the predetermined frame. Processing equipment.
前記ステレオ画像の相違度を算出し、
直前に算出された視差情報に基づいて前記所定フレームの加重値を算出し、
前記ステレオ画像の相違度に前記加重値を重み付けし、
前記加重値によって重み付けされた相違度に基づいて前記所定フレームの視差情報を算出し、
前記所定フレームの視差情報を保存し、保存された前記視差情報を次の加重値の算出に用いること、
を含むステレオ画像処理方法。 A stereo image of a predetermined frame is input,
Calculating the difference between the stereo images;
A weight value of the predetermined frame is calculated based on the disparity information calculated immediately before,
Weighting the weights to the stereo image dissimilarity,
Calculating disparity information of the predetermined frame based on the dissimilarity weighted by the weight value;
Storing the disparity information of the predetermined frame, and using the stored disparity information for calculating a next weight value;
Stereo image processing method including
前記所定フレームのステレオ画像のうち、保存された前記画像データに対応する基準画像又は参照画像のいずれか一方の画像データと前記直前フレームの画像データとを対応する画素ごとに比較すること、をさらに含み、
比較結果に基づいて前記所定フレームの加重値を算出することを特徴とする請求項9乃至11のいずれか一項に記載のステレオ画像処理方法。 Save image data of either the standard image or the reference image among the stereo images immediately before the predetermined frame,
Comparing the image data of either the standard image or the reference image corresponding to the stored image data among the stereo image of the predetermined frame and the image data of the immediately preceding frame for each corresponding pixel, Including
The stereo image processing method according to claim 9, wherein a weight value of the predetermined frame is calculated based on a comparison result.
類似性の結果に基づいて前記所定フレームの加重値を算出することを特徴とする請求項12又は13に記載のステレオ画像処方法。 Determining similarity between the immediately preceding frame and the predetermined frame;
The stereo image processing method according to claim 12 or 13, wherein a weight value of the predetermined frame is calculated based on a result of similarity.
前記加重値が大きな値の場合、前記直前フレームの視差情報とは異なる視差情報を前記所定フレームの視差情報として算出することを特徴とする請求項13又は15に記載のステレオ画像処理方法。 When the weight value is a small value, disparity information that is the same as or close to the disparity information of the frame immediately before the predetermined frame is calculated as the disparity information of the predetermined frame;
16. The stereo image processing method according to claim 13, wherein when the weight value is a large value, disparity information different from the disparity information of the immediately preceding frame is calculated as disparity information of the predetermined frame.
前記ステレオ画像の相違度に前記再度算出した加重値を重み付けし、
前記再度算出した加重値によって重み付けされた相違度に基づいて前記所定フレームの視差情報を算出し、
算出した前記所定フレームの視差情報を保存し、保存された前記視差情報を次の加重値の算出に用いること、
を含む請求項9乃至16のいずれか一項に記載のステレオ画像処理方法。 Using the calculated disparity information, recalculate the weight value of the predetermined frame,
Weighting the recalculated weight value to the difference between the stereo images,
Calculating disparity information of the predetermined frame based on the degree of difference weighted by the weight value calculated again,
Storing the calculated disparity information of the predetermined frame, and using the stored disparity information for calculating a next weight value;
The stereo image processing method according to claim 9, comprising:
ステレオ画像を含む映像信号が入力されるステレオ画像入力部と、
前記ステレオ画像の高さ補正を行い、補正ステレオ画像を生成するステレオ画像平行化部と、
前記補正ステレオ画像のステレオマッチングを行い、前記一方の画像の視差情報を生成するステレオ画像処理装置と、
前記一方の画像及び前記視差情報を用いて、視差映像を作成する画像データを生成する視差画像合成部と、
前記画像データを出力するタイミング制御部と
を有し、
前記ステレオ画像処理装置は、
所定フレームのステレオ画像が入力され、前記ステレオ画像の相違度を算出する相違度演算部と、
前記所定フレームの直前フレームの視差情報に基づいて前記所定フレームの加重値を算出する加重値演算部と、
前記相違度演算部から供給された前記ステレオ画像の相違度に前記加重値演算部から供給された前記加重値を重み付けする第1のフィルタと、
前記第1のフィルタから供給された前記加重値によって重み付けされた相違度に基づいて前記所定フレームの視差情報を算出する最適化部と、
前記最適化部から供給された前記所定フレームの視差情報を保存し、保存された前記視差情報を前記加重値演算部に出力する第1のメモリと、
を具備するステレオ画像表示装置。 A display panel;
A stereo image input unit to which a video signal including a stereo image is input;
A stereo image parallelizing unit that performs height correction of the stereo image and generates a corrected stereo image;
A stereo image processing device that performs stereo matching of the corrected stereo image and generates parallax information of the one image;
Using the one image and the parallax information, a parallax image combining unit that generates image data for creating a parallax video;
A timing control unit for outputting the image data;
The stereo image processing apparatus includes:
A stereo image of a predetermined frame is input, and a dissimilarity calculation unit that calculates the dissimilarity of the stereo image;
A weight value calculator that calculates a weight value of the predetermined frame based on disparity information of a frame immediately before the predetermined frame;
A first filter that weights the weight value supplied from the weight value calculation unit to the difference degree of the stereo image supplied from the difference value calculation unit;
An optimization unit that calculates disparity information of the predetermined frame based on a difference weighted by the weight value supplied from the first filter;
A first memory that stores the disparity information of the predetermined frame supplied from the optimization unit and outputs the stored disparity information to the weight calculation unit;
Stereo image display device comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011273834A JP2013126114A (en) | 2011-12-14 | 2011-12-14 | Stereo image processing method and stereo image processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011273834A JP2013126114A (en) | 2011-12-14 | 2011-12-14 | Stereo image processing method and stereo image processing apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2013126114A true JP2013126114A (en) | 2013-06-24 |
Family
ID=48777124
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011273834A Pending JP2013126114A (en) | 2011-12-14 | 2011-12-14 | Stereo image processing method and stereo image processing apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2013126114A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2913797A1 (en) | 2014-02-27 | 2015-09-02 | Ricoh Company, Ltd. | Accurate parallax calculation in image regions with low texture |
JP2016090449A (en) * | 2014-11-07 | 2016-05-23 | 国立研究開発法人産業技術総合研究所 | Stereo matching device, stereo matching program, and stereo matching method |
JP2016099318A (en) * | 2014-11-26 | 2016-05-30 | 国立研究開発法人産業技術総合研究所 | Stereo matching device, stereo matching program, and stereo matching method |
CN105787932A (en) * | 2016-02-07 | 2016-07-20 | 哈尔滨师范大学 | Stereo matching method based on segmentation cross trees |
KR101995466B1 (en) * | 2018-01-16 | 2019-07-02 | 충북대학교 산학협력단 | Stereo image matching based on feature points |
CN112991421A (en) * | 2021-03-23 | 2021-06-18 | 湖南大学 | Robot vision stereo matching method |
DE112014002816B4 (en) | 2013-06-14 | 2022-06-02 | Hitachi Astemo, Ltd. | vehicle control system |
WO2023017635A1 (en) * | 2021-08-11 | 2023-02-16 | 日立Astemo株式会社 | Computing device, monitoring system and parallax calculation method |
-
2011
- 2011-12-14 JP JP2011273834A patent/JP2013126114A/en active Pending
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE112014002816B4 (en) | 2013-06-14 | 2022-06-02 | Hitachi Astemo, Ltd. | vehicle control system |
EP2913797A1 (en) | 2014-02-27 | 2015-09-02 | Ricoh Company, Ltd. | Accurate parallax calculation in image regions with low texture |
JP2016090449A (en) * | 2014-11-07 | 2016-05-23 | 国立研究開発法人産業技術総合研究所 | Stereo matching device, stereo matching program, and stereo matching method |
JP2016099318A (en) * | 2014-11-26 | 2016-05-30 | 国立研究開発法人産業技術総合研究所 | Stereo matching device, stereo matching program, and stereo matching method |
CN105787932A (en) * | 2016-02-07 | 2016-07-20 | 哈尔滨师范大学 | Stereo matching method based on segmentation cross trees |
KR101995466B1 (en) * | 2018-01-16 | 2019-07-02 | 충북대학교 산학협력단 | Stereo image matching based on feature points |
CN112991421A (en) * | 2021-03-23 | 2021-06-18 | 湖南大学 | Robot vision stereo matching method |
CN112991421B (en) * | 2021-03-23 | 2023-08-08 | 湖南大学 | Robot vision stereo matching method |
WO2023017635A1 (en) * | 2021-08-11 | 2023-02-16 | 日立Astemo株式会社 | Computing device, monitoring system and parallax calculation method |
JP2023025976A (en) * | 2021-08-11 | 2023-02-24 | 日立Astemo株式会社 | Arithmetic unit, monitor system and parallax calculation method |
JP7684142B2 (en) | 2021-08-11 | 2025-05-27 | Astemo株式会社 | Calculation device, monitoring system, and parallax calculation method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2013126114A (en) | Stereo image processing method and stereo image processing apparatus | |
CN103379352B (en) | Video generation device, image display device and image generating method | |
JP4966431B2 (en) | Image processing device | |
CN118212141A (en) | Systems and methods for hybrid deep regularization | |
JP6094863B2 (en) | Image processing apparatus, image processing method, program, integrated circuit | |
TWI485646B (en) | Map converting method, map converting apparatus, and computer program product for map conversion | |
JP6173218B2 (en) | Multi-view rendering apparatus and method using background pixel expansion and background-first patch matching | |
US20130342529A1 (en) | Parallax image generating apparatus, stereoscopic picture displaying apparatus and parallax image generation method | |
JP5755571B2 (en) | Virtual viewpoint image generation device, virtual viewpoint image generation method, control program, recording medium, and stereoscopic display device | |
US8675128B2 (en) | Image processing method and system with repetitive pattern detection | |
JP2016038886A (en) | Information processing apparatus and information processing method | |
JP2012208553A (en) | Image processing device, image processing method, and program | |
KR102567490B1 (en) | Method and apparatus for processing image and computer program product thereof | |
JP2016039618A (en) | Information processing apparatus and information processing method | |
JP4892113B2 (en) | Image processing method and apparatus | |
JP2017021759A (en) | Image processor, image processing method and program | |
JP7159198B2 (en) | Apparatus and method for processing depth maps | |
JP6249173B2 (en) | Image processing method and image processing apparatus | |
JP5692051B2 (en) | Depth estimation data generation apparatus, generation method and generation program, and pseudo stereoscopic image generation apparatus, generation method and generation program | |
JP5627498B2 (en) | Stereo image generating apparatus and method | |
JP2014072809A (en) | Image generation apparatus, image generation method, and program for the image generation apparatus | |
JP4886479B2 (en) | Motion vector correction apparatus, motion vector correction program, interpolation frame generation apparatus, and video correction apparatus | |
JPWO2013161840A1 (en) | Image processing method and image processing apparatus | |
JP5459231B2 (en) | Pseudo stereoscopic image generation apparatus, pseudo stereoscopic image generation program, and pseudo stereoscopic image display apparatus | |
Wei et al. | Iterative depth recovery for multi-view video synthesis from stereo videos |