Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Tetragramm
GitHub Repository: Tetragramm/opencv
Path: blob/master/modules/java/generator/src/cpp/jni_part.cpp
16354 views
1
// This file is part of OpenCV project.
2
// It is subject to the license terms in the LICENSE file found in the top-level directory
3
// of this distribution and at http://opencv.org/license.html
4
5
#include "common.h"
6
7
#include "opencv2/opencv_modules.hpp"
8
9
#ifdef HAVE_OPENCV_FEATURES2D
10
# include "opencv2/features2d.hpp"
11
#endif
12
13
#ifdef HAVE_OPENCV_VIDEO
14
# include "opencv2/video.hpp"
15
#endif
16
17
#ifdef HAVE_OPENCV_CONTRIB
18
# include "opencv2/contrib.hpp"
19
#endif
20
21
extern "C" {
22
23
JNIEXPORT jint JNICALL
24
JNI_OnLoad(JavaVM* vm, void* )
25
{
26
JNIEnv* env;
27
if (vm->GetEnv((void**) &env, JNI_VERSION_1_6) != JNI_OK)
28
return -1;
29
30
/* get class with (*env)->FindClass */
31
/* register methods with (*env)->RegisterNatives */
32
33
return JNI_VERSION_1_6;
34
}
35
36
JNIEXPORT void JNICALL
37
JNI_OnUnload(JavaVM*, void*)
38
{
39
//do nothing
40
}
41
42
} // extern "C"
43
44