PDA

View Full Version : I need a simple color filter


HighInBC
7th October 2004, 22:55
Hi guys, have not posted here in a while.

I need a filter that will allow me to make every pixel below a certain brightness black, and every pixel abouve a cerain level white. In essence a black and white bitmap created using a theshold.

I have tried doing this with Layer() and Limiter() with limited success.

Is the a filter that already does this? Can I do it with Layer() somehow?

I am doing to to create alpha masks for overlaying purposes. I have a perl script that does this, and it works great, but I have to make gigabytes on uncompressed BMP's to do it. An avisynth filter would work great.

I use the latest version of avisynth.

Anyone who helps me will get there name in the special thanks section of the film I am working on. thanks -HighInBC

Karyudo
7th October 2004, 23:06
I'm just surfing while at work (just across the Georgia Strait, BTW) and so I don't have a complete solution, but have you taken a look at the built-in AviSynth function "Levels"? If it works anything like the Photoshop equivalent, this is probably all you need.

Check it out at:
Levels (at AviSynth.org) (http://www.avisynth.org/Levels)

HighInBC
8th October 2004, 04:07
Ahh, I have found the Binarize() command in MaskTools.dll and it does exactly what I want. Thanks!

stickboy
8th October 2004, 11:13
I have a Threshold/Coring (http://www.avisynth.org/stickboy/) plug-in.

HighInBC
8th October 2004, 17:52
That looks very usefull, thank you!