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
c43b8965
Commit
c43b8965
authored
Jul 30, 2013
by
Andrey Pavlenko
Committed by
OpenCV Buildbot
Jul 30, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1177 from janstarzy:refactor
parents
bc78e87a
d6b86d43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
577 additions
and
985 deletions
+577
-985
Mat.cpp
modules/java/generator/src/cpp/Mat.cpp
+577
-985
No files found.
modules/java/generator/src/cpp/Mat.cpp
View file @
c43b8965
#define LOG_TAG "org.opencv.core.Mat"
#define LOG_TAG "org.opencv.core.Mat"
#include <stdexcept>
#include "common.h"
#include "common.h"
#include "opencv2/core/core.hpp"
#include "opencv2/core/core.hpp"
using
namespace
cv
;
using
namespace
cv
;
extern
"C"
{
/// throw java exception
static
void
throwJavaException
(
JNIEnv
*
env
,
const
std
::
exception
*
e
,
const
char
*
method
)
{
std
::
string
what
=
"unknown exception"
;
jclass
je
=
0
;
if
(
e
)
{
std
::
string
exception_type
=
"std::exception"
;
if
(
dynamic_cast
<
const
cv
::
Exception
*>
(
e
))
{
exception_type
=
"cv::Exception"
;
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
}
what
=
exception_type
+
": "
+
e
->
what
();
}
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
what
.
c_str
());
LOGE
(
"%s caught %s"
,
method
,
what
.
c_str
());
(
void
)
method
;
// avoid "unused" warning
}
extern
"C"
{
//
//
// MatXXX::MatXXX()
// MatXXX::MatXXX()
...
@@ -35,24 +60,17 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__III
...
@@ -35,24 +60,17 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__III
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1Mat__III
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1Mat__III
(
JNIEnv
*
env
,
jclass
,
jint
rows
,
jint
cols
,
jint
type
)
(
JNIEnv
*
env
,
jclass
,
jint
rows
,
jint
cols
,
jint
type
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1Mat__III()"
;
try
{
try
{
LOGD
(
"Mat::n_1Mat__III()"
);
LOGD
(
method_name
);
return
(
jlong
)
new
Mat
(
rows
,
cols
,
type
);
Mat
*
_retval_
=
new
Mat
(
rows
,
cols
,
type
);
}
catch
(
const
std
::
exception
&
e
)
{
throwJavaException
(
env
,
&
e
,
method_name
);
return
(
jlong
)
_retval_
;
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1Mat__III() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1Mat__III() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1Mat__III()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -67,24 +85,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__DDI
...
@@ -67,24 +85,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__DDI
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1Mat__DDI
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1Mat__DDI
(
JNIEnv
*
env
,
jclass
,
jdouble
size_width
,
jdouble
size_height
,
jint
type
)
(
JNIEnv
*
env
,
jclass
,
jdouble
size_width
,
jdouble
size_height
,
jint
type
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1Mat__DDI()"
;
try
{
try
{
LOGD
(
"Mat::n_1Mat__DDI()"
);
LOGD
(
method_name
);
Size
size
((
int
)
size_width
,
(
int
)
size_height
);
Size
size
((
int
)
size_width
,
(
int
)
size_height
);
Mat
*
_retval_
=
new
Mat
(
size
,
type
);
return
(
jlong
)
new
Mat
(
size
,
type
);
}
catch
(
const
std
::
exception
&
e
)
{
return
(
jlong
)
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1Mat__DDI() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1Mat__DDI() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1Mat__DDI()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -100,24 +112,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__IIIDDDD
...
@@ -100,24 +112,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__IIIDDDD
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1Mat__IIIDDDD
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1Mat__IIIDDDD
(
JNIEnv
*
env
,
jclass
,
jint
rows
,
jint
cols
,
jint
type
,
jdouble
s_val0
,
jdouble
s_val1
,
jdouble
s_val2
,
jdouble
s_val3
)
(
JNIEnv
*
env
,
jclass
,
jint
rows
,
jint
cols
,
jint
type
,
jdouble
s_val0
,
jdouble
s_val1
,
jdouble
s_val2
,
jdouble
s_val3
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1Mat__IIIDDDD()"
;
try
{
try
{
LOGD
(
"Mat::n_1Mat__IIIDDDD()"
);
LOGD
(
method_name
);
Scalar
s
(
s_val0
,
s_val1
,
s_val2
,
s_val3
);
Scalar
s
(
s_val0
,
s_val1
,
s_val2
,
s_val3
);
Mat
*
_retval_
=
new
Mat
(
rows
,
cols
,
type
,
s
);
return
(
jlong
)
new
Mat
(
rows
,
cols
,
type
,
s
);
}
catch
(
const
std
::
exception
&
e
)
{
return
(
jlong
)
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1Mat__IIIDDDD() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1Mat__IIIDDDD() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1Mat__IIIDDDD()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -132,25 +138,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__DDIDDDD
...
@@ -132,25 +138,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__DDIDDDD
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1Mat__DDIDDDD
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1Mat__DDIDDDD
(
JNIEnv
*
env
,
jclass
,
jdouble
size_width
,
jdouble
size_height
,
jint
type
,
jdouble
s_val0
,
jdouble
s_val1
,
jdouble
s_val2
,
jdouble
s_val3
)
(
JNIEnv
*
env
,
jclass
,
jdouble
size_width
,
jdouble
size_height
,
jint
type
,
jdouble
s_val0
,
jdouble
s_val1
,
jdouble
s_val2
,
jdouble
s_val3
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1Mat__DDIDDDD()"
;
try
{
try
{
LOGD
(
"Mat::n_1Mat__DDIDDDD()"
);
LOGD
(
method_name
);
Size
size
((
int
)
size_width
,
(
int
)
size_height
);
Size
size
((
int
)
size_width
,
(
int
)
size_height
);
Scalar
s
(
s_val0
,
s_val1
,
s_val2
,
s_val3
);
Scalar
s
(
s_val0
,
s_val1
,
s_val2
,
s_val3
);
Mat
*
_retval_
=
new
Mat
(
size
,
type
,
s
);
return
(
jlong
)
new
Mat
(
size
,
type
,
s
);
}
catch
(
const
std
::
exception
&
e
)
{
return
(
jlong
)
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1Mat__DDIDDDD() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1Mat__DDIDDDD() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1Mat__DDIDDDD()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -165,25 +165,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__JIIII
...
@@ -165,25 +165,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__JIIII
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1Mat__JIIII
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1Mat__JIIII
(
JNIEnv
*
env
,
jclass
,
jlong
m_nativeObj
,
jint
rowRange_start
,
jint
rowRange_end
,
jint
colRange_start
,
jint
colRange_end
)
(
JNIEnv
*
env
,
jclass
,
jlong
m_nativeObj
,
jint
rowRange_start
,
jint
rowRange_end
,
jint
colRange_start
,
jint
colRange_end
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1Mat__JIIII()"
;
try
{
try
{
LOGD
(
"Mat::n_1Mat__JIIII()"
);
LOGD
(
method_name
);
Range
rowRange
(
rowRange_start
,
rowRange_end
);
Range
rowRange
(
rowRange_start
,
rowRange_end
);
Range
colRange
(
colRange_start
,
colRange_end
);
Range
colRange
(
colRange_start
,
colRange_end
);
Mat
*
_retval_
=
new
Mat
(
(
*
(
Mat
*
)
m_nativeObj
),
rowRange
,
colRange
);
return
(
jlong
)
new
Mat
(
(
*
(
Mat
*
)
m_nativeObj
),
rowRange
,
colRange
);
}
catch
(
const
std
::
exception
&
e
)
{
return
(
jlong
)
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1Mat__JIIII() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1Mat__JIIII() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1Mat__JIIII()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -194,24 +188,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__JII
...
@@ -194,24 +188,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__JII
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1Mat__JII
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1Mat__JII
(
JNIEnv
*
env
,
jclass
,
jlong
m_nativeObj
,
jint
rowRange_start
,
jint
rowRange_end
)
(
JNIEnv
*
env
,
jclass
,
jlong
m_nativeObj
,
jint
rowRange_start
,
jint
rowRange_end
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1Mat__JII()"
;
try
{
try
{
LOGD
(
"Mat::n_1Mat__JII()"
);
LOGD
(
method_name
);
Range
rowRange
(
rowRange_start
,
rowRange_end
);
Range
rowRange
(
rowRange_start
,
rowRange_end
);
Mat
*
_retval_
=
new
Mat
(
(
*
(
Mat
*
)
m_nativeObj
),
rowRange
);
return
(
jlong
)
new
Mat
(
(
*
(
Mat
*
)
m_nativeObj
),
rowRange
);
}
catch
(
const
std
::
exception
&
e
)
{
return
(
jlong
)
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1Mat__JII() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1Mat__JII() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1Mat__JII()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -225,24 +213,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1adjustROI
...
@@ -225,24 +213,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1adjustROI
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1adjustROI
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1adjustROI
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
dtop
,
jint
dbottom
,
jint
dleft
,
jint
dright
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
dtop
,
jint
dbottom
,
jint
dleft
,
jint
dright
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1adjustROI()"
;
try
{
try
{
LOGD
(
"Mat::n_1adjustROI()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
_retval_
=
me
->
adjustROI
(
dtop
,
dbottom
,
dleft
,
dright
);
Mat
_retval_
=
me
->
adjustROI
(
dtop
,
dbottom
,
dleft
,
dright
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1adjustROI() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1adjustROI() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1adjustROI()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -257,23 +240,15 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1assignTo__JJI
...
@@ -257,23 +240,15 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1assignTo__JJI
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1assignTo__JJI
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1assignTo__JJI
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
,
jint
type
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
,
jint
type
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1assignTo__JJI()"
;
try
{
try
{
LOGD
(
"Mat::n_1assignTo__JJI()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
me
->
assignTo
(
(
*
(
Mat
*
)
m_nativeObj
),
type
);
me
->
assignTo
(
(
*
(
Mat
*
)
m_nativeObj
),
type
);
}
catch
(
const
std
::
exception
&
e
)
{
return
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1assignTo__JJI() caught 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
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1assignTo__JJI() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1assignTo__JJI()}"
);
return
;
}
}
}
}
...
@@ -284,23 +259,15 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1assignTo__JJ
...
@@ -284,23 +259,15 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1assignTo__JJ
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1assignTo__JJ
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1assignTo__JJ
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1assignTo__JJ()"
;
try
{
try
{
LOGD
(
"Mat::n_1assignTo__JJ()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
me
->
assignTo
(
(
*
(
Mat
*
)
m_nativeObj
)
);
me
->
assignTo
(
(
*
(
Mat
*
)
m_nativeObj
)
);
}
catch
(
const
std
::
exception
&
e
)
{
return
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1assignTo__JJ() caught 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
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1assignTo__JJ() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1assignTo__JJ()}"
);
return
;
}
}
}
}
...
@@ -316,24 +283,18 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1channels
...
@@ -316,24 +283,18 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1channels
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1channels
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1channels
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1channels()"
;
try
{
try
{
LOGD
(
"Mat::n_1channels()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
int
_retval_
=
me
->
channels
(
);
return
me
->
channels
(
);
}
catch
(
const
std
::
exception
&
e
)
{
return
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1channels() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1channels() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1channels()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -348,24 +309,18 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JIIZ
...
@@ -348,24 +309,18 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JIIZ
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1checkVector__JIIZ
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1checkVector__JIIZ
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
elemChannels
,
jint
depth
,
jboolean
requireContinuous
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
elemChannels
,
jint
depth
,
jboolean
requireContinuous
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1checkVector__JIIZ()"
;
try
{
try
{
LOGD
(
"Mat::n_1checkVector__JIIZ()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
int
_retval_
=
me
->
checkVector
(
elemChannels
,
depth
,
requireContinuous
);
return
me
->
checkVector
(
elemChannels
,
depth
,
requireContinuous
);
}
catch
(
const
std
::
exception
&
e
)
{
return
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1checkVector__JIIZ() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1checkVector__JIIZ() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1checkVector__JIIZ()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -376,24 +331,18 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JII
...
@@ -376,24 +331,18 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JII
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1checkVector__JII
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1checkVector__JII
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
elemChannels
,
jint
depth
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
elemChannels
,
jint
depth
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1checkVector__JII()"
;
try
{
try
{
LOGD
(
"Mat::n_1checkVector__JII()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
int
_retval_
=
me
->
checkVector
(
elemChannels
,
depth
);
return
me
->
checkVector
(
elemChannels
,
depth
);
}
catch
(
const
std
::
exception
&
e
)
{
return
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1checkVector__JII() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1checkVector__JII() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1checkVector__JII()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -404,24 +353,18 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JI
...
@@ -404,24 +353,18 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JI
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1checkVector__JI
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1checkVector__JI
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
elemChannels
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
elemChannels
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1checkVector__JI()"
;
try
{
try
{
LOGD
(
"Mat::n_1checkVector__JI()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
int
_retval_
=
me
->
checkVector
(
elemChannels
);
return
me
->
checkVector
(
elemChannels
);
}
catch
(
const
std
::
exception
&
e
)
{
return
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1checkVector__JI() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1checkVector__JI() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1checkVector__JI()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -437,24 +380,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1clone
...
@@ -437,24 +380,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1clone
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1clone
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1clone
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1clone()"
;
try
{
try
{
LOGD
(
"Mat::n_1clone()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
_retval_
=
me
->
clone
(
);
Mat
_retval_
=
me
->
clone
(
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1clone() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1clone() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1clone()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -469,24 +407,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1col
...
@@ -469,24 +407,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1col
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1col
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1col
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
x
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
x
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1col()"
;
try
{
try
{
LOGD
(
"Mat::n_1col()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
_retval_
=
me
->
col
(
x
);
Mat
_retval_
=
me
->
col
(
x
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1col() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1col() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1col()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -501,24 +434,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1colRange
...
@@ -501,24 +434,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1colRange
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1colRange
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1colRange
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
startcol
,
jint
endcol
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
startcol
,
jint
endcol
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1colRange()"
;
try
{
try
{
LOGD
(
"Mat::n_1colRange()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
_retval_
=
me
->
colRange
(
startcol
,
endcol
);
Mat
_retval_
=
me
->
colRange
(
startcol
,
endcol
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1colRange() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1colRange() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1colRange()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -526,34 +454,29 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1colRange
...
@@ -526,34 +454,29 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1colRange
//
//
// int Mat::dims()
// int Mat::dims()
//
//
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1dims
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1dims
(
JNIEnv
*
env
,
jclass
,
jlong
self
);
(
JNIEnv
*
env
,
jclass
,
jlong
self
);
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1dims
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1dims
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1dims()"
;
try
{
try
{
LOGD
(
"Mat::n_1dims()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
int
_retval_
=
me
->
dims
;
return
me
->
dims
;
return
_retval_
;
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1dims() catched cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1dims() catched unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1dims()}"
);
return
0
;
}
}
return
0
;
}
}
//
//
// int Mat::cols()
// int Mat::cols()
//
//
...
@@ -564,24 +487,18 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1cols
...
@@ -564,24 +487,18 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1cols
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1cols
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1cols
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1cols()"
;
try
{
try
{
LOGD
(
"Mat::n_1cols()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
int
_retval_
=
me
->
cols
;
return
me
->
cols
;
}
catch
(
const
std
::
exception
&
e
)
{
return
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1cols() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1cols() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1cols()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -596,24 +513,16 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJIDD
...
@@ -596,24 +513,16 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJIDD
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1convertTo__JJIDD
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1convertTo__JJIDD
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
,
jint
rtype
,
jdouble
alpha
,
jdouble
beta
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
,
jint
rtype
,
jdouble
alpha
,
jdouble
beta
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1convertTo__JJIDD()"
;
try
{
try
{
LOGD
(
"Mat::n_1convertTo__JJIDD()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
&
m
=
*
((
Mat
*
)
m_nativeObj
);
Mat
&
m
=
*
((
Mat
*
)
m_nativeObj
);
me
->
convertTo
(
m
,
rtype
,
alpha
,
beta
);
me
->
convertTo
(
m
,
rtype
,
alpha
,
beta
);
}
catch
(
const
std
::
exception
&
e
)
{
return
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1convertTo__JJIDD() caught 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
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1convertTo__JJIDD() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1convertTo__JJIDD()}"
);
return
;
}
}
}
}
...
@@ -624,24 +533,16 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJID
...
@@ -624,24 +533,16 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJID
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1convertTo__JJID
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1convertTo__JJID
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
,
jint
rtype
,
jdouble
alpha
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
,
jint
rtype
,
jdouble
alpha
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1convertTo__JJID()"
;
try
{
try
{
LOGD
(
"Mat::n_1convertTo__JJID()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
&
m
=
*
((
Mat
*
)
m_nativeObj
);
Mat
&
m
=
*
((
Mat
*
)
m_nativeObj
);
me
->
convertTo
(
m
,
rtype
,
alpha
);
me
->
convertTo
(
m
,
rtype
,
alpha
);
}
catch
(
const
std
::
exception
&
e
)
{
return
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1convertTo__JJID() caught 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
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1convertTo__JJID() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1convertTo__JJID()}"
);
return
;
}
}
}
}
...
@@ -652,24 +553,16 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJI
...
@@ -652,24 +553,16 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJI
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1convertTo__JJI
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1convertTo__JJI
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
,
jint
rtype
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
,
jint
rtype
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1convertTo__JJI()"
;
try
{
try
{
LOGD
(
"Mat::n_1convertTo__JJI()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
&
m
=
*
((
Mat
*
)
m_nativeObj
);
Mat
&
m
=
*
((
Mat
*
)
m_nativeObj
);
me
->
convertTo
(
m
,
rtype
);
me
->
convertTo
(
m
,
rtype
);
}
catch
(
const
std
::
exception
&
e
)
{
return
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1convertTo__JJI() caught 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
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1convertTo__JJI() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1convertTo__JJI()}"
);
return
;
}
}
}
}
...
@@ -685,24 +578,16 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1copyTo__JJ
...
@@ -685,24 +578,16 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1copyTo__JJ
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1copyTo__JJ
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1copyTo__JJ
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1copyTo__JJ()"
;
try
{
try
{
LOGD
(
"Mat::n_1copyTo__JJ()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
&
m
=
*
((
Mat
*
)
m_nativeObj
);
Mat
&
m
=
*
((
Mat
*
)
m_nativeObj
);
me
->
copyTo
(
m
);
me
->
copyTo
(
m
);
}
catch
(
const
std
::
exception
&
e
)
{
return
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1copyTo__JJ() caught 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
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1copyTo__JJ() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1copyTo__JJ()}"
);
return
;
}
}
}
}
...
@@ -718,25 +603,17 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1copyTo__JJJ
...
@@ -718,25 +603,17 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1copyTo__JJJ
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1copyTo__JJJ
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1copyTo__JJJ
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
,
jlong
mask_nativeObj
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
,
jlong
mask_nativeObj
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1copyTo__JJJ()"
;
try
{
try
{
LOGD
(
"Mat::n_1copyTo__JJJ()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
&
m
=
*
((
Mat
*
)
m_nativeObj
);
Mat
&
m
=
*
((
Mat
*
)
m_nativeObj
);
Mat
&
mask
=
*
((
Mat
*
)
mask_nativeObj
);
Mat
&
mask
=
*
((
Mat
*
)
mask_nativeObj
);
me
->
copyTo
(
m
,
mask
);
me
->
copyTo
(
m
,
mask
);
}
catch
(
const
std
::
exception
&
e
)
{
return
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1copyTo__JJJ() caught 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
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1copyTo__JJJ() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1copyTo__JJJ()}"
);
return
;
}
}
}
}
...
@@ -752,23 +629,15 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1create__JIII
...
@@ -752,23 +629,15 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1create__JIII
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1create__JIII
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1create__JIII
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
rows
,
jint
cols
,
jint
type
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
rows
,
jint
cols
,
jint
type
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1create__JIII()"
;
try
{
try
{
LOGD
(
"Mat::n_1create__JIII()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
me
->
create
(
rows
,
cols
,
type
);
me
->
create
(
rows
,
cols
,
type
);
}
catch
(
const
std
::
exception
&
e
)
{
return
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1create__JIII() caught 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
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1create__JIII() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1create__JIII()}"
);
return
;
}
}
}
}
...
@@ -784,24 +653,16 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1create__JDDI
...
@@ -784,24 +653,16 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1create__JDDI
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1create__JDDI
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1create__JDDI
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jdouble
size_width
,
jdouble
size_height
,
jint
type
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jdouble
size_width
,
jdouble
size_height
,
jint
type
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1create__JDDI()"
;
try
{
try
{
LOGD
(
"Mat::n_1create__JDDI()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Size
size
((
int
)
size_width
,
(
int
)
size_height
);
Size
size
((
int
)
size_width
,
(
int
)
size_height
);
me
->
create
(
size
,
type
);
me
->
create
(
size
,
type
);
}
catch
(
const
std
::
exception
&
e
)
{
return
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1create__JDDI() caught 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
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1create__JDDI() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1create__JDDI()}"
);
return
;
}
}
}
}
...
@@ -817,25 +678,20 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1cross
...
@@ -817,25 +678,20 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1cross
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1cross
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1cross
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1cross()"
;
try
{
try
{
LOGD
(
"Mat::n_1cross()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
&
m
=
*
((
Mat
*
)
m_nativeObj
);
Mat
&
m
=
*
((
Mat
*
)
m_nativeObj
);
Mat
_retval_
=
me
->
cross
(
m
);
Mat
_retval_
=
me
->
cross
(
m
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1cross() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1cross() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1cross()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -867,24 +723,18 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1depth
...
@@ -867,24 +723,18 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1depth
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1depth
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1depth
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1depth()"
;
try
{
try
{
LOGD
(
"Mat::n_1depth()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
int
_retval_
=
me
->
depth
(
);
return
me
->
depth
(
);
}
catch
(
const
std
::
exception
&
e
)
{
return
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1depth() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1depth() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1depth()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -899,24 +749,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1diag__JI
...
@@ -899,24 +749,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1diag__JI
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1diag__JI
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1diag__JI
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
d
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
d
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1diag__JI()"
;
try
{
try
{
LOGD
(
"Mat::n_1diag__JI()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
_retval_
=
me
->
diag
(
d
);
Mat
_retval_
=
me
->
diag
(
d
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1diag__JI() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1diag__JI() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1diag__JI()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -932,24 +777,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1diag__J
...
@@ -932,24 +777,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1diag__J
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1diag__J
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1diag__J
(
JNIEnv
*
env
,
jclass
,
jlong
d_nativeObj
)
(
JNIEnv
*
env
,
jclass
,
jlong
d_nativeObj
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1diag__J()"
;
try
{
try
{
LOGD
(
"Mat::n_1diag__J()"
);
LOGD
(
method_name
);
Mat
_retval_
=
Mat
::
diag
(
(
*
(
Mat
*
)
d_nativeObj
)
);
Mat
_retval_
=
Mat
::
diag
(
(
*
(
Mat
*
)
d_nativeObj
)
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1diag__J() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1diag__J() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1diag__J()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -964,25 +803,19 @@ JNIEXPORT jdouble JNICALL Java_org_opencv_core_Mat_n_1dot
...
@@ -964,25 +803,19 @@ JNIEXPORT jdouble JNICALL Java_org_opencv_core_Mat_n_1dot
JNIEXPORT
jdouble
JNICALL
Java_org_opencv_core_Mat_n_1dot
JNIEXPORT
jdouble
JNICALL
Java_org_opencv_core_Mat_n_1dot
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1dot()"
;
try
{
try
{
LOGD
(
"Mat::n_1dot()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
&
m
=
*
((
Mat
*
)
m_nativeObj
);
Mat
&
m
=
*
((
Mat
*
)
m_nativeObj
);
double
_retval_
=
me
->
dot
(
m
);
return
me
->
dot
(
m
);
}
catch
(
const
std
::
exception
&
e
)
{
return
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1dot() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1dot() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1dot()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -997,24 +830,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1elemSize
...
@@ -997,24 +830,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1elemSize
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1elemSize
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1elemSize
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1elemSize()"
;
try
{
try
{
LOGD
(
"Mat::n_1elemSize()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
size_t
_retval_
=
me
->
elemSize
(
);
return
me
->
elemSize
(
);
}
catch
(
const
std
::
exception
&
e
)
{
return
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1elemSize() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1elemSize() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1elemSize()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1029,24 +856,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1elemSize1
...
@@ -1029,24 +856,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1elemSize1
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1elemSize1
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1elemSize1
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1elemSize1()"
;
try
{
try
{
LOGD
(
"Mat::n_1elemSize1()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
size_t
_retval_
=
me
->
elemSize1
(
);
return
me
->
elemSize1
(
);
}
catch
(
const
std
::
exception
&
e
)
{
return
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1elemSize1() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1elemSize1() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1elemSize1()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1061,24 +882,18 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1empty
...
@@ -1061,24 +882,18 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1empty
JNIEXPORT
jboolean
JNICALL
Java_org_opencv_core_Mat_n_1empty
JNIEXPORT
jboolean
JNICALL
Java_org_opencv_core_Mat_n_1empty
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1empty()"
;
try
{
try
{
LOGD
(
"Mat::n_1empty()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
bool
_retval_
=
me
->
empty
(
);
return
me
->
empty
(
);
}
catch
(
const
std
::
exception
&
e
)
{
return
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1empty() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1empty() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1empty()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1093,24 +908,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1eye__III
...
@@ -1093,24 +908,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1eye__III
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1eye__III
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1eye__III
(
JNIEnv
*
env
,
jclass
,
jint
rows
,
jint
cols
,
jint
type
)
(
JNIEnv
*
env
,
jclass
,
jint
rows
,
jint
cols
,
jint
type
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1eye__III()"
;
try
{
try
{
LOGD
(
"Mat::n_1eye__III()"
);
LOGD
(
method_name
);
Mat
_retval_
=
Mat
::
eye
(
rows
,
cols
,
type
);
Mat
_retval_
=
Mat
::
eye
(
rows
,
cols
,
type
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1eye__III() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1eye__III() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1eye__III()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1125,24 +934,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1eye__DDI
...
@@ -1125,24 +934,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1eye__DDI
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1eye__DDI
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1eye__DDI
(
JNIEnv
*
env
,
jclass
,
jdouble
size_width
,
jdouble
size_height
,
jint
type
)
(
JNIEnv
*
env
,
jclass
,
jdouble
size_width
,
jdouble
size_height
,
jint
type
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1eye__DDI()"
;
try
{
try
{
LOGD
(
"Mat::n_1eye__DDI()"
);
LOGD
(
method_name
);
Size
size
((
int
)
size_width
,
(
int
)
size_height
);
Size
size
((
int
)
size_width
,
(
int
)
size_height
);
Mat
_retval_
=
Mat
::
eye
(
size
,
type
);
Mat
_retval_
=
Mat
::
eye
(
size
,
type
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1eye__DDI() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1eye__DDI() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1eye__DDI()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1157,24 +961,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1inv__JI
...
@@ -1157,24 +961,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1inv__JI
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1inv__JI
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1inv__JI
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
method
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
method
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1inv__JI()"
;
try
{
try
{
LOGD
(
"Mat::n_1inv__JI()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
_retval_
=
me
->
inv
(
method
);
Mat
_retval_
=
me
->
inv
(
method
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1inv__JI() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1inv__JI() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1inv__JI()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1184,24 +983,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1inv__J
...
@@ -1184,24 +983,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1inv__J
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1inv__J
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1inv__J
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1inv__J()"
;
try
{
try
{
LOGD
(
"Mat::n_1inv__J()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
_retval_
=
me
->
inv
(
);
Mat
_retval_
=
me
->
inv
(
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1inv__J() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1inv__J() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1inv__J()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1216,24 +1010,18 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1isContinuous
...
@@ -1216,24 +1010,18 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1isContinuous
JNIEXPORT
jboolean
JNICALL
Java_org_opencv_core_Mat_n_1isContinuous
JNIEXPORT
jboolean
JNICALL
Java_org_opencv_core_Mat_n_1isContinuous
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1isContinuous()"
;
try
{
try
{
LOGD
(
"Mat::n_1isContinuous()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
bool
_retval_
=
me
->
isContinuous
(
);
return
me
->
isContinuous
(
);
}
catch
(
const
std
::
exception
&
e
)
{
return
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1isContinuous() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1isContinuous() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1isContinuous()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1248,24 +1036,18 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1isSubmatrix
...
@@ -1248,24 +1036,18 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1isSubmatrix
JNIEXPORT
jboolean
JNICALL
Java_org_opencv_core_Mat_n_1isSubmatrix
JNIEXPORT
jboolean
JNICALL
Java_org_opencv_core_Mat_n_1isSubmatrix
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1isSubmatrix()"
;
try
{
try
{
LOGD
(
"Mat::n_1isSubmatrix()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
bool
_retval_
=
me
->
isSubmatrix
(
);
return
me
->
isSubmatrix
(
);
}
catch
(
const
std
::
exception
&
e
)
{
return
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1isSubmatrix() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1isSubmatrix() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1isSubmatrix()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1280,25 +1062,18 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_locateROI_10
...
@@ -1280,25 +1062,18 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_locateROI_10
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_locateROI_10
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_locateROI_10
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jdoubleArray
wholeSize_out
,
jdoubleArray
ofs_out
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jdoubleArray
wholeSize_out
,
jdoubleArray
ofs_out
)
{
{
static
const
char
method_name
[]
=
"core::locateROI_10()"
;
try
{
try
{
LOGD
(
"core::locateROI_10()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Size
wholeSize
;
Size
wholeSize
;
Point
ofs
;
Point
ofs
;
me
->
locateROI
(
wholeSize
,
ofs
);
me
->
locateROI
(
wholeSize
,
ofs
);
jdouble
tmp_wholeSize
[
2
]
=
{
wholeSize
.
width
,
wholeSize
.
height
};
env
->
SetDoubleArrayRegion
(
wholeSize_out
,
0
,
2
,
tmp_wholeSize
);
jdouble
tmp_ofs
[
2
]
=
{
ofs
.
x
,
ofs
.
y
};
env
->
SetDoubleArrayRegion
(
ofs_out
,
0
,
2
,
tmp_ofs
);
jdouble
tmp_wholeSize
[
2
]
=
{
wholeSize
.
width
,
wholeSize
.
height
};
env
->
SetDoubleArrayRegion
(
wholeSize_out
,
0
,
2
,
tmp_wholeSize
);
jdouble
tmp_ofs
[
2
]
=
{
ofs
.
x
,
ofs
.
y
};
env
->
SetDoubleArrayRegion
(
ofs_out
,
0
,
2
,
tmp_ofs
);
return
;
}
catch
(
const
std
::
exception
&
e
)
{
}
catch
(
cv
::
Exception
e
)
{
throwJavaException
(
env
,
&
e
,
method_name
);
LOGD
(
"Mat::locateROI_10() caught 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
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::locateROI_10() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::locateROI_10()}"
);
return
;
}
}
}
}
...
@@ -1314,25 +1089,20 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1mul__JJD
...
@@ -1314,25 +1089,20 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1mul__JJD
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1mul__JJD
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1mul__JJD
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
,
jdouble
scale
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
,
jdouble
scale
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1mul__JJD()"
;
try
{
try
{
LOGD
(
"Mat::n_1mul__JJD()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
&
m
=
*
((
Mat
*
)
m_nativeObj
);
Mat
&
m
=
*
((
Mat
*
)
m_nativeObj
);
Mat
_retval_
=
me
->
mul
(
m
,
scale
);
Mat
_retval_
=
me
->
mul
(
m
,
scale
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1mul__JJD() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1mul__JJD() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1mul__JJD()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1343,25 +1113,20 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1mul__JJ
...
@@ -1343,25 +1113,20 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1mul__JJ
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1mul__JJ
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1mul__JJ
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1mul__JJ()"
;
try
{
try
{
LOGD
(
"Mat::n_1mul__JJ()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
&
m
=
*
((
Mat
*
)
m_nativeObj
);
Mat
&
m
=
*
((
Mat
*
)
m_nativeObj
);
Mat
_retval_
=
me
->
mul
(
m
);
Mat
_retval_
=
me
->
mul
(
m
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1mul__JJ() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1mul__JJ() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1mul__JJ()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1376,24 +1141,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1ones__III
...
@@ -1376,24 +1141,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1ones__III
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1ones__III
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1ones__III
(
JNIEnv
*
env
,
jclass
,
jint
rows
,
jint
cols
,
jint
type
)
(
JNIEnv
*
env
,
jclass
,
jint
rows
,
jint
cols
,
jint
type
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1ones__III()"
;
try
{
try
{
LOGD
(
"Mat::n_1ones__III()"
);
LOGD
(
method_name
);
Mat
_retval_
=
Mat
::
ones
(
rows
,
cols
,
type
);
Mat
_retval_
=
Mat
::
ones
(
rows
,
cols
,
type
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1ones__III() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1ones__III() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1ones__III()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1408,24 +1167,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1ones__DDI
...
@@ -1408,24 +1167,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1ones__DDI
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1ones__DDI
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1ones__DDI
(
JNIEnv
*
env
,
jclass
,
jdouble
size_width
,
jdouble
size_height
,
jint
type
)
(
JNIEnv
*
env
,
jclass
,
jdouble
size_width
,
jdouble
size_height
,
jint
type
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1ones__DDI()"
;
try
{
try
{
LOGD
(
"Mat::n_1ones__DDI()"
);
LOGD
(
method_name
);
Size
size
((
int
)
size_width
,
(
int
)
size_height
);
Size
size
((
int
)
size_width
,
(
int
)
size_height
);
Mat
_retval_
=
Mat
::
ones
(
size
,
type
);
Mat
_retval_
=
Mat
::
ones
(
size
,
type
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1ones__DDI() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1ones__DDI() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1ones__DDI()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1440,23 +1194,15 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1push_1back
...
@@ -1440,23 +1194,15 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1push_1back
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1push_1back
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1push_1back
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
m_nativeObj
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1push_1back()"
;
try
{
try
{
LOGD
(
"Mat::n_1push_1back()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
me
->
push_back
(
(
*
(
Mat
*
)
m_nativeObj
)
);
me
->
push_back
(
(
*
(
Mat
*
)
m_nativeObj
)
);
}
catch
(
const
std
::
exception
&
e
)
{
return
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1push_1back() caught 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
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1push_1back() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1push_1back()}"
);
return
;
}
}
}
}
...
@@ -1472,23 +1218,15 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1release
...
@@ -1472,23 +1218,15 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1release
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1release
JNIEXPORT
void
JNICALL
Java_org_opencv_core_Mat_n_1release
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1release()"
;
try
{
try
{
LOGD
(
"Mat::n_1release()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
me
->
release
(
);
me
->
release
(
);
}
catch
(
const
std
::
exception
&
e
)
{
return
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1release() caught 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
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1release() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1release()}"
);
return
;
}
}
}
}
...
@@ -1504,24 +1242,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1reshape__JII
...
@@ -1504,24 +1242,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1reshape__JII
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1reshape__JII
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1reshape__JII
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
cn
,
jint
rows
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
cn
,
jint
rows
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1reshape__JII()"
;
try
{
try
{
LOGD
(
"Mat::n_1reshape__JII()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
_retval_
=
me
->
reshape
(
cn
,
rows
);
Mat
_retval_
=
me
->
reshape
(
cn
,
rows
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1reshape__JII() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1reshape__JII() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1reshape__JII()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1532,24 +1265,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1reshape__JI
...
@@ -1532,24 +1265,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1reshape__JI
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1reshape__JI
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1reshape__JI
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
cn
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
cn
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1reshape__JI()"
;
try
{
try
{
LOGD
(
"Mat::n_1reshape__JI()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
_retval_
=
me
->
reshape
(
cn
);
Mat
_retval_
=
me
->
reshape
(
cn
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1reshape__JI() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1reshape__JI() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1reshape__JI()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1564,24 +1292,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1row
...
@@ -1564,24 +1292,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1row
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1row
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1row
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
y
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
y
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1row()"
;
try
{
try
{
LOGD
(
"Mat::n_1row()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
_retval_
=
me
->
row
(
y
);
Mat
_retval_
=
me
->
row
(
y
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1row() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1row() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1row()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1596,24 +1319,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1rowRange
...
@@ -1596,24 +1319,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1rowRange
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1rowRange
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1rowRange
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
startrow
,
jint
endrow
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
startrow
,
jint
endrow
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1rowRange()"
;
try
{
try
{
LOGD
(
"Mat::n_1rowRange()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
_retval_
=
me
->
rowRange
(
startrow
,
endrow
);
Mat
_retval_
=
me
->
rowRange
(
startrow
,
endrow
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1rowRange() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1rowRange() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1rowRange()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1628,24 +1346,18 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1rows
...
@@ -1628,24 +1346,18 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1rows
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1rows
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1rows
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1rows()"
;
try
{
try
{
LOGD
(
"Mat::n_1rows()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
int
_retval_
=
me
->
rows
;
return
me
->
rows
;
}
catch
(
const
std
::
exception
&
e
)
{
return
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1rows() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1rows() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1rows()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1660,25 +1372,20 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JDDDD
...
@@ -1660,25 +1372,20 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JDDDD
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1setTo__JDDDD
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1setTo__JDDDD
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jdouble
s_val0
,
jdouble
s_val1
,
jdouble
s_val2
,
jdouble
s_val3
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jdouble
s_val0
,
jdouble
s_val1
,
jdouble
s_val2
,
jdouble
s_val3
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1setTo__JDDDD()"
;
try
{
try
{
LOGD
(
"Mat::n_1setTo__JDDDD()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Scalar
s
(
s_val0
,
s_val1
,
s_val2
,
s_val3
);
Scalar
s
(
s_val0
,
s_val1
,
s_val2
,
s_val3
);
Mat
_retval_
=
me
->
operator
=
(
s
);
Mat
_retval_
=
me
->
operator
=
(
s
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1setTo__JDDDD() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1setTo__JDDDD() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1setTo__JDDDD()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1693,26 +1400,21 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JDDDDJ
...
@@ -1693,26 +1400,21 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JDDDDJ
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1setTo__JDDDDJ
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1setTo__JDDDDJ
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jdouble
s_val0
,
jdouble
s_val1
,
jdouble
s_val2
,
jdouble
s_val3
,
jlong
mask_nativeObj
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jdouble
s_val0
,
jdouble
s_val1
,
jdouble
s_val2
,
jdouble
s_val3
,
jlong
mask_nativeObj
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1setTo__JDDDDJ()"
;
try
{
try
{
LOGD
(
"Mat::n_1setTo__JDDDDJ()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Scalar
s
(
s_val0
,
s_val1
,
s_val2
,
s_val3
);
Scalar
s
(
s_val0
,
s_val1
,
s_val2
,
s_val3
);
Mat
&
mask
=
*
((
Mat
*
)
mask_nativeObj
);
Mat
&
mask
=
*
((
Mat
*
)
mask_nativeObj
);
Mat
_retval_
=
me
->
setTo
(
s
,
mask
);
Mat
_retval_
=
me
->
setTo
(
s
,
mask
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1setTo__JDDDDJ() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1setTo__JDDDDJ() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1setTo__JDDDDJ()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1727,26 +1429,21 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JJJ
...
@@ -1727,26 +1429,21 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JJJ
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1setTo__JJJ
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1setTo__JJJ
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
value_nativeObj
,
jlong
mask_nativeObj
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
value_nativeObj
,
jlong
mask_nativeObj
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1setTo__JJJ()"
;
try
{
try
{
LOGD
(
"Mat::n_1setTo__JJJ()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
&
value
=
*
((
Mat
*
)
value_nativeObj
);
Mat
&
value
=
*
((
Mat
*
)
value_nativeObj
);
Mat
&
mask
=
*
((
Mat
*
)
mask_nativeObj
);
Mat
&
mask
=
*
((
Mat
*
)
mask_nativeObj
);
Mat
_retval_
=
me
->
setTo
(
value
,
mask
);
Mat
_retval_
=
me
->
setTo
(
value
,
mask
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1setTo__JJJ() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1setTo__JJJ() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1setTo__JJJ()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1757,25 +1454,20 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JJ
...
@@ -1757,25 +1454,20 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JJ
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1setTo__JJ
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1setTo__JJ
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
value_nativeObj
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jlong
value_nativeObj
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1setTo__JJ()"
;
try
{
try
{
LOGD
(
"Mat::n_1setTo__JJ()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
&
value
=
*
((
Mat
*
)
value_nativeObj
);
Mat
&
value
=
*
((
Mat
*
)
value_nativeObj
);
Mat
_retval_
=
me
->
setTo
(
value
);
Mat
_retval_
=
me
->
setTo
(
value
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1setTo__JJ() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1setTo__JJ() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1setTo__JJ()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1790,24 +1482,22 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Mat_n_1size
...
@@ -1790,24 +1482,22 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Mat_n_1size
JNIEXPORT
jdoubleArray
JNICALL
Java_org_opencv_core_Mat_n_1size
JNIEXPORT
jdoubleArray
JNICALL
Java_org_opencv_core_Mat_n_1size
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1size()"
;
try
{
try
{
LOGD
(
"Mat::n_1size()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Size
_retval_
=
me
->
size
(
);
Size
_retval_
=
me
->
size
(
);
jdoubleArray
_da_retval_
=
env
->
NewDoubleArray
(
2
);
jdouble
_tmp_retval_
[
2
]
=
{
_retval_
.
width
,
_retval_
.
height
};
env
->
SetDoubleArrayRegion
(
_da_retval_
,
0
,
2
,
_tmp_retval_
);
jdoubleArray
_da_retval_
=
env
->
NewDoubleArray
(
2
);
jdouble
_tmp_retval_
[
2
]
=
{
_retval_
.
width
,
_retval_
.
height
};
env
->
SetDoubleArrayRegion
(
_da_retval_
,
0
,
2
,
_tmp_retval_
);
return
_da_retval_
;
return
_da_retval_
;
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1size() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1size() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1size()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1822,24 +1512,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1step1__JI
...
@@ -1822,24 +1512,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1step1__JI
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1step1__JI
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1step1__JI
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
i
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
i
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1step1__JI()"
;
try
{
try
{
LOGD
(
"Mat::n_1step1__JI()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
size_t
_retval_
=
me
->
step1
(
i
);
return
me
->
step1
(
i
);
}
catch
(
const
std
::
exception
&
e
)
{
return
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1step1__JI() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1step1__JI() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1step1__JI()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1850,24 +1534,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1step1__J
...
@@ -1850,24 +1534,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1step1__J
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1step1__J
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1step1__J
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1step1__J()"
;
try
{
try
{
LOGD
(
"Mat::n_1step1__J()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
size_t
_retval_
=
me
->
step1
(
);
return
me
->
step1
(
);
}
catch
(
const
std
::
exception
&
e
)
{
return
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1step1__J() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1step1__J() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1step1__J()}"
);
return
0
;
}
}
return
0
;
}
}
//
//
...
@@ -1880,26 +1558,21 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1submat_1rr
...
@@ -1880,26 +1558,21 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1submat_1rr
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1submat_1rr
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1submat_1rr
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
rowRange_start
,
jint
rowRange_end
,
jint
colRange_start
,
jint
colRange_end
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
rowRange_start
,
jint
rowRange_end
,
jint
colRange_start
,
jint
colRange_end
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1submat_1rr()"
;
try
{
try
{
LOGD
(
"Mat::n_1submat_1rr()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Range
rowRange
(
rowRange_start
,
rowRange_end
);
Range
rowRange
(
rowRange_start
,
rowRange_end
);
Range
colRange
(
colRange_start
,
colRange_end
);
Range
colRange
(
colRange_start
,
colRange_end
);
Mat
_retval_
=
me
->
operator
()(
rowRange
,
colRange
);
Mat
_retval_
=
me
->
operator
()(
rowRange
,
colRange
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1submat_1rr() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1submat_1rr() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1submat_1rr()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1914,25 +1587,20 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1submat
...
@@ -1914,25 +1587,20 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1submat
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1submat
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1submat
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
roi_x
,
jint
roi_y
,
jint
roi_width
,
jint
roi_height
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
roi_x
,
jint
roi_y
,
jint
roi_width
,
jint
roi_height
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1submat()"
;
try
{
try
{
LOGD
(
"Mat::n_1submat()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Rect
roi
(
roi_x
,
roi_y
,
roi_width
,
roi_height
);
Rect
roi
(
roi_x
,
roi_y
,
roi_width
,
roi_height
);
Mat
_retval_
=
me
->
operator
()(
roi
);
Mat
_retval_
=
me
->
operator
()(
roi
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1submat() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1submat() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1submat()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1947,24 +1615,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1t
...
@@ -1947,24 +1615,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1t
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1t
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1t
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1t()"
;
try
{
try
{
LOGD
(
"Mat::n_1t()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
_retval_
=
me
->
t
(
);
Mat
_retval_
=
me
->
t
(
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1t() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1t() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1t()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -1979,24 +1642,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1total
...
@@ -1979,24 +1642,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1total
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1total
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1total
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1total()"
;
try
{
try
{
LOGD
(
"Mat::n_1total()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
size_t
_retval_
=
me
->
total
(
);
return
me
->
total
(
);
}
catch
(
const
std
::
exception
&
e
)
{
return
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1total() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1total() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1total()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -2011,24 +1668,18 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1type
...
@@ -2011,24 +1668,18 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1type
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1type
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_n_1type
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1type()"
;
try
{
try
{
LOGD
(
"Mat::n_1type()"
);
LOGD
(
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
int
_retval_
=
me
->
type
(
);
return
me
->
type
(
);
}
catch
(
const
std
::
exception
&
e
)
{
return
_retval_
;
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(
cv
::
Exception
e
)
{
LOGD
(
"Mat::n_1type() caught 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
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1type() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1type()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -2043,24 +1694,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1zeros__III
...
@@ -2043,24 +1694,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1zeros__III
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1zeros__III
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1zeros__III
(
JNIEnv
*
env
,
jclass
,
jint
rows
,
jint
cols
,
jint
type
)
(
JNIEnv
*
env
,
jclass
,
jint
rows
,
jint
cols
,
jint
type
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1zeros__III()"
;
try
{
try
{
LOGD
(
"Mat::n_1zeros__III()"
);
LOGD
(
method_name
);
Mat
_retval_
=
Mat
::
zeros
(
rows
,
cols
,
type
);
Mat
_retval_
=
Mat
::
zeros
(
rows
,
cols
,
type
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1zeros__III() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1zeros__III() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1zeros__III()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -2075,24 +1720,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1zeros__DDI
...
@@ -2075,24 +1720,19 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1zeros__DDI
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1zeros__DDI
JNIEXPORT
jlong
JNICALL
Java_org_opencv_core_Mat_n_1zeros__DDI
(
JNIEnv
*
env
,
jclass
,
jdouble
size_width
,
jdouble
size_height
,
jint
type
)
(
JNIEnv
*
env
,
jclass
,
jdouble
size_width
,
jdouble
size_height
,
jint
type
)
{
{
static
const
char
method_name
[]
=
"Mat::n_1zeros__DDI()"
;
try
{
try
{
LOGD
(
"Mat::n_1zeros__DDI()"
);
LOGD
(
method_name
);
Size
size
((
int
)
size_width
,
(
int
)
size_height
);
Size
size
((
int
)
size_width
,
(
int
)
size_height
);
Mat
_retval_
=
Mat
::
zeros
(
size
,
type
);
Mat
_retval_
=
Mat
::
zeros
(
size
,
type
);
return
(
jlong
)
new
Mat
(
_retval_
);
return
(
jlong
)
new
Mat
(
_retval_
);
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::n_1zeros__DDI() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::n_1zeros__DDI() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::n_1zeros__DDI()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -2120,8 +1760,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutD
...
@@ -2120,8 +1760,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutD
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nPutD
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nPutD
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jdoubleArray
vals
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jdoubleArray
vals
)
{
{
static
const
char
method_name
[]
=
"Mat::nPutD()"
;
try
{
try
{
LOGD
(
"Mat::nPutD()"
);
LOGD
(
method_name
);
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
if
(
!
me
||
!
me
->
data
)
return
0
;
// no native object behind
if
(
!
me
||
!
me
->
data
)
return
0
;
// no native object behind
if
(
me
->
rows
<=
row
||
me
->
cols
<=
col
)
return
0
;
// indexes out of range
if
(
me
->
rows
<=
row
||
me
->
cols
<=
col
)
return
0
;
// indexes out of range
...
@@ -2161,18 +1802,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutD
...
@@ -2161,18 +1802,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutD
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
return
res
;
return
res
;
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::nPutD() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::nPutD() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::nPutD()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -2217,8 +1853,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutB
...
@@ -2217,8 +1853,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutB
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nPutB
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nPutB
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jbyteArray
vals
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jbyteArray
vals
)
{
{
static
const
char
method_name
[]
=
"Mat::nPutB()"
;
try
{
try
{
LOGD
(
"Mat::nPutB()"
);
LOGD
(
method_name
);
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
if
(
!
self
)
return
0
;
// no native object behind
if
(
!
self
)
return
0
;
// no native object behind
if
(
me
->
depth
()
!=
CV_8U
&&
me
->
depth
()
!=
CV_8S
)
return
0
;
// incompatible type
if
(
me
->
depth
()
!=
CV_8U
&&
me
->
depth
()
!=
CV_8S
)
return
0
;
// incompatible type
...
@@ -2228,18 +1865,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutB
...
@@ -2228,18 +1865,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutB
int
res
=
mat_put
<
char
>
(
me
,
row
,
col
,
count
,
values
);
int
res
=
mat_put
<
char
>
(
me
,
row
,
col
,
count
,
values
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
return
res
;
return
res
;
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::nPutB() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::nPutB() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::nPutB()}"
);
return
0
;
}
}
return
0
;
}
}
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nPutS
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nPutS
...
@@ -2248,8 +1880,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutS
...
@@ -2248,8 +1880,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutS
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nPutS
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nPutS
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jshortArray
vals
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jshortArray
vals
)
{
{
static
const
char
method_name
[]
=
"Mat::nPutS()"
;
try
{
try
{
LOGD
(
"Mat::nPutS()"
);
LOGD
(
method_name
);
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
if
(
!
self
)
return
0
;
// no native object behind
if
(
!
self
)
return
0
;
// no native object behind
if
(
me
->
depth
()
!=
CV_16U
&&
me
->
depth
()
!=
CV_16S
)
return
0
;
// incompatible type
if
(
me
->
depth
()
!=
CV_16U
&&
me
->
depth
()
!=
CV_16S
)
return
0
;
// incompatible type
...
@@ -2259,18 +1892,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutS
...
@@ -2259,18 +1892,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutS
int
res
=
mat_put
<
short
>
(
me
,
row
,
col
,
count
,
values
);
int
res
=
mat_put
<
short
>
(
me
,
row
,
col
,
count
,
values
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
return
res
;
return
res
;
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::nPutS() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::nPutS() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::nPutS()}"
);
return
0
;
}
}
return
0
;
}
}
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nPutI
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nPutI
...
@@ -2279,8 +1907,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutI
...
@@ -2279,8 +1907,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutI
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nPutI
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nPutI
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jintArray
vals
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jintArray
vals
)
{
{
static
const
char
method_name
[]
=
"Mat::nPutI()"
;
try
{
try
{
LOGD
(
"Mat::nPutI()"
);
LOGD
(
method_name
);
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
if
(
!
self
)
return
0
;
// no native object behind
if
(
!
self
)
return
0
;
// no native object behind
if
(
me
->
depth
()
!=
CV_32S
)
return
0
;
// incompatible type
if
(
me
->
depth
()
!=
CV_32S
)
return
0
;
// incompatible type
...
@@ -2290,18 +1919,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutI
...
@@ -2290,18 +1919,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutI
int
res
=
mat_put
<
int
>
(
me
,
row
,
col
,
count
,
values
);
int
res
=
mat_put
<
int
>
(
me
,
row
,
col
,
count
,
values
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
return
res
;
return
res
;
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::nPutI() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::nPutI() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::nPutI()}"
);
return
0
;
}
}
return
0
;
}
}
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nPutF
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nPutF
...
@@ -2310,8 +1934,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutF
...
@@ -2310,8 +1934,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutF
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nPutF
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nPutF
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jfloatArray
vals
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jfloatArray
vals
)
{
{
static
const
char
method_name
[]
=
"Mat::nPutF()"
;
try
{
try
{
LOGD
(
"Mat::nPutF()"
);
LOGD
(
method_name
);
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
if
(
!
self
)
return
0
;
// no native object behind
if
(
!
self
)
return
0
;
// no native object behind
if
(
me
->
depth
()
!=
CV_32F
)
return
0
;
// incompatible type
if
(
me
->
depth
()
!=
CV_32F
)
return
0
;
// incompatible type
...
@@ -2321,18 +1946,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutF
...
@@ -2321,18 +1946,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutF
int
res
=
mat_put
<
float
>
(
me
,
row
,
col
,
count
,
values
);
int
res
=
mat_put
<
float
>
(
me
,
row
,
col
,
count
,
values
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
return
res
;
return
res
;
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::nPutF() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::nPutF() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::nPutF()}"
);
return
0
;
}
}
return
0
;
}
}
...
@@ -2376,8 +1996,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetB
...
@@ -2376,8 +1996,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetB
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nGetB
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nGetB
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jbyteArray
vals
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jbyteArray
vals
)
{
{
static
const
char
method_name
[]
=
"Mat::nGetB()"
;
try
{
try
{
LOGD
(
"Mat::nGetB()"
);
LOGD
(
method_name
);
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
if
(
!
self
)
return
0
;
// no native object behind
if
(
!
self
)
return
0
;
// no native object behind
if
(
me
->
depth
()
!=
CV_8U
&&
me
->
depth
()
!=
CV_8S
)
return
0
;
// incompatible type
if
(
me
->
depth
()
!=
CV_8U
&&
me
->
depth
()
!=
CV_8S
)
return
0
;
// incompatible type
...
@@ -2387,18 +2008,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetB
...
@@ -2387,18 +2008,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetB
int
res
=
mat_get
<
char
>
(
me
,
row
,
col
,
count
,
values
);
int
res
=
mat_get
<
char
>
(
me
,
row
,
col
,
count
,
values
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
return
res
;
return
res
;
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::nGetB() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::nGetB() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::nGetB()}"
);
return
0
;
}
}
return
0
;
}
}
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nGetS
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nGetS
...
@@ -2407,8 +2023,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetS
...
@@ -2407,8 +2023,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetS
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nGetS
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nGetS
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jshortArray
vals
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jshortArray
vals
)
{
{
static
const
char
method_name
[]
=
"Mat::nGetS()"
;
try
{
try
{
LOGD
(
"Mat::nGetS()"
);
LOGD
(
method_name
);
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
if
(
!
self
)
return
0
;
// no native object behind
if
(
!
self
)
return
0
;
// no native object behind
if
(
me
->
depth
()
!=
CV_16U
&&
me
->
depth
()
!=
CV_16S
)
return
0
;
// incompatible type
if
(
me
->
depth
()
!=
CV_16U
&&
me
->
depth
()
!=
CV_16S
)
return
0
;
// incompatible type
...
@@ -2418,18 +2035,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetS
...
@@ -2418,18 +2035,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetS
int
res
=
mat_get
<
short
>
(
me
,
row
,
col
,
count
,
values
);
int
res
=
mat_get
<
short
>
(
me
,
row
,
col
,
count
,
values
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
return
res
;
return
res
;
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::nGetS() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::nGetS() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::nGetS()}"
);
return
0
;
}
}
return
0
;
}
}
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nGetI
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nGetI
...
@@ -2438,8 +2050,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetI
...
@@ -2438,8 +2050,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetI
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nGetI
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nGetI
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jintArray
vals
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jintArray
vals
)
{
{
static
const
char
method_name
[]
=
"Mat::nGetI()"
;
try
{
try
{
LOGD
(
"Mat::nGetI()"
);
LOGD
(
method_name
);
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
if
(
!
self
)
return
0
;
// no native object behind
if
(
!
self
)
return
0
;
// no native object behind
if
(
me
->
depth
()
!=
CV_32S
)
return
0
;
// incompatible type
if
(
me
->
depth
()
!=
CV_32S
)
return
0
;
// incompatible type
...
@@ -2449,18 +2062,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetI
...
@@ -2449,18 +2062,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetI
int
res
=
mat_get
<
int
>
(
me
,
row
,
col
,
count
,
values
);
int
res
=
mat_get
<
int
>
(
me
,
row
,
col
,
count
,
values
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
return
res
;
return
res
;
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::nGetI() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::nGetI() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::nGetI()}"
);
return
0
;
}
}
return
0
;
}
}
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nGetF
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nGetF
...
@@ -2469,8 +2077,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetF
...
@@ -2469,8 +2077,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetF
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nGetF
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nGetF
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jfloatArray
vals
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jfloatArray
vals
)
{
{
static
const
char
method_name
[]
=
"Mat::nGetF()"
;
try
{
try
{
LOGD
(
"Mat::nGetF()"
);
LOGD
(
method_name
);
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
if
(
!
self
)
return
0
;
// no native object behind
if
(
!
self
)
return
0
;
// no native object behind
if
(
me
->
depth
()
!=
CV_32F
)
return
0
;
// incompatible type
if
(
me
->
depth
()
!=
CV_32F
)
return
0
;
// incompatible type
...
@@ -2480,18 +2089,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetF
...
@@ -2480,18 +2089,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetF
int
res
=
mat_get
<
float
>
(
me
,
row
,
col
,
count
,
values
);
int
res
=
mat_get
<
float
>
(
me
,
row
,
col
,
count
,
values
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
return
res
;
return
res
;
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::nGetF() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::nGetF() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::nGetF()}"
);
return
0
;
}
}
return
0
;
}
}
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nGetD
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nGetD
...
@@ -2500,8 +2104,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetD
...
@@ -2500,8 +2104,9 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetD
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nGetD
JNIEXPORT
jint
JNICALL
Java_org_opencv_core_Mat_nGetD
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jdoubleArray
vals
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
,
jint
count
,
jdoubleArray
vals
)
{
{
static
const
char
method_name
[]
=
"Mat::nGetD()"
;
try
{
try
{
LOGD
(
"Mat::nGetD()"
);
LOGD
(
method_name
);
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
if
(
!
self
)
return
0
;
// no native object behind
if
(
!
self
)
return
0
;
// no native object behind
if
(
me
->
depth
()
!=
CV_64F
)
return
0
;
// incompatible type
if
(
me
->
depth
()
!=
CV_64F
)
return
0
;
// incompatible type
...
@@ -2511,18 +2116,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetD
...
@@ -2511,18 +2116,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetD
int
res
=
mat_get
<
double
>
(
me
,
row
,
col
,
count
,
values
);
int
res
=
mat_get
<
double
>
(
me
,
row
,
col
,
count
,
values
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
env
->
ReleasePrimitiveArrayCritical
(
vals
,
values
,
0
);
return
res
;
return
res
;
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::nGetD() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::nGetD() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::nGetD()}"
);
return
0
;
}
}
return
0
;
}
}
JNIEXPORT
jdoubleArray
JNICALL
Java_org_opencv_core_Mat_nGet
JNIEXPORT
jdoubleArray
JNICALL
Java_org_opencv_core_Mat_nGet
...
@@ -2531,8 +2131,9 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Mat_nGet
...
@@ -2531,8 +2131,9 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Mat_nGet
JNIEXPORT
jdoubleArray
JNICALL
Java_org_opencv_core_Mat_nGet
JNIEXPORT
jdoubleArray
JNICALL
Java_org_opencv_core_Mat_nGet
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
,
jint
row
,
jint
col
)
{
{
static
const
char
method_name
[]
=
"Mat::nGet()"
;
try
{
try
{
LOGD
(
"Mat::nGet()"
);
LOGD
(
method_name
);
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
if
(
!
self
)
return
0
;
// no native object behind
if
(
!
self
)
return
0
;
// no native object behind
if
(
me
->
rows
<=
row
||
me
->
cols
<=
col
)
return
0
;
// indexes out of range
if
(
me
->
rows
<=
row
||
me
->
cols
<=
col
)
return
0
;
// indexes out of range
...
@@ -2553,18 +2154,13 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Mat_nGet
...
@@ -2553,18 +2154,13 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Mat_nGet
env
->
SetDoubleArrayRegion
(
res
,
0
,
me
->
channels
(),
buff
);
env
->
SetDoubleArrayRegion
(
res
,
0
,
me
->
channels
(),
buff
);
}
}
return
res
;
return
res
;
}
catch
(
cv
::
Exception
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
LOGD
(
"Mat::nGet() caught cv::Exception: %s"
,
e
.
what
());
throwJavaException
(
env
,
&
e
,
method_name
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
e
.
what
());
return
0
;
}
catch
(...)
{
}
catch
(...)
{
LOGD
(
"Mat::nGet() caught unknown exception (...)"
);
throwJavaException
(
env
,
0
,
method_name
);
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::nGet()}"
);
return
0
;
}
}
return
0
;
}
}
JNIEXPORT
jstring
JNICALL
Java_org_opencv_core_Mat_nDump
JNIEXPORT
jstring
JNICALL
Java_org_opencv_core_Mat_nDump
...
@@ -2573,25 +2169,21 @@ JNIEXPORT jstring JNICALL Java_org_opencv_core_Mat_nDump
...
@@ -2573,25 +2169,21 @@ JNIEXPORT jstring JNICALL Java_org_opencv_core_Mat_nDump
JNIEXPORT
jstring
JNICALL
Java_org_opencv_core_Mat_nDump
JNIEXPORT
jstring
JNICALL
Java_org_opencv_core_Mat_nDump
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
(
JNIEnv
*
env
,
jclass
,
jlong
self
)
{
{
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
//TODO: check for NULL
static
const
char
method_name
[]
=
"Mat::nDump()"
;
std
::
stringstream
s
;
try
{
try
{
LOGD
(
method_name
);
LOGD
(
"Mat::nDump()"
);
cv
::
Mat
*
me
=
(
cv
::
Mat
*
)
self
;
//TODO: check for NULL
std
::
stringstream
s
;
s
<<
*
me
;
s
<<
*
me
;
return
env
->
NewStringUTF
(
s
.
str
().
c_str
());
std
::
string
str
=
s
.
str
();
}
catch
(
cv
::
Exception
e
)
{
return
env
->
NewStringUTF
(
str
.
c_str
());
LOGE
(
"Mat::nDump() caught cv::Exception: %s"
,
e
.
what
());
}
catch
(
const
std
::
exception
&
e
)
{
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
throwJavaException
(
env
,
&
e
,
method_name
);
if
(
!
je
)
je
=
env
->
FindClass
(
"java/lang/Exception"
);
}
catch
(...)
{
env
->
ThrowNew
(
je
,
e
.
what
());
throwJavaException
(
env
,
0
,
method_name
);
return
env
->
NewStringUTF
(
"ERROR"
);
}
}
catch
(...)
{
LOGE
(
"Mat::nDump() caught unknown exception (...)"
);
return
0
;
jclass
je
=
env
->
FindClass
(
"java/lang/Exception"
);
env
->
ThrowNew
(
je
,
"Unknown exception in JNI code {Mat::nDump()}"
);
return
env
->
NewStringUTF
(
"ERROR"
);
}
}
}
...
...
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