We exploit the advantages of confidence measures to improve the robustness and accuracy of the weighted median filter (WMF). The conventional WMF fails to find a correct solution as the proportion of unreliable disparity values increases. Moreover, correct disparity values can be easily affected by unreliable pixels. To alleviate this problem, we consider the reliability of pixels as an additional weighting strategy where the reliability is computed by conventional confidence measures. We experimentally verified the proposed method on the Middlebury dataset in terms of bad pixel rates with various filtering methods.