I am using the opencv with following config:
opencv-python == 3.4.3
python version --> 3.6
os --> Windows 10
I am trying to read a TIFF image using cv2.imread() function but am getting "None" as response. Below is the code I am trying with:
import cv2
img = cv2.imread('abc.tif', cv2.IMREAD_UNCHANGED)
print(img)
The result of this script is None
.
I have verified that the given image is available at the required path. The same code works when I try to read a PNG file. I am guessing the problem is with TIFF format. Also, it used to work well with Python 2.7. I recently upgraded to Python 3.6 and since then am having this problem.