Change code to evaluate histograms one at the time (avoiding image rotation)