Histogram matching and LUT