View Single Post
Old 20th December 2014, 21:08   #172  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,492
amp - temporal smoother/enhancer

Inspired by RgbAmplifier, which I couldn't get to work, I've written a plugin called amp.

It performs temporal smoothing, then (optionally) enhances the difference between the windowed average and the current frame. In theory, this should let you do things like make pulses visible in videos of human faces or wrists, but I suspect you need a very low noise video to pick that up.

Also worth noting is that it will easily enhance codec artefacts, so for enhancing very small changes, it probably works best with lossless or intra-frame codecs like MJPEG or DV.

It works in YV12, YUY2, RGB24 and RGB32 colourspaces, and because of this its parameters are a bit changeable:

Code:
amp(clip c, int window, double y, double u, double v, double a)
window is the number of frames either side of the current one used for the temporal smoothing, i.e. a value of 5 will smooth over 5*2+1=11 frames.

For YV12/YUY2 colour spaces, the parameters y u v specify the level of enhancement for each channel. a is ignored.

For RGB24/RGB32 colour spaces, the parameters y u v [a] specify the level of enhancement for the channels r g b [a].

A value of 0 performs no enhancement (returns the unaltered channel of the source frame).
If you only specify y, the same value will be used for the other channels.
By not specifying any of these four parameters (or giving them the value of -1) the filter acts purely as a temporal smoother.

David
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 20th December 2014 at 21:21.
wonkey_monkey is offline   Reply With Quote