Denoisers

From Avisynth

Jump to: navigation, search

Note: Please see the update at the end.

Contents

[edit] Heavyweight Denoisers

in order of perceived quality (to *.mp4 guy):

  1. mvdenoise1/2/3 (pick your slowness) + fft3d for high sad picture areas
  2. mvdenoise1/2/3
  3. mvdenoise1/2/3 + predenoised motion prediction clip (stronger denoising)
  4. tnlmeans (technically this can ouperform mvdegrain, but its just too crazily slow with those esettings)
  5. Two stage fft3d (to avoid ringing, example below)
  6. dfttest
  7. fft3d
  8. tbilateral (sometimes better then fft3d on some content)
  9. Vaguedenoiser with prediction (sometimes better then fft3d, fast)
  10. dctfun (basically just blurs)
  11. frfun7 (basically just blurs and turns things to oil painting squiggles)
  12. deen various thresholded blurs, good when combined with more sophisticated methods

[edit] Lightweight Denoisers

in order of percieved quality (to *.mp4 guy):

  1. ttempsmooth great temporal lockdown/stabilization, nonexisten/minor artifacts with default settings
  2. denoise3d (via ffavisynth) fast, powerful spatio temporal smoother, I have never seen it cause temporal artifacts.
  3. fluxsmoothST good spatio temporal 3x3x3 smoother
  4. degrainmedian Very powerful, fast, 3x3x3 median filter, tends to cause artifacts in anything less then mode=3, not very powerful in mode=3
  5. deen (in one of its temporal modes) very strong, but lots of artifacts


[edit] Example Scripts

two stage fft3d:

 strength = 6
 fft3dfilter(bw=6, bh=6, ow=3, oh=3, plane=0, bt=1, sigma=strength)
 fft3dfilter(bw=216, bh=216, ow=108, oh=108, plane=0, bt=1, sigma=strength/8, sigma2=strength/4, sigma3=strength/2, sigma4=strength)


Vaugedenoiser with prediction and temporal stabilization:

 Aux = Deen("c3d", 1, 4, 8)#.ttempsmooth(maxr=7)
 vaguedenoiser(nsteps=8, auxclip=aux, wiener=true, wratio=1.0, chromaT=1, threshold=1)
 FluxsmoothT(3)
 gradfun2db(1.51)


mvdegrain2+fft3d+temporal stabilization and debanding:

 source = last
 pred = source # to get stronger denoising, put denoisers here, they will change how motion vectors are predicted
 
 backward_vec2 = pred.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
 backward_vec1 = pred.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
 forward_vec1 = pred.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
 forward_vec2 = pred.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
 
 maskp1 = mvmask(kind=1, vectors=forward_vec1, ysc=255).UtoY()
 maskp2 = mvmask(kind=1, vectors=forward_vec2).UtoY()
 maskp3 = mvmask(kind=1, vectors=backward_vec1, ysc=255).UtoY()
 maskp4 = mvmask(kind=1, vectors=backward_vec2).UtoY()
 maskf = average(maskp1, 0.25, maskp2, 0.25, maskp3, 0.25, maskp4, 0.25).spline36resize(source.width, source.height)
 
 smooth = pred.fft3dfilter(bw=16, bh=16, ow=8, oh=8, bt=1, sigma=4, plane=0)
 source2 = maskedmerge(source, smooth, maskf)
 
 source3 = source2.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=2)
 source3
 ttempsmooth(maxr=7)
 gradfun2db(1.51)

[edit] Current Recommendations

According to a discussion in 2011, (http://forum.doom9.org/showthread.php?t=162543), the following are recommended as state-of-the-art for denoising:

RemoveGrain(mode=1) http://avisynth.org/mediawiki/RemoveGrain / SMDegrain http://forum.doom9.org/showthread.php?t=152326 (light noise) MCTemporalDenoise() http://avisynth.org/mediawiki/MCTemporalDenoise (low to high noise settings, various presets) Vaguedenoiser http://avisynth.org.ru/vague/vaguedenoiser.html dfttest http://bengal.missouri.edu/~kes25c/ fft3dfilter http://avisynth.org.ru/fft3dfilter/fft3dfilter.html MC_Spuds http://avisynth.org/mediawiki/MC_Spuds

A further screenshot comparison thread is here, which compares vaguedenoiser ttempsmooth tnlmeans removegrain mvdegrain mdegrain mctemporaldenoise mc_spuds fft3dfilter dfttest degrainmedian: http://forum.doom9.org/showthread.php?t=162598

An extensive comparison thread with some objective measurements and video samples is here http://forum.doom9.org/showthread.php?t=162598


Related Links

Personal tools