Histogram computation done with the whole image