Show HN: BlinkAlarm - Prevent eyestrain, dryness with real-time computer vision! https://ift.tt/aFpYAPD
Show HN: BlinkAlarm - Prevent eyestrain, dryness with real-time computer vision! I often struggle with dry, strained eyes from long duration computer usage. It turns out when focusing intently, human blink rates decline from a healthy 15-20 per minute to 3-4 (or even fewer in some cases). I wrote a quick script that calculates facial landmarks on your webcam feed in realtime and plays a sound if you fail to blink for a configurable number of seconds. I use the common way of detecting a blink, which is to calculate the ratio between the height and width of the visible portion of the eye. This can be done with just 6 landmarks -- two on the upper eyelid, two on the lower eyelid, and one on either side of the eye. I found that this doesn't work well in all angles / postural positions, so I also augment this with another metric that corrects for head tilt. It's not perfect (if you tilt your head such that your ear is brought closer to your shoulder, it may over-detect blinks) but it's extremely good in normal scenarios where I don't knot myself into a pretzel. It runs significantly faster than realtime on my M2, and I leave it on all day when I work from home. https://ift.tt/krWG01s March 25, 2025 at 11:07PM
Komentar
Posting Komentar