the environment to build OpenCV sdk for android-x86

asked 2016-03-12 08:59:51 -0600

qiao gravatar image

Hi,

I was trying to build my own OpenCV SDK for android-x86 platform. I've cloned the repo from https://github.com/Itseez/opencv , and set "opencv/platforms/android/android.toolchain.cmake" as CMake toolchain file.

And my environment is - Host: Ubuntu 14.04 x86_64 - Toolchain: android-ndk-r10e - CMake version: 3.2.2

And my target device is an x86 tablet which runs Android L.

The cmake command is as following

cmake \
-DANDROID_ABI=x86 \
-DCMAKE_TOOLCHAIN_FILE=$OPENCV_SRC_DIR/platforms/android/android.toolchain.cmake \
-DCMAKE_VERBOSE_MAKEFILE=OFF \
-DCMAKE_INSTALL_PREFIX=$OPENCV_INSTALL_DIR \
-DEIGEN_INCLUDE_PATH=$EXT_SRC_DIR/Eigen \
-DOPENCV_EXTRA_MODULES_PATH=$EXT_SRC_DIR/opencv_contrib/modules \
$OPENCV_SRC_DIR

However, the libraries I built can't work well, which always cause segmentation fault when any of OpenCV functions was invoked.

Would you please tell me how did you build the official OpenCV-3.1.0-android-sdk ? Because the official sdk libraries works very well on my device, I'd like to know the difference.

Please let me know if any further information is required.

Thanks.

edit retag flag offensive close merge delete