我有几个在imread或cvLoadImage上打开的tif图像在windows中提供null data,而同样的文件在ubuntu安装上处理起来很方便。
运行imagemagik identify返回
代码语言:javascript复制$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.经过大量的谷歌搜索,opencv可以读取未压缩的tiff图像,但对于压缩类型的tiff libtiff是必需的。我多次尝试重新安装/重新配置opencv,但找不到加载压缩的tiff图像的方法。
在OpenCV 2.4.9的ubuntu安装中也会处理相同的图像。我需要在windows中为opencv libtiff构建哪个编解码器?如何构建?
请帮帮忙。
编辑:在一段时间内。我尝试使用libtiff库读取该文件,但它无法读取该文件,并给出一个错误"deprecated and troublesome old-style jpeg compression mode please convert to new-style jpeg compression"。我确保libtiff安装了以下编解码器
代码语言:javascript复制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所要求的示例文件