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
29b763dc
Commit
29b763dc
authored
Feb 28, 2013
by
Andrey Pavlenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updating samples to load JNI lib with correct suffix
parent
5321da92
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
SimpleSample.java
samples/java/ant/src/SimpleSample.java
+3
-1
Main.java
samples/java/eclipse/HelloCV/src/Main.java
+3
-1
Main.scala
samples/java/sbt/src/main/scala/Main.scala
+4
-1
No files found.
samples/java/ant/src/SimpleSample.java
View file @
29b763dc
import
org.opencv.core.Core
;
import
org.opencv.core.Mat
;
import
org.opencv.core.CvType
;
import
org.opencv.core.Scalar
;
class
SimpleSample
{
static
{
System
.
loadLibrary
(
"opencv_java
244"
);
}
static
{
System
.
loadLibrary
(
"opencv_java
"
+
Core
.
VERSION_SUFFIX
);
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"Welcome to OpenCV "
+
Core
.
VERSION
);
Mat
m
=
new
Mat
(
5
,
10
,
CvType
.
CV_8UC1
,
new
Scalar
(
0
));
System
.
out
.
println
(
"OpenCV Mat: "
+
m
);
Mat
mr1
=
m
.
row
(
1
);
...
...
samples/java/eclipse/HelloCV/src/Main.java
View file @
29b763dc
import
org.opencv.core.Core
;
import
org.opencv.core.CvType
;
import
org.opencv.core.Mat
;
public
class
Main
{
public
static
void
main
(
String
[]
args
)
{
System
.
loadLibrary
(
"opencv_java244"
);
System
.
out
.
println
(
"Welcome to OpenCV "
+
Core
.
VERSION
);
System
.
loadLibrary
(
"opencv_java"
+
Core
.
VERSION_SUFFIX
);
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 @
29b763dc
...
...
@@ -8,11 +8,14 @@
* You're invited to submit your own examples, in any JVM language of
* your choosing so long as you can get them to build.
*/
import
org.opencv.core.Core
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"
)
System
.
loadLibrary
(
"opencv_java"
+
Core
.
VERSION_SUFFIX
)
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