mg262
18th September 2005, 10:53
So, this is something that is used within an animation denoiser recently released by @TBL and myself, but there's no reason why it can't be used on its own:
http://people.pwf.cam.ac.uk/mg262/posts/Foreground/edgemask.jpg
To use it, get the Foreground filter from here:
http://people.pwf.cam.ac.uk/mg262/posts/Foreground/Foreground.HTML
and also load MaskTools. Then run the script:
source = ...# change this as appropriate
seeds1 = source.Blur(1).Blur(1).LocalMaxima.inflate.inflate.inflate.binarize(40, upper=false)
seeds2 = source.Blur(1).Blur(1).Blur(1).LocalMaxima.inflate.inflate.inflate.binarize(40, upper=false)
logic(seeds1, seeds2, "or")
greyscale
That script only looks at the luma when creating a mask; if you want one that considers the chroma as well, you can use utoy, etc. .
http://people.pwf.cam.ac.uk/mg262/posts/Foreground/edgemask.jpg
To use it, get the Foreground filter from here:
http://people.pwf.cam.ac.uk/mg262/posts/Foreground/Foreground.HTML
and also load MaskTools. Then run the script:
source = ...# change this as appropriate
seeds1 = source.Blur(1).Blur(1).LocalMaxima.inflate.inflate.inflate.binarize(40, upper=false)
seeds2 = source.Blur(1).Blur(1).Blur(1).LocalMaxima.inflate.inflate.inflate.binarize(40, upper=false)
logic(seeds1, seeds2, "or")
greyscale
That script only looks at the luma when creating a mask; if you want one that considers the chroma as well, you can use utoy, etc. .