how to find relative distance between camera and object in nvidia tx2 board

hi,

i am working on nvidia tx2 board…

onboard camera i.e ov5693 …

I am trying to find relative distance between camera and object in real time video streaming using tensorflow object detection API. To calculate the width of the object by using bounding box.

and finding the relative distance using an formula:

Distance = FocalLength in mm * (Real object width in mm) / (Virtual object width in px)

assuming focal length 4mm.

but not getting accurate result…

so can you help me to direct on right way.

ty

Hi,

We apply this on our DRIVE use case.

First, we train a car detector with depth.
Since the same type of care has a similar size, you can infer the distance based the size of the bounding box.

Thanks.