I want to calculate the distance between object and camera in real time. In my research i have found some formula's
d = h * tan a
from here
and
distance to object (mm) = focal length (mm) * real height of the object (mm) * image height (pixels)
----------------------------------------------------------------
object height (pixels) * sensor height (mm)
from here. And python code from
But both of these required the constant value of Object Height.
Is there any possible to get without Object Height or any libraries available for iOS.