Path: blob/master/modules/dnn/misc/java/src/cpp/dnn_converters.hpp
16367 views
// This file is part of OpenCV project.1// It is subject to the license terms in the LICENSE file found in the top-level directory2// of this distribution and at http://opencv.org/license.html34// Author: abratchik56#ifndef DNN_CONVERTERS_HPP7#define DNN_CONVERTERS_HPP89#include <jni.h>10#include "opencv_java.hpp"11#include "opencv2/core.hpp"12#include "opencv2/dnn/dnn.hpp"1314#define LAYER(ENV) static_cast<jclass>(ENV->NewGlobalRef(ENV->FindClass("org/opencv/dnn/Layer")))15#define LAYER_CONSTRUCTOR(ENV, CLS) ENV->GetMethodID(CLS, "<init>", "(J)V")161718using namespace cv::dnn;1920void Mat_to_MatShape(cv::Mat& mat, MatShape& matshape);2122void MatShape_to_Mat(MatShape& matshape, cv::Mat& mat);2324std::vector<MatShape> List_to_vector_MatShape(JNIEnv* env, jobject list);2526jobject vector_Ptr_Layer_to_List(JNIEnv* env, std::vector<cv::Ptr<cv::dnn::Layer> >& vs);2728std::vector<cv::Ptr<cv::dnn::Layer> > List_to_vector_Ptr_Layer(JNIEnv* env, jobject list);293031#endif /* DNN_CONVERTERS_HPP */323334