Closed karth295 closed 3 years ago
I made a standalone prototype of this (not checked into the repo): https://tawk.space/brightness.html.
Spoiler alert: adjusting brightness only helps make minor changes in lighting. Idk how you would make it appear like there was a bright light in the room, or if there was less sunlight / extremely bright light.
But either way, I still hope this could be useful for those of us: 1) Who often video chat in a dark-ish room 2) Have dark skin 3) Have ever tried video chatting outside on a sunny day
Here is the source (a single html file): https://pastebin.com/yjywK1ef in case we take brightness.html down.
I updated brightness.html to show you a histogram of pixel luminescence, similar to what lightroom/photoshop would show you: https://tawk.space/brightness.html.
The reason the previous prototype sucked is because it was increasing brightness in all pixels, rather than focusing just on the dark regions. The "exposure" slider in lightroom uses a function like this: https://en.wikipedia.org/wiki/Inverse-gamma_distribution to avoid burning bright regions. It wouldn't be difficult to do that in JS.
If we could implement automatic exposure correction efficiently in JS that would be amazing: https://www.microsoft.com/en-us/research/wp-content/uploads/2016/11/AutoExposure_ECCV2012.pdf.
A friend of mine suggested that just popping up a warning "you might want to turn on a light" would be a good start.
Example of a poorly lit video stream and corresponding luminescence graph:
This might be useful for detecting which part(s) of the video should be well lit https://tkv.io/posts/picojs-intro/
Something else I do in this situation is turn up the screen brightnes on my laptop -- it works as a light for my face.
I often use tawk in a relatively dark room, and people can't see my face very well. I usually compensate by turning on a lamp, facing the light, or increasing the brightness on my computer.
Tawk should just preprocess the video and change the brightness for me (given that the original stream is not so dark that it doesn't have enough information regardless of brightness).