The first step for the initial corrections of the "missing scene/shots" faded 16mm print was to get it all working in Avisynth. I had already used the VirtualDub plug-in Gradation Curves (see it's development here http://originaltrilogy.com/forum/topic.cfm/THX-1138-preservations-Italian-Cut-available-see-1st-post/post/589761/#TopicPost589761) to good effect. Still, it would be more convenient to have a single, all-in-one, Avisynth script. The problem was finding an Avisynth plug-in that would duplicate a paint program's complete Histogram functions -- low/high in, low/high out, gamma, and mid-tone compress/expand for independently adjustable R-G-B.
In color correction, be careful never to make adjustments that "crush" dark areas or "blow-out" light ones. That won't happen if one stays with gamma and mid-tone adjustments, which manipulates color within the spectrum limits. So, no low/high input/output manipulation, except in 2 extraordinary cases: [1] you're Peter Jackson (I'd say "George Lucas" but let's give the poor man a rest); [2] color correcting faded film.
In the Peter Jackson case, you've made a perfectly fine looking movie in The Fellowship Of The Ring theatrical edition:
But there's a hankerin' for the green in show-biz, and it spills over into your later TFOTR extended edition:
If you had used gamma and mid-tones, OT forum members would have fair-chance at restoring the original colors. But you used low/high adjustments and crushed a quarter of the Red channel to achieve your effect.
(By inverting only the minimum "0" brightness to maximum "255", R-G-B channel crush shows their colors.):
Bad boy, PJ!
However, in the faded film case, the R-G-B film layers fade, that is, they lighten up -- darks become lighter and lights become lighter still -- effectively losing contrast toward lightness (in different degrees for the different layers):
For color fade correction, you use the low/high input to take those reduced contrast ends and spread them back across the spectrum (to make known blacks black and known whites white -- use an eye-dropper tool to roughly verify R=G=B):
Histogram low input high input
RED 64 160
GREEN 16 200
BLUE 16 176
From that new base, you only need to adjust the gamma to slide the concentration of color around inside the spectrum (to make known middle greys grey -- and everything else just falls in line):
Histogram low input high input gamma
RED 64 160 0.8
GREEN 16 200 1.6
BLUE 16 176 1.2
Done! Is that amazing or what? But the important thing is, now without mid-tones adjustments, this can be accomplished completely within Avisynth using the Levels() function.
As discussed some pages after the above link, we discovered a number of issues that needed addressing for this clip:
- The capture process created chromatic aberration (R-G-B color-layers slightly expanded or contracted due to lens photography) and needed shifting and resizing for better alignment.
- An apparent narrow depth of field produced haloing on slightly out-of-focus layers. A DeHalo filter helped reduce that effect.
- Generational film grain was severe and needed a mild temporal denoising to make the grain reduce itself without blurring the picture.
- Finally, the above demonstrated color correction was applied to de-fade the film.
Here are select, split-screen samples, all with one Avisynth script: