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?
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.
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
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 ..
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
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
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.
@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?
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
@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 👍
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"
@@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 ?
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
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!
This is very cool man! I been following up your series and they have helped me a lot, keep up the good work brother.
Been working through your videos for opencv and the content is fantastic. You are a great teacher.
I do like how you explain, I hope you can explain about converting image to text from zero to advance using pytesseract. Thks
Learning all this is fun
Thank you so much.....
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?
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.
¡Gracias, amigazo!
Thank you so much for your incredible content!
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.
Why am I able to put CP value to 0 in trackbar , when i have put 10 as the minimum value in condition
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
does it works only for "Windows" OS or any windows on any OS?
how to change the position of trackbar?
any solution for this?
Thanks bro..........
In the 2nd trackbar example, why imread is written inside the while loop?
What are the minimum technical specifications for a computer needed to work with computer vision?
@Skill F What technical characteristics of a computer are needed for practical computer vision? that's better?
open CV can also run on raspberry Pi , so there aren't any ..... just a basic machine is needed.
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 ..
you need to share your code. nobody can help with just that much info
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
hi, what version of pycharm do u use? and do you use kite for the autocomplete?
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
press esc
k=27 means you have to press esc to close the windows
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 :(
what is the syntax for change the colour?gettrackbarpos?
please help me for my issue. while loop is running infinitely
on linux mint it isnt work, the trackbar is bugged
Does callback functions work as some kind of interrupts? Thanks
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.
sir, the code for changing color doesn't work with me.
img[:] = [b, r, g]
Check the sequence of the your variables sis. It's BGR in OpenCV.
@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?
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
when next machine learning video is to be uploaded ?
@maryam start with below video:
ruclips.net/video/EjVzjxihGvU/видео.html
@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 👍
Why is : used in img[:] = 0
It's possible to display a Trackbar that uses float numbers? I need it to blend images. Thank's in advance
dividing the number gives float
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?
waitkey()
the window(trackbar) will be displayed until you press esc key (27)
Hi there. My image wont change color?
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"
My indentation is correct, but stil having the same problem
Hi , Please chk ur while loop condition k = cv2.waitKey(1) & 0xFF . If this condition & indent match , i am sure image color will change.
@@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 ?
@@abdultaufiq2237 make sure that cv2.gettrackbarpros are in while loops and k = cv2.waitkey(1) & 0xFF is correctly written
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
type it in correctly. its cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
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!
yeah, why to use a while?
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()