We’re going to see in this video how to detect colors through HSV Color space on Opencv with Python.

We import the libraries Opencv and Numpy, then load the cap to get the frames from the webcam. After that we start a while Loop where we get the frames and we do the detection.

Inside the while loop we define the HSV ranges (low_red, high_red), we create the mask and we show only the object with the red color.

Same for the other colors:

We finally show the result: