Log in

View Full Version : MaskTools, a new set of tools


Kurosu
30th March 2003, 15:38
This set should fit the needs expressed in this (http://forum.doom9.org/showthread.php?s=&threadid=44964&perpage=20) thread, although I didn't have it in mind while making it. That's why it may be redundant with some other filters's uses. The included filters only work in YV12 colorspace, and are able to process separately each plane.

The offered filters aren't exactly atomic, but close to, and should be a good start point for a general use. Despite the huge speed impact (it will most likely make the script spend its time copying data), I've chosen to implement such idea after getting sick of rainbows that can only be filtered on static parts or with an hypothetic Fourrier notch filter. It's still of little efficiency, but at least, some other ideas have arisen to give it other possible uses :)

Get the package here (http://kurosu.inforezo.org/avs/MaskTools.zip).

I let you have ideas while reading section V ("Some practical uses") of MaskTools.txt, included in the package. I've tried some basic MMX optimizations, but there's still a lot of things to add, in particular a clamping function (limiter()'s code should help).

One last point: the idea certainly doesn't have any copyright, since masked filtering is as old as (modern) image processing (any free vs copyright-madness ignored). That's the reason behind the GPL license.

Didée
31st March 2003, 14:45
Kurosu,

thanks A LOT for starting out with this!

I will not code any improvement, since I don't code at all ;)

But I have a lot of ideas what to do with masking, heh.

I definetly hope that further improvements will come in the nearer future.

/off for testing and playing

Didée

primitive
2nd April 2003, 17:28
Ooo, sexy.

Kurosu
2nd April 2003, 21:54
Although more powerfull, this http://forum.doom9.org/showthread.php?s=&threadid=50105 thread seems to allow similar per-frame filtering abilities.

It saddens me quite a bit to see that this set was ignored. Maybe I should have been more precise, in particular for the examples (as some ideas are discussed in the text file within the package) which would have helped to bring some more attention to this set.

I hope that at least it gives more ideas to their author, as it does weighed filtering in addition to conditionnal filtering (the mask is only binary while MaskedMerge's one acts as an alpha channel). Masktools is dead, long live Conditionalfilter.

EDIT
New versions with those fixes:
- Fix the shift for edgemask using sobel and roberts (misplaced MMX instruction)
- MaskMerge should now work (mask cleared before being used... check with MaskMerge(clip3,clip3) for instance)

Above link was updated.

sh0dan
2nd April 2003, 22:42
Very nice!

I hope to get some time to do a new layer soon - operating on planar formats. This filter will be the perfect toolbox for a more generalized (and hopefully more logical) layer function.