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.
- 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
- Enable GitHub Pages for this repository and point it to the default branch.
- Open the published URL on a mobile browser that allows camera access over HTTPS.
- Tap Start measurement and grant camera permission when prompted.
python3 -m http.server 8080Then 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).
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.
- 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.
- Keep assets in plain HTML/CSS/JS to remain GitHub Pages friendly.
- Update this README with any workflow changes.