mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +04:00
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:
committed by
Alexander Alekhin
parent
72315e7b00
commit
b4a3c92867
@@ -349,8 +349,7 @@ class ArgInfo(object):
|
||||
self.py_outputarg = False
|
||||
|
||||
def isbig(self):
|
||||
return self.tp == "Mat" or self.tp == "vector_Mat" or self.tp == "cuda::GpuMat"\
|
||||
or self.tp == "UMat" or self.tp == "vector_UMat" # or self.tp.startswith("vector")
|
||||
return self.tp in ["Mat", "vector_Mat", "GpuMat", "UMat", "vector_UMat"] # or self.tp.startswith("vector")
|
||||
|
||||
def crepr(self):
|
||||
return "ArgInfo(\"%s\", %d)" % (self.name, self.outputarg)
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user