Skip to content

Commit 0151931

Browse files
committed
dnn: invalid bindings
1 parent 7e12c87 commit 0151931

File tree

5 files changed

+11
-49
lines changed

5 files changed

+11
-49
lines changed

modules/dnn/include/opencv2/dnn/dnn.hpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
345345
CV_WRAP Ptr<Layer> getLayer(LayerId layerId);
346346

347347
/** @brief Returns pointers to input layers of specific layer. */
348-
CV_WRAP std::vector<Ptr<Layer> > getLayerInputs(LayerId layerId);
348+
std::vector<Ptr<Layer> > getLayerInputs(LayerId layerId); // FIXIT: CV_WRAP
349349

350350
/** @brief Delete layer for the network (not implemented yet) */
351351
CV_WRAP void deleteLayer(LayerId layer);
@@ -502,16 +502,16 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
502502
* @param outLayerShapes output parameter for output layers shapes;
503503
* order is the same as in layersIds
504504
*/
505-
CV_WRAP void getLayerShapes(const MatShape& netInputShape,
505+
void getLayerShapes(const MatShape& netInputShape,
506506
const int layerId,
507507
CV_OUT std::vector<MatShape>& inLayerShapes,
508-
CV_OUT std::vector<MatShape>& outLayerShapes) const;
508+
CV_OUT std::vector<MatShape>& outLayerShapes) const; // FIXIT: CV_WRAP
509509

510510
/** @overload */
511-
CV_WRAP void getLayerShapes(const std::vector<MatShape>& netInputShapes,
511+
void getLayerShapes(const std::vector<MatShape>& netInputShapes,
512512
const int layerId,
513513
CV_OUT std::vector<MatShape>& inLayerShapes,
514-
CV_OUT std::vector<MatShape>& outLayerShapes) const;
514+
CV_OUT std::vector<MatShape>& outLayerShapes) const; // FIXIT: CV_WRAP
515515

516516
/** @brief Computes FLOP for whole loaded model with specified input shapes.
517517
* @param netInputShapes vector of shapes for all net inputs.
@@ -544,8 +544,8 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
544544
* @param weights output parameter to store resulting bytes for weights.
545545
* @param blobs output parameter to store resulting bytes for intermediate blobs.
546546
*/
547-
CV_WRAP void getMemoryConsumption(const std::vector<MatShape>& netInputShapes,
548-
CV_OUT size_t& weights, CV_OUT size_t& blobs) const;
547+
void getMemoryConsumption(const std::vector<MatShape>& netInputShapes,
548+
CV_OUT size_t& weights, CV_OUT size_t& blobs) const; // FIXIT: CV_WRAP
549549
/** @overload */
550550
CV_WRAP void getMemoryConsumption(const MatShape& netInputShape,
551551
CV_OUT size_t& weights, CV_OUT size_t& blobs) const;
@@ -565,15 +565,15 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
565565
* @param weights output parameter to store resulting bytes for weights.
566566
* @param blobs output parameter to store resulting bytes for intermediate blobs.
567567
*/
568-
CV_WRAP void getMemoryConsumption(const std::vector<MatShape>& netInputShapes,
568+
void getMemoryConsumption(const std::vector<MatShape>& netInputShapes,
569569
CV_OUT std::vector<int>& layerIds,
570570
CV_OUT std::vector<size_t>& weights,
571-
CV_OUT std::vector<size_t>& blobs) const;
571+
CV_OUT std::vector<size_t>& blobs) const; // FIXIT: CV_WRAP
572572
/** @overload */
573-
CV_WRAP void getMemoryConsumption(const MatShape& netInputShape,
573+
void getMemoryConsumption(const MatShape& netInputShape,
574574
CV_OUT std::vector<int>& layerIds,
575575
CV_OUT std::vector<size_t>& weights,
576-
CV_OUT std::vector<size_t>& blobs) const;
576+
CV_OUT std::vector<size_t>& blobs) const; // FIXIT: CV_WRAP
577577

578578
/** @brief Enables or disables layer fusion in the network.
579579
* @param fusion true to enable the fusion, false to disable. The fusion is enabled by default.

modules/dnn/misc/java/src/cpp/dnn_converters.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,6 @@ void MatShape_to_Mat(MatShape& matshape, cv::Mat& mat)
1919
mat = cv::Mat(matshape, true);
2020
}
2121

22-
void Mat_to_vector_size_t(cv::Mat& mat, std::vector<size_t>& v_size_t)
23-
{
24-
v_size_t.clear();
25-
CHECK_MAT(mat.type()==CV_32SC1 && mat.cols==1);
26-
v_size_t = (std::vector<size_t>) mat;
27-
}
28-
29-
void vector_size_t_to_Mat(std::vector<size_t>& v_size_t, cv::Mat& mat)
30-
{
31-
mat = cv::Mat(v_size_t, true);
32-
}
33-
3422
std::vector<MatShape> List_to_vector_MatShape(JNIEnv* env, jobject list)
3523
{
3624
static jclass juArrayList = ARRAYLIST(env);

modules/dnn/misc/java/src/cpp/dnn_converters.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ void Mat_to_MatShape(cv::Mat& mat, MatShape& matshape);
2222

2323
void MatShape_to_Mat(MatShape& matshape, cv::Mat& mat);
2424

25-
void Mat_to_vector_size_t(cv::Mat& mat, std::vector<size_t>& v_size_t);
26-
27-
void vector_size_t_to_Mat(std::vector<size_t>& v_size_t, cv::Mat& mat);
28-
2925
std::vector<MatShape> List_to_vector_MatShape(JNIEnv* env, jobject list);
3026

3127
jobject vector_Ptr_Layer_to_List(JNIEnv* env, std::vector<cv::Ptr<cv::dnn::Layer> >& vs);

modules/java/generator/src/cpp/listconverters.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,3 @@ void Copy_vector_String_to_List(JNIEnv* env, std::vector<cv::String>& vs, jobjec
5757
env->DeleteLocalRef(element);
5858
}
5959
}
60-
61-
#if defined(HAVE_OPENCV_DNN)
62-
void Copy_vector_MatShape_to_List(JNIEnv* env, std::vector<cv::dnn::MatShape>& vs, jobject list)
63-
{
64-
static jclass juArrayList = ARRAYLIST(env);
65-
jmethodID m_clear = LIST_CLEAR(env, juArrayList);
66-
jmethodID m_add = LIST_ADD(env, juArrayList);
67-
68-
env->CallVoidMethod(list, m_clear);
69-
for (std::vector<cv::dnn::MatShape>::iterator it = vs.begin(); it != vs.end(); ++it)
70-
{
71-
jstring element = env->NewStringUTF("");
72-
env->CallBooleanMethod(list, m_add, element);
73-
env->DeleteLocalRef(element);
74-
}
75-
}
76-
#endif

modules/java/generator/src/cpp/listconverters.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,4 @@ std::vector<cv::String> List_to_vector_String(JNIEnv* env, jobject list);
1616

1717
void Copy_vector_String_to_List(JNIEnv* env, std::vector<cv::String>& vs, jobject list);
1818

19-
#if defined(HAVE_OPENCV_DNN)
20-
#include "opencv2/dnn.hpp"
21-
void Copy_vector_MatShape_to_List(JNIEnv* env, std::vector<cv::dnn::MatShape>& vs, jobject list);
22-
#endif
23-
2419
#endif /* LISTCONVERTERS_HPP */

0 commit comments

Comments
 (0)