Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
fbfddbd3
Commit
fbfddbd3
authored
Jul 12, 2011
by
Andrey Pavlenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- 'c_string' support added to Java API
- improved CV_IN_OUT/CV_OUT handling for generated Python/Java wrappers
parent
9aa5e5b0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
11 deletions
+22
-11
core.hpp
modules/core/include/opencv2/core/core.hpp
+1
-1
gen_java.py
modules/java/gen_java.py
+11
-6
objdetect.hpp
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
+2
-2
hdr_parser.py
modules/python/src2/hdr_parser.py
+8
-2
No files found.
modules/core/include/opencv2/core/core.hpp
View file @
fbfddbd3
...
@@ -2031,7 +2031,7 @@ CV_EXPORTS_W void merge(const vector<Mat>& mv, OutputArray dst);
...
@@ -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
//! copies each plane of a multi-channel array to a dedicated array
CV_EXPORTS
void
split
(
const
Mat
&
src
,
Mat
*
mvbegin
);
CV_EXPORTS
void
split
(
const
Mat
&
src
,
Mat
*
mvbegin
);
//! copies each plane of a multi-channel array to a dedicated array
//! 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
//! 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
,
CV_EXPORTS
void
mixChannels
(
const
Mat
*
src
,
size_t
nsrcs
,
Mat
*
dst
,
size_t
ndsts
,
...
...
modules/java/gen_java.py
View file @
fbfddbd3
...
@@ -66,6 +66,10 @@ type_dict = {
...
@@ -66,6 +66,10 @@ type_dict = {
"jni_type"
:
"jstring"
,
"jni_name"
:
"n_
%(n)
s"
,
"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)'
,
"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"
},
"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):
...
@@ -98,10 +102,11 @@ class ArgInfo(object):
self
.
ctype
=
arg_tuple
[
0
]
self
.
ctype
=
arg_tuple
[
0
]
self
.
name
=
arg_tuple
[
1
]
self
.
name
=
arg_tuple
[
1
]
self
.
defval
=
arg_tuple
[
2
]
self
.
defval
=
arg_tuple
[
2
]
self
.
out
=
"/O"
in
arg_tuple
[
3
]
or
"/IO"
in
arg_tuple
[
3
]
self
.
out
=
""
if
"/O"
in
arg_tuple
[
3
]:
## def isbig(self):
self
.
out
=
"O"
## return self.ctype == "Mat" or self.ctype == "vector_Mat"
if
"/IO"
in
arg_tuple
[
3
]:
self
.
out
=
"IO"
class
FuncInfo
(
object
):
class
FuncInfo
(
object
):
...
@@ -407,14 +412,14 @@ class JavaWrapperGenerator(object):
...
@@ -407,14 +412,14 @@ class JavaWrapperGenerator(object):
self
.
skipped_func_list
.
append
(
c_decl
+
"
\n
"
+
msg
)
self
.
skipped_func_list
.
append
(
c_decl
+
"
\n
"
+
msg
)
self
.
java_code
.
write
(
indent
+
msg
)
self
.
java_code
.
write
(
indent
+
msg
)
#self.cpp_code.write( 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
return
if
a
.
ctype
!=
"Mat"
and
"jn_args"
in
type_dict
[
a
.
ctype
]
and
a
.
out
:
# complex out args not yet supported
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
msg
=
"// Unsupported type '
%
s&', skipping the function
\n\n
"
%
a
.
ctype
self
.
skipped_func_list
.
append
(
c_decl
+
"
\n
"
+
msg
)
self
.
skipped_func_list
.
append
(
c_decl
+
"
\n
"
+
msg
)
self
.
java_code
.
write
(
indent
+
msg
)
self
.
java_code
.
write
(
indent
+
msg
)
#self.cpp_code.write( 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
return
self
.
ported_func_counter
+=
1
self
.
ported_func_counter
+=
1
...
...
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
View file @
fbfddbd3
...
@@ -286,8 +286,8 @@ namespace cv
...
@@ -286,8 +286,8 @@ namespace cv
///////////////////////////// Object Detection ////////////////////////////
///////////////////////////// Object Detection ////////////////////////////
CV_EXPORTS_W
void
groupRectangles
(
vector
<
Rect
>&
rectList
,
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
(
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
,
CV_OUT
vector
<
int
>&
weights
,
int
groupThreshold
,
double
eps
=
0.2
);
CV_EXPORTS
void
groupRectangles
(
vector
<
Rect
>&
rectList
,
vector
<
int
>&
rejectLevels
,
CV_EXPORTS
void
groupRectangles
(
vector
<
Rect
>&
rectList
,
vector
<
int
>&
rejectLevels
,
vector
<
double
>&
levelWeights
,
int
groupThreshold
,
double
eps
=
0.2
);
vector
<
double
>&
levelWeights
,
int
groupThreshold
,
double
eps
=
0.2
);
CV_EXPORTS
void
groupRectangles_meanshift
(
vector
<
Rect
>&
rectList
,
vector
<
double
>&
foundWeights
,
vector
<
double
>&
foundScales
,
CV_EXPORTS
void
groupRectangles_meanshift
(
vector
<
Rect
>&
rectList
,
vector
<
double
>&
foundWeights
,
vector
<
double
>&
foundScales
,
...
...
modules/python/src2/hdr_parser.py
View file @
fbfddbd3
...
@@ -454,13 +454,19 @@ class CppHeaderParser(object):
...
@@ -454,13 +454,19 @@ class CppHeaderParser(object):
a
=
a
[:
eqpos
]
.
strip
()
a
=
a
[:
eqpos
]
.
strip
()
arg_type
,
arg_name
,
modlist
,
argno
=
self
.
parse_arg
(
a
,
argno
)
arg_type
,
arg_name
,
modlist
,
argno
=
self
.
parse_arg
(
a
,
argno
)
if
self
.
wrap_mode
:
if
self
.
wrap_mode
:
if
arg_type
==
"InputArray"
or
arg_type
==
"InputOutputArray"
:
if
arg_type
==
"InputArray"
:
arg_type
=
"Mat"
arg_type
=
"Mat"
elif
arg_type
==
"InputOutputArray"
:
arg_type
=
"Mat"
modlist
.
append
(
"/IO"
)
elif
arg_type
==
"OutputArray"
:
elif
arg_type
==
"OutputArray"
:
arg_type
=
"Mat"
arg_type
=
"Mat"
modlist
.
append
(
"/O"
)
modlist
.
append
(
"/O"
)
elif
arg_type
==
"InputArrayOfArrays"
or
arg_type
==
"InputOutputArrayOfArrays"
:
elif
arg_type
==
"InputArrayOfArrays"
:
arg_type
=
"vector_Mat"
arg_type
=
"vector_Mat"
elif
arg_type
==
"InputOutputArrayOfArrays"
:
arg_type
=
"vector_Mat"
modlist
.
append
(
"/IO"
)
elif
arg_type
==
"OutputArrayOfArrays"
:
elif
arg_type
==
"OutputArrayOfArrays"
:
arg_type
=
"vector_Mat"
arg_type
=
"vector_Mat"
modlist
.
append
(
"/O"
)
modlist
.
append
(
"/O"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment