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
c24d7cc0
Commit
c24d7cc0
authored
Feb 28, 2013
by
Andrey Pavlenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding more version-related variables
parent
29b763dc
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
5 deletions
+6
-5
gen_java.py
modules/java/generator/gen_java.py
+3
-2
SimpleSample.java
samples/java/ant/src/SimpleSample.java
+1
-1
Main.java
samples/java/eclipse/HelloCV/src/Main.java
+1
-1
Main.scala
samples/java/sbt/src/main/scala/Main.scala
+1
-1
No files found.
modules/java/generator/gen_java.py
View file @
c24d7cc0
...
...
@@ -739,8 +739,9 @@ public class %(jc)s {
# version_suffix = version_suffix[0 : -1]
self
.
classes
[
class_name
]
.
imports
.
add
(
"java.lang.String"
)
self
.
java_code
[
class_name
][
"j_code"
]
.
write
(
"""
public static final String VERSION = "
%(v)
s", VERSION_SUFFIX = "
%(vs)
s";
"""
%
{
'v'
:
version_str
,
'vs'
:
version_suffix
}
)
public static final String VERSION = "
%(v)
s", NATIVE_LIBRARY_NAME = "opencv_java
%(vs)
s";
public static final int VERSION_EPOCH =
%(ep)
s, VERSION_MAJOR =
%(ma)
s, VERSION_MINOR =
%(mi)
s, VERSION_PATCH =
%(pa)
s;
"""
%
{
'v'
:
version_str
,
'vs'
:
version_suffix
,
'ep'
:
epoch
,
'ma'
:
major
,
'mi'
:
minor
,
'pa'
:
patch
}
)
def
add_class
(
self
,
decl
):
...
...
samples/java/ant/src/SimpleSample.java
View file @
c24d7cc0
...
...
@@ -5,7 +5,7 @@ import org.opencv.core.Scalar;
class
SimpleSample
{
static
{
System
.
loadLibrary
(
"opencv_java"
+
Core
.
VERSION_SUFFIX
);
}
static
{
System
.
loadLibrary
(
Core
.
NATIVE_LIBRARY_NAME
);
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"Welcome to OpenCV "
+
Core
.
VERSION
);
...
...
samples/java/eclipse/HelloCV/src/Main.java
View file @
c24d7cc0
...
...
@@ -6,7 +6,7 @@ public class Main {
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"Welcome to OpenCV "
+
Core
.
VERSION
);
System
.
loadLibrary
(
"opencv_java"
+
Core
.
VERSION_SUFFIX
);
System
.
loadLibrary
(
Core
.
NATIVE_LIBRARY_NAME
);
Mat
m
=
Mat
.
eye
(
3
,
3
,
CvType
.
CV_8UC1
);
System
.
out
.
println
(
"m = "
+
m
.
dump
());
}
...
...
samples/java/sbt/src/main/scala/Main.scala
View file @
c24d7cc0
...
...
@@ -15,7 +15,7 @@ object Main extends App {
// We must load the native library before using any OpenCV functions.
// You must load this library _exactly once_ per Java invocation.
// If you load it more than once, you will get a java.lang.UnsatisfiedLinkError.
System
.
loadLibrary
(
"opencv_java"
+
Core
.
VERSION_SUFFIX
)
System
.
loadLibrary
(
Core
.
NATIVE_LIBRARY_NAME
)
ScalaCorrespondenceMatchingDemo
.
run
()
ScalaDetectFaceDemo
.
run
()
...
...
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