I am using mlkit
for face recognization from github link below:
https://github.com/firebase/quickstart-android/tree/master/mlkit
and to get distance, method below:
https://github.com/philiiiiiipp/Android-Screen-to-Face-Distance-Measurement
But this method needs to declare hard coded value
private var distance10 = 200
private var distance20 = 130
if (leftX != 0f && rightX != 0f) {distanceBetweenEyes = Math.abs(leftX - rightX)}
if((distanceBetweenEyes>distance20||distanceBetweenEyes>distance10){
Log.i("TAG_FACE","Face Detected Left Eye Right Distance:" + rightEye.position + "Right X" + rightX)}
But I am trying to do without hard coding.
Is there any other method to track the distance between face and screen.
Any library or methods to track the distance?