i am trying to load an grayscale image with opencv2, but somehow the color channel gets completely removed.
When i am doing:
img = cv2.imread(PATH_TO_IMAGE, 1) // load image as rgb
img.shape
returns for example (28,28,3)
But if i am loading the same image as grayscale:
img = cv2.imread(PATH_TO_IMAGE, 0) // load image as grayscale
img.shape
returns (28,28)
, but i would expect/need a shape of (28,28,1)
Is this a bug in opencv or am i missing something?
Thanks in advance!