cdybedahl: (Default)
cdybedahl ([personal profile] cdybedahl) wrote2003-11-06 10:43 pm

Averaging images

The other day [livejournal.com profile] communicator posted a link to an artist who made images by averaging other images. The result was pretty nifty, so of course I had to try it myself. This is the average of all 78290 frames of Buffy episode 7:22 "Chosen":

[identity profile] communicator.livejournal.com 2003-11-07 01:20 am (UTC)(link)
That is so amazing. I am delighted to have help to inspire you to do it. But why is it all green? Is that a function of the algorithm you used in some way? Or was it a particualrly green episode? It's very beautiful in any case.

I think one thing it demonstrates is to do with the composition of shots. The action seems to predominantly take place just above and to the right of centre screen. I wonder whether this is common to action shows in general? I rather suspect it may be.
ext_12692: (Default)

[identity profile] cdybedahl.livejournal.com 2003-11-07 01:24 am (UTC)(link)
I've been wondering about the green too, actually. I used a very simple algorithm, just treating each frame as a 3x352x240 matrix, adding them all and then dividing each value by the total number of frames.

[identity profile] communicator.livejournal.com 2003-11-07 11:41 pm (UTC)(link)
dividing each value by the total number of frames

Then my guess is it's a result of the way that colours are coded. You end up with an average brightness and an average colour, and green is coded with a number in the middle of the range, and the mean tends to the centre of the range. Probably with mode rather than mean the colours might be different, only guessing though.
ext_12692: (Default)

[identity profile] cdybedahl.livejournal.com 2003-11-08 01:17 am (UTC)(link)
They way it should work is that each RGB colour has its own plane in the picture matrix, so that reds get averaged with reds, greens with greens and blues with blues. If I just average two or three images, I get them mixed together but quite visible. It's only when I get into thousands of frames that the green effect appears. And to make it even stranger, when I ran the thing on another episode (7:01 "Lessons") I got a distinctly different shade of green (more yellow, less blue). I think I'll keep experimenting, it makes a nice break from the writing.
trixieleitz: sepia-toned drawing of a woman in Jazz Age costume, relaxing with a glass of wine. Text: Trixie (Default)

[personal profile] trixieleitz 2003-11-07 11:36 am (UTC)(link)
Hey, you can just see the credits showing through at the bottom of the picture. Are they that much brighter than the rest of the screen that they persist even through the non-credit frames?

Deep.