1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

python: force using of ArgInfo

This commit is contained in:
Alexander Alekhin
2019-11-15 17:29:51 +03:00
parent 1f57eb93fd
commit 7ec91aefc1
7 changed files with 121 additions and 182 deletions
+2 -8
View File
@@ -4,9 +4,9 @@ typedef std::vector<dnn::MatShape> vector_MatShape;
typedef std::vector<std::vector<dnn::MatShape> > vector_vector_MatShape;
template<>
bool pyopencv_to(PyObject *o, dnn::DictValue &dv, const char *name)
bool pyopencv_to(PyObject *o, dnn::DictValue &dv, const ArgInfo& info)
{
CV_UNUSED(name);
CV_UNUSED(info);
if (!o || o == Py_None)
return true; //Current state will be used
else if (PyLong_Check(o))
@@ -36,12 +36,6 @@ bool pyopencv_to(PyObject *o, dnn::DictValue &dv, const char *name)
return false;
}
template<>
bool pyopencv_to(PyObject *o, std::vector<Mat> &blobs, const char *name) //required for Layer::blobs RW
{
return pyopencvVecConverter<Mat>::to(o, blobs, ArgInfo(name, false));
}
template<typename T>
PyObject* pyopencv_from(const dnn::DictValue &dv)
{