Distance calculation with a single camera

I would like to calculate the distance to certain objects in the scene, I know that I can calculate the relative distance using a single camera, but I know the coordinates of some objects on the scene, so theoretically it would be possible to calculate the actual distance. According to the opencv mailing list archives,

http://tech.groups.yahoo.com/group/OpenCV/message/73541

cvFindExtrinsicCameraParams2 is a function to use, but I can not find information on how to use it?

PS. Assuming the camera is properly calibrated.

+5
source share
1 answer

My guess would be, you know, the width of an object, for example, a ball 6 inches across and 6 inches high, you can also see that it is 20 pixels high and 25 pixels wide. You also know that the ball is 10 feet away. This will be your beginning.

External parameters will not help you, I don’t think, because this is the location of the camera and the rotation in space relative to another camera or source. For a single-camera system, the camera is the source.

Internal options may help. I'm not sure, I just did it using two cameras.

+1
source

Source: https://habr.com/ru/post/891668/


All Articles