I am trying to convert an image from RGB to grayscale. My image looks like this after reading
img = cv2.imread('sample.png')
plt.imshow(img)
I tried converting this to grayscale using cv2 function and the image looks as below after conversion:
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
plt.imshow(gray)
As you can see image is not converted to grayscale properly. What could be the reason? Am I missing something here?