//! copies each plane of a multi-channel array to a dedicated array
CV_EXPORTS void split(const Mat& src, Mat* mvbegin);
//! copies each plane of a multi-channel array to a dedicated array
-CV_EXPORTS_W void split(const Mat& m, vector<Mat>& mv);
+CV_EXPORTS_W void split(const Mat& m, CV_OUT vector<Mat>& mv);
//! copies selected channels from the input arrays to the selected channels of the output arrays
CV_EXPORTS void mixChannels(const Mat* src, size_t nsrcs, Mat* dst, size_t ndsts,
"jni_type" : "jstring", "jni_name" : "n_%(n)s",\r
"jni_var" : 'const char* utf_%(n)s = env->GetStringUTFChars(%(n)s, 0); String n_%(n)s( utf_%(n)s ? utf_%(n)s : "" ); env->ReleaseStringUTFChars(%(n)s, utf_%(n)s)',\r
"suffix" : "Ljava_lang_String_2"},\r
+ "c_string": { "j_type" : "java.lang.String", "jn_type" : "java.lang.String",\r
+ "jni_type" : "jstring", "jni_name" : "n_%(n)s.c_str()",\r
+ "jni_var" : 'const char* utf_%(n)s = env->GetStringUTFChars(%(n)s, 0); std::string n_%(n)s( utf_%(n)s ? utf_%(n)s : "" ); env->ReleaseStringUTFChars(%(n)s, utf_%(n)s)',\r
+ "suffix" : "Ljava_lang_String_2"},\r
\r
}\r
\r
self.ctype = arg_tuple[0]\r
self.name = arg_tuple[1]\r
self.defval = arg_tuple[2]\r
- self.out = "/O" in arg_tuple[3] or "/IO" in arg_tuple[3]\r
-\r
-## def isbig(self):\r
-## return self.ctype == "Mat" or self.ctype == "vector_Mat"\r
+ self.out = ""\r
+ if "/O" in arg_tuple[3]:\r
+ self.out = "O"\r
+ if "/IO" in arg_tuple[3]:\r
+ self.out = "IO"\r
\r
\r
class FuncInfo(object):\r
self.skipped_func_list.append(c_decl + "\n" + msg)\r
self.java_code.write( indent + msg )\r
#self.cpp_code.write( msg )\r
- print "SKIP:", c_decl, "\n\tdue to ARG type", a.ctype\r
+ print "SKIP:", c_decl, "\n\tdue to ARG type", a.ctype, a.out\r
return\r
if a.ctype != "Mat" and "jn_args" in type_dict[a.ctype] and a.out: # complex out args not yet supported\r
msg = "// Unsupported type '%s&', skipping the function\n\n" % a.ctype\r
self.skipped_func_list.append(c_decl + "\n" + msg)\r
self.java_code.write( indent + msg )\r
#self.cpp_code.write( msg )\r
- print "SKIP:", c_decl, "\n\tdue to OUT ARG of type", a.ctype\r
+ print "SKIP:", c_decl, "\n\tdue to OUT ARG of type", a.ctype, a.out\r
return\r
\r
self.ported_func_counter += 1\r
///////////////////////////// Object Detection ////////////////////////////
-CV_EXPORTS_W void groupRectangles(vector<Rect>& rectList, int groupThreshold, double eps=0.2);
-CV_EXPORTS_W void groupRectangles(vector<Rect>& rectList, CV_OUT vector<int>& weights, int groupThreshold, double eps=0.2);
+CV_EXPORTS_W void groupRectangles(CV_IN_OUT vector<Rect>& rectList, int groupThreshold, double eps=0.2);
+CV_EXPORTS_W void groupRectangles(CV_IN_OUT vector<Rect>& rectList, CV_OUT vector<int>& weights, int groupThreshold, double eps=0.2);
CV_EXPORTS void groupRectangles(vector<Rect>& rectList, vector<int>& rejectLevels,
vector<double>& levelWeights, int groupThreshold, double eps=0.2);
CV_EXPORTS void groupRectangles_meanshift(vector<Rect>& rectList, vector<double>& foundWeights, vector<double>& foundScales,
fnpos = 0
fname = fname[fnpos:].strip()
rettype = fdecl[:fnpos].strip()
-
+
if rettype.endswith("operator"):
fname = ("operator " + fname).strip()
rettype = rettype[:rettype.rfind("operator")].strip()
else:
fname = rettype + fname
rettype = ""
-
+
apos = fdecl.find("(")
if fname.endswith("operator"):
fname += "()"
apos = fdecl.find("(", apos+1)
-
+
fname = "cv." + fname.replace("::", ".")
decl = [fname, rettype, [], []]
args0str = fdecl[apos+1:fdecl.rfind(")")].strip()
-
+
if args0str != "":
args0 = args0str.split(",")
if balance_paren == 0 and balance_angle == 0:
args.append(narg.strip())
narg = ""
-
+
for arg in args:
dfpos = arg.find("=")
defval = ""
atype = arg
aname = "param"
decl[3].append([atype, aname, defval, []])
-
+
return decl
def parse_func_decl(self, decl_str):
if not (("CV_EXPORTS_AS" in decl_str) or ("CV_EXPORTS_W" in decl_str) or \
("CV_WRAP" in decl_str) or ("CV_WRAP_AS" in decl_str)):
return []
-
- # ignore old API in the documentation check (for now)
+
+ # ignore old API in the documentation check (for now)
if "CVAPI(" in decl_str:
- return []
-
+ return []
+
top = self.block_stack[-1]
func_modlist = []
a = a[:eqpos].strip()
arg_type, arg_name, modlist, argno = self.parse_arg(a, argno)
if self.wrap_mode:
- if arg_type == "InputArray" or arg_type == "InputOutputArray":
+ if arg_type == "InputArray":
arg_type = "Mat"
+ elif arg_type == "InputOutputArray":
+ arg_type = "Mat"
+ modlist.append("/IO")
elif arg_type == "OutputArray":
arg_type = "Mat"
modlist.append("/O")
- elif arg_type == "InputArrayOfArrays" or arg_type == "InputOutputArrayOfArrays":
+ elif arg_type == "InputArrayOfArrays":
+ arg_type = "vector_Mat"
+ elif arg_type == "InputOutputArrayOfArrays":
arg_type = "vector_Mat"
+ modlist.append("/IO")
elif arg_type == "OutputArrayOfArrays":
arg_type = "vector_Mat"
modlist.append("/O")