Skip to content

This is a computer vision project with the goal of estimating head position relative to the webcam, based on the assumption that the user mostly looks straight ahead. The constant distance between the eyes then allows for an estimate of distance from the webcam, as well as a general angle. If the head position strays outside a "safe-zone" around…

Notifications You must be signed in to change notification settings

johanehr/webcam-ergonomics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webcam-ergonomics

This is a computer vision project with the goal of estimating head position relative to the webcam, based on the assumption that the user mostly looks straight ahead. The constant distance between the eyes then allows for an estimate of the head's position relative to the webcam, assuming a projective camera model.

If the head strays outside a "safe-zone" around a neutral, ergonomically desired position for too long, a warning sound will be played, prompting the user to correct their posture. This neutral position and other settings can be adjusted by editing the "settings.json" file. For a visual representation and position estimate, use the flag "-L" when running the script to include the live view.

The focal length ("f" in settings.json) can be roughly estimated as follows:

f = cot(a/2)w/2

f: focal length a: horizontal field of view w: horizontal resolution (printed once in terminal)

The eye detection used does not seem to work very well for slim eyes - the author included. This should be fixed for use outside a simple proof of concept, for example by detecting the face and eyes using a modern neural network technique, instead of Haar Cascade classifiers. Note that the face is assumed to be directed roughly towards the webcam's image plane.

About

This is a computer vision project with the goal of estimating head position relative to the webcam, based on the assumption that the user mostly looks straight ahead. The constant distance between the eyes then allows for an estimate of distance from the webcam, as well as a general angle. If the head position strays outside a "safe-zone" around…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published