[Image-SIG] frame averaging

Fredrik Lundh fredrik at pythonware.com
Wed Aug 10 14:37:04 CEST 2005

Bob Klimek wrote:

> Is there a way to do frame averaging in PIL? I'm pretty sure there isn't
> a function for frame averaging but I'm wondering whether anyone knows of
> some "trick" to perform averaging using combination of other functions.
> What I mean by frame averaging is a bitwise averaging where, say 10
> frames (same size images) would be averaged, such that the same pixel in
> each image would be added together and the sum divided by 10.

if you're willing to use 1.1.6 alphas, you can use the imagemath
module and do things in a straightforward way:


(if you don't want to use the alpha, but are willing to do some source
code surgery, you can add the _imagingmath and ImageMath modules
to your 1.1.5 install)

hope this helps!


More information about the Image-SIG mailing list