If someone don't come up with some suggestion, this is my "final suggestion"
The video outputted is this one
http://www.mediafire.com/watch/mws7c9hgwwrsqjm/test.mkv
The script used this [i wrote some comments for you]
Code:
import vapoursynth as vs
import havsfunc as has
core = vs.get_core()
#Load imwri
core.std.LoadPlugin("C:/Program Files (x86)/VapourSynth/plugins64/imwri/imwri.dll")
#Read images
src = core.imwri.Read("C:/Users/MonoS/Desktop/BlenderCycles-VapourSynth/images/%04d.png", firstnum=50)
#converting input RGB images to YUV444
input = core.fmtc.bitdepth(src, flt=True).fmtc.matrix(mat="601", col_fam=vs.YUV).fmtc.bitdepth(bits=16, dmode=7)
#This should improve motion estimation for darken zones
superF1 = has.DitherLumaRebuild(input, s0=1)
superF2 = core.mv.Super(superF1, pel=2, sharp=1)
super = core.mv.Super(input)
#Do motion compesated denoising
mvbw2 = core.mv.Analyse(superF2, isb=True, delta=2, overlap=4)
mvbw = core.mv.Analyse(superF2, isb=True, delta=1, overlap=4)
mvfw = core.mv.Analyse(superF2, isb=False, delta=1, overlap=4)
mvfw2 = core.mv.Analyse(superF2, isb=False, delta=2, overlap=4)
deno = core.mv.Degrain2(clip=input, super=super, mvbw=mvbw, mvfw=mvfw, mvbw2=mvbw2, mvfw2=mvfw2, thsad=400)
#After first denoising stage the majority of the grain is on the darker zone, create a mask of only the dark zones
def f(x):
if x < 12000:
return 65535
else:
return 0
maskY = core.std.Lut(deno, [0,1,2], function=f).std.ShufflePlanes([0], vs.GRAY)
mask = core.std.ShufflePlanes([maskY, maskY, maskY], [0,0,0], vs.YUV)
#Do a second pass of spatial denoising only on the masked zones
ret = core.std.MaskedMerge(deno,core.dfttest.DFTTest(deno, sigma=2.5), mask)
#Delete # below to output a 8bit clip
#ret = core.fmtc.bitdepth(bits=8, dmode=7)
ret.set_output()
#Delete # below to output a video showing the difference between the the first and second denoise pass
#core.std.Interleave([deno, ret]).set_output()
#Delete # below to output the mask
#mask.set_output()
I also suggest a moderator to move all this discussion about removing ray tracing noise artifact into a new thread, we went a bit to OT imho
EDIT: i've thrown inside the script the jpg you sent us at the beginning, FAAAAR better result if you ask me
http://www.mediafire.com/watch/ypwrf...fy/testjpg.mkv