Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.

## Multi-frame image processing Beginner
149 Views
I'm trying to average large numbers of frames on a pixel basis. I.e., I want to calculate a frame, with each pixel value being the average of the previous n frames. It seems to me that IPP image functions are largely concerned with a single frame or at most two frames of video. Has anyone tried to solve this type of problem using IPP? I realize that this problem is often solved in HW by the camera, but I don't have that option. It is a data reduction issue: I'm not trying to do this at the framerate. While I realize that I can solve the problem by doing algebra on two frames at a time, I am curious if there are any optimized functions for this type of video processing problem. Perhaps it's more accurately viewed as a vector or math kernel implementation.

Thanks. New Contributor I
149 Views
Quoting - Bob Hayes
I'm trying to average large numbers of frames on a pixel basis. I.e., I want to calculate a frame, with each pixel value being the average of the previous n frames. It seems to me that IPP image functions are largely concerned with a single frame or at most two frames of video. Has anyone tried to solve this type of problem using IPP? I realize that this problem is often solved in HW by the camera, but I don't have that option. It is a data reduction issue: I'm not trying to do this at the framerate. While I realize that I can solve the problem by doing algebra on two frames at a time, I am curious if there are any optimized functions for this type of video processing problem. Perhaps it's more accurately viewed as a vector or math kernel implementation.

Thanks.
Hi Bob,
You could use the incremental mean calculation ( M(N) = (N-1)*M(N-1)/N + X(N)/N, where M(N) is the mean at frame N and X(N) is the pixel value at frame(N)) . But that means that your mean is the mean of all preceding frames. You can also use a running average approach: M(N) = lr*M(N-1) + (1-lr)*X(N)., where lr is a number between 0 and 1. That way the 'influence' of a frame will decay in time. Both versions are easily implemented in IPP.

Hope this helps and with regards,

Rob 