I have few tif images which open on imread
or cvLoadImage
gives null
data
in windows whereas the same file is processed conveniently on ubuntu installation.
Running imagemagik identify
returns
$identify 60018969.tif
60018969.tif[0] TIFF 1696x2192 1696x2192+0+0 8-bit Grayscale DirectClass 516KB 0.000u 0:00.040
60018969.tif[1] TIFF 1696x2192 1696x2192+0+0 8-bit Grayscale DirectClass 516KB 0.000u 0:00.030
60018969.tif[2] TIFF 1696x2376 1696x2376+0+0 8-bit Grayscale DirectClass 516KB 0.000u 0:00.019
60018969.tif[3] TIFF 1696x2376 1696x2376+0+0 8-bit Grayscale DirectClass 516KB 0.000u 0:00.019
identify: 60018969.tif: wrong data type 4 for "JpegProc"; tag ignored. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
After a lot of google search ,opencv can read uncompressed tiff images, but for compressed types tiff libtiff is needed. I tried re-intalling/re-configuring opencv many times but could not find a way to load compressed tiff images.
The same image is processed in ubuntu installation of OpenCV 2.4.9. Which codec I need to build in windows for opencv libtiff and how?
Please Help.
EDIT: During the course of time. I tried reading the file using libtiff
library and it failed to read the file giving an error "deprecated and troublesome old-style jpeg compression mode please convert to new-style jpeg compression"
. I made sure that libtiff had following codecs installed
Support for external codecs:
ZLIB support: yes
Pixar log-format algorithm: yes
JPEG support: yes
Old JPEG support: yes
JPEG 8/12 bit dual mode: no
ISO JBIG support: yes
LZMA2 support: no
C++ support: yes
OpenGL support: no
The example file as asked