A comparison of image histograms

A sample histogram of an image

Histograms are one way to describe the information content of an image. They help us to understand the patterns in the image through observing the distribution of the values in each channel – read, green and blue. Changing an image is possible through changing its histogram; changing the histogram is possible through visually editing the image. Histograms are so frequently used in design that they are part of every modern image editor. Lightroom allows you to drag the histogram curve and dynamically observe the changes in the image which is very intuitive. Clamping the histogram at both ends has long been used as a way to enhance the contrast of an image. The idea is that areas with near-zero occurences of certain values can be removed from the histogram as they are unlikely to contribute much to the overall look of the image. This effectively takes the most significant values and spreads them across the interval [0, 255].

I have decided to take the Oxford Buildings Dataset (5k images, 1.8GB) and see whether the histograms can reveal interesting things about images. I have preselected slightly more than 300 images to make this manageable. Then I plotted their histograms and created thumbnails from the originals, to create the image-histogram connections in a way that could make them browsable. The original file names were preserved to make it easy for you to see the same image in the original dataset if you wish so (although relabeling would have slightly reduced the page size). I hope that this collection will help you to understand histograms better, so you can use them more effectively in your own designs. I would also like to thank to everyone involved in making these beautiful photos freely available.