android studio 上配置opencv4Android
来源:互联网 发布:greg laswell 知乎 编辑:程序博客网 时间:2024/05/17 09:16
The below steps for using Android OpenCV sdk in Android Studio. Thanks to TGMCains answer which is simplified below.
- Download latest OpenCV sdk for Android from OpenCV.org and decompress the zip file.
- Import OpenCV to Android Studio, From File -> Import Module, choose sdk/java folder in the unzipped opencv archive.
- Update build.gradle under imported OpenCV module to update 4 fields to match your project build.gradle a) compileSdkVersion b) buildToolsVersion c) minSdkVersion and 4) targetSdkVersion.
- Add module dependency by Application -> Module Settings, and select the Dependencies tab. Click + icon at bottom, choose Module Dependency and select the imported OpenCV module.
- Copy libs folder under sdk/native to Android Studio under app/src/main.
- In Android Studio, rename the copied libs directory to jniLibs and we are done.
Step (6) is since Android studio expects native libs in app/src/main/jniLibs
instead of older libs
folder. For those new to Android OpenCV, don't miss below steps
- include
static{ System.loadLibrary("opencv_java"); }
- For step(5), if you ignore any platform libs like x86, make sure your device/emulator is not on that platform.
OpenCV written is in C/C++. Java wrappers are
- Android OpenCV SDK - OpenCV.org maintained Android Java wrapper. I suggest this one.
- OpenCV Java - OpenCV.org maintained auto generated desktop Java wrapper.
- JavaCV - Popular Java wrapper maintained by independent developer(s). Not Android specific. This library might get out of sync with OpenCV newer versions.
0 0
- android studio 上配置opencv4Android
- 在Android Studio 2.2上集成OpenCV4Android SDK
- Android Studio配置并运行OpenCV4Android的face-detection
- Android Studio中集成OpenCV4Android记录(一)
- Android Studio 使用 java 通过 OpenCV4Android 实现 Hello OpenCV
- OpenCV4Android SDK在Win 8.1平台上的配置
- 【Android】OpenCV4Android开发技巧
- 1、在Android Studio上配置OpenCV
- android studio上配置git、使用git
- Android Studio上gradle配置Lambda表达式
- Android Studio上OpneCV的配置
- Android Annotations在studio上的配置
- MAC上Android Studio的SVN配置
- OpenCV4android 配置以及注意点
- OpenCV On Android开发 - Android Studio上环境配置
- android-gif-drawable在android studio上怎么配置
- android-gif-drawable在android studio上怎么配置
- 在Ubuntu上安装Tegra Android Development Pack,一键安装ubuntu 上的eclipse opencv4android的开发环境
- dirname(__FILE__)的含义和应用
- Java_多线程_创建及启动线程
- 视图在画出得路径上移动
- qt与c的几种数据类型转换
- css3动画-00通俗易懂的介绍,你不能错过
- android studio 上配置opencv4Android
- Source Insight自定义快捷键
- LVM使用手册简化命令
- ORACLE HAVING
- TCP/IP 详解卷一 - TCP
- 使用 VMware 虚拟机的克隆功能,快速复制已安装好的 Linux 系统。|| ifconfig显示的IP和eth0的IP不一致
- nyoj题目101:两点距离
- 用 const 限定类的成员函数
- oracle-基于oracle dataguard滚动升级(oracle10.2.0.1--10.2.0.4--11.2.0.4)