Hi,
I try to open a list of TIFF images with opencv-python (cv2.imread) but there's always an issue with binary images. I have this warning message :
[ WARN:0] global C:\projects\opencv-python\opencv\modules\imgcodecs\src\grfmt_tiff.cpp (271) cv::TiffDecoder::readHeader OpenCV TIFF(line 271): failed TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric) imread_('1729.tif'): can't read header: OpenCV(4.1.1) C:\projects\opencv-python\opencv\modules\imgcodecs\src\grfmt_tiff.cpp:271: error: (-2:Unspecified error) OpenCV TIFF: failed TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric) in function 'cv::TiffDecoder::readHeader'
So, to open these binary images, I use PIL and convert images into numpy arrays. But I test before with opencv and consequently, the warning messages still appear in command line.
How to delete them ? I try to add this line but nothing happens: warnings.filterwarnings("ignore")