阅读更多 JavaCV-0.5基于OpenCV-2.4.5,在Android上运行按照教程设置即可,有几个注意事项:

教程: https://code.google.com/p/javacv/
Eclipse (Android 2.2 or newer):1.Follow the instructions on this page: http://developer.android.com/training/basics/firstapp/2.Go to File > New > Folder, select your project as parent folder, type "libs/armeabi" as Folder name, and click Finish.3.Copy javacpp.jar and javacv.jar into the newly created "libs" folder.4.Extract all the *.so files from javacv-android-arm.jar, opencv-2.4.5-android-arm.jar, and ffmpeg-1.2-android-arm.jar directly into the newly created "libs/armeabi" folder, without creating any of the subdirectories found in the JAR files.5.Navigate to Project > Properties > Java Build Path > Libraries and click "Add JARs...".6.Select both javacpp.jar and javacv.jar from the newly created "libs" folder.


注意事项:
1.上面第三步和第四步是分别复制到libs和libs/armeabi目录
2.该库运行需要CPU支持FPU(要在不支持FPU的机器上运行,需要自己修改参数重新编译库,运行效果可能很差)
查看CPU是否支持FPU方法: http://stackoverflow.com/questions/8161184/detecting-fpu-presence-on-android
# cat /proc/cpuinfo Processor       : ARMv7 Processor rev 3 (v7l)BogoMIPS        : 249.96Features        : swp half thumb fastmult vfp edsp neon vfpv3 CPU implementer : 0x41CPU architecture: 7CPU variant     : 0x1CPU part        : 0xc08CPU revision    : 3[ ... ]If the "Features" line lists at least vfp, then the ARM SoC has an FPU.

3.模拟器不支持摄像头
4.如果没有后置摄像头,需要修改示例代码
FacePreview.java中
mCamera = Camera.open(); 改为 mCamera = Camera.open(0);

更多相关文章

  1. [置顶] Android(安卓)Studio Eclipse运行时出现 finished with n
  2. Android:EventBus-3 基本使用
  3. Android体系结构
  4. (Android集成支付宝支付)react-native实现支付宝支付
  5. Android入门教程(五)之------第一个Android工程HelloAndroid
  6. BlueStacks App Player:在PC上运行Android
  7. Android(安卓)low memory killer 详解
  8. 图解Android和Linux发行版的区别
  9. apk反编译

随机推荐

  1. 关于mysql jsp字符编码的问题解决
  2. SQL大量数据查询的优化 及 非用like不可
  3. 存储过程放在sql脚本里,命令行导入总是提
  4. mysql.cnf配置后启动不了~
  5. 唯一ID的连续行中的值之间的差异
  6. 怎样实现用一条sql语句同时插入多行数据?
  7. 比较mysql中的两个逗号分隔值并获取匹配
  8. Oracle配置PL/SQL Developer连接数据库
  9. JDBC_mysql---防sql注入,存储图片
  10. Mybatis的动态sql详解,区别于传统的sql拼