From Beginner to Expert: Optical Flow for Object Tracking and Trajectories in OpenCV Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ค. 2024
  • Inside my school and program, I teach you my system to become an AI engineer or freelancer. Life-time access, personal help by me and I will show you exactly how I went from below average student to making $250/hr. Join the High Earner AI Career Program here 👉 www.nicolai-nielsen.com/aicareer (PRICES WILL INCREASE SOON)
    You will also get access to all the technical courses inside the program, also the ones I plan to make in the future! Check out the technical courses below 👇
    _____________________________________________________________
    In this video 📝 we are going to take a look at Optical Flow for Object Tracking and Trajectories in OpenCV Python. We will talk about what optical flow is, and what it can be used for. We will go through the code to set up object tracking with sparse optical flow. At the end of the video, we will see the results of the tracking and trajectories.
    If you enjoyed this video, be sure to press the 👍 button so that I know what content you guys like to see.
    _____________________________________________________________
    🛠️ Freelance Work: www.nicolai-nielsen.com/nncode
    _____________________________________________________________
    💻💰🛠️ High Earner AI Career Program: www.nicolai-nielsen.com/aicareer
    ⚙️ Real-world AI Technical Courses: (www.nicos-school.com)
    📗 OpenCV GPU in Python: www.nicos-school.com/p/opencv...
    📕 YOLOv7 Object Detection: www.nicos-school.com/p/yolov7...
    📒 Transformer & Segmentation: www.nicos-school.com/p/transf...
    📙 YOLOv8 Object Tracking: www.nicos-school.com/p/yolov8...
    📘 Research Paper Implementation: www.nicos-school.com/p/resear...
    📔 CustomGPT: www.nicos-school.com/p/custom...
    _____________________________________________________________
    📞 Connect with Me:
    🌳 linktr.ee/nicolainielsen
    🌍 My Website: www.nicolai-nielsen.com/
    🤖 GitHub: github.com/niconielsen32
    👉 LinkedIn: / nicolaiai
    🐦 X/Twitter: / nielsencv_ai
    🌆 Instagram: / nicolaihoeirup
    _____________________________________________________________
    🎮 My Gear (Affiliate links):
    💻 Laptop: amzn.to/49LJkTW
    🖥️ Desktop PC:
    NVIDIA RTX 4090 24GB: amzn.to/3Uc7yAM
    Intel I9-14900K: amzn.to/3W4Z5Cb
    Motherboard: amzn.to/4aR6wBC
    32GB RAM: amzn.to/3Jt2XVR
    🖥️ Monitor: amzn.to/4aLP8hh
    🖱️ Mouse: amzn.to/3W501GH
    ⌨️ Keyboard: amzn.to/3xUGz5b
    🎙️ Microphone: amzn.to/3w1F1WK
    📷 Camera: amzn.to/4b4Ryr9
    _____________________________________________________________
    Tags:
    #OpticalFlow #ObjectTracking #OpenCV #ComputerVision
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 25

  • @NicolaiAI
    @NicolaiAI  ปีที่แล้ว +1

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

  • @user-ee1yh6ur5r
    @user-ee1yh6ur5r 3 หลายเดือนก่อน

    oh bless you god!! your videos are such helpful. I write my bachelor's thesis rn and you really help me with this shit

  • @smithkhalil9236
    @smithkhalil9236 ปีที่แล้ว

    Very informative video , thanks for uploading, can we use optical flow for micro expressions recognition?

  • @juliabraga3587
    @juliabraga3587 2 ปีที่แล้ว +1

    Amazing video, the best I saw about this topic

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว

      Thanks a lot for watching!

  • @CsIsOwning
    @CsIsOwning 2 ปีที่แล้ว +3

    How do i go about tracking objects if the camera is not fixed and is moving?

  • @gerardaristizabalpla9138
    @gerardaristizabalpla9138 7 หลายเดือนก่อน

    Very nice video! Thanks for sharing the code. Works great :) Quick question - why do you calculate p0r in line 39 and use it later to keep the good trajectories? Couldn't you just use _st ==1? Thanks!

  • @davidizquierdogomez
    @davidizquierdogomez 2 ปีที่แล้ว +1

    Very nice tutorial. What is the object that stores all trajectories? it is weird but after one minute of my video analysis, I get 40 trajectories stored in the "trajectories" object. Surprisingly, after 2 minutes I get less trajectories stored....I am confused. Thank you in advance.

  • @moses5407
    @moses5407 2 ปีที่แล้ว +2

    GREAT tutorials, thanks! One question: how do we limit or manually select from among the good quality features in order to limit what is tracked?

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว

      Hi thanks a lot. I'll recommend u want my newest videos about visual odometry with monocular camera. I show in that video how to only use the best key points tracked. Very similar to this video here

    • @moses5407
      @moses5407 2 ปีที่แล้ว

      Also, what is a "corner" as referenced in the code?

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว

      @@moses5407 a corner is basically just a corner detected in the image. I use a corner detector to find the key points to track with optical flow

  • @AlejandroDiaz-kc5lq
    @AlejandroDiaz-kc5lq 2 ปีที่แล้ว +3

    Thanks for the video and the explanation. It's it possible to get the optical flow from specific objects inside a frame instead of all the objects ?

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว +1

      Thanks for watching! I actually have a video about sparse optical flow where we just do it for individual points. It could be objects as an example

    • @AlejandroDiaz-kc5lq
      @AlejandroDiaz-kc5lq 2 ปีที่แล้ว +2

      @@NicolaiAI Could you provide me the link of the video, I couldn't find it.

  • @hawkaerospace9852
    @hawkaerospace9852 2 ปีที่แล้ว +1

    Excellent explanation, Nicolai.
    I was left with a doubt. How would I detect only static features of the environment?

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว

      Thanks a lot for watching! I also have a video about dense optical flow where u can get the static points as well

  • @marcindyba4774
    @marcindyba4774 7 หลายเดือนก่อน

    Hey Nicolai, thank you for tutorial. I was going to unlike it , because form video in few moments is really hard to check the code , but then realized that you have repository on github with code , therefore big thanks for you.

    • @NicolaiAI
      @NicolaiAI  7 หลายเดือนก่อน

      Yeah thanks a lot for watching! A bit old video, but definitely check out some of my recent ones!

  • @faisaljaved3612
    @faisaljaved3612 ปีที่แล้ว

    Hello Nicolai. First of all thanks for uploading such detail video. It's very helpful. I'm applying this on real time vehicle detection and tracking through dashcam. And I want to detect only vehicles or motorbikes on the road. Not the changing surroundings like trees, street lights or bridges. Can you help me in this regard. Thanks

    • @san-um7iv
      @san-um7iv 7 หลายเดือนก่อน

      Hey, I am also working on something similar to this. Did you find a solution? If you could share your idea, it would be really helpful!

  • @mponny
    @mponny ปีที่แล้ว

    Great tutorial! Please upload this file to GitHub again, have not been able to find it and some of the code is not visible in the video

  • @sakibquddus8471
    @sakibquddus8471 ปีที่แล้ว +2

    Can u please provide the exact code repo??

  • @andikasujanadi
    @andikasujanadi ปีที่แล้ว

    Bro I can't find your repository (at least none of that name contains 'optical')

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว +1

      github.com/niconielsen32/ComputerVision/tree/master/opticalFlow