我使用Opencv库2.4.5进行面部检测 我解决了所有的错误,并给出了演示项目的NDK路径和Opencv路径....但是当我在设备上运行这个项目时,它被强制关闭......我在stackoverflow中提到了关于这个主题的所有问题,但无法找到适当的解决方案......
Android.mk文件如下...
include $(CLEAR_VARS)
include C:/ANotherWork/OpenCV-2.4.5-android-sdk/OpenCV-2.4.5-android-sdk/sdk/native/jni/OpenCV.mk
LOCAL_SRC_FILES := DetectionBasedTracker_jni.cpp
LOCAL_C_INCLUDES += $(LOCAL_PATH)
LOCAL_LDLIBS += -llog -ldl
LOCAL_MODULE := detection_based_tracker
include $(BUILD_SHARED_LIBRARY)
答案 0 :(得分:0)
更新您的Android.mk文件,如下所示,它缺少LOCAL_PATH的值
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
#OPENCV_CAMERA_MODULES:=off
#OPENCV_INSTALL_MODULES:=off
#OPENCV_LIB_TYPE:=SHARED
include C:/ANotherWork/OpenCV-2.4.5-android-sdk/OpenCV-2.4.5-android-sdk/sdk/native/jni/OpenCV.mk
LOCAL_SRC_FILES := DetectionBasedTracker_jni.cpp
LOCAL_C_INCLUDES += $(LOCAL_PATH)
LOCAL_LDLIBS += -llog -ldl
LOCAL_MODULE := detection_based_tracker
include $(BUILD_SHARED_LIBRARY)
答案 1 :(得分:0)
检查此链接..它是一个简单的实现(No Opencv)
http://www.edumobile.org/android/face-detection-example-tutorials-in-android/