Ask Your Question

yoo's profile - activity

2016-03-17 13:27:10 -0600 asked a question how to get source/header files of libjpeg in opencv4ndk 3rd-party

Hello,

I used libjpeg.a and libtiff.a in opencv for my project. I downloaded opencv-3.1.0 for Mac. When I build my project on Mac, I included the source/header files of jpeg/tiff from the above downloaded folder. (/opencv-3.1.0/3rdparty/libjpeg or /libtiff) After build and compile the opencv on the folder 'opencv', I can get the library files(liblibjpeg.a/liblibtiff.a) from the folder '/opencv/3rdparty/lib' So I linked these libraries to my project. Finally, I succeed to compile and ran well.

But, my problem is occurred when I try to port my project to Android. I downloaded 'OpenCV-3.1.0-android-sdk.zip' from https://sourceforge.net/projects/open... But, when I unzip this, there are no source/header files, only libs. Actually, I don't need to change source/header files of jpeg/tiff libraries, but I need to include them to my project. So I just tried to use source/header files from opencv-3.1.0 for Mac, and use libraries(*.a) from opencv-3.1.0-android-sdk. Then, it failed to compile. One of the errors is like, jhcomp.c:function jpeghdr_CreateCompress: error: undefined reference to 'jpeg_CreateCompress'

I wondering that jpeg-library of opencv-3.1.0-android-sdk is not same as opencv-3.1.0 for Mac ?

if yes, can I use source/header files from opencv-3.1.0 instead of opencv-3.1.0-android-sdk?

if not, how can I get source/header files of jpeg-library(3rd party) from opencv-3.1.0-android-sdk?

Thank you for your help in advance.