1 #include "common.h" 2 3 #include "opencv2/opencv_modules.hpp" 4 5 #ifdef HAVE_OPENCV_FEATURES2D 6 # include "opencv2/features2d.hpp" 7 #endif 8 9 #ifdef HAVE_OPENCV_VIDEO 10 # include "opencv2/video.hpp" 11 #endif 12 13 #ifdef HAVE_OPENCV_CONTRIB 14 # include "opencv2/contrib.hpp" 15 #endif 16 17 extern "C" { 18 19 JNIEXPORT jint JNICALL 20 JNI_OnLoad(JavaVM* vm, void* ) 21 { 22 JNIEnv* env; 23 if (vm->GetEnv((void**) &env, JNI_VERSION_1_6) != JNI_OK) 24 return -1; 25 26 /* get class with (*env)->FindClass */ 27 /* register methods with (*env)->RegisterNatives */ 28 29 return JNI_VERSION_1_6; 30 } 31 32 JNIEXPORT void JNICALL 33 JNI_OnUnload(JavaVM*, void*) 34 { 35 //do nothing 36 } 37 38 } // extern "C" 39