checking the Colors Opencv Python
问题 I have a code to detect two colors green and blue. I want to check if green color is detected to print a massage and if blue color is detected to print another message too Here is the Code: import cv2 import numpy as np cap = cv2.VideoCapture(0) while(1): # Take each frame _, frame = cap.read() # Convert BGR to HSV hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV) # define range of blue color in HSV lower_blue = np.array([110,50,50]) upper_blue = np.array([130,255,255]) lower_green = np.array([50,