How to do Stereo Vision and Depth Estimation with OpenCV C++ and Python

Поделиться
HTML-код
  • Опубликовано: 19 янв 2025

Комментарии • 88

  • @nilutpolkashyap
    @nilutpolkashyap 3 года назад +3

    Last week I received an OAK D kit and then today I got to know about your channel (best combination ever).....your videos are so awesome....I instantly subscribed and became a big fan of your work....keep shining

    • @NicolaiAI
      @NicolaiAI  3 года назад +2

      Thank you very much! Really appreciate it and hope that u will learn a lot. Definitely enjoy ur oak D kit, it's so cool

  • @NicolaiAI
    @NicolaiAI  Год назад +1

    Join My AI Career Program
    👉 www.nicolai-nielsen.com/aicareer
    Enroll in My School and Technical Courses
    👉 www.nicos-school.com

  • @hamzaomari7052
    @hamzaomari7052 Год назад +1

    Thanks a lot, this is the best video I've seen about all the process of a simple stereovision system.

    • @NicolaiAI
      @NicolaiAI  Год назад

      Thanks a lot Hamza! Really appreciate it

  • @omarmurajia1642
    @omarmurajia1642 3 года назад +3

    How the aggregate cost computation algorithm ?

  • @santoshkamble1290
    @santoshkamble1290 6 дней назад +1

    Do you have a tutorial on multi view stereo calibration using opencv?

    • @NicolaiAI
      @NicolaiAI  6 дней назад

      Nope bit would be similar approach to single. Just the rotation and translation you will get between the multiple cameras

  • @janaeshkrish
    @janaeshkrish 3 года назад +4

    HI can you combine both Camera Calibration and depth estimation as a single vedio? That would be greate if you do so ..

  • @SealionPrime
    @SealionPrime 3 года назад +2

    Great video, clear and to the point!

    • @NicolaiAI
      @NicolaiAI  3 года назад

      Thank you very much!

  • @schnebastian
    @schnebastian 2 года назад +2

    do you know, what kind of metrics or procedures autonomous car use to detect obstacles and the distance to the obstacles?

    • @NicolaiAI
      @NicolaiAI  2 года назад +1

      They use deep learning. Tesla uses deep learning and neural nets for depth too, all the other guys are using lidar

    • @schnebastian
      @schnebastian 2 года назад +1

      @@NicolaiAI so only Tesla uses the camera to detect obstacles?

    • @NicolaiAI
      @NicolaiAI  2 года назад +1

      They all use cameras for obstacle detection but merge the data with lidar for depth also. So they create a 3d map of the whole environment

    • @schnebastian
      @schnebastian 2 года назад +1

      @@NicolaiAI do they use sematic segmentation to detect the obstacles? do you also have a video about that?

    • @NicolaiAI
      @NicolaiAI  2 года назад +1

      @@schnebastian yeah they use segmentation for the road, sidewalks and so on. I don't have videos about that yet unfortunately

  • @SAINIVEDH
    @SAINIVEDH 4 года назад +3

    Please make a video on deep learning based depth estimation works. Thanks

    • @NicolaiAI
      @NicolaiAI  4 года назад +1

      Yea that's a really cool topic, that's certainly a video in the future. Thank you 🙂

  • @raihankhan5160
    @raihankhan5160 3 года назад +3

    Thanks a lot for explaining stereo projection in simple words rather than math and vectors :D (most computer vision books do)
    I wanted to ask, if the cameras were placed in orthogonal positions and not in same axis, can we apply the same formulas and techniques to find the depth estimation and corresponding 3D reconstruction to get 3D coordinates of an obstacle/detected object?
    Thanks in advance!

    • @AbdulkerimBiz
      @AbdulkerimBiz Год назад

      bro did you get any informat,on about this topic

  • @letianwang5141
    @letianwang5141 3 года назад +2

    Awesome tutorial!

    • @NicolaiAI
      @NicolaiAI  3 года назад

      Thank you very much!

  • @fairozashour3339
    @fairozashour3339 3 года назад +1

    I want to get the steroe camera, but I don't know what type or version was used in the video. Can you help me?

    • @NicolaiAI
      @NicolaiAI  3 года назад +1

      I'm just using two budget webcams as a stereo camera in this video

    • @fairozashour3339
      @fairozashour3339 3 года назад

      @@NicolaiAI I want to use the steroe camera like you used it in the facial recognition video,Can any steroe camera get the same results, and can I use two separate cameras?

    • @fairozashour3339
      @fairozashour3339 3 года назад +1

      @@NicolaiAIthank you know i inderstand

  • @milindpandya2230
    @milindpandya2230 3 года назад +2

    Loved this tutorial ✌️

    • @NicolaiAI
      @NicolaiAI  3 года назад +1

      Thank you for watching, glad that you liked it!

  • @nigellim8272
    @nigellim8272 3 года назад +1

    Isit possible to get a pdf copy of the notes you shared in this video? so that i can refer to it for my project

    • @NicolaiAI
      @NicolaiAI  3 года назад

      Some of them should be on GitHub somewhere

  • @fiNitEarth
    @fiNitEarth 3 года назад +4

    Thank you for this interesting video. What do you think about the approaches to use neural networks to compute depth from stereo pair images? Supposedly they're faster, but it would be interesting to hear what a pro thinks about it

    • @NicolaiAI
      @NicolaiAI  3 года назад +2

      It depends on many things, but I'll prefer neural networks when u want to create full depth maps and not only the depth to couple of objects. Or if u need really good accuracy. The neural networks have become so strong and the are improving almost exponentially

  • @QuarktaschemitSenf
    @QuarktaschemitSenf 2 года назад +1

    Hey Nicolai. What is a decent sterovision camera (maybe with usb) for a decent price atm?

    • @NicolaiAI
      @NicolaiAI  2 года назад +1

      All depends on project, accuracy and price

    • @QuarktaschemitSenf
      @QuarktaschemitSenf 2 года назад

      @@NicolaiAI Ok, more general. Do you have a prefered brand / shop for this kind of equipment. ? My goal : Detect and track objects on a custom trained yolo algorithm (by the way , how to do transfer learning e.g. add a custom class to coco nameset?) and track the distance of the objects. Price for stero-cam

    • @NicolaiAI
      @NicolaiAI  2 года назад +1

      @@QuarktaschemitSenf u won’t get good real life results with Midas. But if u are looking for an easy to work with camera u can check out oak-d

    • @QuarktaschemitSenf
      @QuarktaschemitSenf 2 года назад +1

      @@NicolaiAI Ok, ty for that Info Nicolai. Highly apreciate your interaction with your viewers. But lets say i have a good Stereo-Camera and want to use it for example for collision prevention. Can i do this with python/opencv without tracking certain objects like red ones. Would i need any additional things like reference points in the fov?

    • @NicolaiAI
      @NicolaiAI  2 года назад +1

      @@QuarktaschemitSenf yeah u can do that with opencv without object detection. Basically just create a depth map from ur stereo camera and then avoid objects being close. Then u will also know the position of the objects. So it will more be avoid everything close than avoid certain objects

  • @Bala92635
    @Bala92635 2 года назад +1

    I am bit confused with stereo vison approch and Structure from motion (Photogrammetry approach)

    • @NicolaiAI
      @NicolaiAI  2 года назад +1

      What are u confused about?

    • @Bala92635
      @Bala92635 2 года назад +1

      @@NicolaiAI whether these two approaches different or uses same algorithm two calculate 3d point

    • @NicolaiAI
      @NicolaiAI  2 года назад +1

      @@Bala92635 yeah they are different, but u can create point clouds with both. I'm general u will get a more complete and better point cloud by using STFM since u have more views points and more information to create ur point clouds. I'll make some videos I'm the future about structure from motion

    • @Bala92635
      @Bala92635 2 года назад

      @@NicolaiAI Thanks sir... Waiting for next SFM video

  • @satishsinha2221
    @satishsinha2221 Год назад

    Hi, I recently explored some deep learning approaches for stereo and I am very new to it. Can you please help me by telling what’s the difference between stereo matching networks like GANet and stereo depth estimation networks like MVSnet. Thanks

  • @salmansaleem4343
    @salmansaleem4343 4 года назад +2

    Love this tutorial.
    Is it possible for you to share the code? Because the link you mentioned here does not refer to any page or repository on Github.

    • @NicolaiAI
      @NicolaiAI  4 года назад

      Thank you very much! I have updated the link in the description

    • @salmansaleem4343
      @salmansaleem4343 4 года назад +1

      @@NicolaiAI Thank you so much for your quick reply.

  • @faizaali895
    @faizaali895 4 года назад +2

    Thank you for a very informative video! I have written a program that already gives me the position of the object that I want to track, so I already got its x-coordinates from both cameras. Is it then necessary to create a disparity map of the whole frame in view or is it enough to just calculate the disparity of my one target point?

    • @NicolaiAI
      @NicolaiAI  4 года назад +1

      If you already know the point you want the disparity for and you don't need any other points later on, then yes you can just calculate it for that point. I would still recommend you to calculate it for some of the neighbor points aswell for more precision. Would you mind me taking a look and maybe make a video about it so others learn from it aswell. If not that is totally okay and thank you for ur question and attention 🙂

    • @faizaali895
      @faizaali895 4 года назад +1

      @@NicolaiAI I see, interesting! I don't seem to get the right value so I wonder if it matters if the target object is non-stationary? So the depth of it changes with time? The idea is to throw the target object (being a red ball) and calculate the depth while it is being thrown. Yes, I wouldn't mind sharing the code; however, it works in real-time if that's okay. So if you don't have a red ball I guess, the code won't be able to track anything :)

    • @NicolaiAI
      @NicolaiAI  4 года назад +1

      It might be a bit of a problem if it's non stationary, but I think that it would help to calculate the disparity of an area instead of just a couple of points then :) can u send me the code to my email? Thank you
      - TheCodingLibraryYT@gmail.com

    • @watoysland1137
      @watoysland1137 4 года назад +1

      I also tried to measure distance of object from camera. But it behave in different lighting conditions. How to get rid of this problem. I also want share result with you so kindly share email.

    • @watoysland1137
      @watoysland1137 4 года назад +1

      Faiza which stereo camera are you using?

  • @BlueWolf-ry2os
    @BlueWolf-ry2os 8 месяцев назад

    I'm planning to use a single camera to detect various points of interest such as banks and pharmacies (specifically, to detect their logos). I have already trained a YOLOv8 model for this purpose and aim to calculate their 3D coordinates . Can YOU help me with a code that can calculate the 3D coordinates of detected objects in the image using a single camera? I'm considering treating two consecutive images from the camera as if they were captured by two separate cameras, thereby making stereo vision applicable. Additionally, the coordinates of the camera are always known via GPS

    • @ShadowD2C
      @ShadowD2C 4 месяца назад

      Im kinda doing something similar, did you find any good solution?

  • @ahmadrezayousefi-r1w
    @ahmadrezayousefi-r1w 4 месяца назад +2

    thank you

  • @nealrowe6169
    @nealrowe6169 4 года назад +2

    Love this tutorial tbh

    • @NicolaiAI
      @NicolaiAI  4 года назад

      Glad that you like it!

  • @souravsahoo1582
    @souravsahoo1582 3 года назад +2

    i am immature in this subject........................but what you mean by depth of the image...i didn't clearly understand?????

    • @NicolaiAI
      @NicolaiAI  3 года назад

      Depth in stereo vision is the depth or distance to the objects 🙂 so u have 3d information instead of only 2d

    • @souravsahoo1582
      @souravsahoo1582 3 года назад

      @@NicolaiAI like 3d information on 2d screen 🤔😐

    • @NicolaiAI
      @NicolaiAI  3 года назад

      Yes i also have a video where i actually do it in code with a small project. Tracking an object and calculating the distance to it with stereo vision. So i have 3d information from 2x 2d cameras

    • @souravsahoo1582
      @souravsahoo1582 3 года назад

      @@NicolaiAI ok i definitely check it bro👍
      Please make more tutorial on computer vision ..i am currently grad student in computer science..and take this subject as elective 😭😭

    • @NicolaiAI
      @NicolaiAI  3 года назад

      @@souravsahoo1582 thank you 🙂 if you take computer vision as an elective course then everything in this computer vision tutorial here will cover more than enough for you

  • @eaoliver
    @eaoliver 16 часов назад

    Title is misleading. No mention of C++ or Python.

  • @zainahmed4172
    @zainahmed4172 3 года назад +1

    20000 views?! Tillykke!!!

    • @NicolaiAI
      @NicolaiAI  3 года назад +1

      Haha tak Zain!

    • @zainahmed4172
      @zainahmed4172 3 года назад +1

      @@NicolaiAI det er velbekommen. Men nice video, og over 6000 views, du er populær.
      Men jeg kan rigtig godt lide hvor tydeligvis du forklarer i dine video. Stort pros til dig.

  • @speak_charlie
    @speak_charlie 2 года назад +1

    👍🏿👍🏿👍🏿