From e2499e5b2fae3ad923db2ad9b7f0d977b157a3ea Mon Sep 17 00:00:00 2001 From: Igor Wodiany Date: Sat, 14 Oct 2017 00:27:37 +0100 Subject: [PATCH] Move vector_size_t and vector_vector_Mat These two typdefs are not compiled when BUILD_opencv_dnn is set to false, however there are other modules that uses these typedef so it may cause build errors. Moving typedef to the python module ensures they are always defined. --- modules/dnn/misc/python/pyopencv_dnn.hpp | 3 +-- modules/python/src2/cv2.cpp | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/dnn/misc/python/pyopencv_dnn.hpp b/modules/dnn/misc/python/pyopencv_dnn.hpp index 312e5fcc56..ccc05babb7 100644 --- a/modules/dnn/misc/python/pyopencv_dnn.hpp +++ b/modules/dnn/misc/python/pyopencv_dnn.hpp @@ -2,8 +2,7 @@ typedef dnn::DictValue LayerId; typedef std::vector vector_MatShape; typedef std::vector > vector_vector_MatShape; -typedef std::vector vector_size_t; -typedef std::vector > vector_vector_Mat; + template<> bool pyopencv_to(PyObject *o, dnn::DictValue &dv, const char *name) diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp index e6172fac22..40a0d96169 100644 --- a/modules/python/src2/cv2.cpp +++ b/modules/python/src2/cv2.cpp @@ -89,6 +89,7 @@ typedef std::vector vector_char; typedef std::vector vector_int; typedef std::vector vector_float; typedef std::vector vector_double; +typedef std::vector vector_size_t; typedef std::vector vector_Point; typedef std::vector vector_Point2f; typedef std::vector vector_Point3f; @@ -101,6 +102,7 @@ typedef std::vector vector_Rect; typedef std::vector vector_Rect2d; typedef std::vector vector_KeyPoint; typedef std::vector vector_Mat; +typedef std::vector > vector_vector_Mat; typedef std::vector vector_UMat; typedef std::vector vector_DMatch; typedef std::vector vector_String;