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
7fed582d
Commit
7fed582d
authored
Jul 01, 2011
by
Kirill Kornyakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implemented static Mat.eye method
parent
837b733a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
Mat.cpp
modules/java/src/cpp/Mat.cpp
+14
-0
Mat.java
modules/java/src/java/Mat.java
+5
-0
No files found.
modules/java/src/cpp/Mat.cpp
View file @
7fed582d
...
...
@@ -218,6 +218,14 @@ JNIEXPORT jlong JNICALL Java_org_opencv_Mat_nCross
*/
JNIEXPORT
jlong
JNICALL
Java_org_opencv_Mat_nInv
(
JNIEnv
*
,
jclass
,
jlong
);
/*
* Class: org_opencv_Mat
* Method: nEye
* Signature: (III)J
*/
JNIEXPORT
jlong
JNICALL
Java_org_opencv_Mat_nEye
(
JNIEnv
*
,
jclass
,
jint
,
jint
,
jint
);
#ifdef __cplusplus
}
...
...
@@ -586,6 +594,12 @@ JNIEXPORT jlong JNICALL Java_org_opencv_Mat_nInv
return
0
;
//NYI
}
JNIEXPORT
jlong
JNICALL
Java_org_opencv_Mat_nEye
(
JNIEnv
*
env
,
jclass
cls
,
jint
_rows
,
jint
_cols
,
jint
_type
)
{
return
(
jlong
)
new
cv
::
Mat
(
cv
::
Mat
::
eye
(
_rows
,
_cols
,
_type
));
}
JNIEXPORT
jlong
JNICALL
Java_org_opencv_Mat_nCreateMat__III
(
JNIEnv
*
env
,
jclass
cls
,
jint
_rows
,
jint
_cols
,
jint
_type
)
{
...
...
modules/java/src/java/Mat.java
View file @
7fed582d
...
...
@@ -383,6 +383,10 @@ public class Mat {
return
nativeObj
;
}
static
public
Mat
eye
(
int
rows
,
int
cols
,
CvType
type
)
{
return
new
Mat
(
nEye
(
rows
,
cols
,
type
.
toInt
())
);
}
// native stuff
static
{
System
.
loadLibrary
(
"opencv_java"
);
}
protected
long
nativeObj
;
...
...
@@ -414,5 +418,6 @@ public class Mat {
private
static
native
double
nDot
(
long
self
,
long
mat
);
private
static
native
long
nCross
(
long
self
,
long
mat
);
private
static
native
long
nInv
(
long
self
);
private
static
native
long
nEye
(
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