View Single Post
Old 20th November 2013, 19:53   #1  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 724
TempLinearApproximate plugin

Here's what seems to be stable release of TempLinearApproximate plugin rewrite for VapourSynth.
This plugin is meant for motion-compensated temporal denoising.

TempLinearApproximate r3 - Windows binaries.
Sources.

Usage:
Code:
tla.TempLinearApproximate(
	clip:clip
	radius:int:opt
	planes:int[]:opt:empty
	gamma:int:opt
	)
radius: (default 5) The size of neighborhood of the current frame. Approximation is made by (radius * 2 + 1) points, unless close to beginning or end - it is trimmed in these cases.

planes: The array of planes you want to process. If not specified - all planes are processed. Empty array is allowed for testing purposes.

gamma: Boolean. True by default. Indicates if luma values are converted from gamma corrected to linear light before processing and back after. Never applied to chroma planes. Setting this argument to False gives a speed up.

Motion compensated denoising script.
Usage example:
Code:
import sys
sys.path.append('E:\\vapoursynth-plugins\\py\\')
import MCDenoise as mcd

tlamcArguments = {
	'radius': 5,
	'search': 5,
	'pelsearch': 2,
	'subpelinterp': 2,
	'searchparam': 5,
	'truemotion': True,
	'chromamotion': True,
	'thsad': 600,
	'thscd1': 200,
	'thscd2': 150,
	'refine': True,
	'_lambda': 2000,
}

denoised = mcd.TempLinearApproximateMC(input=source, **tlamcArguments)
Note the "refine" argument. It makes the function ignore the "blocksize" and "overlap" parameters, start motion estimation with blocksize=32 and overlap=16 and gradually refine down to blocksize=4 and overlap=2. Very accurate, but very slow.

CHANGELOG:

r3: Support for single precision float input.
Processing in linear light. On by default.
Motion compensated script modified into standalone function. "gamma" argument added.

r2:
Fallback to averaging when current frame is the middle in the range (it is not the middle only when close to the beginning or the end). Speedup.
License change to MIT.
Fallback to C90. Compilable with MSVC.
__________________
...desu!

Last edited by Mystery Keeper; 7th November 2016 at 21:15.
Mystery Keeper is offline   Reply With Quote