I tried to gray an image but it does not work properly like it should. It just applied a kind of filter as you can see by using cv2.COLOR_BGR2GRAY function. Kindly someone help me to get over with this issue.
CodePudding user response:
Your issue is that you're using matplotlib to show your grayscale image. Matplotlib applies a colormap. By default that's a colorful one.
Add cmap="gray"
in your imshow
call: plt.imshow(img_gray, cmap="gray")