I think I know what you are asking for. Here is what you can do.
first get the height of the person say h meters.
if you can calculate the height of the camera from ground (using height if the person i.e. h) and get angles A and B using gyroscope or something from android then you can calculate the height of the object using the above formula.
Isn't this what you were looking for???
let me know if you need any explanation.