Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

Android-Screen-to-Face-Distance-Measurement

> 编程语言
Open source

Calculate the distance between your smartphone screen and your face using the front facing camera

192 stars0 likes0 views
WebsiteGitHub

About

Calculate the distance between your smartphone screen and your face using the front facing camera

Be aware that this code is unmaintained since a couple of years and will probably not work with current android versions.

Android-Screen-to-Face-Distance-Measurement

Calculate the distance between your smartphone screen and your face using the front facing camera. The idea is pretty simple and best explained in an image.

An object or a "distance" will seem smaller once its further away from the camera than when its closer to it. So one should be able to calculate the distance between camera and face while using the eye distance at a reference length, in our case 29.7cm (the length of an A4 paper), and multiplying the reference length with the change of eye distance.

Close:

Far:

For a video
https://www.youtube.com/watch?v=-6_pGkPKAL4

And the link to the paper with a more thorough analysation can be found at
http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=6825217
or here.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Java

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言