View Full Version : help with conditionalfilter needed

23rd February 2004, 16:06
I have 4 clips:

out1 and mask1
out2 and mask2

I need a construct that returns out1, if mask1 is darker than mask2
and returns out2, if mask2 ist darker than mask1

something like

out = (averageluma(mask1)<averageluma(mask2)) ? out1 : out2

but this does not work and conditionalfilter has one one clip to test on....

23rd February 2004, 16:15
Can't you use FrameEvaluate to determine the AverageLuma of one clip (= AL1), and use ConditionalFilter to compare the AverageLuma of the second clip with AL1?

23rd February 2004, 16:19
I didn't really get into the frameevalute and scriptclip - stuff :(((

I need a example...

I even don't check those ones supplied with the avisynth-doc.

23rd February 2004, 17:06
Originally posted by scharfis_brain
out = (averageluma(mask1)<averageluma(mask2)) ? out1 : out2

ConditionalFilter(out1, out2, "averageluma(mask1)", "<", "averageluma(mask2)")


24th February 2004, 01:34
oh, whoops this thing works....

never thought that conditionalfilter can handle two teststream.
I thought also, that "value" has to be a constant number...