Log in

View Full Version : Extreme Denoising


koopa
29th July 2010, 09:49
Hey guys, you've always come through for me before, and I come before you again seeking answers! ;)

http://dl.dropbox.com/u/8571520/Sample.avi

http://dl.dropbox.com/u/8571520/PreSample.jpg

This clip has very obvious noise, obvious enough that when I average the whole clip (about 60 frames), I get a MUCH clearer scene:

http://dl.dropbox.com/u/8571520/Sample.jpg

My best script for denoising & fixing luminance in this clip is this:

avisource("Sample.avi")
converttoyv12()
NNEDI3(qual=2)
ConvertToYuy2()
saturation_v = 1.08
cv = - (1-saturation_v)*256
ColorYUV(gain_y=-29,cont_y=70,cont_v = cv, opt="coring" )
converttoyv12()
MCTemporalDenoise(settings="very high", radius=6, pel=4)
NNEDI3_rpow2(rfactor=2, qual=2)

It has been quite effective:

http://dl.dropbox.com/u/8571520/PostSample.jpg

...but it gets slower and never completes more than 20ish frames. I wonder what else can be done to increase clarity. This comes up time and time again. Maybe FFT3D?

Since I have a clean static image, is there a way I can feed it back into the video and penalise pixels for being insufficiently different from that background?

Thanks guys!

Nightshiver
31st July 2010, 02:54
Strange source... hard to remove all of the grain without utterly destroying the picutre.

FizzKillerMulti(blksize=16, sharp=2, thsad=1000, refframes=6)
FFT3DFilter(sigma=3.0, sigma2=3.0, sigma3=2.5, sigma4=2.5, bw=48, bh=48, bt=4, ow=16, oh=16, interlaced=false)

Or could choose to not use FFT3DFilter, as I like the reults from FizzKillerMulti (Which is really just MVDegrainMulti with 6 refframes)

flebber
31st July 2010, 03:18
dfftest() is slow but can produce some very nice results. Worked very well for me on VHS conversions with light static, a lot lighter than yours :) but I do think it would be wortha try.

http://forum.doom9.org/showthread.php?t=132194&highlight=dfftest

or even could try just filtering chroma u & v
FFT3dGPU(sigma=2.25, plane=3, bt=0,sharpen=1, bw=32, bh=32)

optional

FFT3dGPU(sigma=2.25, plane=3, bt=0,sharpen=1, bw=32, bh=32)
MCTemporalDenoise(settings="medium", edgeclean=true, ecrad=4, stabilize=true, maxr=2, flat=true, GFthr=1.2, AGstr=0.8, bias=64, temp=50)

Nightshiver
31st July 2010, 21:56
I actually tried dfttest. It does not fit this source at all.

Blue_MiSfit
2nd August 2010, 08:41
OP: You're probably running out of RAM - maybe due to using the equivalent of MDegrain6 :D

Back off your settings, or make it all work in 64 bit and throw a shit ton of RAM at it :devil:

Derek

Yobbo
2nd August 2010, 09:19
OP - Excuse my ignorance but how did you "average the frames" to get that beautiful crisp image?

leon1789
2nd August 2010, 19:03
Just a test:


merge(last,last.trim(1,0))

softsharpen(move=0,sharp=30,denois=10,denoisT=17.3,aa=5,deban=2)

saturation_v = 1.08
cv = - (1-saturation_v)*256
ColorYUV(gain_y=-29,cont_y=70,cont_v = cv, opt="coring" )

koopa
6th August 2010, 05:41
Thanks guys!

I couldn't get softsharpen to work, it randomly gives me green frames, and the merge part of the script blurs the motion later on, a shame because it looked promising!

FizzKillerMulti worked very well (showing improvements at up to 30 reference frames!) but blew out some moving highlights (headlights from a car), again it's a shame because it was working really well!

Yobbo -> I'll send you a PM

So far my cleanest script is this, but it blurs the result horribly:

avisource("Sample.avi")
converttoyv12()
NNEDI3(qual=2)
ConvertToYuy2()
saturation_v = 1.08
cv = - (1-saturation_v)*256
ColorYUV(gain_y=-29,cont_y=70,cont_v = cv, opt="coring" )
converttoyv12()
MCTemporalDenoise(settings="very high")
source = last
backward_vec3 = source.MVAnalyse(isb = true, delta = 3, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
backward_vec2 = source.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
backward_vec1 = source.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
forward_vec1 = source.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
forward_vec2 = source.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
forward_vec3 = source.MVAnalyse(isb = false, delta = 3, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
smooth = fft3dfilter(bt=1, sigma=10, plane=0, sharpen=0)
smooth.MVDegrain3(backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=400,idx=1)
LimitedSharpenFaster(ss_x=1.8, ss_y=1.8, smode=3, strength=185, overshoot=1, undershoot=1)
http://dl.dropbox.com/u/8571520/PostSample2.jpg
Any more ideas?

Again, it would be great if I could somehow use my reference image to help take the mathematical guesswork out of the denoising?