answered Dec 2 '13
You already has function in OpenCV that highly optimized for this specific task: addWeighted.
addWeighted(frame_current, 1/Beta, background_current, 1-1/Beta, 0, foreground_current);