Python language using openCV cv2 cvtColor error, where is wrong?
CodePudding user response:
That's because the frame is not 3 channel or 4 channel
If len (frame shape)==3 or len (frame) shape)==4:
Gray=cv2. CvtColor (frame, cv2 COLOR_BGR2GRAY
The else:
Gray=frame
CodePudding user response: