2015-10-21 16:25:26 -0600 | asked a question | How to include OpenCV files in include folder ? Actually when I try to run my project I face the following error: 22:51:45 * Incremental Build of configuration Default for project DarwinWallet * "D:\FYP\android-ndk-r10e\ndk-build.cmd" all [armeabi-v7a] Compile++ thumb: native_wallet <= jni_recognizer.cpp jni/jni_recognizer.cpp:2:33: fatal error: opencv2/core/core.hpp: No such file or directory #include <opencv2 core="" core.hpp=""> ^ compilation terminated. make.exe: * [obj/local/armeabi-v7a/objs/native_wallet/jni_recognizer.o] Error 1 My Android.mk is given below: OPENCV_INSTALL_MODULES:=on include $(OPENCV_MK_PATH) Profiler-include android-ndk-profiler.mkinclude ../includeOpenCV.mkifeq ("$(wildcard $(OPENCV_MK_PATH))","")try to load OpenCV.mk from default install locationinclude $(TOOLCHAIN_PREBUILT_ROOT)/user/share/OpenCV/OpenCV.mkelseinclude $(OPENCV_MK_PATH)endifLOCAL_C_INCLUDES:=D:\FYP\darwinwallet-master\OpenCV-2.4.9-android-sdk\sdk\native\jni\includeLOCAL_MODULE:=native_wallet LOCAL_SRC_FILES:=jni_recognizer.cpp NativeVision\vision.cpp LOCAL_CFLAGS=-ffast-math -O3 -funroll-loops LOCAL_CFLAGS=-O3 -funroll-loopsLOCAL_LDLIBS+=-llog -ldl ProfilingLOCAL_CFLAGS:=-pgLOCAL_STATIC_LIBRARIES:=andprofinclude $(BUILD_SHARED_LIBRARY) jni_recognizer.cpp is given below: include <jni.h>include <opencv2 core="" core.hpp="">include <opencv2 imgproc="" imgproc.hpp="">include <opencv2 features2d="" features2d.hpp="">include <opencv2 highgui="" highgui.hpp="">include <vector>include "NativeVision/vision.h"include <time.h>include <android log.h="">using namespace std; using namespace cv; define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, "JNI_DEBUGGING", __VA_ARGS__)double diffclock(clock_t clock1,clock_t clock2) { double diffticks=clock2-clock1; double diffms=(diffticks*1000)/ CLOCKS_PER_SEC; } static Ptr<orb> detector; static Ptr<descriptormatcher> descriptorMatcher; static vector<mat> trainImages; static bool training_complete = false; static vector<string> billMapping; extern "C" { JNIEXPORT void JNICALL Java_com_ndu_mobile_darwinwallet_Recognizer_nvInitialize(JNIEnv* env, jobject thiz) { } extern "C" { JNIEXPORT void JNICALL Java_com_ndu_mobile_darwinwallet_Recognizer_nvResetTrainedDatabase(JNIEnv* env, jobject thiz) { LOGD( "Started nvResetTrainedDatabase" ); } extern "C" { JNIEXPORT void JNICALL Java_com_ndu_mobile_darwinwallet_Recognizer_nvTrainImage(JNIEnv* env, jobject thiz, jstring billname, jstring billpath) { //char* _imgBytes = (char*) env->GetPrimitiveArrayCritical(imgBytes, 0); const char * _billpath = env->GetStringUTFChars(billpath, 0); const char * _billname = env->GetStringUTFChars(billname, 0); } extern "C" { JNIEXPORT void JNICALL Java_com_ndu_mobile_darwinwallet_Recognizer_nvFinalizeTraining(JNIEnv* env, jobject thiz) { LOGD( "Started nvFinalizeTraining" ); descriptorMatcher->add(trainImages); descriptorMatcher->train(); } extern "C" { JNIEXPORT jstring JNICALL Java_com_ndu_mobile_darwinwallet_Recognizer_nvRecognize(JNIEnv* env, jobject thiz, jint width, jint height, jbyteArray yuv) { jbyte* _yuv = env->GetByteArrayElements(yuv, 0); //jint* _bgra = env->GetIntArrayElements(bgra, 0); (more) |