Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The case against color grading without a linear color space
#1
Most software out there (Photoshop, After Effects, etc.) will by default operate in sRGB colorspace. The same applies for photos or videos taken by digital cameras as well as most video editing applications.

What do you do when you want to color your photo or do a custom grade? You load it into your software and start working on it, for example with Curves or Levels.

In my opinion this is a wrong approach. It's especially problematic if your goal is to remove a blanket tint or correct white balance.

Here's why: sRGB colorspace by default has a gamma of 2.2 (Apple used to have 1.8 I believe, but I believe they switched too). 

This means that the color values, as they are saved in an sRGB image file, are NOT linear. The blacks are essentially stretched and the highlights compressed. This makes sense from a standpoint of maintaining small file sizes (due to the usual low bit depth of 8 bits), but it causes problems when you're trying to do precise work.

More info on Gamma and why it exists: https://en.wikipedia.org/wiki/Gamma_correction

Here are some images from Wikipedia to demonstrate what I mean:
[Image: 1024px-SRGB_gamma.svg.png][Image: 2019-03-13-13-27-51-Gamma-correction-Wikipedia.png]

You can see in the first image that some weird stuff is done to the signal when gamma is applied.

If you look at the second image, in the top row the values are more evenly spread. The top row roughly represents the actually stored brightness values in a gamma-corrected file (for example sRGB) and the lower row represents brightness values in a linearly saved file.

The benefit of the file with the applied gamma is clear: There is more space left for storing darker values, while in the linear file dark values are strongly compressed and quickly crushed in a normal 8 bit file. Without gamma, we wouldn't be able to get the same kind of quality out of 8 bit files.

BUT

Due to the values not being stored linearly, manipulating them without prior conversion to linear space (which most software does *not* do by default) results in unnatural behavior. Some of you may already know how this applies to blur (there are a few videos on Youtube about it), but it applies to everything really.

Let's start with a simple experiment I made:


[Image: source.png][Image: srgb.png][Image: linear.png]

On the left side is the source image. A neutral gradient with a green blob (created in sRGB with 100 G 50R and 50B).

My goal here was to use Curves to lower the green intensity (by dragging the upper right corner down in the green channel) until the green blob becomes neutral.

The middle image is just that, done in sRGB. The right image is again exactly that, but done in linear space. As you can see, the results are not 100% identical, despite the green blob being neutralized in both of them. Granted, it's not a huge difference in this example, but you can see how with more complex examples with many different organic colors could start looking "unnatural" with the wrong approach, or in extreme cases (like when you're trying to brighten dark images) result in really ugly discolored images.

If your eyes allow you to see it, the two images do indeed look pretty identical around 1/4 from the bottom. That's because that is roughly the value (in terms of brightness) I was "aiming for" when neutralizing the green blob. If you overlay both images with "Difference" mode in Photoshop and amplify the results, you get this:

[Image: difference.png]

As you can see, the farther away the values go from the brightness I "aimed at", the bigger the difference between both approaches becomes.

So what does this mean practically?

Imagine you're trying to remove an orange tint that is the result from a white balance that was set wrong.

Now you go ahead and change the curves or Levels so that the highlights are all neutral (a very very common approach that I was even tought at web design school).

But what happens? The middle values don't "fall into place" perfectly and you get subtle discoloration and you can never quite "nail it". When you nail the grey values, the highlights become slightly off, etc.

And white balance is a relatively small problem. Let's take some more challenging problem, for example film fading, where green and blue channels often need to be amplified to extreme degrees. The bigger the change you're trying to make, the bigger these effects become.

Let me give another example:


[Image: IMG-5851-source.jpg]

Above you see the source image.

[Image: IMG-5851-s-RGB-strip.jpg][Image: IMG-5851-linear-strip.jpg]

These are my two attempts at simply reducing the brightness. Left one in sRGB and right one in linear colorspace. Done with Curves by dragging the top right corner downwards. Now, the differences are pretty subtle and get lost in the thumbnails, so I suggest you open them up in full size.

Here's a screenshot comparison for a better comparison: http://screenshotcomparison.com/comparison/132031

Again, it's very subtle in this example, but you can see how the one edited in sRGB gets a kind of "grayness" to it and the one edited in linear space keeps a more natural contrast and more organic colors, as if the photo had simply been taken with lower exposure.

Fazit

I'm making a topic about this because I believe this to be the culprit of a lot of mediocre color correction work I've done throughout my life. Photoshop and other software by default simply operate on the saved values as-they-are, and does not convert to linear colorspace unless you explicitly tell it to.

Granted, my examples are not perfect, but hopefully good enough to bring across my point, which is that basic color manipulation in sRGB colorspace (like increasing Exposure - or gain - or changing color balance) will not behave organically and naturally and sometimes leave you wondering why your results look "weird" without being quite able to put the finger on why.

Happy to hear your opinions and criticisms.
Reply
Thanks given by: bronan


Possibly Related Threads…
Thread Author Replies Views Last Post
  Technical aspects/workflow of HDR grading & encoding TomArrow 1 1,065 2019-12-29, 12:56 PM
Last Post: TomArrow
  Color correction - how to do it easiest way? Colek 5 4,033 2015-10-07, 11:04 PM
Last Post: jerryshadoe

Forum Jump:


Users browsing this thread: 1 Guest(s)