Skip to content

sadevana/web-lux-meter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Web Lux Meter

Estimate ambient brightness using the camera on mobile browsers. The site is fully static, so it can be hosted on GitHub Pages without additional tooling.

Features

  • Camera-based lux estimation with on-device processing
  • Optional calibration (offset/scale) stored locally
  • Privacy-friendly: no frames leave the browser
  • Mobile-first layout that works offline once cached by the browser

Getting Started

  1. Enable GitHub Pages for this repository and point it to the default branch.
  2. Open the published URL on a mobile browser that allows camera access over HTTPS.
  3. Tap Start measurement and grant camera permission when prompted.

Local Preview

python3 -m http.server 8080

Then visit http://localhost:8080 from a device on the same network (HTTPS is required on iOS for camera access; use a tunneling tool such as ngrok if needed).

How Lux Is Estimated

Each frame is downscaled and analysed locally. Average luminance is mapped to an approximate lux value using a non-linear curve and your optional calibration settings. Because camera sensors are not calibrated lux meters, the numbers are indicative rather than absolute.

Notes & Limitations

  • Some browsers (especially desktop) may block camera use on non-secure origins.
  • When the tab goes to the background, measurement stops to save battery.
  • Keep the lens clean and avoid pointing directly at intense light sources.

Contributing

  • Keep assets in plain HTML/CSS/JS to remain GitHub Pages friendly.
  • Update this README with any workflow changes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors