Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
fbfddbd3
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fbfddbd3
编写于
7月 12, 2011
作者:
A
Andrey Pavlenko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- 'c_string' support added to Java API
- improved CV_IN_OUT/CV_OUT handling for generated Python/Java wrappers
上级
9aa5e5b0
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
32 addition
and
21 deletion
+32
-21
modules/core/include/opencv2/core/core.hpp
modules/core/include/opencv2/core/core.hpp
+1
-1
modules/java/gen_java.py
modules/java/gen_java.py
+11
-6
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
+2
-2
modules/python/src2/hdr_parser.py
modules/python/src2/hdr_parser.py
+18
-12
未找到文件。
modules/core/include/opencv2/core/core.hpp
浏览文件 @
fbfddbd3
...
...
@@ -2031,7 +2031,7 @@ CV_EXPORTS_W void merge(const vector<Mat>& mv, OutputArray dst);
//! 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
,
...
...
modules/java/gen_java.py
浏览文件 @
fbfddbd3
...
...
@@ -66,6 +66,10 @@ type_dict = {
"jni_type"
:
"jstring"
,
"jni_name"
:
"n_%(n)s"
,
"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)'
,
"suffix"
:
"Ljava_lang_String_2"
},
"c_string"
:
{
"j_type"
:
"java.lang.String"
,
"jn_type"
:
"java.lang.String"
,
"jni_type"
:
"jstring"
,
"jni_name"
:
"n_%(n)s.c_str()"
,
"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)'
,
"suffix"
:
"Ljava_lang_String_2"
},
}
...
...
@@ -98,10 +102,11 @@ class ArgInfo(object):
self
.
ctype
=
arg_tuple
[
0
]
self
.
name
=
arg_tuple
[
1
]
self
.
defval
=
arg_tuple
[
2
]
self
.
out
=
"/O"
in
arg_tuple
[
3
]
or
"/IO"
in
arg_tuple
[
3
]
## def isbig(self):
## return self.ctype == "Mat" or self.ctype == "vector_Mat"
self
.
out
=
""
if
"/O"
in
arg_tuple
[
3
]:
self
.
out
=
"O"
if
"/IO"
in
arg_tuple
[
3
]:
self
.
out
=
"IO"
class
FuncInfo
(
object
):
...
...
@@ -407,14 +412,14 @@ class JavaWrapperGenerator(object):
self
.
skipped_func_list
.
append
(
c_decl
+
"
\n
"
+
msg
)
self
.
java_code
.
write
(
indent
+
msg
)
#self.cpp_code.write( msg )
print
"SKIP:"
,
c_decl
,
"
\n\t
due to ARG type"
,
a
.
ctype
print
"SKIP:"
,
c_decl
,
"
\n\t
due to ARG type"
,
a
.
ctype
,
a
.
out
return
if
a
.
ctype
!=
"Mat"
and
"jn_args"
in
type_dict
[
a
.
ctype
]
and
a
.
out
:
# complex out args not yet supported
msg
=
"// Unsupported type '%s&', skipping the function
\n\n
"
%
a
.
ctype
self
.
skipped_func_list
.
append
(
c_decl
+
"
\n
"
+
msg
)
self
.
java_code
.
write
(
indent
+
msg
)
#self.cpp_code.write( msg )
print
"SKIP:"
,
c_decl
,
"
\n\t
due to OUT ARG of type"
,
a
.
ctype
print
"SKIP:"
,
c_decl
,
"
\n\t
due to OUT ARG of type"
,
a
.
ctype
,
a
.
out
return
self
.
ported_func_counter
+=
1
...
...
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
浏览文件 @
fbfddbd3
...
...
@@ -286,8 +286,8 @@ namespace cv
///////////////////////////// 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
,
...
...
modules/python/src2/hdr_parser.py
浏览文件 @
fbfddbd3
...
...
@@ -253,7 +253,7 @@ class CppHeaderParser(object):
fnpos
=
0
fname
=
fname
[
fnpos
:].
strip
()
rettype
=
fdecl
[:
fnpos
].
strip
()
if
rettype
.
endswith
(
"operator"
):
fname
=
(
"operator "
+
fname
).
strip
()
rettype
=
rettype
[:
rettype
.
rfind
(
"operator"
)].
strip
()
...
...
@@ -265,16 +265,16 @@ class CppHeaderParser(object):
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
(
","
)
...
...
@@ -287,7 +287,7 @@ class CppHeaderParser(object):
if
balance_paren
==
0
and
balance_angle
==
0
:
args
.
append
(
narg
.
strip
())
narg
=
""
for
arg
in
args
:
dfpos
=
arg
.
find
(
"="
)
defval
=
""
...
...
@@ -307,7 +307,7 @@ class CppHeaderParser(object):
atype
=
arg
aname
=
"param"
decl
[
3
].
append
([
atype
,
aname
,
defval
,
[]])
return
decl
def
parse_func_decl
(
self
,
decl_str
):
...
...
@@ -326,11 +326,11 @@ class CppHeaderParser(object):
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
=
[]
...
...
@@ -454,13 +454,19 @@ class CppHeaderParser(object):
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"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录