opencv color conversion code example
Example 1: bgr2gray opencv
img = cv2.imread(path)
img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
Example 2: cvtcoloer opencv
toGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
img = cv2.imread(path)
img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
toGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)