Stereo Vision Project: Depth Estimation with OpenCV in Python

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

КОМЕНТАРІ • 63

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

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

  • @empowercode
    @empowercode 3 роки тому +6

    Hey Coding Library, nice to meet you! I just found your channel, love what you're doing!
    I like how clear and detailed your explanations are as well as the depth of knowledge you have surrounding the topic! Since I run a tech education channel as well, I love to see fellow Content Creators sharing, educating, and inspiring a large global audience. I wish you the best of luck on your UA-cam Journey, can't wait to see you succeed! Your content really stands out and you've put so much thought into your videos, I applaud you on that!
    Cheers, take care, and keep up the great work ;)

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

      Thank you very much for the nice words, i really appreciate that! 🙂 Cool that your are creating videos aswell and good luck on your journey too. Feel free to join the discord server so we can stay in touch!

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

      @@NicolaiAI No problem, glad I could help out! I'll definitely check out your server too :)

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

    Hello, first of all thanks a lot for this video and all the others, you help us so much and present things like no one does, so I want to say that I really appreciate it!
    Then I have 2 questions to ask you :
    1) Is it possible to modify the shape detection in order to detect a square? If yes by modifying what?
    2) I did not understand which the color detection parameters were and how to change the color detection range, can you tell me where to look at?
    Again, thanks a lot, I love what you're doing!!

  • @박규태-r3d
    @박규태-r3d 18 днів тому

    What if i use different stereo camera between? For example, one is pi camera module3 else is pi camera module 3 wide lens. What do i have to change?

  • @NeyuhNeyugn
    @NeyuhNeyugn 3 місяці тому

    @NicolaiAI can i use MYNT EYE S SDK for this??

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

    How can i calculate de f_pixel if the cameras are different?

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

    Hi, thanks for the video. question for you. I have images from a stereo camera. I know the distance between optics. How can I take measures of the features in one couple of images? thanks in advance

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

      Thanks for watching! What u ask for is pretty much what i do in this video here. In this video i only use 1 feature doe, but u can have as many as u want

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

      I also have a video about depth maps and another one only with the theory of stereo vision that i would recommend!

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

    hello bro, excuse me , i need your help about many cuestions, i make a project for my work and i want use 3 depth cameras but, i dont know so much about that. do you would give me your email or another social media for comunicate
    Sorry for my bad English

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

      If u are a member u can find my email under the community section

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

    Wow that's the work I was looking for, a real motivation! Keep it up man. I just want to ask you if you can help find the focal length and field of view of my camera ( laptop camera) .Thanks in advance

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

      Thank you very much! I have a video about a computer vision project here in the tutorial. In that video i show how to calculate the focal length and the field of view aswell🙂 that project is about depth estimation and object detection with only 1 camera

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

      @@NicolaiAI Is there any place where I can chat with you , I am nearly finishing a final year project where I use CNN for object detection and then I estimate the distance using triangulation , but I want to ask you something about the camera calibration. Regards, Elio

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

      I have a discord server in the description :)

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

      @@NicolaiAI Since I have the same problem regarding the focal length, I wanted to ask if you can share the link to this video here. Thanks.

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

    Thanks for your tutorial. The instruction really nice and clear for me. Keep doing well!

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

      Awesome! Im glad u like it

  • @TheBriandegroot
    @TheBriandegroot 10 місяців тому +1

    Will it be possible to use my own yolov8 object detection or do i then need to build it in a segmentation model for the best results? I also need it to track with id's

    • @NicolaiAI
      @NicolaiAI  10 місяців тому +2

      Yeah you can definitely run your own custom models and then just extract the detections and use that for the depth calculations. Both detection and segmentation can be used and trackers on top of that. Ultralytics also have trackers directly with a few lines of code. Def check out their videos on their UA-cam channel

    • @TheBriandegroot
      @TheBriandegroot 9 місяців тому

      I now use the center of the segmentation masks to calculate the desparity. is this a good point or is it better to use the center of the detection boxes? what will be most accurate? and does the circle around the center dot have a certain function? I'm not using it at the moment. I mainly use the center point (my objects are pyramid/trapezium shaped)

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

    Hi Nicolai. Which dual camera do you recommend, I am using a RPi 4, and I´m not sure did a little research and I found StereoPi and some Arducam options. Thanks in advance.

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

      U can also take a look at econ systems. I have a video about their cameras here on the channel as well

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

      @@NicolaiAI thanks for your answer I will take a look at econ systems

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

    Is the variable f or alpha used in the code? I couldn't find where

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

      Alpha is not used in the code since we already know the focal length, but alpha can be used to calculate the focal length, f

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

    hi, where can i find the "calib_parameters.py" file which you mention in "calibration.py" :( ? Thnx

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

      I dont calibrate the cameras in this video here, so that file is just empty, but should be the camera parameters and distortion parameters. If you want to learn how to calibrate a camera and get the parameters i have made a video about that aswell. Thank you🙂

  • @xiangxingxu5455
    @xiangxingxu5455 Рік тому

    According to your formula you can get Z=b*f/Diaparity. But there is a contradiction in dimension. Because Z, b and f are all in millimeter units, and Disparity is in pixel units. How can this be explained?

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

    Which camera are you using ? can put the link for so that we can buy it .

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

      I'm just using two cheap standard webcams. If u want a good and fixed setup i would recommend oak d from opencv

  • @technowingsproject2298
    @technowingsproject2298 Рік тому

    Hello @nicolaiAI, you have not used focal length (f) in find_depth function. Why so ?

  • @coooliiioooo
    @coooliiioooo Рік тому

    Hi Nicolai
    Thanks for the video and the explainations nice work!
    One question, how should I define the baseline? Is there any best practice or formula I can use?
    My use case is to create a data set for volume prediction of cups pictured from above and fixed position. So max distance/depth to the table/ cup is always the same.

  • @fernandosutanto8447
    @fernandosutanto8447 Рік тому

    Sorry, Quick question, is the program accurate for other objects?

  • @chahine6828
    @chahine6828 Рік тому

    good morning, thank you for this great tutorial, although i have a question, did you ignore the calibration in this project? cause it worked well although you didnt uncomment the calibrate function,
    thank you very much for responding asap ☺

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

    i have just webcam on my laptop...so can i do this project???/

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

      No unfortunately u will need two cameras to do stereo vision and depth estimation with that. I have another video here in the computer vision tutorial where i have a project where i do it with one camera like you have, but it is not as precise as this one with two cameras 🙂

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

      @@NicolaiAI o thanks for reply bro🙂🙃😑😐

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

    Great Tutorial.. can you please make a video to estimate depth of multiple object.

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

      Thank you for watching! I already have a video about dense stereo vision and deep learning for depth. U can use that for depth to multiple objects

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

      @@NicolaiAI Great work man ! I really appreciate your knowledge ! Can you please share the link of the video where you talk about dense stereo vision (detecting distance of multiple objects). Thanks in advance!!😃😃

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

    hello sir, i just calibrated my stereo cameras but my disparity matrix second and third column is infinite how can i i overcome this problem?

  • @granatapfel6661
    @granatapfel6661 Рік тому

    Can you share the code how to calculate the distance of any object?

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

    please implement some deep learning paper related to deep map and view synthesis. thanks

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

    Nice! Thanks for this!

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

    My friend please activate the subtitles.

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

      It should be on automatically, i think it takes some time before it's fully processed. Maybe a couple of hours. I just uploaded it 1 hour ago and just published. Thank you for watching! 🙂

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

      @@NicolaiAI On the contrary thanks to you. This tutorial you put in is a gem

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

      Thank you! I appreciate that

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

    Great tutorial! It working fine. Just wanted to ask a question, to calculate X and Y coordinates, should I use the equations X=ZxL/f and Y = ZyL/f. If so, then the yL= circle_left [1] or it needs to be calculated?

    • @shadowiwnl6444
      @shadowiwnl6444 5 місяців тому

      did you ever resolve this ? I have the same question

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

    your camera name????

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

      I just use a budget webcam in this video. So nothing special. U can use whatever u want

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

    Nice! Thanks for this!

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

    Thank you! Any recommendations on what camera to use? Maybe put a link here?

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

      I just use 2 standard webcams, the cameras really depends on the application. If it's for personal projects webcams are fine but in production u can get stereo cameras but they are very expensive. An example could be the OpenCV oak d

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

    Now we got depth, can we use time somehow to obtain speed ?!!!

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

      (1/FPS) gives time taken for each frame and when divided by difference b/w depths of object in successive frames gets us speed right ?.

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

      Yes u would be able to do that and calculate it. But It would require that u know a distance between two points in world coordinates and then u can use geometry. Then u know the two sides of the triangle and the unknown is the distance between those two points. u can reproject the 2d points to 3d, if u are thinking about doing some project where u want to get the speed of objects. U can do that with monocular camera aswell unless u need to know where the objects are located precisely

  • @benoitd94
    @benoitd94 Рік тому

    Hi, i have been following your videos since a while now. I would like to know how can i extract the shadow and only a shadow from a picture with openCV ? i would like to automatize my umbrella move in order to have the best shadow possible