Python, Opencv, Jupyter Notebook, Computer Vision, Programming.
takes the original image and the COLOR_BGR2GRAY attribute as an argument. Store the resultant image in a variable: gray_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) Display the original and grayscale images: cv2.imshow("Original Image", img) cv2.imshow("Gray Scale Image", gray_img) cv2.waitKey(0)