My median filter gets the disparity map estimated by Census Transform costs ( hamming distance for 8-bit strings) worse by around %5 of the original error. Unlike, Rank transform based disparity matching; which shows enhancement in the error results between ground truth and the output disparity map after applying median filtering. What could be the reason behind this?
the best pixel location will be at the location has the minimum hamming distance
hamming distance = sum(First_string xor Second_string )