g-force said:
Here's what you get by setting the blue output from 255 to 235, and overall gamma of 1.2
SmoothCurve( "0-0;128-158;255-255", "0-0;20-0;128-128;255-235", "0-62;50-67;100-102;128-125;255-252", dither=100, show=false )
You will need LaTo's plugin Smoothadjust, which you can get here:
I believe there are 2 misguided approaches here. First is spectrum clipping , which should never be used (while data is present) because it removes that precious information. Always slide the spectrum to where you want it, for example by adjusting gamma (but gamma itself is too specialized for this application). Second is correction should be accomplished in RGB only. Other approaches (like with SmoothCurve() using YUY2, YV12, et al, colorspaces) are not intuitive and make unintended alterations in other parts of the spectrum.
For global correction, manipulate the spectrum in RGB colorspace by setting what should be picture greys to R=G=B greys. This technique is often called "white balance". Use a "curves" function (most paint programs have one, as in my example below) where one may set the "in" and "out" of any number of arbitrary points and the program re-curves the spectrum to fit. For this proof of concept, I selected test points at low=100 and high=200 (low, medium, and high points, equally spaced across the 0-255 range, would produce an even better result):
I used "the captured princess" shot as my representative sample because it had "without doubt" pure whites (white storm trooper armor under white illumination) from dark to bright -- the posted DVD originals are on the left; the resultant adjustments are on the right. Overall, it fixes everything quite well. However, due to a whole assortment of reasons, a single adjustment may not hold true throughout and exception-adjusts should be made on a shot-by-shot basis where needed.
For this proof-of-concept, the base line (unaltered) is Blue and adjustments for true greys were made to Red and Green, as shown. Points selected for testing were Blue at roughly "100" (shadow) and "200" (hi-light) on what should be truly white objects. This is science, so use an "eye-dropper tool" and get real numbers. Then adjust the corresponding Red and Green to also equal 100 and 200 on those points. In this case:
* Red_low_input = 100 ... Red_low_output = 110
* Red_high_input = 200 ... Red_high_output = 220
* Green_low_input = 100 ... Green_low_output = 110
* Green_high_input = 200 ... Green_high_output = 215
and the rest of the color spectrum takes care of itself.
Use an Avisynth filter to do this as would a paint program (I vaguely remember seeing one, some time ago, somewhere). Otherwise, you must manually extract the 0-255 point adjusts from on your paint program curve (tedious) and otherwise apply them in Avisynth.