Advertisement
tophf

t_smallspots

May 21st, 2012
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function t_smallspots( clip c, int "thresh", int "color1", int "color2", int "color3", int "tolerance", int "expand", bool "BT601" )
  2. {
  3.     thresh=default(thresh,30) #maximum spot area in pixels
  4.     color1=default(color1,$e0e0e0) #white 87%
  5.     color2=default(color2,$f0f0f0) #white 94%
  6.     color3=default(color3,$ffffff) #white 100%
  7.     tolerance=default(tolerance,30) #color matching tolerance
  8.     expand=default(expand,0) #additional expansion of color mask to include edges of the spots
  9.     BT601=default(BT601,true) #RGB YUV matrix of color is BT.601 tv-range (true) or BT.709 tv-range (false)
  10.  
  11.     c.t_3colormask(color1,color2,color3,tolerance,expand,BT601).mt_deflate.mt_binarize(128)
  12.     TMaskCleaner(thresh).mt_expand.mt_invert.mt_logic(last,"min")
  13.     mt_expand.binomialblur(10,u=1,v=1).mt_lut("x 5 *").binomialblur(5,u=1,v=1)
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement