Hi there, I’m the founder of Pysource.
I’m a Computer Vision Consultant, developer and Course instructor.
I help Companies and Developers to build efficient computer vision software.
If I do not want to have the track bars would I just have to define the HSV numbers in my code? I want to track R,G,B,Y objects and I do not want to be using a track bar every time to adjust for them. Also how could I add on more colors to this code (tutorial 17 second code)?
You don’t have to use trackbars, I use them only because it’s easier to find the range in real time.
If you already know the HSV values, you can just type them instead of using trackbars:
If I do not want to have the track bars would I just have to define the HSV numbers in my code? I want to track R,G,B,Y objects and I do not want to be using a track bar every time to adjust for them. Also how could I add on more colors to this code (tutorial 17 second code)?
Thank you
You don’t have to use trackbars, I use them only because it’s easier to find the range in real time.
If you already know the HSV values, you can just type them instead of using trackbars:
for example:
lower_blue = np.array([0, 75, 42])
upper_blue = np.array([155, 255, 180])
You can add more colors, by creating more masks. Each color must be detected indivitually and then you can link the masks together at the end.
if i want to look for the red color ,what do i have to change in this code?