cv2 grayscale image code example
Example 1: cv2 grayscale
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
Example 2: save an image in python as grayscale cv2
cv2.imwrite('data/dst/lena_opencv_red.jpg', im)
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
cv2.imwrite('data/dst/lena_opencv_red.jpg', im)