Thread: Masks creation
View Single Post
Old 10th June 2011, 23:01   #6  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 712
My attempt. A bit rough but should be close enough for rock 'n' roll.

Code:
e1 = mt_edge (mode="prewitt", thY1=0, thY2=255)
e2 = mt_edge (mode="min/max", thY1=0, thY2=255)
mt_makediff (e1, e2)
mt_lut ("x 128 - 0 max 256 / 0.25 ^ 256 *")
mt_deflate ().mt_deflate ()
w = width ()
h = height ()
r = 3
BicubicResize (w / (r*2) * 2, h / (r*2) * 2, 1, 0)
TemporalSoften (2, 20, 255)
mt_expand ().mt_inpand ().mt_inpand (mode="both")
BicubicResize (w, h, 1, 0)
mt_lut ("x 10 - 6 *")

MergeRGB (last, last, last) # Display
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding

Last edited by cretindesalpes; 10th June 2011 at 23:29. Reason: Silly display code
cretindesalpes is offline   Reply With Quote