Cleanup core module API

* Drop some low level API
* Remove outdated overloads
* Utilize Input/OutputArray
This commit is contained in:
Andrey Kamaev
2013-04-09 13:10:54 +04:00
parent f4ae0cf19c
commit b0e6606b98
13 changed files with 77 additions and 116 deletions

View File

@@ -3,6 +3,8 @@
import hdr_parser, sys, re, os, cStringIO
from string import Template
ignored_arg_types = ["RNG*"]
gen_template_check_self = Template(""" if(!PyObject_TypeCheck(self, &pyopencv_${name}_Type))
return failmsgp("Incorrect type of self (must be '${name}' or its derivative)");
$cname* _self_ = ${amp}((pyopencv_${name}_t*)self)->v;
@@ -426,6 +428,8 @@ class FuncVariant(object):
argno += 1
if a.name in self.array_counters:
continue
if a.tp in ignored_arg_types:
continue
if a.returnarg:
outlist.append((a.name, argno))
if (not a.inputarg) and a.isbig():
@@ -586,6 +590,16 @@ class FuncInfo(object):
# form the function/method call,
# for the list of type mappings
for a in v.args:
if a.tp in ignored_arg_types:
defval = a.defval
if not defval and a.tp.endswith("*"):
defval = 0
assert defval
if not code_fcall.endswith("("):
code_fcall += ", "
code_fcall += defval
all_cargs.append([[None, ""], ""])
continue
tp1 = tp = a.tp
amp = ""
defval0 = ""