TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: BlinkAlarm - Prevent eyestrain, dryness with real-time computer vision!

4 pointsby grbshabout 2 months ago
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).<p>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.<p>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&#x27;t work well in all angles &#x2F; postural positions, so I also augment this with another metric that corrects for head tilt. It&#x27;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&#x27;s extremely good in normal scenarios where I don&#x27;t knot myself into a pretzel.<p>It runs significantly faster than realtime on my M2, and I leave it on all day when I work from home.

no comments

no comments