Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tips:opencv:install [2018/06/11 17:56] – scipio | tips:opencv:install [2018/06/13 09:06] (current) – scipio | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== opencv install ====== | ====== opencv install ====== | ||
+ | |||
+ | ===== android studio ===== | ||
+ | |||
+ | [[https:// | ||
===== linux ===== | ===== linux ===== | ||
Line 79: | Line 83: | ||
prereq: | prereq: | ||
- | * substitute /opt/android-sdk/tools with https:// | + | * android |
- | * android sdk in / | + | |
+ | Download a stub android sdk and opencv sources | ||
< | < | ||
- | cd /opt | + | # adjust these paths ## |
- | git clone -b 3.4 --depth 1 https:// | + | REAL_ANDROID_SDK=/opt/ |
- | </ | + | # output builded opencv, can be removed after |
+ | BASE=/ | ||
+ | ####################### | ||
- | <file python platforms/android/ndk.config.py> | + | mkdir -p ${BASE} |
- | vars=dict(BUILD_ANDROID_PROJECTS=' | + | cd ${BASE} |
+ | wget https:// | ||
+ | unzip tools_r25.2.5-linux.zip | ||
+ | tool/ | ||
+ | Select and install the following two packages: | ||
+ | Android SDK Build-tools 27.0.3 | ||
+ | Android 8.1.0 (API 27) -> SDK Platform | ||
- | ABIs = [ | + | git clone --depth 1 https:// |
- | # | + | cd opencv |
- | # | + | wget https:// |
- | ABI(" | + | git apply always-use-ant__find_android.patch |
- | | + | |
- | # | + | |
- | ] | + | |
- | </ | + | |
- | create | + | cd platform/android |
- | < | + | |
- | cd /opt/opencv.git | + | # edit ndk-16.config.py |
- | python ./ | + | # ABI(" |
- | --config ndk.config.py | + | |
- | | + | ANDROID_SDK=${BASE} ANDROID_HOME=${BASE} |
- | --sdk_path / | + | --force_opencv_toolchain |
- | /opt/ | + | --ndk_path |
+ | --config ndk-16.config.py | ||
+ | ${BASE}/build | ||
</ | </ | ||
+ | To compile against libc++, I then changed ANDROID_STL=" | ||
+ | @ngriffiths you need to strip out intel threading libs (TBB). That' | ||