View Full Version : Accumulation buffer/Moving Average - how?
pandy
3rd June 2014, 15:29
Struggle with this from some time and i stuck without clue how to do Accumulation Buffer/Moving Averaging in temporal domain (or kind of infinite/long time persistence buffer).
http://en.wikipedia.org/wiki/Moving_average
In simple words - how to add all (or some reasonable but long sequence) of frames to create one frame (properly scaled - similar to HDR imaging)?
StainlessS
3rd June 2014, 16:11
Some links that might be of interest.
http://forum.doom9.org/showthread.php?t=168001
http://forum.doom9.org/showthread.php?p=1632542#post1632542
http://forum.doom9.org/showthread.php?t=168293
(where Multiplier arg = 0.0)
http://forum.doom9.org/showthread.php?p=1643168&highlight=clipblend#post1643168
pandy
3rd June 2014, 16:37
ClipBlend/ClipBlend16 looks very promising,
Thank You StainlessS! (and also Gavino for GScript). :thanks:
StainlessS
3rd June 2014, 16:57
Clipblend, blends all frames played so far (when Delay=0), with equal weight.
RGBAmplifier averages frames either side of target frame (with radius 'rad') when multiplier == 0.0.
Is equal weight blending sufficient for your needs ?
pandy
3rd June 2014, 17:04
Clipblend, blends all frames played so far (when Delay=0), with equal weight.
RGBAmplifier averages frames either side of target frame (with radius 'rad') when multiplier == 0.0.
Is equal weight blending sufficient for your needs ?
It should be sufficient - my purpose is to extract purely static part and ignore motion.
PS
I would investigate also RGBAmplifier but it seem to be more complex as probably more universal tool - not sure that i need this part.
Btw Avisynth it is just proof of concept - target application will be probably not based on Avisynth.
--after being hit by brilliant idea of the StainlessS mind--
Clipblend, blends all frames played so far (when Delay=0), with equal weight.
RGBAmplifier averages frames either side of target frame (with radius 'rad') when multiplier == 0.0.
Is equal weight blending sufficient for your needs ?
RGBAmplifier is perfect for my needs - thank You once again!!!
StainlessS
3rd June 2014, 19:04
You're welcome.
Thankyou for the link on moving averages.
I think I'm gonna try to implement "exponential moving average, with \alpha=1/N" under "Modified moving average" in your link.
Will only be implemented for ClipBlend where delay is non zero (where delay is N in '1/N' above) .
pandy
4th June 2014, 09:14
You're welcome.
Thankyou for the link on moving averages.
I think I'm gonna try to implement "exponential moving average, with \alpha=1/N" under "Modified moving average" in your link.
Will only be implemented for ClipBlend where delay is non zero (where delay is N in '1/N' above) .
It can be nice feature especially for motion/static video part separation which is my goal - i need to remove as much as possible video from overlayed as semitransperent text and pictures (typical UI).
This for testing automation - proof of concept to simulate and to show developers ways to deal with various video processing possibilities to improve automatic detection capabilities (minimize false positive/negative results).
btw i also realized that RgbAmplifier can be quite slow for large radius (such as 50 for example i.e. 2 sec for 25fps video) - also seem that for radius=99 is sometimes not enough to average motion completely (for example looks like 250 i.e. 10 sec can be sometimes required).
I miss also offset settings - to stack multiple RgbAmplifier instances.
Anyway it works - thank You once again!
StainlessS
22nd June 2017, 15:01
Bumping this old thread to just point out to Pandy that DavidHorman did an alternative plug to RgbAmplifier, which supports YUV, ie Amp().
here:- https://forum.doom9.org/showthread.php?p=1703332#post1703332
EDIT: About 6 months after his last post.
pandy
24th November 2017, 10:15
Bumping this old thread to just point out to Pandy that DavidHorman did an alternative plug to RgbAmplifier, which supports YUV, ie Amp().
here:- https://forum.doom9.org/showthread.php?p=1703332#post1703332
EDIT: About 6 months after his last post.
Once again big thx StainlessS! Your work is very appreciated.
Cheers.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.