我正在使用facedetection
在Android
上测试NDK
计划。我遵循了所有讨论here。我将OpenCV's
和armeabi
内的所有armeabi-v7a
库文件复制到我的project libs folder
中。然后我的Android.mk更新为
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
OPENCV_INSTALL_MODULES := on
OPENCV_CAMERA_MODULES := off
OPENCV_LIB_TYPE := STATIC
include C:\adt-bundle-windows-x86\OpenCV-2.4.9-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)
然后我转到命令窗口并输入
C:\facedetection\jni\include>javah -classpath ../../bin/classes;C:
\adt-bundle-windows-x86\sdk\platforms\android-18\android.jar -o DetectionBas
edTracker_jni.h org.opencv.samples.facedetect.FdActivity
Error: Class org.opencv.android.CameraBridgeViewBase could not be found.
然后错误为Class org.opencv.android.CameraBridgeViewBase could not be found
。
这个错误的原因是什么?
感谢
答案 0 :(得分:1)
您提供了错误的\
斜杠。您需要使用此/
斜杠。
请更改以下内容
include C:\adt-bundle-windows-x86\OpenCV-2.4.9-android-sdk\sdk\native\jni\OpenCV.mk
到
include C:/adt-bundle-windows-x86/OpenCV-2.4.9-android-sdk/sdk/native/jni/OpenCV.mk