VideoHelp Forum

+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 32 of 32
Thread
  1. You need the RemoveDirtMC filter. There are several variations around. Here's the one that I used.

    Code:
    #####################################################################
    #
    # https://forum.videohelp.com/threads/382527-Need-help-setting-up-avisynth-pls%21?p=2477423&viewfull=1#post2477423
    #
    ######################################################################
    
    #REMOVE DIRT FUNCTION
    #......................................................................................................................................................................
    function RemoveDirt(clip input, int "limit", bool "_grey")
    {
      clensed=input.Clense(grey=_grey, cache=4)
      alt=input.RemoveGrain(2)
      return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=30,cthreshold=8, gmthreshold=40,dist=3,dmode=2,debug=false,noise=limit,noisy=4, grey=_grey)
    
      # Alternative settings
      # return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=4,cthreshold=6, gmthreshold=40,dist=1,dmode=2,debug=false,noise=limit,noisy=12,grey=_grey,show=true)
      # return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=6,cthreshold=8, gmthreshold=40,dist=3,tolerance= 12,dmode=2,debug=false,noise=limit,noisy=12,grey=_grey,show=false)
    }
    
    function RemoveDirtMC(clip, int "limit", bool "_grey")
    {
      _grey=default(_grey, false)
      limit = default(limit,6)
    
    #  prefiltered = fft3dfilter(clip,sigma=1,sigma2=2,sigma3=3,sigma4=5,bw=64,bh=64)
      
      prefiltered = RemoveGrain(clip,2)
      superfilt = MSuper(prefiltered, hpad=32, vpad=32,pel=2)
    
      super=MSuper(clip, hpad=32, vpad=32,pel=2)
    
      bvec = MAnalyse(superfilt,isb=true,  blksize=16, overlap=2,delta=1, truemotion=true)
      fvec = MAnalyse(superfilt,isb=false, blksize=16, overlap=2,delta=1, truemotion=true)
    
    # Increase thSAD if moving objects are being removed!!
      bvec_re = Mrecalculate(super,bvec,blksize=8, overlap=0,thSAD=20)
      fvec_re = Mrecalculate(super,fvec,blksize=8, overlap=0,thSAD=20)
    
      backw = MFlow(clip,super,bvec_re,thSCD1=900,thSCD2=200)
      forw  = MFlow(clip,super,fvec_re,thSCD1=900,thSCD2=200)
    
      clp=interleave(forw,clip,backw)
      clp=clp.RemoveDirt(limit,_grey)
    
    
    # Alternative to RemoveDirt call above
    #  clp     = clp.DeSpot(p1=20, p2=4, pwidth=30, pheight=30, mthres=22, merode=33, sign=1,  seg=0, color=false, \
    #                       motpn=false, fitluma=true, mark_v=255)
    
    #  clp     = clp.invert.DeSpot(p1=12, p2=6, pwidth=18, pheight=16, mthres=22, merode=25, p1percent=10, sign=1, show=Show, seg=1, \
    #                       color=true, motpn=false, mark_v=255).invert
    
    
      clp=clp.SelectEvery(3,1)
      return clp
    }
    Put that in an AVSI file in the plugins64+ folder. Or plugins+ for 32 bit.

    I'm not sure if it requires any other filters you don't already have...
    Last edited by jagabo; 15th Jan 2022 at 11:49.
    Quote Quote  
  2. Tha Great
    Join Date
    Feb 2004
    Location
    DFW from the GoIll
    Search Comp PM
    OK I finally got back to this project after a busy week, had to download AWarpSharp & CAS and I finally got it to load in Vdub2... so now I shall convert things....

    Thanks for all your help!!!
    Quote Quote