Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

measure distance from android phone screen to user face

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.

like image 918
Thelinh Truong Avatar asked Feb 01 '13 15:02

Thelinh Truong


People also ask

Can Android camera measure distance?

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.

Can I use my phone to measure distance?

You can use Manual Distance (Free Android App) for more accurate distance and height measurement if accuracy is important and critical.

How do you measure height width and distance of an object using camera android github?

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.


2 Answers

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

like image 72
Philiiiiiipp Avatar answered Oct 18 '22 02:10

Philiiiiiipp


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

like image 36
Ivan Ludvig Avatar answered Oct 18 '22 02:10

Ivan Ludvig