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/12 09:34] – 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 75: | Line 79: | ||
sudo ldconfig | sudo ldconfig | ||
</ | </ | ||
- | |||
- | ===== android method 1 ===== | ||
- | |||
- | prereq: | ||
- | * substitute / | ||
- | * android sdk in / | ||
- | |||
- | < | ||
- | cd /opt | ||
- | git clone -b 3.4 --depth 1 https:// | ||
- | </ | ||
- | |||
- | <file python platforms/ | ||
- | vars=dict(BUILD_ANDROID_PROJECTS=' | ||
- | |||
- | ABIs = [ | ||
- | # | ||
- | # | ||
- | ABI(" | ||
- | ABI(" | ||
- | # | ||
- | ] | ||
- | </ | ||
- | |||
- | create / | ||
- | < | ||
- | cd / | ||
- | python ./ | ||
- | | ||
- | | ||
- | | ||
- | / | ||
- | </ | ||
- | |||
- | ===== android method 2 ===== | ||
- | |||
- | Thank you to everyone for your help. | ||
- | |||
- | I recently had to build OpenCV for Android from source (because I wanted to link against LLVM libc++ STL instead of GNU STL). In case it’s useful to anyone else, here are some quick instructions on how I did it: | ||
- | |||
- | < | ||
- | $ mkdir ~/sdk && cd ~/sdk | ||
- | $ wget https:// | ||
- | $ tools/ | ||
- | Select and install the following two packages: | ||
- | Android SDK Build-tools 27.0.3 | ||
- | Android 8.1.0 (API 27) -> SDK Platform 27 | ||
- | $ mkdir ~/opencv && cd ~/opencv | ||
- | $ git clone https:// | ||
- | $ cd ~/ | ||
- | $ wget https:// | ||
- | $ cd platforms/ | ||
- | $ ANDROID_SDK=~/ | ||
- | </ | ||
- | |||
- | I already had the ANDROID_NDK environment variable set to a local NDK 16 installation. | ||
- | |||
- | |||
- | One unusual thing I couldn’t work out was why the static libs I built were much larger than those in the official distribution (e.g. my arm64-v8a/ | ||
- | @peterchaula | ||
- | peterchaula commented on Apr 11 | ||
- | |||
===== android ===== | ===== android ===== |