I have been working on ocr, so I need to load images and convert it to gray scale I tried to load the image as below
filename = "sample.jpg"
image = cv2.imread(filename)
plt.imshow(image)
it gave image which is what I need.
when I tried to load as grayscale image as
filename = "sample.jpg"
image = cv2.imread(filename,0)
plt.imshow(image)
the loaded image wasn't grayscale. Any sort of help is appreciated, thank you. link to image - https://i.stack.imgur.com/L1i44.png