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