red and blue works fine, what happened to GREEN. i've read the similar question and another one,still doesn't work. see my picture frame,mask,res
import cv2 as cv
import numpy as np
cap = cv.VideoCapture(0)
while(1):
_, frame = cap.read()
hsv = cv.cvtColor(frame, cv.COLOR_BGR2HSV)
lower_blue = np.array([110,50,50])
upper_blue = np.array([130,255,255])
lower_green = np.array([45,100,20])
upper_green = np.array([75,255,255])
lower_red = np.array([0,100,100])
upper_red = np.array([10,255,255])
mask1 = cv.inRange(hsv, lower_blue, upper_blue)
mask2 = cv.inRange(hsv, lower_green, upper_green)
mask3 = cv.inRange(hsv, lower_red, upper_red)
res = cv.bitwise_and(frame,frame, mask= mask1+mask2+mask3)
cv.imshow('frame',frame)
cv.imshow('mask',mask1+mask2+mask3)
cv.imshow('res',res)
k = cv.waitKey(5) & 0xFF
if k == 27:
break
cv.destroyAllWindows()