Visualizing images as histograms