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
ee10a388
Commit
ee10a388
authored
Jul 01, 2011
by
Andrey Pavlenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#863: typo fixed, minor changes in cpp generator
parent
2b83d416
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
13 deletions
+5
-13
gen_java.py
modules/java/gen_java.py
+4
-12
Mat.java
modules/java/src/java/Mat.java
+1
-1
No files found.
modules/java/gen_java.py
View file @
ee10a388
...
...
@@ -277,7 +277,7 @@ public class %(module)s {
"""
%
{
"module"
:
module
})
self
.
cpp_code
.
write
(
"
\n
"
.
join
([
'#include "opencv2/
%
s/
%
s"'
%
(
module
,
os
.
path
.
basename
(
f
))
\
for
f
in
srcfiles
])
)
self
.
cpp_code
.
write
(
"
\n\n
"
)
self
.
cpp_code
.
write
(
'
\n\n
extern "C" {
\n\n
'
)
# step 2: generate the code for global constants
self
.
gen_consts
()
...
...
@@ -288,8 +288,9 @@ public class %(module)s {
# step 4: generate code for the classes
#self.gen_classes() # !!! tempory disabled !!!
#
java
module tail
# module tail
self
.
java_code
.
write
(
"}
\n
"
)
self
.
cpp_code
.
write
(
'} // extern "C"
\n
'
)
self
.
save
(
output_path
,
module
+
".java"
,
self
.
java_code
)
self
.
save
(
output_path
,
module
+
".cpp"
,
self
.
cpp_code
)
...
...
@@ -449,16 +450,6 @@ public class %(module)s {
rtype
=
type_dict
[
fi
.
ctype
][
"jni_type"
]
self
.
cpp_code
.
write
(
Template
(
\
"""
#ifdef __cplusplus
extern "C" {
#endif
JNIEXPORT $rtype JNICALL Java_org_opencv_${module}_$fname
($args);
#ifdef __cplusplus
}
#endif
JNIEXPORT $rtype JNICALL Java_org_opencv_${module}_$fname
($args)
...
...
@@ -468,6 +459,7 @@ JNIEXPORT $rtype JNICALL Java_org_opencv_${module}_$fname
$ret( $cvname( $cvargs ) );
}
"""
)
.
substitute
(
\
rtype
=
rtype
,
\
module
=
self
.
module
,
\
...
...
modules/java/src/java/Mat.java
View file @
ee10a388
...
...
@@ -394,7 +394,7 @@ public class Mat {
}
// native stuff
static
{
System
.
loadLibrary
(
"opencv_java"
);
);
}
static
{
System
.
loadLibrary
(
"opencv_java"
);
}
protected
long
nativeObj
;
private
static
native
long
nCreateMat
();
private
static
native
long
nCreateMat
(
int
rows
,
int
cols
,
int
type
);
...
...
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