Skip to content

feat: learned work zones for several screens; gaze relative to calibration - #11

Merged
fidok15 merged 1 commit into
mainfrom
feat/focus-zones
Nov 11, 2026
Merged

fidok15 merged 1 commit into
mainfrom
feat/focus-zones

Conversation

@fidok15

@fidok15 fidok15 commented Nov 11, 2026

Copy link
Copy Markdown
Owner

With two screens, focus read 0 % while looking at the laptop that holds the camera, and only about 60 % at the main monitor.

  • Work zones: head poses are recorded in 10° bins over the last 10 minutes. A pose held for 60 s in total becomes a zone and counts as focused, so a second monitor or a laptop is learned after about a minute. Poses more than 30° above or below calibration (a phone in the lap) are never learned. Zones last for the app run, across study phases.
  • Relative gaze: the pupil offset is compared with its calibrated value, not a fixed 0.35. A camera beside the screen sees the eye at an angle.
  • Tests: second screen learned, zones carry over to the next phase, relative gaze. The away pose in the old tests is now the phone pose, because a long look to the side is now legitimately learned.

swift run focus-check: all 32 checks pass. Not yet checked with a real camera and two screens.

…o calibration

With two screens the calibration only knew the one you looked at first: turning to a laptop with the camera read
as looking away (0 %), and the pupil check used an absolute threshold, so a camera beside the screen cost focus even
when looking straight ahead (about 60 %).

- PoseZones records head poses in 10° bins over the last 10 minutes; a pose held for 60 s in total becomes a work
  zone and counts as focused. Poses more than 30° above or below calibration (a phone in the lap) are never learned.
  Zones live for the app run, across study phases.
- The pupil offset is compared with its calibrated value instead of a fixed 0.35.
- Tests: second screen learned, zones carry over, relative gaze; 'away' in the old tests is now the phone pose.
@fidok15
fidok15 merged commit cd24f9e into main Nov 11, 2026
2 checks passed
@fidok15
fidok15 deleted the feat/focus-zones branch November 11, 2026 15:11
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.

1 participant