Calise (acronym for “camera light sensor”) is a Free/Open Source python 2.x program that calculates ambient brightness and sets screen’s correct backlight using a camera.

Basic explanation

Calise, poorly speaking, grabs frames from a camera, returns “correct” backlight steps associated to them and of course sets that value for you.

yellow buttoncyan button


In detail

Everything starts with user-calibration.
Brightness scale is set according to user preferences through a semi-automated configuration process. That process creates a “default” profile (other can be added after).
The program reads selected profile parameters and starts execution.
On every cicle, it takes a small frame from the camera, obtains its average brightness, corrects the value removing the brightness that comes from the screen, converts the result according to user’s scale and then returns the correct backlight step to use.

Interactive versions (both cli and gui) have also a “movement control” feature that avoids (within a certain range) any “user in front of the camera” movement resulting in an unwanted backlight change.

Service version has lots of power optimizations based on sun angle above the horizon (thanks to pyEphem lib) and weather informations (from a main API + eventually backup one). Its execution has four cycle periods: dawn, day, sunset and night. Service behaviour during these periods of time is:

  • dawn/sunset: more or less from 1 to 7 captures per minute (according to latitude)
  • daytime: from 12 to 60 captures per hour (according to weather informations taken once per hour, if no internet or weather info disaled 20)
  • night: no captures

Additionally, the service accepts also “manual” captures if the user is not satisfied enough of the result.

Main features are:

Calise 0.0.7 interactive gui on xfce 4.8

  • works with every linux distribution and every desktop enviroment (Gnome, KDE, XFCE, … and also non-X);
  • profiles support, different configurations are stored on different profiles and can be recalled trough cli switch “–profile”
  • interactive cli interface (as said before X is not needed), program execution can be controlled with keypresses
  • DBus service optimized with automatic dawn/sunset recognition and weather informations, all with only latitude and longitude. Power and cpu time usage are negligible.
  • data export, values obtained/calculated by the program can be exported to a csv file (first you have to enable recording, then every session recorded from program start is exported, if none has been recorded, none will be exported)
  • Interactive and customizable Qt GUI with tray-icon (non-service only).
  • Cute icons :)

Comments are closed.