Color Uniformization

Rarely does a photo reflect the amazing diversity of colors present in the RGB color space. For instance this one has an abundance of green and blue:
3857784068_31282c8047_o
Where is the yellow? the red? the pink? Here it is:
3857784068_31282c8047_o-o
In the second picture, I’ve altered the color of each pixel so that the colors are uniformly distributed in the RGB space. I wrote the program in the Perl programming language because I was curious how the adjusted pictures would look.

Every color that can be displayed by your screen is in the image, and that the amount of the colors are all proportional. This applies on all scales. For example with general terms like “red” and “blue”, there is the same amount of red as blue, if red and blue get the same volume in the color cube. On a smaller scale, consider fushcia and radioactive green: These two colors appear in equal quantities, (provide those two colors actually are equally represented in the cube).

Every pixel in the entire image is different from every other. Each pixel color in the image is equally spaced from the nearest pixels to it (by color, not by position).

Of course, there is more than one way to do this. We could have simply replaced the whole image with any preselected one which was color-uniform. We could have even used a simple rainbow picture without any structure.

To make it interesting, the program attempts to make as little change as possible to each pixel. The pixels don’t move, they just adjust their shading. Or sometimes they change a lot, if there is a big shortage of a color.

Sometimes a photo has a good mix of colors to begin with. Then the program’s job is easy. A few small modifications are enough to give each missing color a spot in the frame. More often, there are some pretty big gaps. Most of the pictures I’ve looked at are missing magenta, hot pink and lime green. That means the program has to change some existing pixels to those colors. It will change the ones that are already close to the target color to keep the geometry of the picture as intact as possible.

Once in a while you get a picture that is missing almost everything

3857826492_ce6d29be08_o

Everything the program needs can be found in the picture, although it may be well hidden. Some patches of this muddy water are slightly darker than others. Some have more blue or more green. These slight tendencies can be exaggerated until the color cube is filled in.

3857826492_ce6d29be08_o-o

Here are a few more examples. This is all generated by a simple-minded program which doesn’t know anything about the picture content. I didn’t do any pre- or post-processing.

Another way to think of it is as follows: Every one of the pictures with a resolution of 1632 x 1224 (which is most of them) uses exactly the same pixels, rearranged in different ways.

4343514933_f9a251843a_o-o

river-med-o

natalies-face-3-o

About these ads

2 Comments »

  1. [...] color in the RGB space. Here's a link to the article, and sample photos from Flickr below. http://wellons.wordpress.com/201…And many more in his Flickr Gallery: http://www.flickr.com/photos/wel…This answer .Please specify [...]

  2. Malcolm said

    This is so beautiful. Is the script you used available anywhere?

RSS feed for comments on this post · TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: