Distance Measurement With a Stereo Camera using Python and OpenCV

preview_player
Показать описание
This work has been done in the context of a project at the University of Karlsruhe.
Two cameras are calibrated and a disparity map is created. A regression model allows a pretty accurate measure of the distance to an object.

Python and the OpenCV library are used for the script.

Cameras used in the projet are: Logitech Webcam C170. C270 and C370 are also fine.

Amazon Links for webcams (best prices):

Project & Video by Frederic Uhrweiller and Stephane Vujasinovic
Рекомендации по теме
Комментарии
Автор

can it still find distance when i move the cameras ?

zerosatan
Автор

this is exactly what we needed for our project now. thank you.

RoboSidekick
Автор

Congrats guys I will use it for my object detection projects

granatapfel
Автор

Oh, I am gonna have so much fun with OpenCV OAK-D stereo camera 😁

instars
Автор

Hello, I heard that your program is a part of another larger project. Is there any obstacle avoidance or path planning related content in that project? Your program is very beautiful and useful, I hope it can be extended to UAV obstacle avoidance related fields. Thank you.

nillin
Автор

Hello, I am trying to use your approach and code with a mobile fischertechnik robot and the original fischertechnik cameras. The 3D measuring result for measuring object distances is fine enough for a construction toy (+-5 cm). However, it seems to be a bit difficult to identify the objects in an algorithm. Of course one could combine the approach with an object recognition, but then one would have to know, which objects to expect.
Also it appears quite difficult to get proper results for the distance of a wall, if there is no corner or any clear texture on it (probably I would compensate that by combining a ultrasonic sensor). Did you elaborate on these topics? Another interesting difficulty seems to come with objects with reflection or refraction, but I would ignore this for now.
Anyway, nice work - thank you for sharing the code.

ftmodels
Автор

-Processing speed is too slow, I need to make it faster what I should do?
-What is the maximum distance range? I got only 5 meters, Is there any way to get the distance reach about 8 meters??
-Should I input the distance between the two lenses in the code??

omarelziat
Автор

i am also use two cameras, same as you but i need to track postion also can you suggest any videos or papers you known it must be helpfun

sarathkumar-gqbe
Автор

Hi, Great work there, I love what you have done here.
Just out of curiosity, how does the equation for distance work? Did you created by yourself or is it available somewhere?

sohaibshabbir
Автор

Thank you for your sharing. I am also doing a similar study. For stereocalibration I need to take pictures from both cameras at the same time. What program did you do this with? I made video shooting with two cameras at the same time with multicamcapture application. but I couldn't find an application that would allow me to take pictures from both cameras at the same time for calibration.

esraesra
Автор

Hello, I can run two separate modules
1. For object detection
2. Yours for stereovision

Do you have any idea on how can I combine both.

ritvikdayal
Автор

Hi! We're trying to use the code for a project of ours. We got our cameras to be able to find the distance of our object. However, the output on our screen simply shows a totally white screen or a totally black screen instead of what the camera sees.

zamaadkhan
Автор

what is the equation for distance measurement?And can i calculate it?

sakib
Автор

do you have the paper/document available explaining about this?

chawza
Автор

what happens of you place it on front of a mirro ?

deweyosborne
Автор

Can I use the raspberry pi to make the whole setup portable also can you please mention your camera model with a link to buy.

ritvikdayal
Автор

Bonjour, vraiment beau projet! Pour obtenir un calcul à la précision d'environ +/- 1mm que faut-il avoir ? Caméra haute résolution et rapide en fps ? Serait-ce possible de mesurer plusieurs distances à la fois ? Ex. Les dimensions d'un carré

QuebecoisSti
Автор

Excuse me i have tried your code but the variable counterdist is not defined, how should i do ? thank you

Red_Fang.
Автор

What are those paremeters in your distance calculation formula ?
how can i derrive this formula for my stereo vision camera of focal length = 760px and baseline = 60 mm


please tell me this !
Thanks in Advance

vishavsingh
Автор

Can u please tell me if i can measure distance on long range like 1-12 mile ? And if yes on what it depends ?

funenglish