Question: how to convert bgr to hsv?
Answer: while(1): # Take each frame. _, frame = cap.read() # Convert BGR to HSV. hsv = cv.cvtColor(frame, cv.COLOR_BGR2HSV) # define range of blue color in HSV. upper_blue = np.array([130,255,255]) # Threshold the HSV image to get only blue colors. mask = cv.inRange(hsv, lower_blue, upper_blue)