From 0aa5391c4bf01d0ff6163cf3ff996d0016ee6a39 Mon Sep 17 00:00:00 2001 From: Zach Lowry Date: Wed, 23 Oct 2019 12:40:56 -0500 Subject: [PATCH] Use argument value for 'mat' in call to format for vector_mat and vector_mat_template The hard-coded string value "Mat" was used in the two format strings for vector_mat and vector_mat_template, preventing UMat arguments to functions that have these types from working correctly. as noted in #12231. --- modules/python/src2/hdr_parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/python/src2/hdr_parser.py b/modules/python/src2/hdr_parser.py index 2bbaf23b8b..780a263ced 100755 --- a/modules/python/src2/hdr_parser.py +++ b/modules/python/src2/hdr_parser.py @@ -571,8 +571,8 @@ class CppHeaderParser(object): arg_type, arg_name, modlist, argno = self.parse_arg(a, argno) if self.wrap_mode: # TODO: Vectors should contain UMat, but this is not very easy to support and not very needed - vector_mat = "vector_{}".format("Mat") - vector_mat_template = "vector<{}>".format("Mat") + vector_mat = "vector_{}".format(mat) + vector_mat_template = "vector<{}>".format(mat) if arg_type == "InputArray": arg_type = mat