init - 初始化项目

This commit is contained in:
Lee Nony
2022-05-06 01:58:53 +08:00
commit 90a5cc7cb6
6772 changed files with 2837787 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
//
// This file is auto-generated. Please don't modify it!
//
#undef LOG_TAG
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_$M
#include <string>
#include "opencv2/$m.hpp"
$includes
#define LOG_TAG "org.opencv.$m"
#include "common.h"
using namespace cv;
/// throw java exception
#undef throwJavaException
#define throwJavaException throwJavaException_$m
static void throwJavaException(JNIEnv *env, const std::exception *e, const char *method) {
std::string what = "unknown exception";
jclass je = 0;
if(e) {
std::string exception_type = "std::exception";
if(dynamic_cast<const cv::Exception*>(e)) {
exception_type = "cv::Exception";
je = env->FindClass("org/opencv/core/CvException");
}
what = exception_type + ": " + e->what();
}
if(!je) je = env->FindClass("java/lang/Exception");
env->ThrowNew(je, what.c_str());
LOGE("%s caught %s", method, what.c_str());
(void)method; // avoid "unused" warning
}
extern "C" {
$code
} // extern "C"
#endif // HAVE_OPENCV_$M

View File

@@ -0,0 +1,17 @@
//
// This file is auto-generated. Please don't modify it!
//
package org.opencv.$module;
$imports
$docs$annotation
public class $jname {
protected final long nativeObj;
protected $jname(long addr) { nativeObj = addr; }
public long getNativeObjAddr() { return nativeObj; }
// internal usage only
public static $jname __fromPtr__(long addr) { return new $jname(addr); }

View File

@@ -0,0 +1,14 @@
//
// This file is auto-generated. Please don't modify it!
//
package org.opencv.$module;
$imports
$docs$annotation
public class $jname extends $base {
protected $jname(long addr) { super(addr); }
// internal usage only
public static $jname __fromPtr__(long addr) { return new $jname(addr); }

View File

@@ -0,0 +1,9 @@
//
// This file is auto-generated. Please don't modify it!
//
package org.opencv.$module;
$imports
$docs$annotation
public class $jname {