Anyone know if OpenCV is capable of loading a multi-frame TIFF stack? I'm using OpenCV 2.2.0 with python 2.6.
So, OpenCV can always read JPEGs, PNGs, and TIFFs.
The drawings are mostly single page tiff images, but the documents may have multiple pages. For an interim fix to the issue, you will have to download a tiff viewer from the app store.
OpenCV is now capable of reading a multi-page TIFF using the imreadmulti
function. See this page from the OpenCV 3.4 documentation:
https://docs.opencv.org/3.4/d4/da8/group__imgcodecs.html#ga4dd47c9ae3d55cc42286cff005825e31
You can load multi-frame tiff files in OpenCV using file read function called imreadmulti. Here is the example
ret, images = cv2.imreadmulti('<path_of_tiff_files>.tiff', [], cv2.IMREAD_ANYCOLOR)
Images will be a list of frames in the tiff file. Suppose you want to see 2nd image, you can access as
img = images[1] # note 0 based indexing
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With