OpenCV Python Tutorial For Beginners 12 - How to Bind Trackbar To OpenCV Windows

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

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

  • @angelpico3236
    @angelpico3236 4 года назад +6

    This is very cool man! I been following up your series and they have helped me a lot, keep up the good work brother.

  • @joecandoit5341
    @joecandoit5341 5 лет назад +2

    Been working through your videos for opencv and the content is fantastic. You are a great teacher.

  • @Subagyo-Tepil
    @Subagyo-Tepil 3 месяца назад

    I do like how you explain, I hope you can explain about converting image to text from zero to advance using pytesseract. Thks

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

    Learning all this is fun

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

    Thank you so much.....

  • @akashsaxena3267
    @akashsaxena3267 4 года назад +4

    It may be a rookie doubt but can someone please clarify why we are not passing some value as an argument when calling 'nothing' function inside cv.createTrackback?

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

      Hi, we are just giving reference to TrackBack that on trackback event you have to call this function. And argument will be passed by Trackback and that is a standard single argument which will be value of the trackback change to which this method has been binded.

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

    ¡Gracias, amigazo!

  • @ValSpiridonov
    @ValSpiridonov 5 лет назад +3

    Thank you so much for your incredible content!

  • @pawanps8896
    @pawanps8896 5 лет назад +1

    nice videos , i think you have used new repository for each video in git. can you make all py files in same repository so that its easier to download.

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

    Why am I able to put CP value to 0 in trackbar , when i have put 10 as the minimum value in condition

  • @GelsYT
    @GelsYT 5 лет назад +3

    hey why does mine show up two widnows? the other one with black window and the other one with the trackbar with grey color at the bottom? hahaha
    Congrats on your 1M subs =)
    #ILOVEINDIANS

  • @paul_wiggin
    @paul_wiggin 5 лет назад +1

    does it works only for "Windows" OS or any windows on any OS?

  • @ShivamVerma-mu6oy
    @ShivamVerma-mu6oy 5 лет назад +4

    how to change the position of trackbar?

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

    Thanks bro..........

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

    In the 2nd trackbar example, why imread is written inside the while loop?

  • @aidenstill7179
    @aidenstill7179 5 лет назад +1

    What are the minimum technical specifications for a computer needed to work with computer vision?

    • @aidenstill7179
      @aidenstill7179 5 лет назад

      @Skill F What technical characteristics of a computer are needed for practical computer vision? that's better?

    • @pravindesai-nm6io
      @pravindesai-nm6io 5 лет назад +5

      open CV can also run on raspberry Pi , so there aren't any ..... just a basic machine is needed.

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

    hey,
    you are teaching in a descent way ...
    I am made the trackbar , but I am not getting any color change in my image
    Any one who van help me ?
    thanks ..

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

      you need to share your code. nobody can help with just that much info

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

    Why do I have the indexing for the img [x1:x2 , y1:y2] working as inverted. It is the same also for the creation of the image as black image (300) is the Y and 512 is the X

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

    hi, what version of pycharm do u use? and do you use kite for the autocomplete?

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

    the program work well but every time i close the window with trackbar there is another window named 'image ' appears and i can't close it until i close the entire spyder ID

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

      press esc
      k=27 means you have to press esc to close the windows

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

    I have the error 17.00 and I tried a lot but I didn't fix it. There is being first time for on me :(

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

    what is the syntax for change the colour?gettrackbarpos?

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

    please help me for my issue. while loop is running infinitely

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

    on linux mint it isnt work, the trackbar is bugged

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

    Does callback functions work as some kind of interrupts? Thanks

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

      I think the function is just called when the trackbar is changed. So instead of updating b, g, and r every iteration of the while loop, we could update b, g, and r only when the trackbar position is changed. Just what I got from the vid, not a professional myself.

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

    sir, the code for changing color doesn't work with me.
    img[:] = [b, r, g]

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

      Check the sequence of the your variables sis. It's BGR in OpenCV.

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

    @ProgrammingKnowledge @codebind @YogeshPatel What's the point of adding a trackbar to the image if the grayscale values of all pixels don't change at all even when you move the slider/tracker on the trackbar? What do you gain by simply adding text that represents the tracker position/value? What does that number even mean if it has no effect on the image? I would like to see a colored image change its BGR values and a black-and-white image changes its grayscale values if you add such features to an image. Simply changing the color of a blank background in the very first example is OK, but how can you extend that feature to actual images/pictures? Am I the only one wondering about the usefulness of trackbars?

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

      I think it's the best if you watch this tutorial chapter 7, there is an example for your question. I tested, works fine. :) ruclips.net/video/WQeoO7MI0Bs/видео.html

  • @parimalarenga92
    @parimalarenga92 5 лет назад +1

    when next machine learning video is to be uploaded ?

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

      @maryam start with below video:
      ruclips.net/video/EjVzjxihGvU/видео.html

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

      @maryam first of all, this machine learning series is Focused on just basic area of machine like image recognition ,speech recognition data Predictions etc....
      Image processing is one of the Sub field of AI, if you want to learn only image processing specifically . Just go for another youtube channel that teaches you image processing and search for answers in reddit, quora for more information.... That gives you actual road map to learn image processing from the ground up. Best of luck 👍

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

    Why is : used in img[:] = 0

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

    It's possible to display a Trackbar that uses float numbers? I need it to blend images. Thank's in advance

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

      dividing the number gives float

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

    How is cv.waitkey() used? I've seen it get used in the end, which i understand, but what role does it play in a code like this?

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

      waitkey()
      the window(trackbar) will be displayed until you press esc key (27)

  • @josemuniz5501
    @josemuniz5501 5 лет назад

    Hi there. My image wont change color?

    • @downintheshop4147
      @downintheshop4147 5 лет назад

      I know you posted this comment 2 months ago so might be a little late for you, but if anyone else is having problems, make sure your indentation is correct after the "break"

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

      My indentation is correct, but stil having the same problem

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

      Hi , Please chk ur while loop condition k = cv2.waitKey(1) & 0xFF . If this condition & indent match , i am sure image color will change.

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

      @@shailavijay1 hi , i am getting also same kind of problem. My window is also not changing the color ...
      Can anyone here, who can help me out from this issue ?

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

      @@abdultaufiq2237 make sure that cv2.gettrackbarpros are in while loops and k = cv2.waitkey(1) & 0xFF is correctly written

  • @ThinhNguyen-hb8nj
    @ThinhNguyen-hb8nj 4 года назад

    In example 2, my error appears from line 30? How can i fix?
    cv2.error: OpenCV(4.1.2) C:\projects\opencv-python\opencv\modules\imgproc\src\color.cpp:182: err

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

      type it in correctly. its cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

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

    when i changed the image rgb values in while loop my image window crashed so i changed the values in nothing (trackbar changed value function ) and show the image in the nothing every time then it fixed!

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

    can anyone tell me problem in this?
    import cv2
    cv2.namedWindow("image")
    def nothing():
    pass
    cv2.createTrackbar('CP','image',0,200,nothing)
    img=cv2.imread("C:\\Users\\Nikunj\\Downloads\\buggati.jpg")
    switch='0 : colour
    1 : gray'
    s=cv2.createTrackbar("switch","image",0,1,switch)
    while(1):
    pos=cv2.getTrackbarPos('CP','image')
    font=cv2.FONT_ITALIC
    cv2.putText(img,str(pos),(10,230),font,5,(255,62,175),3)
    s = cv2.getTrackbarPos(switch, 'image')
    if s==0:
    pass
    elif s==1:
    img=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
    cv2.imshow("image",img)
    k= cv2.waitKey(0)
    if k==27:
    break
    cv2.destroyAllWindows()