Skip to content

Instantly share code, notes, and snippets.

@YamashitaRen
Created September 15, 2015 10:47
Show Gist options
  • Save YamashitaRen/a0418d71603deda09ad0 to your computer and use it in GitHub Desktop.
Save YamashitaRen/a0418d71603deda09ad0 to your computer and use it in GitHub Desktop.
FichierSource='mpv-shot0006.png'
import vapoursynth as vs
import functools
core=vs.get_core()
def band(x,y):
if x==y:
return 255
else:
return 0
Clip=core.ffms2.Source(source=FichierSource)
Clip=core.std.ShufflePlanes(clips=Clip,planes=0,colorfamily=vs.GRAY)
Clipnnedi=core.nnedi3.nnedi3_rpow2(clip=Clip,rfactor=2)
for i in range(0,2):
Clip=core.nnedi3.nnedi3(clip=Clip,field=1,dh=1,nsize=0,nns=3)
Clip=core.std.Transpose(Clip)
Clip=core.std.Lut2(clipa=Clip,clipb=Clipnnedi,function=band)
Clip.set_output()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment