Issue
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.
Solution
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")
Answered By - Christoph Rackwitz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.