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

Поділитися
Вставка
  • Опубліковано 30 вер 2024

КОМЕНТАРІ • 85

  • @NicolaiAI
    @NicolaiAI  Рік тому +1

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

  • @janaeshkrish
    @janaeshkrish 3 роки тому +3

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

  • @omarmurajia1642
    @omarmurajia1642 3 роки тому +2

    How the aggregate cost computation algorithm ?

  • @ahmadrezayousefi-r1w
    @ahmadrezayousefi-r1w 16 днів тому +1

    thank you

  • @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

  • @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 11 місяців тому

      bro did you get any informat,on about this topic

  • @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

  • @SAINIVEDH
    @SAINIVEDH 3 роки тому +2

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

    • @NicolaiAI
      @NicolaiAI  3 роки тому

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

  • @nilutpolkashyap
    @nilutpolkashyap 3 роки тому +2

    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 роки тому +1

      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

  • @salmansaleem4343
    @salmansaleem4343 3 роки тому +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  3 роки тому

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

    • @salmansaleem4343
      @salmansaleem4343 3 роки тому +1

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

  • @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

  • @nigellim8272
    @nigellim8272 2 роки тому +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  2 роки тому

      Some of them should be on GitHub somewhere

  • @fairozashour3339
    @fairozashour3339 2 роки тому +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  2 роки тому +1

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

    • @fairozashour3339
      @fairozashour3339 2 роки тому

      @@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 2 роки тому +1

      @@NicolaiAIthank you know i inderstand

  • @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

  • @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

  • @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

  • @SealionPrime
    @SealionPrime 3 роки тому +2

    Great video, clear and to the point!

  • @BlueWolf-ry2os
    @BlueWolf-ry2os 5 місяців тому

    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 11 днів тому

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

  • @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

  • @faizaali895
    @faizaali895 3 роки тому +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  3 роки тому +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 3 роки тому +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  3 роки тому +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 3 роки тому +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 3 роки тому +1

      Faiza which stereo camera are you using?

  • @letianwang5141
    @letianwang5141 3 роки тому +2

    Awesome tutorial!

  • @milindpandya2230
    @milindpandya2230 3 роки тому +2

    Loved this tutorial ✌️

    • @NicolaiAI
      @NicolaiAI  3 роки тому +1

      Thank you for watching, glad that you liked it!

  • @zainahmed4172
    @zainahmed4172 2 роки тому +1

    20000 views?! Tillykke!!!

    • @NicolaiAI
      @NicolaiAI  2 роки тому +1

      Haha tak Zain!

    • @zainahmed4172
      @zainahmed4172 2 роки тому +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

    👍🏿👍🏿👍🏿

  • @nealrowe6169
    @nealrowe6169 3 роки тому +2

    Love this tutorial tbh

    • @NicolaiAI
      @NicolaiAI  3 роки тому

      Glad that you like it!