Object Distance Tracking with Python and OpenCV

preview_player
Показать описание
Who needs an expensive lidar to detect object distance from the camera? we got Webcams for that now. The demo shows how the object was detected and its distance was identified easily with a script.

Рекомендации по теме
Комментарии
Автор

bro can I change it to measure distance for detected object rather than color such as an apple?

shadowz
Автор

Well if it is possible it means I can do it

tuvelout
Автор

will it find the distance of the object which is approx 20 metre far?

darshikagupta
Автор

i can use this without the object? i want it in the centre

faisal
Автор

bro i have error:Traceback (most recent call last):
File "c:\Users\devad\opencv\distance_fromcamera\get_colour.py", line 27, in <module>
cv2.resizeWindow('F', 700, 600)
cv2.error: OpenCV(4.9.0) error: (-27:Null pointer) NULL window: 'F' in function 'cvResizeWindow'

devados
Автор

Hello :-) Thank you for sharing this interesting video.
I am having the following error though when running dist_measure

_, cont, hei = cv2.findContours(d_img, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
ValueError: not enough values to unpack (expected 3, got 2)

jvhwcqk
Автор

I could not really understand the way you ve measured with just one camera. Did you give the specific sizes of the object to calculate the distance. Which means you can not calculate the distance of another object without inputing the sizes?

borasarikaya
Автор

I am currently doing a project for university and I am not able to understand how is it measuring the distance I watched some of the other videos but in many of them it requires the actual height of the object can you please help

anirudhhasinghpanwar
Автор

i have a beacon and i want to detect it and find the distance

dariusdarius
Автор

Can I calculate the live speed with it?

adarshraj