Histogram normalization of images