Merge pull request #15957 from cudawarped:fix_cudacodec_python

Fix cudacodec python

* Add python bindings to cudacodec.

* Allow args with CV_OUT GpuMat& or CV_OUT cuda::GpuMat& to generate python bindings that allow the argument to be an optional output in the same way as OutputArray.

* Add wrapper flag to indicate that an OutputArray is a GpuMat.

* python: drop CV_GPU, extra checks in test

* Remove "cuda::GpuMat" check rom python parser
This commit is contained in:
cudawarped
2019-12-04 15:57:58 +00:00
committed by Alexander Alekhin
parent 72315e7b00
commit b4a3c92867
3 changed files with 35 additions and 7 deletions
+2 -2
View File
@@ -913,9 +913,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]:
# If function takes as one of arguments Mat or vector<Mat> - we want to create the
# same declaration working with GpuMat (this is important for T-Api access)
# same declaration working with GpuMat
args = decl[3]
has_mat = len(list(filter(lambda x: x[0] in {"Mat", "vector_Mat"}, args))) > 0
if has_mat: