2016-11-29 03:02:32 -0600 | commented question | How to use opencv on Android Studio with Jni call Thanks for your reply! Your posted link is helpful . Recently, I have found the solution and solved the problem by using cmake to include the OpenCV native header for my project. Here is my study wiki: |
2016-11-27 20:06:30 -0600 | asked a question | How to use opencv on Android Studio with Jni call Hi all, Refrence to pure java to develop OpenCV demo , we can import new module *OpenCV-android-sdk\sdk\java* as a module dependencies for android project. Using this way, Android Studio will give the tips of functions and so on. Now I wanna do the same thing when I use Jni, see below please: JNIEXPORT jintArray JNICALL Java_com_ckt_eirot_opencv4jni_GrayProcess_grayProcess(JNIEnv *env, class obj,jintArray buf,jint w, jint h) { jboolean ptfalse = false; jint *srcBuf = env->GetIntArrayElements(buf, &ptfalse); if (srcBuf == NULL) { return 0; } int size = w * h; } Looking forward to replies |