我已經實現了這個項目:https://github.com/yaylas/AndroidFaceRecognizer到Android Studio - 我自己的應用程序。我使用教程:https://www.youtube.com/watch?v=OTw_GIQNbD8(這是靜態初始化)包含OpenCV,並且我在src/main中創建了jni文件夾,並且將這些文件放入其中https://github.com/yaylas/AndroidFaceRecognizer/tree/master/jni。 這是Android.mk從該文件夾:OpenCV - 原生Android集成
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
OPENCV_CAMERA_MODULES:=on
OPENCV_INSTALL_MODULES:=on
include C:/Users/Piotr/Desktop/Android_App/MyApplication/libraries/opencv/native/jni/OpenCV.mk
LOCAL_SRC_FILES := DetectionAndRecognition.cpp
LOCAL_C_INCLUDES := C:/Users/Piotr/Desktop/Android_App/MyApplication/libraries/opencv/native/jni/include
LOCAL_LDLIBS += -llog -ldl
LOCAL_MODULE := detection_and_recognition_lib
include $(BUILD_SHARED_LIBRARY)
問題是,如果我嘗試編譯項目,Android Studio中說:
Error:(2, 33) opencv2/core/core.hpp: No such file or directory
爲什麼它是什麼?