• Stars
    star
    188
  • Rank 205,563 (Top 5 %)
  • Language
    Java
  • License
    MIT License
  • Created over 10 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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.

alt tag

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: alt tag Far: alt tag

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.