ddd
ddd

Reputation: 359

Measure distance between camera and flat objects

I have an application that is detecting objects in dashcam videos using Tensorflow object detection. I am trying to calculate the physical distance (and subsequently angle) of the detected objects from the camera. I tried the similar triangles method described in this post: https://medium.com/geoai/road-feature-detection-geotagging-600ea03f9a8 distance calculation

It is working for objects with a height such as road signs, but how do I calculate the distance of flat objects such as potholes? I tried setting height of 1mm but it is not correct.

Upvotes: 0

Views: 1051

Answers (1)

Ophir S
Ophir S

Reputation: 459

When taking an image of a 3D scene we lose depth information in the process. In some cases, we can infer the lost information using various methods such as triangulation, or by using assumptions about the scene like the one you are making (knowing the height of the object whose distance you are trying to calculate).

When inferring the distance of an object that has no height, you will need to use some other information. For example, you can use the width/diameter of the pothole (if you know it) as replacement for the height and replacing h and H in your calculations accordingly.

Upvotes: 1

Related Questions