AI for Everyone LESSON 13: HOMEWORK SOLUTION Tracking an Object Based on Color in OpenCV

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

КОМЕНТАРІ • 80

  • @boweifan174
    @boweifan174 3 роки тому +7

    Hello, I am a student from Taiwan, it's teacher's day today in Taiwan and I want to thank you for your arduino lessons, it inspired me into learning more about tech and programming. I wouldn't be able to do the amazing projects I am doing right now without your help. Thank you very much and have a good day! :)

  • @darthdaenerys
    @darthdaenerys 2 роки тому +4

    I'm a legend. I used the concept of adding two masks using bitwise OR function and took an AND with the original frame. The results were as expected. Thanks for your great lessons !

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

      i just add two images mask=mask1+mask2. one mask is tracking blue and second was tracking yellow.

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

      @@cutoutsolution did you use a bitwise operation?

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

    I am legend. I posted my solution in the previous video. I took a slightly different approach to combining the two masks. I made a second object and concatenated it with the first object when we made the myObjectSmall variable. It worked. I was glad to see the different ways of making it work. More options is better.

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

    I am legend.Used the concept of adding two masks using bitwise OR function. Thank you for the great lessons.

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

    I am LEGEND! I was stumped a bit, as the bitwise kept overriding the other then I realized that they were both arrays and we can simply just add an array. Didn't think it would be so simple but it worked beautifully!

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

    an interesting exercise and demonstration of the problem you are solving is to shoot the color wheel and very the sliders.

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

    i am legend. Hey Sir I have done homework.. it was easy. Thanks for the great content.

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

    Hi - also a legend. I also had a version taking in the last couple of lessons where I used the mouse to select a rectangular ROI and then set the bounding values (including 2 hue values) based on the stats of the selected area. Enjoyed that challenge ! Thanks for the lessons

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

    I am Legend: I added the two masks together. worked but your solution is better using the OR. Once again, thanks for sharing
    your knowledge.

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

    Hello Paul, another fantastic lesson and your teachings are in a league of their own.
    I have a suggestion. For fine-tuning, the Trackbars should have a textbox for inputting the exact value. Maybe my age is showing at 62 the hand is shaking to hold the slider steady on the trackbars. Just a thought!
    Once again thank you for your lessons.

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

    Thank you so much as always for an instructive session.

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

    Very clear explanation. Thanks.

  • @alfredcalleja450
    @alfredcalleja450 7 місяців тому

    Hi Prof. Paul, I worked out all of the code except for the Composite part, so I suppose I have to "back-peddle" my "Legend" claim from the previous tutorial: maybe I should spell it with a lowercase l as in "legend". Thanks, as always, for a great tutorial. See you at the next one.

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

    I am legend!
    This one took a while, but I was able to tinker through it.
    I did not create a "combined-mask" variable. I just directly added them together as follows:
    Hue1Mask = cv2.inRange(Cm0f0HSV , Hue1LB , Hue1UB)
    Hue2Mask = cv2.inRange(Cm0f0HSV , Hue2LB , Hue2UB)
    Objectsimg = cv2.bitwise_and(Cm0f0 , Cm0f0 , mask = Hue1Mask + Hue2Mask)
    Great Lessons!

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

    I am legend!! fun lesson. Enjoy the mystery persons!

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

    Love the new background!!!

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

    Another member of the legend club here

  • @MichaelWilliams-rf2jw
    @MichaelWilliams-rf2jw 3 роки тому

    I am legend with a lower case L. I tried to make a composite mask using cv2.bitwise_or but it didn't work. However, I created one object per mask and then cv2.bitwise_or worked to merge them into one object, so I crossed the finish line with tracking two colors. Thanks for another good lesson.
    Also, I felt like I needed 12 trackbars to get my yellow and blue objects selected. I had to set them as follows:
    hsv yellow: [(12,41),(234,255),(137,190)].
    hsv blue: [(104,115),(198,255),(31,117)]

  • @leeg.1402
    @leeg.1402 3 роки тому

    Thanks for another great lesson / homework.
    I'm not a legend with a capital "L". I had some help from a colleague here at the university.

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

    Perfect! ❤️

  • @Sean-lv8kh
    @Sean-lv8kh 3 роки тому

    The window size of my Tracker window was not showing the proper size I was not able to see Val High track. I could not adjust the size of my tracker window to be able to see and modify all tracks

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

    William Bradford Shockley Jr.
    An American physicist and inventor. Along with John Bardeen and Walter Houser Brattain, Shockley co-invented the transistor. 😯🙂

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

      Yes, potentially one of the most significant inventions of all times. We have a winner of the Person of Mystery contest. Good job.

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

    I saw blue is opposite yellow so I plus 80 to hueLow and hueHigh to tracking blue and yellow :D , i didn't think like an engineer, that's terrible!

  • @HUDSON-EV
    @HUDSON-EV 2 роки тому

    I tried to do the homework, but I couldn't figure out how to get the myTrackbars1 and myTrackbars2 to work independently. I found that they effected each other and as a result I was only able to track 1 color. That's why I needed to keep moving forward to figure out how that was done.

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

    you are our huckleberry ^^

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

    I am legend, waiting for the next one ;) u r gr8

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

    I need your help building a star tracker. They’re called barn door trackers. I wanna put a stepper motor on it. Not sure I can write the proper code. Whatever gear I use has to go one rpm. I think. Let’s make one together. Thank you Doug.

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

    I did a bitwise_or. Thinking in bit patterns is somehow easier for me in this context

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

    I AM LEGENDDDD!!!!!!!!!!!!!!!!!!

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

    At first I thought it was Karl Jansky of Bell Labs also but he was gone before Shockley.

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

    I am Legend!

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

    Help!! I seem to have lost numpy and cv2, both squiggly underlined.
    import numpy as np
    import cv2
    (pyAI) PS D:\PythonAI\pyAI3.6> & d:/PythonAI/pyAI3.6/pyAI/Scripts/python.exe d:/PythonAI/pyAI3.6/openCV-18.py
    Traceback (most recent call last):
    File "d:/PythonAI/pyAI3.6/openCV-18.py", line 1, in
    import numpy as np
    ModuleNotFoundError: No module named 'numpy'
    (pyAI) PS D:\PythonAI\pyAI3.6>
    How do I get numpy and cv2 back again??

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

      Make sure you have selected a python interpreter that has the openCV and numpy installed. Remember we installed different versions of python, and put the libraries with 3.6.6. Go back and watch that earlier lesson on installing python and environments if this is not clear. Good luck.

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

      @@paulmcwhorter Thanks for your help. I have gone back to previous episodes and repeated the set-up of the Virtual Environment and also imported CV2 and with it numpy again.
      I am now ready to start Lesson 13 but will have to leave it until tomorrow now.

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

    I am LEGEND!!!

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

    i am legend. i created two masks and added them in bitwise_and

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

    I tried the HW for an hour and a half, but I folded up like a cheap lawn chair.

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

    William Shockley. American physicist

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

      You are killing these things! Excellent!

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

    I am LEGEND

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

    I am legendary!

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

    i am legend

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

    I am legend

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

    I am Legend and I am Pawan

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

    I'm a legend 😎

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

    Paul, Nice to know you don't approve of health and wealth preachers

  • @polito-yd8fp
    @polito-yd8fp Рік тому

    I folded up like a cheap Walmart lawn chair

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

    went relatively fast for me this time: ua-cam.com/video/3QFFVFMGHCs/v-deo.html - I simply made mask1 plus mask 2 and seemed to work just fine... it casts as error with or bit not with |

  • @shettyabhishay
    @shettyabhishay Місяць тому

    Folded up like a cheap walmart chair :(

  • @aman-sood
    @aman-sood 2 роки тому

    I am legend. I did it using cv2.add(). Don't know the mystery person for this week. Why do you think they made red both at the end and the start of the scale? The 175-179 could have been 0-10 and the 0-10 part could have been 11-21

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

    I am legend

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

    I am legend

  • @TYTennis
    @TYTennis 7 місяців тому

    I am legend