Log in

View Full Version : Adjusting image brightness using ColorYUV (chroma question)


Stereodude
14th May 2018, 01:25
Is it correct from a color theory perspective to darken only the luma of an image using color YUV while leaving the chroma untouched if the image is too bright?

For example, I have some video footage that is too bright with glowing blacks and I apply something like a -20.0 offset to the luma channel to darken it up fixing the luma levels (luma) with ColorYUV the chroma is left untouched. Is that the correct way to correct footage that is too bright?

When doing this the colors in the image seems to gain saturation / vibrancy as the luma is decreased. For example skin tones seem to become more colored and less natural. I realize the colors are not actually gaining saturation as the chroma is entirely untouched, but the perceived color looks richer because there is less luma component to dominate the chroma.

It looks more natural to my eye to apply an equivalent saturation reduction using cont_u & cont_v to the image in the two chroma channels, but is that really the right way to handle it?

poisondeathray
14th May 2018, 01:48
It might partially depend on why the image was "dark" in the first place, what processing was used in the steps to get it there

BUT - There is no necessarily "correct" answer. Use whatever works. Some people like adjusting in RGB or even CMYK. Because most certainly the image didn't begin as YUV (raw camera data is usually debayered to RGB).

On one hand, there should be some association, it just makes intuitive sense. But on the other hand the ability to adjust Y separately from CbCr gives you more control

If you look at smoothlevels, the default "chroma" settings is 100, or in the middle (in a range of 0 to 200 . 0 is no chroma processing.)

Stereodude
14th May 2018, 02:13
The image is actually too bright, so I'm darkening it. I'm not entirely sure what happened. I'm guessing it was underexposed and someone didn't have a clue what they were doing when they brightened it up and ended up applying an offset instead of stretching it. I don't know if they were working in RGB when they did so, but it probably was done in RGB.

Stereodude
14th May 2018, 15:22
There's no equivalent filter to ColorYUV that works in RGB, but has a conditional argument so it can be used in conjunction with ConditionalReader?

RGBAdjust and Levels are a no go...

foxyshadis
20th May 2018, 05:43
ColorYUV is pretty dumb. It just does a straight simple math operation on the image, instead of adjusting all the fiddly bits to compensate for our visual perception. What you expect is like the green arrow here, because we usually think of YUV as being a big cube sandbox of 16-236, 16-240, 16-240 that we can play in, but really, it looks more like a Link to the Past crystal, and we get the red arrow. (And that doesn't even touch on gamma-correct shifting!) The opposite effect appears in brights, where things will become less saturated.

I'd say that using HDRAGC is the correct fix, but that may be a sledgehammer to kill a flea for your case. I think SmoothAdjust might deal with saturation automatically? But I can't remember for sure.

Stereodude
21st May 2018, 15:50
I guess it all depends what you're trying to do and how the footage needs adjusting. I can see cases where you'd want to make stupid adjustments exactly as specified and cases when you'd want it to make more intelligent perceptual adjustments.