Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can compile the library by yourself, built them as static lib and disable opencv_world.This post has the details

Supplement :

1 : Switch off the modules you do not need 2 : Switch off BUILD_opencv_world(maybe step 2 could be skiped) 3 : Switch off BUILD_SHARED_LIBS 4 : I build opencv3.3 with tbb and carotene, they works fine on android phone

After you run mingw32-make install, link to the library you need, the order of linking is crucial, try to change their orders if you got a lot of link errors.

My example(I build the project by qmake):

LIBS += $${CV_LIB_PATH}/libopencv_world.a

LIBS += $${OPENCV_3RD_LIBS}/liblibtiff.a
LIBS += $${OPENCV_3RD_LIBS}/liblibjpeg.a
LIBS += $${OPENCV_3RD_LIBS}/liblibjasper.a
LIBS += $${OPENCV_3RD_LIBS}/liblibpng.a
LIBS += $${OPENCV_3RD_LIBS}/libIlmImf.a

LIBS += $${OPENCV_3RD_LIBS}/libcpufeatures.a
LIBS += $${OPENCV_3RD_LIBS}/libtegra_hal.a
LIBS += $${OPENCV_3RD_LIBS}/liblibwebp.a
LIBS += $${OPENCV_3RD_LIBS}/liblibprotobuf.a
LIBS += $${OPENCV_3RD_LIBS}/libtbb.a

I link with opencv_world because I do not want to fiddle with the link order

Example project--Light detector, build with Qt5 and opencv3.3, show you how to build cross-platform computer vision app with Qt5 and opencv.

ps : if you are familiar with tensorflow, please lend me a hand--Turn is_training of batchnorm(TensorFlow) to False, thanks.

You can compile the library by yourself, built them as static lib and disable opencv_world.This post has the details

Supplement :

1 :

  1. Switch off the modules you do not need 2 : need
  2. Switch off BUILD_opencv_world(maybe step 2 could be skiped) 3 : skiped)
  3. Switch off BUILD_SHARED_LIBS 4 : BUILD_SHARED_LIBS
  4. I build opencv3.3 with tbb and carotene, they works fine on android phone

After you run mingw32-make install, link to the library you need, the order of linking is crucial, try to change their orders if you got a lot of link errors.

My example(I build the project by qmake):

LIBS += $${CV_LIB_PATH}/libopencv_world.a

LIBS += $${OPENCV_3RD_LIBS}/liblibtiff.a
LIBS += $${OPENCV_3RD_LIBS}/liblibjpeg.a
LIBS += $${OPENCV_3RD_LIBS}/liblibjasper.a
LIBS += $${OPENCV_3RD_LIBS}/liblibpng.a
LIBS += $${OPENCV_3RD_LIBS}/libIlmImf.a

LIBS += $${OPENCV_3RD_LIBS}/libcpufeatures.a
LIBS += $${OPENCV_3RD_LIBS}/libtegra_hal.a
LIBS += $${OPENCV_3RD_LIBS}/liblibwebp.a
LIBS += $${OPENCV_3RD_LIBS}/liblibprotobuf.a
LIBS += $${OPENCV_3RD_LIBS}/libtbb.a

I link with opencv_world because I do not want to fiddle with the link order

Example project--Light detector, build with Qt5 and opencv3.3, show you how to build cross-platform computer vision app with Qt5 and opencv.

ps : if you are familiar with tensorflow, please lend me a hand--Turn is_training of batchnorm(TensorFlow) to False, thanks.