Log in

View Full Version : Manual Global Color Correction with ColorYUV()


DoctorM
22nd June 2013, 07:28
I'm trying to tweak an old piece of video with a yellow push.

Using coloryuv(autowhite=true) is a little cold looking. I read a suggestion to use coloryuv(analyze=true) and manually setting the chromau and chromav using those numbers.

The thing is, it doesn't work how I'd really like it to. Unless I'm wrong, the average Y, U, and V generated by analyze is for each frame.

What I'd really like is some way to take a cumulative average across the whole piece of video and then setting one U and V value based on that.

Is that even possible?

StainlessS
22nd June 2013, 07:30
cumulative average across the whole piece of video
ShowChannels() does that (but not really a reliable way of correcting a colour cast.).

http://forum.doom9.org/showthread.php?t=163829&highlight=showchannels

Perhaps take a peek here:-
http://forum.doom9.org/showthread.php?t=156774&highlight=coloryuv2

EDIT: Also see "Histogram()" in docs.
http://avisynth.org/mediawiki/Histogram

DoctorM
22nd June 2013, 21:59
Thanks. I ended up using AverageLuma, AverageChromaU and AverageChromaV with WriteFile().
Ran the video, dumped the output data to an XL spreadsheet and ran an average on the columns. (Your way would have been better if I had read that first...)

And you are right... NOT a good method in general.
Tried: ColorYUV(off_u=8.16126,off_v=-7.549737)
Except that black screens are now more blue.

There really needs to be a way to limit it when the values are less than 128+the offset.
I'm thinking of using: merge(ColorYUV(autowhite=true),last,.5) as a compromise.

StainlessS
22nd June 2013, 22:59
It might be worth getting the Graffers & Toys zip @ 2nd link, save a bitmap and in real time move the sliders
in ColorYUV Graffer, probably get you in the right ball park, if not then maybe RGBAdjust Graffer will do it.