Log in

View Full Version : HSV (de)composing: is it possible in AVISynth?


FredMSloniker
7th May 2011, 22:11
I want to produce a psychedelic effect in a short video clip by taking the saturation and value from one clip and the hue from another, merging them together. Combining the chroma from one and the luma from the other isn't what I want, because I want the first clip's gray areas to stay gray. I'm pretty sure I can't do that with out-of-the-box AVISynth, but if I'm wrong, I'd be happy to be corrected! If I'm not wrong, is there a plugin that would let me do this?

IanB
8th May 2011, 01:00
You might be able to craft something using UtoY, VtoY and Masktools LUTs

Saturation is related to SQRT(U**2+V**2).

Hue is related to ARCTAN2(U, V).

Remember U and V data are biased by 128. So 16 means -1.0, 128 means 0.0 and 240 means +1.0 in normalised terms.