CraigBjorn
22nd November 2004, 01:23
I'm trying to create a contrast mask. I use them alot when processesing overly contrasted images, but I've never done it with video... If you don't know what it is this http://www.gimp.org/tutorials/ContrastMask/ should give you a good idea. So far I've come up with this
#Applies a contrast mask to a video in order to reduce contrast
function CMASK (clip source, float opacity)
{
a = source.converttoYUY2()
b = a.Tweak(sat=0).invert()
return Overlay(a, b, opacity=opacity, mode="XXX")
}
my only problem is that none of the modes work like the overlay mode in the image processing programs... this could be due to the fact that I'm working with a YUY2 source.. butI don't know if there's any good work around for this...
Any ideas?
#Applies a contrast mask to a video in order to reduce contrast
function CMASK (clip source, float opacity)
{
a = source.converttoYUY2()
b = a.Tweak(sat=0).invert()
return Overlay(a, b, opacity=opacity, mode="XXX")
}
my only problem is that none of the modes work like the overlay mode in the image processing programs... this could be due to the fact that I'm working with a YUY2 source.. butI don't know if there's any good work around for this...
Any ideas?