I imported a single channel image (from a .mat
) file. When I use plt.imshow()
for the image, the image looks distorted...kind of like inverted hues? Not sure. I think it's something trivial, but I'm unable to understand what exactly is happening. Some have suggested changing from BGR to RGB but that would be valid for RGB images, not single channel ones.
example of how i'm loading my image file -
import scipy as sp
from scipy.io import loadmat
red=sp.io.loadmat('red.mat')['red']
red
is a dictionary from which i extract the value of the key red
whose value is essentially the color intensity matrix.
plt.imshow(red)
yields this.
funny thing is that red, blue and the green channels they all have the same colour hues. What am I missing?