Published
- 1 min read
rgb to grayscale python opencv
The solution for this is noted below
rgb to grayscale python opencv
Solution
import cv2
image = cv2.imread('C:/Users/N/Desktop/Test.jpg')
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
cv2.imshow('Original image',image)
cv2.imshow('Gray image', gray)
cv2.waitKey(0)
cv2.destroyAllWindows()
Try other methods by searching on the site. That is if this doesn’t work