Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th May 2010, 17:09   #21  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Thank you! It does work the first script, the second script comes from this post. He says he is only motion compensating the clip, but I dont know at what stage of the process output (I dont want to Despot) the clip as I dont understand the method. This paper explains very well my case I think, in the case of low frequence jitter artifacts. Anyways, I dont expect to go so far, fixing my actual script would be enough to start encoding.

Edit: What about this? I used the first "Despot Script" as the prefiltered clip of the second script. SSIM detects further changes. Now ideally I think that after the interleave command I should perform a strong temporal denoiser (temporalsoften?) to average those 3 frames. Problem is temporalsoften affects the 4th frame too thus creating an ugly blending.

Quote:
#Despot Script

_fft = 6
_thSAD = 600
_bs = 16
_ov = 4

prefilt=s.FFT3DFilter(sigma=_fft,plane=4,bw=32,bh=32,ow=8,oh=8,bt=3,ncpu=2)
osuper=s.MSuper()
asuper=prefilt.MSuper()

ml = 100
thscd1 = 400

vf = asuper.MAnalyse(isb=false)
cf = s.MFlow(osuper, vf, thscd1 = thscd1)
sadf = s.MMask(vf, ml=ml,kind=1,gamma=1, thscd1 = thscd1)
msadf=sadf.MT_Binarize()

vb = asuper.MAnalyse(isb=true)
cb = s.MFlow(osuper, vb, thscd1 = thscd1)
sadb = s.MMask(vb, ml=ml, gamma=1, kind=1, thscd1 = thscd1)
msadb = sadb.MT_Binarize()

msad = MT_Logic(msadf,msadb,"or")
msad = msad.MT_Expand()
msadi = Interleave(msad, msad, msad)

in=Interleave(cf,s,cb)
TemporalSoften(in,1,255,255,0,2)


SelectEvery(3,1)

#############
#stab script

bsuper=last.MSuper()

b3v = MAnalyse(bsuper, isb=true, delta=3, blksize=_bs, overlap=_ov)
b2v = MAnalyse(bsuper, isb=true, delta=2, blksize=_bs, overlap=_ov)
b1v = MAnalyse(bsuper, isb=true, delta=1, blksize=_bs, overlap=_ov)
f1v = MAnalyse(bsuper, delta=1, blksize=_bs, overlap=_ov)
f2v = MAnalyse(bsuper, delta=2, blksize=_bs, overlap=_ov)
f3v = MAnalyse(bsuper, delta=3, blksize=_bs, overlap=_ov)
process = MDeGrain3(osuper, b1v, f1v, b2v, f2v, b3v, f3v, thSAD=_thSAD)

mt_merge(process, mt_edge("min/max").RemoveGrain(19), U=3,V=3)
btw, results are far from being nice. An ideal script would be one that fixes pixels if temporally (frames span) spatial changes aren't greater than (threshold) (aimed at animation of course)

EDIT: I just wanted to point out the investigation these guys are making on the subject using B-Splines with bUnwarpJ
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 25th May 2010 at 08:33.
Dogway is offline   Reply With Quote
Old 26th May 2010, 11:26   #22  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Thank you guys, at last I will use medianblur. I will start encoding in the next few days. Im also not using the mask as it was aimed at spot removal and cant load it with medianblurt nor any other filter.

Deshaker by Gunnar +

Quote:
s=last
thescd1 = 400
_fft = 6
_thSAD = 600
_bs = 16
_ov = 4

#######################################
prefilt=s.FFT3DFilter(sigma=_fft,plane=4,bw=32,bh=32,ow=8,oh=8,bt=5,ncpu=2)
osuper=s.MSuper()
asuper=prefilt.MSuper()

vf = asuper.MAnalyse(isb=false)
cf = s.MFlow(osuper, vf, thscd1 = thescd1)
vb = asuper.MAnalyse(isb=true)
cb = s.MFlow(osuper, vb, thscd1 = thescd1)

Interleave(cf,s,cb)
medianblurt(0,0,0,1,markscenechange=true,mc=true,,thSCD1=130,thSCD2=90)
SelectEvery(3,1)

######################################

bsuper=last.MSuper()

b3v = MAnalyse(bsuper, isb=true, delta=3, blksize=_bs, overlap=_ov)
b2v = MAnalyse(bsuper, isb=true, delta=2, blksize=_bs, overlap=_ov)
b1v = MAnalyse(bsuper, isb=true, delta=1, blksize=_bs, overlap=_ov)
f1v = MAnalyse(bsuper, delta=1, blksize=_bs, overlap=_ov)
f2v = MAnalyse(bsuper, delta=2, blksize=_bs, overlap=_ov)
f3v = MAnalyse(bsuper, delta=3, blksize=_bs, overlap=_ov)
process = MDeGrain3(bsuper, b1v, f1v, b2v, f2v, b3v, f3v, thSAD=_thSAD)

mt_merge(process, mt_edge("min/max").RemoveGrain(19), U=3,V=3)
########################################################
Edit: Forget all these filters mess above here. I got something working much much better, actually using Stabilise filter + the second routine of my above script. Result is here:

1Mb mp4
http://www.sendspace.com/file/rpjuv5
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 27th May 2010 at 22:50.
Dogway is offline   Reply With Quote
Reply

Tags
bake, dejitter, deshake, stab, wave

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:56.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.