TransWikia.com

How to calculate vehicle detection distance?

Robotics Asked by assam alzookery on December 17, 2021

I would like to know how to calculate the distance to each car when I run my application for an autonomous vehicle in real-time. In addition, I want to know how to implement the calculation in C++.

You can see in the images we can know the distance for each vehicle but I don’t know what code I should use to make all these calculations for every vehicle.

Please check the photo to understand more about what I’m trying to achieve.

autonomous vehicle obstacle detection

autonomous vehicle obstacle detection (2)

One Answer

From the images, I am assuming you do not have a multi camera setup.

So, the short answer, based on the information I think you have, you cannot. In an ideal scenario, if you know the calibration parameters of the camera, you could use the distance to a known object to compute the scale factor. But in this case, you do not have a fixed object in each image.

However, having said this, you should understand that longitudinal distance computation using single camera systems are generally error prone in the real world.(as you can see from the distance measurements in the images). This can be attributed to the non uniformity of objects as well as varying illumination conditions.

A more constrained case would be to track only objects moving in the same direction as the host. In that case, you could try to detect the labe markers(they generally have a uniform width, length and distance between them) and use the principles of similar triangles to compute the distance to the target vehicle.

Answered by Mathew C. on December 17, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP