Log in

View Full Version : Help with denoiser script


Randall
25th October 2007, 02:02
Hi I'm trying to clean up as much noise as possible from the Seinfeld Season 1 DVDs. There must be a good balance between denoising and preserving/restoring sharpness, but I haven't found it yet. I need a video processing expert on this board (hopefully has had experience with this same source material) to make this look as beautiful as possible. Thanks for the help. Here is my script so far.

# LOAD THE PLUGINS
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\decomb.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FFT3DFilter.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrainSSE3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll")
Import("C:\Program Files\AviSynth 2.5\plugins\LimitedSharpenFaster.avs")

# VIDEO SOURCE
mpeg2source("H:\SeinfeldDVD\Season1\01 The Seinfeld Chronicles\chronicles.d2v")

# INVERSE TELECLINE (29.97 FPS -> 23.97 FPS)
Telecide(guide=1).Decimate()

# DENOISE (frequency domain)
FFT3DFilter(bt=4, plane=4, bw=32, bh=32)

# DENOISE AGAIN (still too much noise)
RemoveGrain(mode=17)

# SHARPEN (compensate for denoisers smoothing effects)
LimitedSharpenFaster(strength=60)

# CROP THE IMAGE (Left, Top, -Right, -Bottom)
crop(8,8,-8,-8):thanks:

DeathAngelBR
25th October 2007, 02:38
Maybe something like:

mpeg2source("H:\SeinfeldDVD\Season1\01 The Seinfeld Chronicles\chronicles.d2v")

Telecide(guide=1).Decimate()
crop(8,8,-8,-8)

source = last

# you might wanna test and tweak the sigma (noise) value, so removegrain won't be necessary
denoised = source.FFT3DFilter(sigma=1.5, bt=4, plane=4, bw=32, bh=32)

# sharpening with seesaw, and tweak the sootheS and sootheT values
seesaw(source,denoised,sootheS=75,sootheT=75)

Randall
25th October 2007, 04:01
Thanks I will try that

Randall
25th October 2007, 12:44
Well that method didn't work too well because there is still too much noise in the source material, so the seesaw adds a ton of noise back in. I think I found some good settings by tweaking my original script a little bit. Thanks for the advice of sharpening the FFT3D filter!
# LOAD THE PLUGINS
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\decomb.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FFT3DFilter.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrainSSE3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll")
Import("C:\Program Files\AviSynth 2.5\plugins\LimitedSharpenFaster.avs")

# VIDEO SOURCE
mpeg2source("H:\SeinfeldDVD\Season1\01 The Seinfeld Chronicles\chronicles.d2v")

# INVERSE TELECLINE (29.97 FPS -> 23.97 FPS)
Telecide(guide=1, post=1, gthresh=1).Decimate()

# CROP THE IMAGE (Left, Top, -Right, -Bottom)
crop(8,8,-8,-8)

# DENOISE (frequency domain)
FFT3DFilter(sigma=1.5, bt=4, plane=4, bw=32, bh=32, ow=16, oh=16, sharpen=0.5)

# DENOISE (reduce file size)
RemoveGrain(mode=17)

# SHARPEN (compensate for denoisers smoothing effects)
LimitedSharpenFaster(strength=50)

steptoe
25th October 2007, 16:57
Have a look at RemoveNoiseMC which is a function that has been written specifically to remove noise and dirt using various filters and with varying degress of removal

Its very slow as its calls some slow functions and filters but does do a very good job, final result is what matters not speed

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