Ask Your Question

What library opencv is using to handle tiff file and how?

asked 2013-01-16 10:37:26 -0500

yancey gravatar image

Hi I got a problem on handling tiff image files. I built opencv 2.4.3 as shard libraries on a powerpc linux machine which have no tiff lib from operating system, and turned on 3rd party library (tiff, jpeg, etc.) when building it. But I can't read or write tiff files in opencv. I have two questions.

How does opencv 2.4.3 build its own 3rd party libraries, as a shared libraries .so files or static .a files? there is no option in cmake to control this. Where are these libraries after make, make install, I suppose they should be in opencv-install-prefix/share/, but they are not there. Actually they are not in opencv-install-prefix/ at all.

When I built opencv 2.4.3 on another computer with library from operating system. It works fine with tiff file but when I ldd to list all shared libraries used by my program I didn't see So is opencv actually calling libtiff? if not how does opencv handle tiff images?



edit retag flag offensive close merge delete



Did you actually find something for your problem? If so, you could write your answer here for the benefit of future user. Thanks.

Jean-François Côté gravatar imageJean-François Côté ( 2013-01-21 07:28:54 -0500 )edit

2 answers

Sort by » oldest newest most voted

answered 2018-09-17 15:39:56 -0500

yancey gravatar image

I completely forgot the question here. What I can remember for the issue are: the problem was caused by endian difference on powerpc arch and the tiff lib from opencv didn't get the endian correctly. To fix it, I used source code from libtiff and pass the data to opencv.

edit flag offensive delete link more

answered 2013-01-17 12:07:57 -0500

Jean-François Côté gravatar image

From the documentation page

Note: OpenCV offers support for the image formats Windows bitmap (bmp), portable image formats (pbm, pgm, ppm) and Sun raster (sr, ras). With help of plugins (you need to specify to use them if you build yourself the library, nevertheless in the packages we ship present by default) you may also load image formats like JPEG (jpeg, jpg, jpe), JPEG 2000 (jp2 - codenamed in the CMake as Jasper), TIFF files (tiff, tif) and portable network graphics (png). Furthermore, OpenEXR is also a possibility.

edit flag offensive delete link more

Question Tools


Asked: 2013-01-16 10:37:26 -0500

Seen: 1,859 times

Last updated: Jan 17 '13