gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) code example Example: cv2.cvtcolor grayscale gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)