How to finding distance between camera and detected object using openCV in python?
I am sorry but finding a distance is a metrology problem, so you need to calibrate your camera. Calibrating is a relatively easy process which is necessary for any measurements.
Let's assume you only have one calibrated camera, if the orientation/position of this camera is fixed relatively to the ground plane, it is possible to calculate the distance between the camera and the feet of somebody (assuming the feet are visible).
I want to find out the distance between the camera and the people (detected using the HOG descriptor) in front of camera.I'm looking into more subtle approach rather than calibrating the camera and without knowing any distances before hand.
This can fall under the scenario of an autonomous car finding the distance between the car in front.
Can someone help me out with a sample code or an explanation on how to do so