Fast Cost-Volume Filtering for Visual Correspondence and Beyond