mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 09:25:45 +08:00
dnn: invalid bindings
This commit is contained in:
parent
7e12c879c2
commit
01519313d7
@ -345,7 +345,7 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
|
||||
CV_WRAP Ptr<Layer> getLayer(LayerId layerId);
|
||||
|
||||
/** @brief Returns pointers to input layers of specific layer. */
|
||||
CV_WRAP std::vector<Ptr<Layer> > getLayerInputs(LayerId layerId);
|
||||
std::vector<Ptr<Layer> > getLayerInputs(LayerId layerId); // FIXIT: CV_WRAP
|
||||
|
||||
/** @brief Delete layer for the network (not implemented yet) */
|
||||
CV_WRAP void deleteLayer(LayerId layer);
|
||||
@ -502,16 +502,16 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
|
||||
* @param outLayerShapes output parameter for output layers shapes;
|
||||
* order is the same as in layersIds
|
||||
*/
|
||||
CV_WRAP void getLayerShapes(const MatShape& netInputShape,
|
||||
void getLayerShapes(const MatShape& netInputShape,
|
||||
const int layerId,
|
||||
CV_OUT std::vector<MatShape>& inLayerShapes,
|
||||
CV_OUT std::vector<MatShape>& outLayerShapes) const;
|
||||
CV_OUT std::vector<MatShape>& outLayerShapes) const; // FIXIT: CV_WRAP
|
||||
|
||||
/** @overload */
|
||||
CV_WRAP void getLayerShapes(const std::vector<MatShape>& netInputShapes,
|
||||
void getLayerShapes(const std::vector<MatShape>& netInputShapes,
|
||||
const int layerId,
|
||||
CV_OUT std::vector<MatShape>& inLayerShapes,
|
||||
CV_OUT std::vector<MatShape>& outLayerShapes) const;
|
||||
CV_OUT std::vector<MatShape>& outLayerShapes) const; // FIXIT: CV_WRAP
|
||||
|
||||
/** @brief Computes FLOP for whole loaded model with specified input shapes.
|
||||
* @param netInputShapes vector of shapes for all net inputs.
|
||||
@ -544,8 +544,8 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
|
||||
* @param weights output parameter to store resulting bytes for weights.
|
||||
* @param blobs output parameter to store resulting bytes for intermediate blobs.
|
||||
*/
|
||||
CV_WRAP void getMemoryConsumption(const std::vector<MatShape>& netInputShapes,
|
||||
CV_OUT size_t& weights, CV_OUT size_t& blobs) const;
|
||||
void getMemoryConsumption(const std::vector<MatShape>& netInputShapes,
|
||||
CV_OUT size_t& weights, CV_OUT size_t& blobs) const; // FIXIT: CV_WRAP
|
||||
/** @overload */
|
||||
CV_WRAP void getMemoryConsumption(const MatShape& netInputShape,
|
||||
CV_OUT size_t& weights, CV_OUT size_t& blobs) const;
|
||||
@ -565,15 +565,15 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
|
||||
* @param weights output parameter to store resulting bytes for weights.
|
||||
* @param blobs output parameter to store resulting bytes for intermediate blobs.
|
||||
*/
|
||||
CV_WRAP void getMemoryConsumption(const std::vector<MatShape>& netInputShapes,
|
||||
void getMemoryConsumption(const std::vector<MatShape>& netInputShapes,
|
||||
CV_OUT std::vector<int>& layerIds,
|
||||
CV_OUT std::vector<size_t>& weights,
|
||||
CV_OUT std::vector<size_t>& blobs) const;
|
||||
CV_OUT std::vector<size_t>& blobs) const; // FIXIT: CV_WRAP
|
||||
/** @overload */
|
||||
CV_WRAP void getMemoryConsumption(const MatShape& netInputShape,
|
||||
void getMemoryConsumption(const MatShape& netInputShape,
|
||||
CV_OUT std::vector<int>& layerIds,
|
||||
CV_OUT std::vector<size_t>& weights,
|
||||
CV_OUT std::vector<size_t>& blobs) const;
|
||||
CV_OUT std::vector<size_t>& blobs) const; // FIXIT: CV_WRAP
|
||||
|
||||
/** @brief Enables or disables layer fusion in the network.
|
||||
* @param fusion true to enable the fusion, false to disable. The fusion is enabled by default.
|
||||
|
@ -19,18 +19,6 @@ void MatShape_to_Mat(MatShape& matshape, cv::Mat& mat)
|
||||
mat = cv::Mat(matshape, true);
|
||||
}
|
||||
|
||||
void Mat_to_vector_size_t(cv::Mat& mat, std::vector<size_t>& v_size_t)
|
||||
{
|
||||
v_size_t.clear();
|
||||
CHECK_MAT(mat.type()==CV_32SC1 && mat.cols==1);
|
||||
v_size_t = (std::vector<size_t>) mat;
|
||||
}
|
||||
|
||||
void vector_size_t_to_Mat(std::vector<size_t>& v_size_t, cv::Mat& mat)
|
||||
{
|
||||
mat = cv::Mat(v_size_t, true);
|
||||
}
|
||||
|
||||
std::vector<MatShape> List_to_vector_MatShape(JNIEnv* env, jobject list)
|
||||
{
|
||||
static jclass juArrayList = ARRAYLIST(env);
|
||||
|
@ -22,10 +22,6 @@ void Mat_to_MatShape(cv::Mat& mat, MatShape& matshape);
|
||||
|
||||
void MatShape_to_Mat(MatShape& matshape, cv::Mat& mat);
|
||||
|
||||
void Mat_to_vector_size_t(cv::Mat& mat, std::vector<size_t>& v_size_t);
|
||||
|
||||
void vector_size_t_to_Mat(std::vector<size_t>& v_size_t, cv::Mat& mat);
|
||||
|
||||
std::vector<MatShape> List_to_vector_MatShape(JNIEnv* env, jobject list);
|
||||
|
||||
jobject vector_Ptr_Layer_to_List(JNIEnv* env, std::vector<cv::Ptr<cv::dnn::Layer> >& vs);
|
||||
|
@ -57,20 +57,3 @@ void Copy_vector_String_to_List(JNIEnv* env, std::vector<cv::String>& vs, jobjec
|
||||
env->DeleteLocalRef(element);
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(HAVE_OPENCV_DNN)
|
||||
void Copy_vector_MatShape_to_List(JNIEnv* env, std::vector<cv::dnn::MatShape>& vs, jobject list)
|
||||
{
|
||||
static jclass juArrayList = ARRAYLIST(env);
|
||||
jmethodID m_clear = LIST_CLEAR(env, juArrayList);
|
||||
jmethodID m_add = LIST_ADD(env, juArrayList);
|
||||
|
||||
env->CallVoidMethod(list, m_clear);
|
||||
for (std::vector<cv::dnn::MatShape>::iterator it = vs.begin(); it != vs.end(); ++it)
|
||||
{
|
||||
jstring element = env->NewStringUTF("");
|
||||
env->CallBooleanMethod(list, m_add, element);
|
||||
env->DeleteLocalRef(element);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -16,9 +16,4 @@ std::vector<cv::String> List_to_vector_String(JNIEnv* env, jobject list);
|
||||
|
||||
void Copy_vector_String_to_List(JNIEnv* env, std::vector<cv::String>& vs, jobject list);
|
||||
|
||||
#if defined(HAVE_OPENCV_DNN)
|
||||
#include "opencv2/dnn.hpp"
|
||||
void Copy_vector_MatShape_to_List(JNIEnv* env, std::vector<cv::dnn::MatShape>& vs, jobject list);
|
||||
#endif
|
||||
|
||||
#endif /* LISTCONVERTERS_HPP */
|
||||
|
Loading…
Reference in New Issue
Block a user