/Gastbeitrag von Sebastian Starke/
This tutorial will give a brief overview about the installation and configuration of the opencv Framework for Android.
The tutorial is tested for:
- SWIG: Version 1.3.40 - Compiled with g++ [i686-pc-linux-gnu]
- Android-SDK: android-sdk_r10-linux_x86.tgz, Checksum: c022dda3a56c8a67698e6a39b0b1a4e0
- Android-SDK Platform-tools, revision 3
- SDK Platform Android 2.2, API 8, revision 2
- OpenCV; Rev: 4962; URL: https://code.ros.org/svn/opencv/trunk/opencv; Autor: vp153
h3. Reference documentations/tutorials:
- http://android-cmake.googlecode.com/hg/documentation.html
- http://opencv.willowgarage.com/wiki/AndroidExperimental
- http://opencv.willowgarage.com/wiki/Android
h3. Setup Ubuntu 11.04
h3. Setup Android-SDK
Download the android-sdk from:
- http://developer.android.com/sdk/index.html
Unpack the Downloaded Package:
Add this to your .bashrc:
Update your environment:
Setup SDK and test the environment Variables:
- Available Packages -> Install at least the packages „Android-SDK Platform-tools“ and “SDK Platform Android 2.2”
- Virtual Devices -> Create a new AVD (Android Virtial Device) with the Target “Android 2.2 - API Level 8”
Add this to your .bashrc:
h4. Test your environment
Try hello-cmake:
- http://android-cmake.googlecode.com/hg/docs/hello-cmake.html Try hello-android-cmake:
- http://android-cmake.googlecode.com/hg/docs/hello-android-cmake.html
h3. Setup Android-NDK 5
Add this to your .bashrc:
h3. Setup Android-Cmake
Add this to your .bashrc:
h3. Setup standalone Android-Toolchain
Add this to your .bashrc:
Install the toolchain with:
h2. Setup OpenCV
If you get a error message like this @Compile error: something with gtest@ fix it with:
- disable Google Test
If you get a error like this @Compile error ~/opencv/modules/ts/src/ts_gtest.cpp:6950: clone not declared in this scope@ fix it with:
- Edit the file @~/opencv/modules/ts/src/ts_gtest.cpp@ and add the declaration of the function at line 6944:
h3. Build OpenCV Dynamic Lib
List available targets, so we can define it in the next step
Edit „project_create.sh“ and add the Argument „–target 1“
If you get a error like this @Compile/Build Error: libraries not found!@ fix it with:
- Edit the file @build.xml@ and add the following lines just before the project closing tag @</project>@:
Compile again:
h3. Build CVCamera App
YOU DID IT! IT’S DONE, FINISHED! LET IT ROCK ;)