Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Tetragramm
GitHub Repository: Tetragramm/opencv
Path: blob/master/modules/dnn/misc/java/src/cpp/dnn_converters.hpp
16367 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
// Author: abratchik
6
7
#ifndef DNN_CONVERTERS_HPP
8
#define DNN_CONVERTERS_HPP
9
10
#include <jni.h>
11
#include "opencv_java.hpp"
12
#include "opencv2/core.hpp"
13
#include "opencv2/dnn/dnn.hpp"
14
15
#define LAYER(ENV) static_cast<jclass>(ENV->NewGlobalRef(ENV->FindClass("org/opencv/dnn/Layer")))
16
#define LAYER_CONSTRUCTOR(ENV, CLS) ENV->GetMethodID(CLS, "<init>", "(J)V")
17
18
19
using namespace cv::dnn;
20
21
void Mat_to_MatShape(cv::Mat& mat, MatShape& matshape);
22
23
void MatShape_to_Mat(MatShape& matshape, cv::Mat& mat);
24
25
std::vector<MatShape> List_to_vector_MatShape(JNIEnv* env, jobject list);
26
27
jobject vector_Ptr_Layer_to_List(JNIEnv* env, std::vector<cv::Ptr<cv::dnn::Layer> >& vs);
28
29
std::vector<cv::Ptr<cv::dnn::Layer> > List_to_vector_Ptr_Layer(JNIEnv* env, jobject list);
30
31
32
#endif /* DNN_CONVERTERS_HPP */
33
34