paul-pias / Object-Detection-and-Distance-Measurement

Using yolov3 & yolov4 weights objects are being detected from live video frame along with the measurement of the object from the camera without the support of any extra hardware device.
348 stars 118 forks source link

Generalization of the formula #3

Closed ataftaf closed 4 years ago

ataftaf commented 4 years ago

Hello, Thank you for sharing this project. Sorry, how did you get this formula:? distancei = (2 x 3.14 x 180) ÷ (w + h x 360) x 1000 + 3 I didn't quite understand. Are we supposed to know the real object size ? Please I want to use this formula in my own Android application and I didn't quite understand how? Can you please make it more general? I have to detect the focal length and then what other parameters? Thanks in advance

paul-pias commented 4 years ago

Hi @ataftaf , Thank you for reaching out! Actually one of our work regarding this explanation is in the queue for a publication, that's why I can't explain further here for now. However, I am adding a few references for your understanding. Hope it will help. And here 1000 is helping to decide the unit of the result. And 3 is just a constant threshold value added to get the measured distance close to the actual distance. I hope, this helps.