I have developed an application that detects faces with Google Vision API(offline) and then sends the image of the detection to Microsoft Azure to obtain the information of this face (age,gender...). In my case I also need to calculate (approximate at least) the distance between the camera and the face detected, I didn't see this option in the Microsoft Azure Documentation so I suppose that's not implemented. What should I implement to calculate the distance between camera and face ? Can I achieve this objective with OpenCV or another OpenSource library ?
I've seen this answer here in SO (How to measure height, width and distance of object using camera?) but in my case I don't have the altitude of the device so I don't think I can implement this solution (1st answer - drulabs's answer).