Is it possible to measure the distance between your android phone screen and user face?
I want to change the zoom ratio zoom of your android app screen base on the distance between your face and your phone screen.
Please help me.
Thanks.
Can I use my phone camera to measure? Google's augmented reality app “Measure” turns ARCore-compatible Android smartphones into digital measuring tapes. Simply launch Measure, point the phone's camera to an object, then pick two points to measure the distance in between.
You can use Manual Distance (Free Android App) for more accurate distance and height measurement if accuracy is important and critical.
Input the height (approximate) of the camera from the base of the target object. Click the 'Adjust Height' button. Point the marker at the base of the object, then select 'Get Distance' This will result in calculating the approximate distance of the object from the user.
Yes it is possible, as long as you have a front facing camera in your device. This was more or less my bachelor thesis.
Here is the code https://github.com/philiiiiiipp/Android-Screen-to-Face-Distance-Measurement
and a video of the result https://www.youtube.com/watch?v=-6_pGkPKAL4
and the paper A new context - Screen to Face distance 1 1.pdf
I described how to calculate screen to face distance in a post on my blog. The algorithm is based on the distance between eyes. The further the face, the less the distance between your eyes appears on the camera.
https://ivanludvig.github.io/blog/2019/07/20/calculating-screen-to-face-distance-android
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With