FedeDP / Clightd

A linux bus interface that lets you change screen brightness, compute captured webcam frames brightness and change screen temperature.
GNU General Public License v3.0
82 stars 10 forks source link

Set temperature based on camera input #118

Open rhendric opened 3 weeks ago

rhendric commented 3 weeks ago

I found this project while looking for a way to set my monitor's color temperature based on the ambient light in the room, but it seems—unless I missed something—that this sets brightness based on camera input but only sets color temperature based on location and time of day.

Before I go diving into how to write a module or a patch that does this, is this something that I'm likely to be able to implement? Any pointers? Or should I keep looking?

FedeDP commented 3 weeks ago

Hi! Thanks for opening this issue! Clight offers such an option under "ambient_gamma" config key: https://github.com/FedeDP/Clight/blob/a4d4762ce6f9ff84e2c843939c9171ac72e2a41d/Extra/config/modules.conf.d/gamma.conf#L42 It should satisfy your needs ;)

rhendric commented 3 weeks ago

Ah, not quite, but it's my fault for being imprecise!

It looks like ambient_gamma sets the temperature of the screen based on brightness from the camera, but not color. I'm looking for a way to set the temperature of the screen based on the measured color temperature of a white object that the camera is pointing at, so that the white point of my monitor matches a white sheet of paper on my desk, without assuming that bright light is blue and dim light is red-yellow.