I've been trying to convert an image to grayscale using opencv in Python but it converts the image to some kind of thermal camera image. What am I doing wrong? Here is the code for image below:
img =X_tr[9999]
plt.imshow(img)
plt.show()
img = cv2.cvtColor(img.astype(np.uint8), cv2.COLOR_RGB2GRAY)
plt.imshow(img)
plt.show()
img.shape