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
6fbda0df
Commit
6fbda0df
authored
Jul 18, 2013
by
Andrey Pavlenko
Committed by
OpenCV Buildbot
Jul 18, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1138 from janstarzy:mat-dist
parents
12f304ec
12c42ac1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
0 deletions
+47
-0
Mat.cpp
modules/java/generator/src/cpp/Mat.cpp
+31
-0
core+Mat.java
modules/java/generator/src/java/core+Mat.java
+16
-0
No files found.
modules/java/generator/src/cpp/Mat.cpp
View file @
6fbda0df
...
@@ -523,6 +523,37 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1colRange
...
@@ -523,6 +523,37 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1colRange
//
// int Mat::dims()
//
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1dims
(
JNIEnv
*
env
,
jclass
,
jlong
self
);
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1dims
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
try
{
LOGD
(
"Mat::n_1dims()"
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
int
_retval_
=
me
->
dims
;
return
_retval_
;
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1dims() catched cv::Exception: %s"
,
e
.
what
());
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
LOGD
(
"Mat::n_1dims() catched unknown exception (...)"
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1dims()}"
);
return
0
;
}
}
//
//
// int Mat::cols()
// int Mat::cols()
//
//
...
...
modules/java/generator/src/java/core+Mat.java
View file @
6fbda0df
...
@@ -245,6 +245,19 @@ public class Mat {
...
@@ -245,6 +245,19 @@ public class Mat {
return
retVal
;
return
retVal
;
}
}
//
// C++: int Mat::dims()
//
// javadoc: Mat::dims()
public
int
dims
()
{
int
retVal
=
n_dims
(
nativeObj
);
return
retVal
;
}
//
//
// C++: int Mat::cols()
// C++: int Mat::cols()
//
//
...
@@ -1130,6 +1143,9 @@ public class Mat {
...
@@ -1130,6 +1143,9 @@ public class Mat {
// C++: Mat Mat::colRange(int startcol, int endcol)
// C++: Mat Mat::colRange(int startcol, int endcol)
private
static
native
long
n_colRange
(
long
nativeObj
,
int
startcol
,
int
endcol
);
private
static
native
long
n_colRange
(
long
nativeObj
,
int
startcol
,
int
endcol
);
// C++: int Mat::dims()
private
static
native
int
n_dims
(
long
nativeObj
);
// C++: int Mat::cols()
// C++: int Mat::cols()
private
static
native
int
n_cols
(
long
nativeObj
);
private
static
native
int
n_cols
(
long
nativeObj
);
...
...
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