现在的位置: 首页 > 综合 > 正文

1. opencv for android开发环境的配置

2013年09月16日 ⁄ 综合 ⁄ 共 2486字 ⁄ 字号 评论关闭

参考:http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html 

            http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/android_dev_intro.html#android-dev-intro    android-环境配置

中文翻译:http://blog.csdn.net/tu_tustudio/article/details/8463119 手把手教你配置android for opencv

这篇文章主要用来帮助大家学习Android开发的基本知识以及工作环境的快速搭建。 文章所写的内容主要是在win7的系统环境下进行的,

当然,在Linux(Ubuntu) ,或者 Mac OS x 和其他的 支持android SDK的系统都可以正常运行。如果碰到有其他问题到相关的讨论组:

opencv4android:(https://groups.google.com/group/android-opencv/)和opencv-(http://answers.opencv.org/)的论坛中查找解决问题的方法。

第一 前言

    Android 是一个基于Linux ,开源的移动操作系统,由著名的搜索引擎公司google领导组织的开放式手机联盟(Open Handset Alliance )所开发的。

利用android进行移动开发,针对不同的平台有不同的开发环境,为了更好的理解android的开发工作,最好对下面的技术有所理解:

    

  1. Java programming language that is the primary development technology for Android OS. Also, you can find Oracle
    docs on Java
     useful.
  2. Java Native Interface (JNI) that is a technology of running native code in Java virtual machine. Also, you can find Oracle
    docs on JNI
     useful.
  3. Android Activity and its lifecycle, that is an essential Android API class.
  4. OpenCV development will certainly require some knowlege of the Android Camera specifics.
第二 android开发环境的快速设置
  1. 使用TADP (NvidIA开发的)Tegra android development pack,解压这个TADP包到某个目录下面,
   这个TADP能自动安装相关的配置模块,直接可以进行opencv 在android下面的开发。
   硬件空间:1.6G hardware, internet 下载 SDK 和NDK,unix 中间需要root权限。

第三 人工设置android的开发环境

   这时候可以根据当前机器的配置,进行合适的设置:
 1. 用JAVA 开发。
    (1)sun JDK6 ,JDK7
      下载JDK http://www.oracle.com/technetwork/java/javase/downloads/
       Ubuntu 和 Mac os下面JDK的安装指南: http://source.android.com/source/initializing.html#installing-the-jdk
      注意:openjdk 不能用于android开发。
       设置 当前的java环境为SUN 的JDK
      sudo update-java-alternatives --set java-6-sun
     (2)android sdk
       
      下载最新的android sdk,地址:http://developer.android.com/sdk/index.html,SDK的安装配置方法:http://developer.android.com/sdk/installing.html
      note: 如果下载的是ADT Bundle package,这个捆绑安装包里面包含了Eclipse + ADT +NDK/CDT插件,Android platform-tools, 最新的android平台和最新的android 系统图片支持。
             如果你的运行系统是64位的ubuntu linux,需要安装其他的共享库。
sudo apt-get install ia32-libs
             对于红帽的系统:
sudo yun install libXtst.i386
      (3) Android SDK components
              . android SDK tools, revision 20 or newer.
              . SDK Platform Android 3.0 (API 11)
              最小的支持Opencv Java 调用的 API 版本为 Android 2.2 (API 8).通过查看:
<uses-sdk android:minSdkVersion="8"/>标签在AndroidMainifest.xml配置文件。

Android SDK Manager

(4)Eclipse IDE

Check the Android SDK System Requirements document for a list of Eclipse versions that are compatible with the Android
SDK. For OpenCV 2.4.x we recommend Eclipse 3.7 (Indigo) or Eclipse 4.2 (Juno). They work well for OpenCV under both Windows and Linux.

If you have no Eclipse installed, you can get it from the official site.









抱歉!评论已关闭.