Merge pull request #1225 from apavlenko:fix_format_security

pull/1216/merge
Roman Donchenko 11 years ago committed by OpenCV Buildbot
commit b2d1d87ed1
  1. 154
      modules/java/generator/src/cpp/Mat.cpp

@ -62,7 +62,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__III
{
static const char method_name[] = "Mat::n_1Mat__III()";
try {
LOGD(method_name);
LOGD("%s", method_name);
return (jlong) new Mat( rows, cols, type );
} catch(const std::exception &e) {
throwJavaException(env, &e, method_name);
@ -87,7 +87,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__DDI
{
static const char method_name[] = "Mat::n_1Mat__DDI()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Size size((int)size_width, (int)size_height);
return (jlong) new Mat( size, type );
} catch(const std::exception &e) {
@ -114,7 +114,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__IIIDDDD
{
static const char method_name[] = "Mat::n_1Mat__IIIDDDD()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Scalar s(s_val0, s_val1, s_val2, s_val3);
return (jlong) new Mat( rows, cols, type, s );
} catch(const std::exception &e) {
@ -140,7 +140,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__DDIDDDD
{
static const char method_name[] = "Mat::n_1Mat__DDIDDDD()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Size size((int)size_width, (int)size_height);
Scalar s(s_val0, s_val1, s_val2, s_val3);
return (jlong) new Mat( size, type, s );
@ -167,7 +167,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__JIIII
{
static const char method_name[] = "Mat::n_1Mat__JIIII()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Range rowRange(rowRange_start, rowRange_end);
Range colRange(colRange_start, colRange_end);
return (jlong) new Mat( (*(Mat*)m_nativeObj), rowRange, colRange );
@ -190,7 +190,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__JII
{
static const char method_name[] = "Mat::n_1Mat__JII()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Range rowRange(rowRange_start, rowRange_end);
return (jlong) new Mat( (*(Mat*)m_nativeObj), rowRange );
} catch(const std::exception &e) {
@ -215,7 +215,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1adjustROI
{
static const char method_name[] = "Mat::n_1adjustROI()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat _retval_ = me->adjustROI( dtop, dbottom, dleft, dright );
return (jlong) new Mat(_retval_);
@ -242,7 +242,7 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1assignTo__JJI
{
static const char method_name[] = "Mat::n_1assignTo__JJI()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
me->assignTo( (*(Mat*)m_nativeObj), type );
} catch(const std::exception &e) {
@ -261,7 +261,7 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1assignTo__JJ
{
static const char method_name[] = "Mat::n_1assignTo__JJ()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
me->assignTo( (*(Mat*)m_nativeObj) );
} catch(const std::exception &e) {
@ -285,7 +285,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1channels
{
static const char method_name[] = "Mat::n_1channels()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
return me->channels( );
} catch(const std::exception &e) {
@ -311,7 +311,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JIIZ
{
static const char method_name[] = "Mat::n_1checkVector__JIIZ()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
return me->checkVector( elemChannels, depth, requireContinuous );
} catch(const std::exception &e) {
@ -333,7 +333,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JII
{
static const char method_name[] = "Mat::n_1checkVector__JII()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
return me->checkVector( elemChannels, depth );
} catch(const std::exception &e) {
@ -355,7 +355,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JI
{
static const char method_name[] = "Mat::n_1checkVector__JI()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
return me->checkVector( elemChannels );
} catch(const std::exception &e) {
@ -382,7 +382,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1clone
{
static const char method_name[] = "Mat::n_1clone()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat _retval_ = me->clone( );
return (jlong) new Mat(_retval_);
@ -409,7 +409,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1col
{
static const char method_name[] = "Mat::n_1col()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat _retval_ = me->col( x );
return (jlong) new Mat(_retval_);
@ -436,7 +436,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1colRange
{
static const char method_name[] = "Mat::n_1colRange()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat _retval_ = me->colRange( startcol, endcol );
return (jlong) new Mat(_retval_);
@ -463,7 +463,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1dims
{
static const char method_name[] = "Mat::n_1dims()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
return me->dims;
} catch(cv::Exception e) {
@ -489,7 +489,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1cols
{
static const char method_name[] = "Mat::n_1cols()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
return me->cols;
} catch(const std::exception &e) {
@ -515,7 +515,7 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJIDD
{
static const char method_name[] = "Mat::n_1convertTo__JJIDD()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat& m = *((Mat*)m_nativeObj);
me->convertTo( m, rtype, alpha, beta );
@ -535,7 +535,7 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJID
{
static const char method_name[] = "Mat::n_1convertTo__JJID()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat& m = *((Mat*)m_nativeObj);
me->convertTo( m, rtype, alpha );
@ -555,7 +555,7 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJI
{
static const char method_name[] = "Mat::n_1convertTo__JJI()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat& m = *((Mat*)m_nativeObj);
me->convertTo( m, rtype );
@ -580,7 +580,7 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1copyTo__JJ
{
static const char method_name[] = "Mat::n_1copyTo__JJ()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat& m = *((Mat*)m_nativeObj);
me->copyTo( m );
@ -605,7 +605,7 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1copyTo__JJJ
{
static const char method_name[] = "Mat::n_1copyTo__JJJ()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat& m = *((Mat*)m_nativeObj);
Mat& mask = *((Mat*)mask_nativeObj);
@ -631,7 +631,7 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1create__JIII
{
static const char method_name[] = "Mat::n_1create__JIII()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
me->create( rows, cols, type );
} catch(const std::exception &e) {
@ -655,7 +655,7 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1create__JDDI
{
static const char method_name[] = "Mat::n_1create__JDDI()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Size size((int)size_width, (int)size_height);
me->create( size, type );
@ -680,7 +680,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1cross
{
static const char method_name[] = "Mat::n_1cross()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat& m = *((Mat*)m_nativeObj);
Mat _retval_ = me->cross( m );
@ -725,7 +725,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1depth
{
static const char method_name[] = "Mat::n_1depth()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
return me->depth( );
} catch(const std::exception &e) {
@ -751,7 +751,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1diag__JI
{
static const char method_name[] = "Mat::n_1diag__JI()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat _retval_ = me->diag( d );
return (jlong) new Mat(_retval_);
@ -779,7 +779,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1diag__J
{
static const char method_name[] = "Mat::n_1diag__J()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat _retval_ = Mat::diag( (*(Mat*)d_nativeObj) );
return (jlong) new Mat(_retval_);
} catch(const std::exception &e) {
@ -805,7 +805,7 @@ JNIEXPORT jdouble JNICALL Java_org_opencv_core_Mat_n_1dot
{
static const char method_name[] = "Mat::n_1dot()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat& m = *((Mat*)m_nativeObj);
return me->dot( m );
@ -832,7 +832,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1elemSize
{
static const char method_name[] = "Mat::n_1elemSize()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
return me->elemSize( );
} catch(const std::exception &e) {
@ -858,7 +858,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1elemSize1
{
static const char method_name[] = "Mat::n_1elemSize1()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
return me->elemSize1( );
} catch(const std::exception &e) {
@ -884,7 +884,7 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1empty
{
static const char method_name[] = "Mat::n_1empty()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
return me->empty( );
} catch(const std::exception &e) {
@ -910,7 +910,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1eye__III
{
static const char method_name[] = "Mat::n_1eye__III()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat _retval_ = Mat::eye( rows, cols, type );
return (jlong) new Mat(_retval_);
} catch(const std::exception &e) {
@ -936,7 +936,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1eye__DDI
{
static const char method_name[] = "Mat::n_1eye__DDI()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Size size((int)size_width, (int)size_height);
Mat _retval_ = Mat::eye( size, type );
return (jlong) new Mat(_retval_);
@ -963,7 +963,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1inv__JI
{
static const char method_name[] = "Mat::n_1inv__JI()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat _retval_ = me->inv( method );
return (jlong) new Mat(_retval_);
@ -985,7 +985,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1inv__J
{
static const char method_name[] = "Mat::n_1inv__J()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat _retval_ = me->inv( );
return (jlong) new Mat(_retval_);
@ -1012,7 +1012,7 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1isContinuous
{
static const char method_name[] = "Mat::n_1isContinuous()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
return me->isContinuous( );
} catch(const std::exception &e) {
@ -1038,7 +1038,7 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1isSubmatrix
{
static const char method_name[] = "Mat::n_1isSubmatrix()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
return me->isSubmatrix( );
} catch(const std::exception &e) {
@ -1064,7 +1064,7 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_locateROI_10
{
static const char method_name[] = "core::locateROI_10()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Size wholeSize;
Point ofs;
@ -1091,7 +1091,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1mul__JJD
{
static const char method_name[] = "Mat::n_1mul__JJD()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat& m = *((Mat*)m_nativeObj);
Mat _retval_ = me->mul( m, scale );
@ -1115,7 +1115,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1mul__JJ
{
static const char method_name[] = "Mat::n_1mul__JJ()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat& m = *((Mat*)m_nativeObj);
Mat _retval_ = me->mul( m );
@ -1143,7 +1143,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1ones__III
{
static const char method_name[] = "Mat::n_1ones__III()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat _retval_ = Mat::ones( rows, cols, type );
return (jlong) new Mat(_retval_);
} catch(const std::exception &e) {
@ -1169,7 +1169,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1ones__DDI
{
static const char method_name[] = "Mat::n_1ones__DDI()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Size size((int)size_width, (int)size_height);
Mat _retval_ = Mat::ones( size, type );
return (jlong) new Mat(_retval_);
@ -1196,7 +1196,7 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1push_1back
{
static const char method_name[] = "Mat::n_1push_1back()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
me->push_back( (*(Mat*)m_nativeObj) );
} catch(const std::exception &e) {
@ -1220,7 +1220,7 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1release
{
static const char method_name[] = "Mat::n_1release()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
me->release( );
} catch(const std::exception &e) {
@ -1244,7 +1244,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1reshape__JII
{
static const char method_name[] = "Mat::n_1reshape__JII()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat _retval_ = me->reshape( cn, rows );
return (jlong) new Mat(_retval_);
@ -1267,7 +1267,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1reshape__JI
{
static const char method_name[] = "Mat::n_1reshape__JI()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat _retval_ = me->reshape( cn );
return (jlong) new Mat(_retval_);
@ -1294,7 +1294,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1row
{
static const char method_name[] = "Mat::n_1row()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat _retval_ = me->row( y );
return (jlong) new Mat(_retval_);
@ -1321,7 +1321,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1rowRange
{
static const char method_name[] = "Mat::n_1rowRange()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat _retval_ = me->rowRange( startrow, endrow );
return (jlong) new Mat(_retval_);
@ -1348,7 +1348,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1rows
{
static const char method_name[] = "Mat::n_1rows()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
return me->rows;
} catch(const std::exception &e) {
@ -1374,7 +1374,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JDDDD
{
static const char method_name[] = "Mat::n_1setTo__JDDDD()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Scalar s(s_val0, s_val1, s_val2, s_val3);
Mat _retval_ = me->operator =( s );
@ -1402,7 +1402,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JDDDDJ
{
static const char method_name[] = "Mat::n_1setTo__JDDDDJ()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Scalar s(s_val0, s_val1, s_val2, s_val3);
Mat& mask = *((Mat*)mask_nativeObj);
@ -1431,7 +1431,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JJJ
{
static const char method_name[] = "Mat::n_1setTo__JJJ()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat& value = *((Mat*)value_nativeObj);
Mat& mask = *((Mat*)mask_nativeObj);
@ -1456,7 +1456,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JJ
{
static const char method_name[] = "Mat::n_1setTo__JJ()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat& value = *((Mat*)value_nativeObj);
Mat _retval_ = me->setTo( value );
@ -1484,7 +1484,7 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Mat_n_1size
{
static const char method_name[] = "Mat::n_1size()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Size _retval_ = me->size( );
jdoubleArray _da_retval_ = env->NewDoubleArray(2);
@ -1514,7 +1514,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1step1__JI
{
static const char method_name[] = "Mat::n_1step1__JI()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
return me->step1( i );
} catch(const std::exception &e) {
@ -1536,7 +1536,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1step1__J
{
static const char method_name[] = "Mat::n_1step1__J()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
return me->step1( );
} catch(const std::exception &e) {
@ -1560,7 +1560,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1submat_1rr
{
static const char method_name[] = "Mat::n_1submat_1rr()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Range rowRange(rowRange_start, rowRange_end);
Range colRange(colRange_start, colRange_end);
@ -1589,7 +1589,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1submat
{
static const char method_name[] = "Mat::n_1submat()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Rect roi(roi_x, roi_y, roi_width, roi_height);
Mat _retval_ = me->operator()( roi );
@ -1617,7 +1617,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1t
{
static const char method_name[] = "Mat::n_1t()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
Mat _retval_ = me->t( );
return (jlong) new Mat(_retval_);
@ -1644,7 +1644,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1total
{
static const char method_name[] = "Mat::n_1total()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
return me->total( );
} catch(const std::exception &e) {
@ -1670,7 +1670,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1type
{
static const char method_name[] = "Mat::n_1type()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
return me->type( );
} catch(const std::exception &e) {
@ -1696,7 +1696,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1zeros__III
{
static const char method_name[] = "Mat::n_1zeros__III()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Mat _retval_ = Mat::zeros( rows, cols, type );
return (jlong) new Mat(_retval_);
} catch(const std::exception &e) {
@ -1722,7 +1722,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1zeros__DDI
{
static const char method_name[] = "Mat::n_1zeros__DDI()";
try {
LOGD(method_name);
LOGD("%s", method_name);
Size size((int)size_width, (int)size_height);
Mat _retval_ = Mat::zeros( size, type );
return (jlong) new Mat(_retval_);
@ -1762,7 +1762,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutD
{
static const char method_name[] = "Mat::nPutD()";
try {
LOGD(method_name);
LOGD("%s", method_name);
cv::Mat* me = (cv::Mat*) self;
if(!me || !me->data) return 0; // no native object behind
if(me->rows<=row || me->cols<=col) return 0; // indexes out of range
@ -1855,7 +1855,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutB
{
static const char method_name[] = "Mat::nPutB()";
try {
LOGD(method_name);
LOGD("%s", method_name);
cv::Mat* me = (cv::Mat*) self;
if(! self) return 0; // no native object behind
if(me->depth() != CV_8U && me->depth() != CV_8S) return 0; // incompatible type
@ -1882,7 +1882,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutS
{
static const char method_name[] = "Mat::nPutS()";
try {
LOGD(method_name);
LOGD("%s", method_name);
cv::Mat* me = (cv::Mat*) self;
if(! self) return 0; // no native object behind
if(me->depth() != CV_16U && me->depth() != CV_16S) return 0; // incompatible type
@ -1909,7 +1909,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutI
{
static const char method_name[] = "Mat::nPutI()";
try {
LOGD(method_name);
LOGD("%s", method_name);
cv::Mat* me = (cv::Mat*) self;
if(! self) return 0; // no native object behind
if(me->depth() != CV_32S) return 0; // incompatible type
@ -1936,7 +1936,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutF
{
static const char method_name[] = "Mat::nPutF()";
try {
LOGD(method_name);
LOGD("%s", method_name);
cv::Mat* me = (cv::Mat*) self;
if(! self) return 0; // no native object behind
if(me->depth() != CV_32F) return 0; // incompatible type
@ -1998,7 +1998,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetB
{
static const char method_name[] = "Mat::nGetB()";
try {
LOGD(method_name);
LOGD("%s", method_name);
cv::Mat* me = (cv::Mat*) self;
if(! self) return 0; // no native object behind
if(me->depth() != CV_8U && me->depth() != CV_8S) return 0; // incompatible type
@ -2025,7 +2025,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetS
{
static const char method_name[] = "Mat::nGetS()";
try {
LOGD(method_name);
LOGD("%s", method_name);
cv::Mat* me = (cv::Mat*) self;
if(! self) return 0; // no native object behind
if(me->depth() != CV_16U && me->depth() != CV_16S) return 0; // incompatible type
@ -2052,7 +2052,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetI
{
static const char method_name[] = "Mat::nGetI()";
try {
LOGD(method_name);
LOGD("%s", method_name);
cv::Mat* me = (cv::Mat*) self;
if(! self) return 0; // no native object behind
if(me->depth() != CV_32S) return 0; // incompatible type
@ -2079,7 +2079,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetF
{
static const char method_name[] = "Mat::nGetF()";
try {
LOGD(method_name);
LOGD("%s", method_name);
cv::Mat* me = (cv::Mat*) self;
if(! self) return 0; // no native object behind
if(me->depth() != CV_32F) return 0; // incompatible type
@ -2106,7 +2106,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetD
{
static const char method_name[] = "Mat::nGetD()";
try {
LOGD(method_name);
LOGD("%s", method_name);
cv::Mat* me = (cv::Mat*) self;
if(! self) return 0; // no native object behind
if(me->depth() != CV_64F) return 0; // incompatible type
@ -2133,7 +2133,7 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Mat_nGet
{
static const char method_name[] = "Mat::nGet()";
try {
LOGD(method_name);
LOGD("%s", method_name);
cv::Mat* me = (cv::Mat*) self;
if(! self) return 0; // no native object behind
if(me->rows<=row || me->cols<=col) return 0; // indexes out of range
@ -2171,7 +2171,7 @@ JNIEXPORT jstring JNICALL Java_org_opencv_core_Mat_nDump
{
static const char method_name[] = "Mat::nDump()";
try {
LOGD(method_name);
LOGD("%s", method_name);
cv::Mat* me = (cv::Mat*) self; //TODO: check for NULL
std::stringstream s;
s << *me;

Loading…
Cancel
Save