Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd June 2014, 15:29   #1  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,049
Accumulation buffer/Moving Average - how?

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)?
pandy is offline   Reply With Quote
Old 3rd June 2014, 16:11   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Some links that might be of interest.

http://forum.doom9.org/showthread.php?t=168001

http://forum.doom9.org/showthread.ph...42#post1632542

http://forum.doom9.org/showthread.php?t=168293
(where Multiplier arg = 0.0)

http://forum.doom9.org/showthread.ph...nd#post1643168
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 3rd June 2014 at 16:30.
StainlessS is offline   Reply With Quote
Old 3rd June 2014, 16:37   #3  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,049
ClipBlend/ClipBlend16 looks very promising,
Thank You StainlessS! (and also Gavino for GScript).
pandy is offline   Reply With Quote
Old 3rd June 2014, 16:57   #4  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
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 ?
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 3rd June 2014, 17:04   #5  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,049
Quote:
Originally Posted by StainlessS View Post
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--

Quote:
Originally Posted by StainlessS View Post
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!!!

Last edited by pandy; 3rd June 2014 at 18:38.
pandy is offline   Reply With Quote
Old 3rd June 2014, 19:04   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
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) .
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 4th June 2014, 09:14   #7  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,049
Quote:
Originally Posted by StainlessS View Post
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!

Last edited by pandy; 4th June 2014 at 09:22.
pandy is offline   Reply With Quote
Old 22nd June 2017, 15:01   #8  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
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.p...32#post1703332

EDIT: About 6 months after his last post.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 22nd June 2017 at 22:45.
StainlessS is offline   Reply With Quote
Old 24th November 2017, 10:15   #9  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,049
Quote:
Originally Posted by StainlessS View Post
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.p...32#post1703332

EDIT: About 6 months after his last post.
Once again big thx StainlessS! Your work is very appreciated.
Cheers.
pandy is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:32.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.