Skip to content

feat(camera): gate calibration on webcam lighting quality check#132

Merged
KarinePistili merged 2 commits into
ruxailab:mainfrom
midaa1:feat/camera-lighting-check
Jun 10, 2026
Merged

feat(camera): gate calibration on webcam lighting quality check#132
KarinePistili merged 2 commits into
ruxailab:mainfrom
midaa1:feat/camera-lighting-check

Conversation

@midaa1

@midaa1 midaa1 commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a real-time lighting quality indicator on the Camera Configuration
    screen.
  • Disables Start Calibration until the webcam feed has been in a
    "good" lighting state for ~1.5 s (3 consecutive samples at 2 Hz).
  • Helps users avoid calibrating under conditions that silently degrade
    gaze accuracy (too dark, backlit, or flat/low-contrast scenes).

What changed

src/views/CameraConfiguration.vue

  • Samples luminance (mean + stddev) from every 10th pixel of the existing
    detectFace RAF canvas at 2 Hz — no extra frame capture.
  • Classifies into good / dark / bright / lowContrast / unknown
    and renders a Vuetify chip under the preview with an icon + message.
  • lightingReady computed requires 3 consecutive good samples; the
    streak resets on any non-good reading, re-disabling the button.
  • startCalibration button :disabled now also checks !lightingReady.

Classification thresholds

  • mean < 60 → dark
  • mean > 200 → bright
  • stddev < 18 → low contrast
  • otherwise → good

Testing

  • unstable photo :
Screenshot 2026-04-23 223420
  • stable one:
Screenshot 2026-04-23 223437

References :

@KarinePistili KarinePistili merged commit ae92ff9 into ruxailab:main Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants