20111128

The 2.1285e+10 pixels of 2011 (so far)

How do you visualize an entire year of photography in a single graphic? The following is a geeky art project I indulged myself in. It measures every pixel I have taken so far this year, showing the prevalent hues and volume of photos throughout the year. Each bar represents a week of images - there would be 52 if the year were over. The length of the bar represents the number of pixels of photography done in that week. The colors in the bar show the hues captured during that week.

The quantity trends are pretty obvious. The first bump in January is indoor shots from my signature annual party. I took relatively few photos in the spring when I was locked in the thesis cave. Photo quantity grew in the summer as I embarked on weekly kayaking and hiking trips. Peak pixel was September as I took a week to bike through France, capturing hundreds of images along the way.

Hue trends are also present. Winter times have a lot of brown and white. Green appears more as summer approaches. I might be fooling myself but I think I can even see autumn foliage. You might notice the appearance of a red kayak and a red backpack if you look carefully. I had hoped that my brilliant yellow kayak would show up in the summer photos, but the boat's colors get spread out among too many different hues to be noticeable.

How did I make this? MATLAB of course!

  1. Sort a 512-color RGB colormap with RGB2NTSC
  2. Load an image with IMREAD
  3. Reduce JPEG's truecolor space down to a tractable 512 colorspace with RGB2IND
  4. Bin all pixels into groups with IMHIST
  5. Lather, rinse, repeat. Sum all photo histograms, binned by date.
The trickiest part was figuring out how to sort the 3-dimensional RGB color space into a pleasing 1-d continuum. It turns out that I'm not the first to have this problem; the folks over at Visualmotive already investigated this and I agree with their preference for the YIQ colorspace.

In the histogram above, you can see blue peaks for the sky, green for the trees, and orange for the hiker's shirt. Black is prevalent since shadows are dark and some objects (the dog, the shirt) are also black. The most heuristically "wrong" thing about the 512-color reduction is that purple/magenta hues show up more often than you'd expect. There's a bit of lilac in the sky, and the same color often also shows up in wood and stone.

This was a fun project. I like using computation to come up with new ways to understand the world.

No comments:

Post a Comment