blending last few frames of a movie to achieve motion blur


I’m trying to create a motion blur effect on a movie by blending the last 5 frames.
Currently I’m doing it by creating a buffer and draw the last 5 frames on top of each other with a lower alpha value with ofSetColor(r,g,b,a). This creates the following effect (you can see the rotor in the picture being blurry) which is already quite nice. But I wonder if this is the best way to do it.

Does anyone know a better way to achieve this effect. May be with OpenCV?


I’m pretty sure you can do motion blur using the opengl Accumulation buffer. Do some searching and you should turn something up. I think even the opengl red book might have an example in the section on the Accumulation buffer if my memory serves me correctly.

You can also do this kind of thing much faster using shaders as well.