ADT+NDK+OPENCV Environment Deployment

Source: Internet
Author: User

ADT+NDK+OPENCV Environment Deployment


Recently in the study of OpenCV image processing, here to introduce the ADT+NDK+OPENCV environment deployment and simple implementation of a picture of grayscale processing

Development tools

    • ADT (Adt-bundle-windows)
    • NDK (android-ndk-r9d)
    • OpenCV (OPENCV-2.4.10-ANDROID-SDK)

Because of the ADT+NDK environment deployment described earlier, only OpenCV is described here

    • Jdk+adt Environment Deployment

Environment variables

Note: All development tools for this machine are placed in the D:\DevTools directory

    • Java_home D:\DevTools\Java\jdk1.8.0_05
    • Path.; %java_home%\bin;%java_home%\jre\bin;d:\devtools\adt-bundle-windows\sdk\tools;d:\devtools\adt-bundle-windows\ Sdk\platform-tools;
    • CLASSPATH.; %java_home%\lib\tools.jar;%java_home%\lib\dt.jar;%java_home%\bin;

First, OpenCV download and configuration

1.:http://sourceforge.net/projects/opencvlibrary/files/opencv-android/

  

It is recommended to use the 2.4.10 version, click on the version number to download, or click here to download http://jaist.dl.sourceforge.net/project/opencvlibrary/opencv-android/2.4.10 /opencv-2.4.10-android-sdk.zip

2. After downloading, unzip the package to the development directory.

  

II. implementation of OPENCV development needs to configure the NDK's development environment locally

1. Download Ndk:http://developer.android.com/intl/zh-cn/tools/sdk/ndk/index.html#downloads

  

2. After downloading, unzip the package to the development directory.

  

Third, eclipse internal parameter configuration

1.WINDOW--PREFERENCES--ANDROID--SDK location >>d:\devtools\adt-bundle-windows\sdk--apply--ok

2.WINDOW--PREFERENCES--ANDROID--NDK--NDK location >>d:\devtools\android-ndk-r9d--apply--ok

3.window--preferences--c/c++--build--environment, add an environment variable: variable name: Ndkroot variable Value: D:\DevTools\android-ndk-r9d--Apply-- Ok

3. Right click on Project name--properties--android >> Select Android Editor version at Project Build Target

4. Right-click the project name--properties--android >> Select OpenCV Library at the library--add--

  

5. Right click on project name--properties--c/c++ build--builder settings--build commands>> ${ndkroot}/ndk-build.cmd

  

6. Right click on the project name--properties--c/c++ Build--behaviour

  

Click Apply--ok when you are finished setting up

7. Right click on the project name--properties--c\c++ General--path and Symbols--includes--gnu C + + Add the following path

    • ${ndkroot}/platforms/android-15/arch-arm/usr/include (note the Android version here)
    • ${ndkroot}/sources/cxx-stl/gnu-libstdc++/4.6/include
    • ${ndkroot}/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/include
    • ${projdirpath}/. /opencv-2.4.10-android-sdk/sdk/native/jni/include (use Projdirpath here to avoid compilation problems caused by using absolute paths, note the OpenCV version here)

  

After the configuration is finished, click Apply--ok, and the environment deployment is complete.

ADT+NDK+OPENCV Environment Deployment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.