From bf49149c97fff299384e48831767d7d2ef7badd8 Mon Sep 17 00:00:00 2001 From: Daniel Motilla Date: Mon, 19 Oct 2020 14:35:03 +0200 Subject: [PATCH] Enable imshow to take GpuMat inputs in Python --- modules/python/src2/hdr_parser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/python/src2/hdr_parser.py b/modules/python/src2/hdr_parser.py index a486e0b71a..3a977e8605 100755 --- a/modules/python/src2/hdr_parser.py +++ b/modules/python/src2/hdr_parser.py @@ -958,7 +958,9 @@ class CppHeaderParser(object): else: decls.append(decl) - if self._generate_gpumat_decls and "cv.cuda" in decl[0]: + if self._generate_gpumat_decls and ("cv.cuda" in decl[0] or decl[0] in [ + "cv.imshow", # https://github.com/opencv/opencv/issues/18553 + ]): # If function takes as one of arguments Mat or vector - we want to create the # same declaration working with GpuMat args = decl[3]