Interactive Media Systems, TU Vienna

Fast Cost-Volume Filtering for Visual Correspondence and Beyond

By Asmaa Hosni, Christoph Rhemann, Michael Bleyer, Carsten Rother, and Margrit Gelautz


Many computer vision tasks can be formulated as labeling problems. The desired solution is often a spatially smooth labeling where label transitions are aligned with color edges of the input image. We show that such solutions can be efficiently achieved by smoothing the label costs with a very fast edge-preserving filter. In this paper we propose a generic and simple framework comprising three steps: (i) Constructing a cost volume; (ii) Fast cost volume filtering; and (iii) Winner-Takes-All label selection. Our main contribution is to show that with such a simple framework state-of-the-art results can be achieved for several computer vision applications. In particular, we achieve (i) disparity maps in real-time, whose quality exceeds those of all other fast (local) approaches on the Middlebury stereo benchmark, and (ii) optical flow fields which contain very fine structures as well as large displacements. To demonstrate robustness, the few parameters of our framework are set to nearly identical values for both applications. Also, competitive results for interactive image segmentation are presented. With this work, we hope to inspire other researchers to leverage this framework to other application areas.


A. Hosni, C. Rhemann, M. Bleyer, C. Rother, M. Gelautz: "Fast Cost-Volume Filtering for Visual Correspondence and Beyond"; IEEE Transactions on Pattern Analysis and Machine Intelligence, 35 (2013), 2; 504 - 511.

Additional Information

Important notes:

(1) To run our code you need to additionally download the "Guided Image Filter" [K. He, J. Sun, X. Tang, Guided Image Filtering, ECCV10] from Kaiming He's website and extract the files "guidedfilter_color.m" and "boxfilter.m" into the same directory as the other Matlab files. Here is a direct link to the guided image filter code.

(2) The code is provided for academic use only. Use of the code in any commercial or industrial related activities is prohibited.

(3) If you use our code we request that you cite the corresponding paper:

        author    = {Asmaa Hosni and Christoph Rhemann and Michael Bleyer and Carsten Rother and Margrit Gelautz},
        title        = {Fast Cost-Volume Filtering for Visual Correspondence and Beyond},
        journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI)},
        year     = {2013},
        volume = {35},
        pages  = {504 - 511},
        number = {2},


Demo 27.7 MB Windows Media video Download
Source Code 4 MB Zip archive Download
Supplementary Material 26.9 MB RAR archive Download


Click into the text area and press Ctrl+A/Ctrl+C or ⌘+A/⌘+C to copy the BibTeX into your clipboard… or download the BibTeX.