Log in

View Full Version : Degrain3 not working


InsigniaMath
11th August 2017, 16:13
Hello everyone,

I am trying to emulate the following script for vapoursynth into Avisynth+:

http://pasteall.org/60466

It is a denoising script that takes a set of images and does denoising. I have a script that is pretty similar to that script, but DeGrain3 is not working, it tells me that arguments are not valid despite me following this:

http://www.avisynth.org.ru/mvtools/mvtools2.html

Here is my script, any help would be greatly appreciated thanks!

ret=ImageSource("C:/Path/to/images/10%02d.exr", start=1, end=4, fps=24, use_DevIL=False, info=False, pixel_type="RGB32")
input=ConvertToYV16(ret, matrix="Rec709", interlaced=false)
super1 = FFT3DFilter(input, sigma=100.5, bt=5, bw=32, bh=32, ow=16, oh=16, sharpen=0.1)
superF2 = MSuper(super1, pel=2, sharp=1)
super = MSuper(input)
mvbw3 = MAnalyse(superF2, isb=True, delta=3, overlap=4)
mvbw2 = MAnalyse(superF2, isb=True, delta=2, overlap=4)
mvbw = MAnalyse(superF2, isb=True, delta=1, overlap=4)
mvfw = MAnalyse(superF2, isb=False, delta=1, overlap=4)
mvfw2 = MAnalyse(superF2, isb=False, delta=2, overlap=4)
mvfw3 = MAnalyse(superF2, isb=False, delta=3, overlap=4)

ret = MDeGrain3(input, super=super, mvbw=mvbw, mvfw=mvfw, mvbw2=mvbw2, mvfw2=mvfw2, mvbw3=mvbw3, mvfw3=mvfw3)
ret = FFT3DFilter(ret,sigma=2.5, bt=5, bw=32, bh=32, ow=16, oh=16, sharpen=0.7)
ret = ConvertToRGB32(ret,matrix="Rec601", interlaced=false)

return ret

Thanks,
Cris

poisondeathray
11th August 2017, 16:43
Replace MDeGrain3 line with this

ret = MDeGrain3(input, super, mvbw, mvfw, mvbw2, mvfw2, mvbw3, mvfw3)

InsigniaMath
11th August 2017, 16:47
That did indeed work! WHy for the other mvtools functions it worked fine specifying the arguments, but for MDeGrain3 you shouldn't specify them. Thank you for the help though!

poisondeathray
11th August 2017, 17:06
WHy for the other mvtools functions it worked fine specifying the arguments, but for MDeGrain3 you shouldn't specify them. Thank you for the help though!




Not sure, maybe this modified mvtools2 for avisynth+ is slightly different ? I just use whatever works :)

Also, if your exr sequence is linear, you're probably not going to get the correct results that way

WolframRhodium
11th August 2017, 17:23
That did indeed work! WHy for the other mvtools functions it worked fine specifying the arguments, but for MDeGrain3 you shouldn't specify them. Thank you for the help though!

According to the official documentation (http://avisynth.nl/index.php/Grammar#Functions.2C_Filters_and_Arguments), only named arguments (which are optional) can be specified by names. Video clips are not named arguments in this case.

StainlessS
12th August 2017, 02:30
The tools are less than specific about what is and is not allowed/necessary, I dont like the way that things are brushed over or 'short handed', it
could be documented better, and this from someone that hates documenting anything (ie me).
Each function should have all args doc'ed, never mind the 'common args' or whatever its called, they should be individually doc'ed for each function.
Copy and paste is not so very difficult.