TV Backlight Compensation
lofibucket.com
lofibucket.com
There's a few things I don't get. The first one is why he's using the same global scalar values for gain and offset for the entire image, instead of pixel-wise values. The pattern isn't uniform, so why is the correction?
The second is why the optimization is just randomizing new values instead of using a better algorithm like gradient decent. This kind of stochastic search seems really wasteful.
The third is why it needs to be an optimization problem at all, why not just look at the blob image? Each pixel is supposed to be white, but we see (R_max, G_max, B_max), where both G_max and B_max is < R_max, making the pixel red. So just remap the green and blue channel for each pixel to [0, R_max] instead. Then each pixel will have the same gray value of (R_max, R_max, R_max) when displaying white. This should be really straight forward in a shader.
0. The full stack of end-user display down through distribution, editing, and "film" camera applies faithful color management.
1. Every scene contained a hidden color calibration frame that was recorded on-set holding a proper calibration sheet that the end-user's display could apply dynamic color-correction to produce color calibrated to the average lighting conditions that existed on-set.
2. The end-user can choose whether to apply just 0. or also 1.
There is another problem: in filming or editing, by applying color filter "looks" there is currently little in the way of assurances that downstream will faithfully reproduce what was intended. Colorspace profiles were and are a great advance, but they need to be measured, calibrated and validated all the way down so that they're useful.
PS: This article also reminded me of an attack that could reproduce almost an entire image from diffuse reflections of old-style scanned CRTs/TVs, e.g., that ghostly blue glow of TV watching visible from outdoors, but also that imperfect reflections of CRT computer monitors could reveal their contents.
https://dl.acm.org/doi/10.1145/1186822.1073257
"We present a novel photographic technique called dual photography, which exploits Helmholtz reciprocity to interchange the lights and cameras in a scene. With a video projector providing structured illumination, reciprocity permits us to generate pictures from the viewpoint of the projector, even though no camera was present at that location."
I recommend watchign the video from the paper for good explains and demonstrates the technique. It's very impressive work.
I'm sure it was harder than that in practice.
As incredible as LCD manufacturing is, the eye is amazing at being able to pick-out differences under the right conditions. All kinds of corrective work had to be applied to the displays in order to achieve uniform, repeatable and reliable color and image rendering performance.
Instead of white target, could even map a desired digital video file into the ideal target. For more general distortions you could obviate the 'blob' image and instead just optimize a gain and offset for every pixel independently. Seems ambitiously high dimensional but I was able to get this kind of thing to work effectively using SPSA ( https://www.jhuapl.edu/SPSA/ ). Also basically the algorithm of evolutionary strategies in AI: https://openai.com/blog/evolution-strategies/
Nice hack to do it with a webcam. :)
CRTs use distinct phosphors for each color, which slowly fade over time, and at different rates.
LCDs typically use color filters, which in most cases tend not to fade. In fact, most LCDs are so consistent that you can use the calibration done by someone else with the same panel model and use it yourself just fine. (The rare exception to this would be LCDs exposed to direct sunlight. Strong UV light can make just about anything fade)
OLEDs fade, much like CRTs, but are very rarely used as PC monitors.
This is why it annoys me that LCD panels don't simply report their ICC profile to the operating system. It would be 99% accurate 99% of the time. This is a vast improvement over the current status quo, where color reproduction outside of premium televisions is basically random.
For example, when I last punished myself by using a better-than-sRGB monitor, I learned that browsers will properly color correct images that have a colorspace tag, but they do not do it to CSS. So if you have an image with color #abcdef and then you set a CSS color to #abcdef, they will be different colors!
Applications that want to properly display color have to hack around things. They need to ask the OS for the display's colorspace, then they have to figure out the image's color space, then compute a transformation that will yield an (r, g, b) tuple that when transformed by the OS (using the monitor's profile) will display the right color. This is horrifying but does work; so at least things like Photoshop can typically show you the right color.
It would be nice if we could use more than 24 bits for color and just stored everything as a CIExyz color. People have known that that is the right solution for decades but nothing has happened, so I'm not holding my breath. Realistically, I think we have to agree on a new set of primaries and gamma, and start assuming that a (r, g, b) tuple is in that colorspace. I guess this is what DCI-P3 is. It is the same problem all over again, but might at least get people better colors soon.
The older LCDs were backlit with (cold cathode) fluorescent lamps, and those lamps do fade out and shift in color over time. With those you do want to adjust calibration once in a while. No idea how modern LCD backlit ones fare in longer run.
At one point I've had two decent quality CCFL LCDs set side-by-side; one had about 10'000 hours, the other 40'000 hours. The difference in color (and in brightness) was notable, and not quite possible to get right with the basic RGB calibration provided.
Maybe OLED will fix that. Whenever affordable OLED monitors show up...
Wickedly high contrast ratios seem to be encouraged too and keeping the ratio down gets frowned upon. Some of the screens come out the box at close to 1000:1, which is too high but happens with a high luminance screen. The first thing I usually do with a screen I use is dim it, and I long for iPad and iPhone screens that are dimmer. The lowest settings are too high.
On CRTs you could set a black background, turn your brightness way down and happily code with enough contrast. Even with black on white text you could turn the brightness down somewhat because the black was... black.
Hopefully when OLED becomes usable for something between wall sized TVs and watches, this problem will be gone because there is no backlight so black is again black.
EE in me died a little reading this, while programmer loved the hack :). Personally I would just replace the backlight, discoloration is most likely sign of impending failure anyway. Btw we already do something similar to a lot of electronics by design. For example camera sensors have defect lists, pristine ones are extremely expensive, think highend microscopes and satellites.
I'm gonna add it to my fictional image analysis toolkit for next time when i'll need it.
Free idea, go do it!
Model: Clunker :P
Besides, life stinks if you break it down like this.