invisible-college / tawk.space

Social video chats
https://tawk.space
Apache License 2.0
14 stars 1 forks source link

Tawk Space should adjust lighting #27

Closed karth295 closed 3 years ago

karth295 commented 7 years ago

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).

karth295 commented 6 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

karth295 commented 6 years ago

Here is the source (a single html file): https://pastebin.com/yjywK1ef in case we take brightness.html down.

karth295 commented 6 years ago

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.

karth295 commented 6 years ago

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.

karth295 commented 6 years ago

Example of a poorly lit video stream and corresponding luminescence graph:

screenshot 4

karth295 commented 6 years ago

This might be useful for detecting which part(s) of the video should be well lit https://tkv.io/posts/picojs-intro/

toomim commented 6 years ago

Something else I do in this situation is turn up the screen brightnes on my laptop -- it works as a light for my face.

karth295 commented 3 years ago

I'm going to close this as too large of a problem space to tackle. Our phone webcams are getting better at this (HDR), so I imagine laptop webcams will get better as well.