|
General-purpose masking filters?
It seems like we have a lot of neat filters that calculate a mask for the video clip and then process things that fall under / don't fall under that mask.
For example, we have MSmooth / MSharpen which detect edges, BlockBuster which detects areas most likely to be afflicted with DCT blocks, etc.
My question: would it be simple to convert these masking algorithms into filters that just apply the masks and return the relavant clips? For example, it would make something like this possible:
clip = MPEG2Source("test.d2v")
#split into edges and not edges
clip_edges = clip.EdgeMask(strength=5)
clip_notedges = clip.EdgeMask(inverse=true,strength=5)
#process edges
...
#process parts of the clip which aren't edges
clip_notedges_block1 = clip_notedges.DCTBlockMask(block_size=4,detail_min=1,detail_max=20)
clip_notedges_block2 = clip_notedges.DCTBlockMask(block_size=4,detail_min=20,detail_max=100)
#more processing here
...
#splice the clips back together
clip_notedges_final = Layer(clip_noedges_block1,clip_notedges_block2)
clip_final = Layer(clip_edges,clip_notedges)
return clip_final
---
It seems to me that these masking functions could be more useful than they already are if they are broken out of their respective filters so we can play with them more.
-p
__________________
xvid + vorbis + ogm = dance all night
|