Offset for Color Correction & Histogram Gaps

ALO wrote on 10/20/2021, 11:30 AM

Recently I've been experimenting with using Vegas' Offset fx (aka Printer Lights) to tackle global color casts. To make a long story short, in ease of operation and quality of results, this approach seems to best every other technique I've tried, particularly for the most difficult-to-fix images. I particularly like the look of the linear correction vs things like color balance. I also love how you can directly monitor your correction with the vectorscope, which shows you in real time exactly what the image needs *and* tells you how to do it.

The issue is if you use Offset, you're going to end up with gaps in your histogram where the individual channels don't extend across their entire range. Here's an extreme example:

I've been pondering what the best approach is to deal with this, including just ignoring it and going forward with contrast, sat, etc... (although I am afraid of getting in trouble with the histogram police).

If I ignore the gaps, the image above is going to have a cast in the highlights and shadows, which never reach true black or true white (though on a case by case basis this may or may not be visible).

Obviously I could use a per-channel levels to drag those histograms to their endpoints, but that defeats the purpose of the initial offset, which was to create a linear correction.

I could also use a global (RGB) levels to clip the ends (in the example here) to the bottom of the blue channel and the top of the red channel. This seems like the most logical approach, although I do hate to throw away the shadow and highlight data in the other two channels.

If anyone has any thoughts on this, I'd love to hear them.

For the record, you can access offset in two ways. Either via the Color Grading Panel, which gives you both a wheel and a sliders interface, or via the Color Corrector (Secondary) fx, under the "chrominance" arrow, which gives you a wheel but not (alas) the sliders.

Comments

Yelandkeil wrote on 10/20/2021, 12:56 PM

Confused what is your purpose!

An SDR-camcorder takes as much illegal colors as it can by shooting so that you have the alternative to use them or throw them away by your post.

 

As for color correction, people use at least three tools to monitor the preview window/picture:

The vectorscope for color value

The waveform for signal peak

The histogram for pixel distribution

And for a proper signal range there's LEVELS filter, for color temperature the CC2ndary i.e. and for fine tune the CC1st/primary. Here you meet words like offset etc.

Last changed by Yelandkeil on 10/21/2021, 5:40 AM, changed a total of 1 times.

ASUS TUF Gaming B550plus BIOS3202: 
- Thermaltake TOUGHPOWER GF1 850W 
- ADATA XPG GAMMIX S11PRO; 512GB/sys, 2TB/data 
- G.SKILL F4-3200C16Q-64GFX 
- AMD Ryzen9 5950x + LiquidFreezer II-240 
- XFX Speedster-MERC319-RX6900XT <-AdrenalinEdition 24.12.1
Samsung 2xLU28R55 HDR10 (300CD/m², 1499Nits/peak) ->2xDPort
ROCCAT Kave 5.1Headset/Mic ->Analog (AAFOptimusPack 6.0.9403.1)
LG DSP7 Surround 5.1Soundbar ->TOSLINK

DJI Mini4 Pro: HLG4k60p, AWB, shutter=100, ISO=auto, EV-2.0
Lumix DC-GH6/H-FS12060E: HLG4k60p, AWBw, shutter=100, ISO=auto (250 - 6400)
HERO5: ProtuneFlat2.7k60pLinear, WB=4800K, Shutter=auto, ISO=800

Win11Pro: 24H2-26100.4202; Direct3D API: 12.2
VEGASPro22 + XMediaRecode/Handbrake + DVDArchi7 
AcidPro10 + SoundForgePro14.0.065 + SpectraLayersPro7 
K-LitecodecPack17.8.0 (MPC Video Renderer for HDR10-Videoplayback on PC) 

ALO wrote on 10/20/2021, 1:16 PM

I should have mentioned the image above is the *corrected* image's histogram. By using offset, you are rearranging the individual RGB channels' horizontal relationship without otherwise altering them in any way ... hence the historgram "offset".

For those who have not tried it, I do recommend this method for color balancing, as the linear nature of the transform does give a distinctly different (and pleasing) look.

ALO wrote on 10/20/2021, 2:06 PM

Here is an example of a (random) non-linear color correction:

Color Balance Fx, Temp & Tint Fx, and the primary color wheels all operate as variations of this kind of operation.

Here is a linear channel offset:

This is apparently analogous to how things used to be done in the film days (note I'm using Photoshop's curves dialogue because for some insane reason, Vegas' Curves Fx won't allow you to move the endpoints freely in both X and Y axes).

ALO wrote on 10/20/2021, 8:23 PM

Just wanted to also note that figure A above is also a fantastic example of why, esp with 8-bit capture, you want to get your white balance right in-camera (when you can) rather than trying to fix in post. :)

RogerS wrote on 10/20/2021, 9:16 PM

Real world images don't have each channel of the histogram taking up the entire available space- that really depends on image content, so no need to fear the histogram police.

It's more helpful to identify neutral areas in the shadows, mids and highlights and use whatever tool works best (white balance, color curves, 3 way color corrector) to get them to neutral without clipping important image data.

Musicvid wrote on 10/20/2021, 11:34 PM

Depends on the scene content and lighting. Locking the black point or white point first is often the best place to start. That's why cinematographers like Lift and Gain.

Pop Quiz: Hand-draw approximations of histograms for the following:

  • Black cat in a coal mine
  • White cat in a snowstorm
  • Overcast day

Note that none of these will quite "fill" the available dynamic range. Nor would they look especially good if they did. For further reading, start here:

https://www.amazon.com/Digital-Zone-System-Control-Capture/dp/1937538133/ref=sr_1_7?dchild=1&keywords=photography+zone+system&qid=1634790738&s=books&sr=1-7

NickHope wrote on 10/21/2021, 2:16 AM

....Vegas' Curves Fx won't allow you to move the endpoints freely in both X and Y axes).

You can make a preset that has 2 extra points on it and move those. Points move 1 unit for each press of the arrow keys on your keyboard, so it's quite quick to get points to 16, 235 or whatever. I don't think this is possible in the color curves in the grading panel.

I do all my color correction like this, sometimes adding Color Corrector (secondary) FX to do masking, adjust saturation etc.. It's fiddly but you have lots of control. Would love a more automated way to color correct that doesn't do the blunt clipping seen in the histogram in your first screengrab but have never found one, even in Resolve.

Yelandkeil wrote on 10/21/2021, 5:08 AM

No doubt that's the Histogram of screenshot in a finished product strictly according to the early "Rec709" standard.

That's why my big confusion.

 

For such post-source materials, if colorcorrection is needed, Lift or ChannelBalance is OK for shadow; but for highlight, it's not what called offset/gaps, it's the colorpeak balance --

Last changed by Yelandkeil on 10/21/2021, 5:29 AM, changed a total of 1 times.

ASUS TUF Gaming B550plus BIOS3202: 
- Thermaltake TOUGHPOWER GF1 850W 
- ADATA XPG GAMMIX S11PRO; 512GB/sys, 2TB/data 
- G.SKILL F4-3200C16Q-64GFX 
- AMD Ryzen9 5950x + LiquidFreezer II-240 
- XFX Speedster-MERC319-RX6900XT <-AdrenalinEdition 24.12.1
Samsung 2xLU28R55 HDR10 (300CD/m², 1499Nits/peak) ->2xDPort
ROCCAT Kave 5.1Headset/Mic ->Analog (AAFOptimusPack 6.0.9403.1)
LG DSP7 Surround 5.1Soundbar ->TOSLINK

DJI Mini4 Pro: HLG4k60p, AWB, shutter=100, ISO=auto, EV-2.0
Lumix DC-GH6/H-FS12060E: HLG4k60p, AWBw, shutter=100, ISO=auto (250 - 6400)
HERO5: ProtuneFlat2.7k60pLinear, WB=4800K, Shutter=auto, ISO=800

Win11Pro: 24H2-26100.4202; Direct3D API: 12.2
VEGASPro22 + XMediaRecode/Handbrake + DVDArchi7 
AcidPro10 + SoundForgePro14.0.065 + SpectraLayersPro7 
K-LitecodecPack17.8.0 (MPC Video Renderer for HDR10-Videoplayback on PC) 

ALO wrote on 10/21/2021, 9:45 AM

 

You can make a preset that has 2 extra points on it and move those. Points move 1 unit for each press of the arrow keys on your keyboard, so it's quite quick to get points to 16, 35 or whatever. I don't think this is possible in the color curves in the grading panel.

 

Nick thank you -- I wasn't aware you could use the arrows to move in increments. That's really helpful.

ALO wrote on 10/21/2021, 10:05 AM

For further reading, start here:

https://www.amazon.com/Digital-Zone-System-Control-Capture/dp/1937538133/ref=sr_1_7?dchild=1&keywords=photography+zone+system&qid=1634790738&s=books&sr=1-7

This is your wheelhouse, isn't it?

https://theasc.com/ac_magazine/September2006/DigiPrinterLights/page1.html

Musicvid wrote on 10/21/2021, 12:01 PM

Would love a more automated way to color correct that doesn't do the blunt clipping seen in the histogram in your first screengrab...

Unfortunately, when working with integer space source, that is often the case. On the other hand, the art of expressing the "best" 8 bits from real HDR source is in its infancy, and I think some more sophisticated weighting tools for expert graders are on the horizon.

This is your wheelhouse, isn't it?

https://theasc.com/ac_magazine/September2006/DigiPrinterLights/page1.html

That's great! My film finishing experience was pre-Hazeltine, but it looks to be an adaptation of the hybrid high-volume film and negative scanner technology I used and maintained in a previous century. And you are correct; I would be right at home in that captain's chair, if I'm not too old to retool my thinking. I retired from film in 1988.

ALO wrote on 10/21/2021, 9:00 PM

@Musicvid here is the connection:

https://www.google.com/books/edition/Color_Correction_Handbook/mFkXAgAAQBAJ?hl=en&gbpv=1&dq=hurkman+%22the+reason+for+this+difference+is+that+the+principal+controls+of+offset%22&pg=PA231&printsec=frontcover

Musicvid wrote on 10/22/2021, 12:28 AM

I invite further discussion, but I generally grade from the bottom up, and I tune my orchestras from the bottom up. I've survived criticism on both stages. I'll think on it, though. Why again are you introducing black setup? What if the scene is low key or high key and doesn't fill the dynamic range?

ALO wrote on 10/23/2021, 2:00 PM

I think we are 100% in agreement that a scene shot in fog, for example, probably isn't going to have blacks at 0% and whites at 100. For sake of simplicity let's just assume we're in bright daylight and we have true blacks and whites in frame.

The use of offset as I'm describing it leads to an interesting choice/dilemma as to how to contend with what offset does -- it "offsets" the channels. But we probably want our endpoints to be (0,0,0) and (255,255,255), not (0,0,20) and (225,255,255), for example.

If we shot in a raw format there wouldn't be much dilemma -- we'd just clip off the endpoints because we'd already have an abundance of bit depth.

But particularly in 8-bit source, bits are precious, and thus the interesting dilemma: how best to grade the scene.

I find myself leaning in the direction of jpeg compression -- figure out what can and can't be seen, and make your compromises, as much as possible, where they tend to be invisible. Philosophy, I guess. But you can get gorgeous results using offset's linear effect vs the more traditional color balance or tint/temperature controls.

Musicvid wrote on 10/23/2021, 8:29 PM

Just for fun, what if you were to substitute the term "Brightness" instead of "Offset" when reading the article, and in your thinking and discussion that followed. Would that affect your thinking?

The discussion, though, actually lends some credence to other requests to add "Brightness / Contrast" in addition to HSL (all midlevel-centric TV controls); I still don't think any of them deserve prominence on the Grading Panel, though. I do suppose that they serve a purpose by providing a familiar entry point into the grading constellation for the many emerging editors who have had only consumer experience.

I enjoy reading your bright observations, and trust they will continue to lead you down a productive learning trail.

RogerS wrote on 10/23/2021, 8:55 PM

Wouldn't per-channel curves preserve more image data than offsetting channels? Something like the X-Rite Colorchecker Video gives you middle gray, highlights and shadows you can use to dial in the neutrality of each channel.

ALO wrote on 11/5/2021, 1:46 PM

Roger I suspect (though I don't know how to prove it) that doing a 3-channel color offset is exactly the same manipulation as an autolevels correction, but (1) via a manual vs automatic action and (2) without the clipping.

It also seems clear to me that doing a color balance adjustment (which I think is what you're describing) preserves detail in the shadows and highlights, but at the cost of introducing distortions elsewhere. The beauty (or liability) of the offset strategy is you preserve the detail in the midtones, where presumably you most want it, and shift the distortions to the ends.

MusicVid I see a brightness adjustment as grabbing the middle of the curve and dragging it. Same as dragging the gamma slider in a levels fx. The brightness transform (some NLE's also call this exposure) is non-linear. It mostly affects the midpoint, with progressively less effect as you move to the shadows/highlights.

Whereas offset is a linear transform (ie, add or subtract x to each brightness value from 0-255). So no, I don't see them as equivalent. They do distinctly different things to an image. (and thanks -- I at least try to do more than just cause trouble...)

Musicvid wrote on 11/5/2021, 3:40 PM

MusicVid I see a brightness adjustment as grabbing the middle of the curve and dragging it. Same as dragging the gamma slider in a levels fx. The brightness transform (some NLE's also call this exposure) is non-linear. It mostly affects the midpoint, with progressively less effect as you move to the shadows/highlights.

You do? Do you have a visual demonstration of the "difference" between the two controls in Vegas?

Here's a parallel discussion (hint: Vegas' Brightness control is linear, the equivalent of applying analog DC offset).

https://www.vegascreativesoftware.info/us/forum/harshly-backlit-sun-from-walls-of-windows-causing-really-bad-washout--132616/?page=2#ca826982

ALO wrote on 11/10/2021, 9:23 AM

OK you got me -- I never use that fx in Vegas. I think that's an unusual implementation. In other apps I've used, brightness works in the way I described -- equivalent to Vegas level's fx's gamma slider, not an offset.

Sorry for the confusion!

(incidentally, if you want to play around with the difference between offset/curves when colorizing an image, put two black-to-white gradients on the timeline, add a color curves fx to one and the color grading fx to the other. Use the curves to manipulate one channel -- say red -- by placing a point in the middle and dragging it. Use the offset sliders in color grading to add or subtract the same color. Good demonstration of how the two approaches give different results)

Musicvid wrote on 11/10/2021, 12:08 PM

Yes, I know that but thanks. Of course you must be aware that method can be deceptive with log functions.

An often better visual indicator for me is the Difference composite, such as my banding examples here

https://www.vegascreativesoftware.info/us/forum/hdr-banding-target-for-post-production--132579/