PDA

View Full Version : grayscale filter for avisynth?


Luxcious
23rd November 2001, 10:04
Does anyone know of a grayscale filter for avisynth?

I have some black/white material that contains colour splotches (must be that NTSC format) that i'd like to remove. I've pretty much started using avisynth and Greedyhma for all my encodes, so I used to use the internal VirtualDub filter.

Lux.

Steady
23rd November 2001, 17:36
Does it need to work with RGB or is just YUY2 ok? If YUY2 I can write you one and have it up tomorrow. I could also have an RGB version up tomorrow but it would be much slower.

TPN
23rd November 2001, 19:35
If you can't wait till tomorrow, you can use Donald Graft's Colorize plugin for VirtualDub http://sauron.mordor.net/dgraft/colorize.html

Import("vdfilters.avs")
VD_Colorize(0,0,239)

You need to use RGB ofcourse so it is slow.

Luxcious
23rd November 2001, 23:00
@steady

Thanks for the reply. Yeah, a YUY2 grayscale filter would be great. Last night I frameserved through VirtualDub, but I'd rather skip that step if possible.

@TPN

Thanks for the tip. I'll give it a try and see how it compares to adding VirtualDub framserver to the loop.

Steady
24th November 2001, 06:33
Here ya go ...
http://home.midwest.net/~steady/greyyuy2.zip

Luxcious
24th November 2001, 11:52
Originally posted by Steady
Here ya go ...
http://home.midwest.net/~steady/greyyuy2.zip

Great. Thanks Steady.

I'll give it a try tomorrow when I plan to cap another Black & White movie.

Lux.

Guest
2nd January 2002, 08:09
Better to use my Hue/Saturation/Intensity filter with saturation
at 0, because it allows to adjust the intensity, which typically must be increased.

TactX
2nd January 2002, 21:15
Thanks for the HSI-filter-hint Donald !

I wanted to use Steadys filter on a b/w-coloured-mixed-movie (the first 2 or 3 minutes are b/w, the rest is color).

Unfortunately the b/w and coloured parts are blended together.

No problem (I thought), simply use Dissolve to blend both parts toghether after filtering. But for some reason dissolve won't work on my system.

So I wanted to use Animate, but as Steadys filter doesn't have any parameter to "animate"...

Then I tried your HSI-filter with animate :

animate(1,69,"hsi",0,0,-100,10,63,0,0,50,10,63)

and it works great :D

Keep on programming filters Donald and Steady !

nickolasemp
23rd September 2006, 15:00
Could someone please upload the file again. I would like to remove all those partially green stuff that sometimes appear in my picture when using x264...

scharfis_brain
23rd September 2006, 15:10
just use greyscale()

nickolasemp
23rd September 2006, 15:13
Thanks... Is there any way of using this to just some areas and not to other? Just for future reference, I don't need such thing right now.

scharfis_brain
23rd September 2006, 15:14
use some trim()

nickolasemp
23rd September 2006, 15:18
Thank you for your quick answers... I'll look it up to see how it works.

JMP
24th September 2006, 10:46
Thanks... Is there any way of using this to just some areas and not to other? Just for future reference, I don't need such thing right now.
And what do you mean by "some areas"? Some areas of a frame, or some sequences of frames? In the former case you may use masktools, in conjunction with some hand created masks selecting the areas you want to grayscale. In the latter case Applyrange() may produce a nicer-looking script, than a sequence of Trims.

nickolasemp
24th September 2006, 11:20
In the latter case Applyrange() may produce a nicer-looking script, than a sequence of Trims

Yes, I meant the latter. I'll see both opf them. I'll see what exactly Applyrange() does and I'll see how I am supposed to use it -with parameters. Thank you both.

JMP
24th September 2006, 12:31
Applyrange(start_frame, end_frame, "Greyscale")

Removes color from frames from start_frame to end_frame inclusive.

nickolasemp
24th September 2006, 12:46
Thank you very much for your tip JMP. I've found here (http://avisynth.org.ru/docs/english/corefilters/animate.htm) that In cases where a large number of ranges need similar processing using many ApplyRange calls may cause resourse issues I sure hope that I won't have to use that Conditional thing. It's not difficult but I'm not in the mood of combining too many stuff for -what is supposed to be- an easy task.

JMP
24th September 2006, 12:54
If you have really many ranges, then the RemapFrames filter (and in particular ReplaceFramesSimple() function coming with this package) may help, and is definitely easier to use, than ConditionalFilter().

Unless you want to select the frames that will be grayed out automatically, by some frame property. Then ConditionalFilter() is for you.