下载
OpenCV-3.0.0-android-sdk-1.zip,解压到E:\testproject\OpenCV-android-sdk
Eclipse
1.新建个workspace
2.import存在的工程,选择E:\testproject\OpenCV-android-sdk\samples\face-detection,选择copy source
3.import 存在的工程,选择E:\testproject\OpenCV-android-sdk\sdk\java,选择copy source
4.在face-detection里右键属性,Android->Library ,把opencv library 加进来,这时java的错误已经消失了
如何要demo不需要安装opencv manager,则需要设置Android.mk,参考下面配置
OPENCV_INSTALL_MODULES:=on
OPENCV_CAMERA_MODULES:=off
OPENCV_LIB_TYPE:=SHARED
#OPENCV_LIB_TYPE:=STATIC
需要注意的地方
下面的路径需要指定正确,sdk目录是E:\testproject\OpenCV-android-sdk下面的子目录
include ../sdk/native/jni/OpenCV.mk
OpenCV-3.0.0-android-sdk-1.zip,解压到E:\testproject\OpenCV-android-sdk
Eclipse
1.新建个workspace
2.import存在的工程,选择E:\testproject\OpenCV-android-sdk\samples\face-detection,选择copy source
3.import 存在的工程,选择E:\testproject\OpenCV-android-sdk\sdk\java,选择copy source
4.在face-detection里右键属性,Android->Library ,把opencv library 加进来,这时java的错误已经消失了
如何要demo不需要安装opencv manager,则需要设置Android.mk,参考下面配置
OPENCV_INSTALL_MODULES:=on
OPENCV_CAMERA_MODULES:=off
OPENCV_LIB_TYPE:=SHARED
#OPENCV_LIB_TYPE:=STATIC
需要注意的地方
下面的路径需要指定正确,sdk目录是E:\testproject\OpenCV-android-sdk下面的子目录
include ../sdk/native/jni/OpenCV.mk