I am loading an image using OpenCV python as a greyscale image because of which the shape of the image is (125, 125). But, I need the shape to be (125, 125, 1) where 1 denotes the number of channels ( 1 since it's greyscale ).
img = cv2.imread('/path/to/image.png', 0)
print(img.shape)
# prints (125, 125)
Now, I need to convert img's shape to (125, 125, 1)