Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV 3.2 build for iOS with libjpeg-turbo to be used with Qt

How to build OpenCV 3.2 with libjpeg-turbo for iOS so that it can be used with Qt (5.7.1 or 5.8) and avoid the JPEG version mismatch error and crash. I was using the following with 2.4

cmake -DWITH_JPEG=ON -DBUILD_JPEG=OFF -DJPEG_INCLUDE_DIR=/path/to/libjepeg-turbo/include/ -DJPEG_LIBRARY=/path/to/libjpeg-turbo/lib/libjpeg.a /path/to/OpenCV

and this worked, but fails with 3.2. If I use the 'OpenCV for iOS' with Qt and try to load a jpeg file with imdecode the application will crash with a jpeg version mismatch error.

Eventually is there other workaround for this?

Qt 5.7.1

#define JVERSION    "8c  16-Jan-2011"

OpenCV 3.2

#define JVERSION    "9  13-Jan-2013"
click to hide/show revision 2
retagged

updated 2017-01-04 16:44:38 -0600

berak gravatar image

OpenCV 3.2 build for iOS with libjpeg-turbo to be used with Qt

How to build OpenCV 3.2 with libjpeg-turbo for iOS so that it can be used with Qt (5.7.1 or 5.8) and avoid the JPEG version mismatch error and crash. I was using the following with 2.4

cmake -DWITH_JPEG=ON -DBUILD_JPEG=OFF -DJPEG_INCLUDE_DIR=/path/to/libjepeg-turbo/include/ -DJPEG_LIBRARY=/path/to/libjpeg-turbo/lib/libjpeg.a /path/to/OpenCV

and this worked, but fails with 3.2. If I use the 'OpenCV for iOS' with Qt and try to load a jpeg file with imdecode the application will crash with a jpeg version mismatch error.

Eventually is there other workaround for this?

Qt 5.7.1

#define JVERSION    "8c  16-Jan-2011"

OpenCV 3.2

#define JVERSION    "9  13-Jan-2013"