File Exchange

image thumbnail

Dense disparity map with kmeans and median filter

version 1.0.0 (5.64 MB) by Victor Gonzalez
median filter and k-means clustering for dense disparity map estimation


Updated 25 May 2020

GitHub view license on GitHub

median filter and k-means for dense disparity map estimation MATLAB functions to fill a sparse disparity map, in consequence, creating a dense disparity map. DEMO.m contains three examples with Tsukuba, Middlebury, and KITTI stereo datasets.

As input, the sparse disparity map must have NaN labels for occluded values, the reference RGB image and a minimum window size to perform the filtering. First the RGB reference image is color segmented from CIELab colorspace' 'a' and 'b' channels, then the median filtering stage is performed iteratively, beginning with a minimum window size, and then increasing its dimensions until there isn't NaN values or there isn't a value change between iterations

MEX functions were done with Armadillo linear algebra library, libgomp.dll is required to perform parallel processing

Conrad Sanderson and Ryan Curtin. Armadillo: a template-based C++ library for linear algebra. Journal of Open Source Software, Vol. 1, pp. 26, 2016.

Cite As

Victor Gonzalez (2021). Dense disparity map with kmeans and median filter (, GitHub. Retrieved .

Gonzalez-Huitron, Victor, et al. “Parallel Framework for Dense Disparity Map Estimation Using Hamming Distance.” Signal, Image and Video Processing, vol. 12, no. 2, Springer Science and Business Media LLC, Aug. 2017, pp. 231–38, doi:10.1007/s11760-017-1150-3.

View more styles

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!