I want to read the alpha channel from a tiff image using Python OpenCV. I am using Enthought Canopy with OpenCV 2.4.5-3 module.
I followed the OpenCV website's tutorial using cv2.imread, but it doesn't seem to work.
What I have now is:
import cv2
image = cv2.imread('image.tif', -1)
Then I used: print (image.shape)
, it still shows the (8192, 8192, 3). But I used Matlab to read the same image, I can see the dimension of this image is (8192, 8192, 4).
I am not sure what should I do to read the alpha channel of this image.
Thanks in advance!! Nan