Advertisement
tophf

mask_2color_edge

Dec 26th, 2011
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. replaceframessimple( mt_merge( spline36resize(width/2,height/2).eedi3_rpow2(2,alpha=0.5,cshift="spline64resize"),
  2.     \mask_2color_edge($a80130,$4c0222), true), mappings="[11111 22222]")
  3.  
  4. function mask_2color_edge(clip c, int color1, int color2, int "tolerance1", int "tolerance2", int "overlap")
  5. {
  6.     tolerance1=default(tolerance1,10)
  7.     tolerance2=default(tolerance2,10)
  8.     overlap=default(overlap,6)
  9.     c.converttorgb
  10.     colorkeymask(color1,tolerance1).showalpha("yv12").mt_inpand_multi(sw=overlap,sh=overlap)
  11.     \.mt_logic(colorkeymask(color2,tolerance2).showalpha("yv12").mt_inpand_multi(sw=overlap,sh=overlap),"or")
  12.     \.mt_invert.removegrain(4,-1)
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement