Robust stereo matching under radiometric variations based on cumulative distributions of gradients