Ask Your Question
1

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

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

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 libtiff.so 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 libtiff.so. So is opencv actually calling libtiff? if not how does opencv handle tiff images?

Thanks.

Yancey

edit retag flag offensive close merge delete

Comments

1

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 -0600 )edit

2 answers

Sort by » oldest newest most voted
0

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

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
-1

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

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

Stats

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

Seen: 2,740 times

Last updated: Jan 17 '13