Blog  |   Puzzles  |   Books  |   About

Graffiti Shroud



If you combine a sufficiently large number of (uncorrelated) photos, and choose the images carefully, you can approximate any image you like.

This “Shroud of Turin” was made by carefully choosing 300 photographs from a larger set of 20,000 photographs of graffiti. All images come from Flickr and are Creative Commons licensed. The images are combined by adding the individual pixel values, so that each of the 300 photos contributes an equal amount to the final image.

You’ll notice an orange color that appears a few seconds into the video. This orange color is usually seen when combining uncorrelated photos. I blogged about this phenomenon a few years ago.

I wrote the software to produce this video in Processing.

4 Responses to “Graffiti Shroud”

  1. Nick Porcino Says:

    Are you doing the blending in floating point, or integer? If integer, cumulative error gradually push pixel values to the corners of the color cube and muddy colors result. If you’ve already done the blending in float I have no explanation :)

  2. jbum Says:

    What I’m doing uses integers, but it shouldn’t accumulate errors in the way you describe.

    I have an array of integers which represent the sums of the R,G,B components of each pixel. For each image, I add it’s value to the array. So, for the pixel at 0,0, given 3 images, I might add the following values:

    Image 1: rgb(0,0) = 50, 60, 50
    Image 2: rgb(0,0) = 62, 72, 100
    Image 3: rgb(0,0) = 200, 198, 170
    ————
    This produces: 312, 338, 320

    After I’ve added all the images. I then scale the numbers (“normalize” them) so that the lowest value maps to 0, and the highest value maps to 255.

  3. Lars Says:

    This is an interesting effect.

    I assume you “carefully choose” the 300 photos using a program, correct (not manually)? What’s the algorithm like?

  4. jbum Says:

    Yes, I wrote a Processing program to do it. The algorithm is essentially:

    1. Start with a random assortment of 300 photos from the larger the list (of 20,000 photos).

    2. For each unselected photo, A from the set of 20000

    3. For each B of the 200 selected photos

    4. Swap A and B.
    If the swap produces a better match to the target image, keep it.

    I repeat from step 2 until no progress can be made.

    The “better match” is the same type of matching used for photo mosaics. I compute the sum of the RGB differences for each pixel. Lower sums are closer matches.