Movie Color Visualization

Inspired by my comic book colors project, I just put together a few visualizations of the colors used by various movies:

So far I’ve played around with two different visualizations. The first one shows a movie as a timeline of the colors used in each frame. For example here is Finding Nemo:

The other visualization creates a multiple exposure by combining every frame of a movie into a single image. Here’s Finding Nemo again:

Finding Nemo multiple exposure

At first glance this is just a dull blue image, but the fun thing here is if you squint hard enough, you can see some common elements of the movie, formed by images that show up often in the frames.


Hi Kevin!
I think this is great! I liked how you used k-means instead of average as a better representation of simply averaging the entire frame in your previous project. I wonder if there’s still a way of averaging in a better way. What if you were able to restrict the sample of your averages to certain areas/masks? For instance:

def setup():
    global comic
    #Loading a comic (or movie frame?)
    comic = loadImage("comic.png")
def draw():
    #Rule of Thirds columns
    # for i in range(3):
    #     rectCapture(comic,i*width/3,0,width/3,height)
    # #Rule of Thirds rows
    # for i in range(3):
    #     rectCapture(comic,0,i*height/3,width,height/3)
    #Grid Capture
    # for i in range(0,width,50):
    #     for j in range(0,height,50):
    #         rectCapture(comic,i,j,30,30)

def rectCapture(someImage,x,y,w,h):
    colors = []
    for i in range(w):
        for j in range(h):

def averageColors(alist):
    averagedColor = [0,0,0]
    for i in alist:
        averagedColor[0] += red(i)
        averagedColor[1] += green(i)
        averagedColor[2] += blue(i)
    averagedColor = [1.0*i/len(alist) for i in averagedColor]
    return color(*averagedColor)

You can comment out different masks above as an illustration of what I mean. It’s possible to think of other masks to analyze frames from seeing how movie frames are composed (or even comics composition).

Maybe masks need not be rectangular, maybe it could be linear, just as an approach that doesn’t favor the background over the foreground elements in a composition.

Also, I wonder if the final visual could be animated. It could be a series of interpolations between one set of masked averages to another. Maybe analyzing the averages of Warm/Cool colors in a composition through time. If you have access to the subtitles, perhaps what’s the average sentiment from one set of colors to the next?

Just wanted to suggest some ideas. I liked your analysis and I think there’s so much potential in it. I think I’m conflating this visualization with your comic books project, but I forgot to reply to the previous one and I think they’re both related.

1 Like

Hey thanks for the feedback!

For the movie visualization, I did just use the basic average. This isn’t perfect, and there’s a lot of research on this topic. Apparently it’s better to use something called lab space to calculate the average color. For my purposes this is overkill, but it would definitely be an interesting extension to the project.

There are a lot of really interesting next steps that could be taken. One thing I thought about was taking the colors of one book / movie and applying them to another book / movie. What would American History X look like with Finding Nemo’s colors?

The process and source code I used is available here. If this stuff is interesting to you, I definitely encourage remixes of the code!

1 Like

I think I see a shark coming in the final image LOL. Nice idea, I could see this being used for forensics

1 Like