1 2 // 3 // This file is auto-generated, please don't edit! 4 // 5 6 #define LOG_TAG "org.opencv.core" 7 8 #include "common.h" 9 10 #include "opencv2/opencv_modules.hpp" 11 #ifdef HAVE_OPENCV_CORE 12 13 #include <string> 14 15 #include "opencv2/core.hpp" 16 17 #include "../../core/include/opencv2/core/base.hpp" 18 #include "../../core/include/opencv2/core.hpp" 19 #include "../../core/include/opencv2/core/utility.hpp" 20 #include "../../core/misc/java/src/cpp/core_manual.hpp" 21 22 using namespace cv; 23 24 /// throw java exception 25 static void throwJavaException(JNIEnv *env, const std::exception *e, const char *method) { 26 std::string what = "unknown exception"; 27 jclass je = 0; 28 29 if(e) { 30 std::string exception_type = "std::exception"; 31 32 if(dynamic_cast<const cv::Exception*>(e)) { 33 exception_type = "cv::Exception"; 34 je = env->FindClass("org/opencv/core/CvException"); 35 } 36 37 what = exception_type + ": " + e->what(); 38 } 39 40 if(!je) je = env->FindClass("java/lang/Exception"); 41 env->ThrowNew(je, what.c_str()); 42 43 LOGE("%s caught %s", method, what.c_str()); 44 (void)method; // avoid "unused" warning 45 } 46 47 48 extern "C" { 49 50 51 // 52 // double getTickFrequency() 53 // 54 55 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_getTickFrequency_10 (JNIEnv*, jclass); 56 57 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_getTickFrequency_10 58 (JNIEnv* env, jclass ) 59 { 60 static const char method_name[] = "core::getTickFrequency_10()"; 61 try { 62 LOGD("%s", method_name); 63 64 double _retval_ = cv::getTickFrequency( ); 65 return _retval_; 66 } catch(const std::exception &e) { 67 throwJavaException(env, &e, method_name); 68 } catch (...) { 69 throwJavaException(env, 0, method_name); 70 } 71 return 0; 72 } 73 74 75 76 // 77 // int64 getCPUTickCount() 78 // 79 80 JNIEXPORT jlong JNICALL Java_org_opencv_core_Core_getCPUTickCount_10 (JNIEnv*, jclass); 81 82 JNIEXPORT jlong JNICALL Java_org_opencv_core_Core_getCPUTickCount_10 83 (JNIEnv* env, jclass ) 84 { 85 static const char method_name[] = "core::getCPUTickCount_10()"; 86 try { 87 LOGD("%s", method_name); 88 89 int64 _retval_ = cv::getCPUTickCount( ); 90 return _retval_; 91 } catch(const std::exception &e) { 92 throwJavaException(env, &e, method_name); 93 } catch (...) { 94 throwJavaException(env, 0, method_name); 95 } 96 return 0; 97 } 98 99 100 101 // 102 // void setErrorVerbosity(bool verbose) 103 // 104 105 JNIEXPORT void JNICALL Java_org_opencv_core_Core_setErrorVerbosity_10 (JNIEnv*, jclass, jboolean); 106 107 JNIEXPORT void JNICALL Java_org_opencv_core_Core_setErrorVerbosity_10 108 (JNIEnv* env, jclass , jboolean verbose) 109 { 110 static const char method_name[] = "core::setErrorVerbosity_10()"; 111 try { 112 LOGD("%s", method_name); 113 114 cv::setErrorVerbosity( (bool)verbose ); 115 return; 116 } catch(const std::exception &e) { 117 throwJavaException(env, &e, method_name); 118 } catch (...) { 119 throwJavaException(env, 0, method_name); 120 } 121 return; 122 } 123 124 125 126 // 127 // void mulSpectrums(Mat a, Mat b, Mat& c, int flags, bool conjB = false) 128 // 129 130 JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulSpectrums_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jboolean); 131 132 JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulSpectrums_10 133 (JNIEnv* env, jclass , jlong a_nativeObj, jlong b_nativeObj, jlong c_nativeObj, jint flags, jboolean conjB) 134 { 135 static const char method_name[] = "core::mulSpectrums_10()"; 136 try { 137 LOGD("%s", method_name); 138 Mat& a = *((Mat*)a_nativeObj); 139 Mat& b = *((Mat*)b_nativeObj); 140 Mat& c = *((Mat*)c_nativeObj); 141 cv::mulSpectrums( a, b, c, (int)flags, (bool)conjB ); 142 return; 143 } catch(const std::exception &e) { 144 throwJavaException(env, &e, method_name); 145 } catch (...) { 146 throwJavaException(env, 0, method_name); 147 } 148 return; 149 } 150 151 152 153 JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulSpectrums_11 (JNIEnv*, jclass, jlong, jlong, jlong, jint); 154 155 JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulSpectrums_11 156 (JNIEnv* env, jclass , jlong a_nativeObj, jlong b_nativeObj, jlong c_nativeObj, jint flags) 157 { 158 static const char method_name[] = "core::mulSpectrums_11()"; 159 try { 160 LOGD("%s", method_name); 161 Mat& a = *((Mat*)a_nativeObj); 162 Mat& b = *((Mat*)b_nativeObj); 163 Mat& c = *((Mat*)c_nativeObj); 164 cv::mulSpectrums( a, b, c, (int)flags ); 165 return; 166 } catch(const std::exception &e) { 167 throwJavaException(env, &e, method_name); 168 } catch (...) { 169 throwJavaException(env, 0, method_name); 170 } 171 return; 172 } 173 174 175 176 // 177 // int getOptimalDFTSize(int vecsize) 178 // 179 180 JNIEXPORT jint JNICALL Java_org_opencv_core_Core_getOptimalDFTSize_10 (JNIEnv*, jclass, jint); 181 182 JNIEXPORT jint JNICALL Java_org_opencv_core_Core_getOptimalDFTSize_10 183 (JNIEnv* env, jclass , jint vecsize) 184 { 185 static const char method_name[] = "core::getOptimalDFTSize_10()"; 186 try { 187 LOGD("%s", method_name); 188 189 int _retval_ = cv::getOptimalDFTSize( (int)vecsize ); 190 return _retval_; 191 } catch(const std::exception &e) { 192 throwJavaException(env, &e, method_name); 193 } catch (...) { 194 throwJavaException(env, 0, method_name); 195 } 196 return 0; 197 } 198 199 200 201 // 202 // void randu(Mat& dst, double low, double high) 203 // 204 205 JNIEXPORT void JNICALL Java_org_opencv_core_Core_randu_10 (JNIEnv*, jclass, jlong, jdouble, jdouble); 206 207 JNIEXPORT void JNICALL Java_org_opencv_core_Core_randu_10 208 (JNIEnv* env, jclass , jlong dst_nativeObj, jdouble low, jdouble high) 209 { 210 static const char method_name[] = "core::randu_10()"; 211 try { 212 LOGD("%s", method_name); 213 Mat& dst = *((Mat*)dst_nativeObj); 214 cv::randu( dst, (double)low, (double)high ); 215 return; 216 } catch(const std::exception &e) { 217 throwJavaException(env, &e, method_name); 218 } catch (...) { 219 throwJavaException(env, 0, method_name); 220 } 221 return; 222 } 223 224 225 226 // 227 // void randn(Mat& dst, double mean, double stddev) 228 // 229 230 JNIEXPORT void JNICALL Java_org_opencv_core_Core_randn_10 (JNIEnv*, jclass, jlong, jdouble, jdouble); 231 232 JNIEXPORT void JNICALL Java_org_opencv_core_Core_randn_10 233 (JNIEnv* env, jclass , jlong dst_nativeObj, jdouble mean, jdouble stddev) 234 { 235 static const char method_name[] = "core::randn_10()"; 236 try { 237 LOGD("%s", method_name); 238 Mat& dst = *((Mat*)dst_nativeObj); 239 cv::randn( dst, (double)mean, (double)stddev ); 240 return; 241 } catch(const std::exception &e) { 242 throwJavaException(env, &e, method_name); 243 } catch (...) { 244 throwJavaException(env, 0, method_name); 245 } 246 return; 247 } 248 249 250 251 // 252 // void randShuffle(Mat& dst, double iterFactor = 1., RNG* rng = 0) 253 // 254 255 JNIEXPORT void JNICALL Java_org_opencv_core_Core_randShuffle_10 (JNIEnv*, jclass, jlong, jdouble); 256 257 JNIEXPORT void JNICALL Java_org_opencv_core_Core_randShuffle_10 258 (JNIEnv* env, jclass , jlong dst_nativeObj, jdouble iterFactor) 259 { 260 static const char method_name[] = "core::randShuffle_10()"; 261 try { 262 LOGD("%s", method_name); 263 Mat& dst = *((Mat*)dst_nativeObj); 264 cv::randShuffle( dst, (double)iterFactor, 0 ); 265 return; 266 } catch(const std::exception &e) { 267 throwJavaException(env, &e, method_name); 268 } catch (...) { 269 throwJavaException(env, 0, method_name); 270 } 271 return; 272 } 273 274 275 276 JNIEXPORT void JNICALL Java_org_opencv_core_Core_randShuffle_11 (JNIEnv*, jclass, jlong); 277 278 JNIEXPORT void JNICALL Java_org_opencv_core_Core_randShuffle_11 279 (JNIEnv* env, jclass , jlong dst_nativeObj) 280 { 281 static const char method_name[] = "core::randShuffle_11()"; 282 try { 283 LOGD("%s", method_name); 284 Mat& dst = *((Mat*)dst_nativeObj); 285 cv::randShuffle( dst ); 286 return; 287 } catch(const std::exception &e) { 288 throwJavaException(env, &e, method_name); 289 } catch (...) { 290 throwJavaException(env, 0, method_name); 291 } 292 return; 293 } 294 295 296 297 // 298 // double kmeans(Mat data, int K, Mat& bestLabels, TermCriteria criteria, int attempts, int flags, Mat& centers = Mat()) 299 // 300 301 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_kmeans_10 (JNIEnv*, jclass, jlong, jint, jlong, jint, jint, jdouble, jint, jint, jlong); 302 303 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_kmeans_10 304 (JNIEnv* env, jclass , jlong data_nativeObj, jint K, jlong bestLabels_nativeObj, jint criteria_type, jint criteria_maxCount, jdouble criteria_epsilon, jint attempts, jint flags, jlong centers_nativeObj) 305 { 306 static const char method_name[] = "core::kmeans_10()"; 307 try { 308 LOGD("%s", method_name); 309 Mat& data = *((Mat*)data_nativeObj); 310 Mat& bestLabels = *((Mat*)bestLabels_nativeObj); 311 TermCriteria criteria(criteria_type, criteria_maxCount, criteria_epsilon); 312 Mat& centers = *((Mat*)centers_nativeObj); 313 double _retval_ = cv::kmeans( data, (int)K, bestLabels, criteria, (int)attempts, (int)flags, centers ); 314 return _retval_; 315 } catch(const std::exception &e) { 316 throwJavaException(env, &e, method_name); 317 } catch (...) { 318 throwJavaException(env, 0, method_name); 319 } 320 return 0; 321 } 322 323 324 325 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_kmeans_11 (JNIEnv*, jclass, jlong, jint, jlong, jint, jint, jdouble, jint, jint); 326 327 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_kmeans_11 328 (JNIEnv* env, jclass , jlong data_nativeObj, jint K, jlong bestLabels_nativeObj, jint criteria_type, jint criteria_maxCount, jdouble criteria_epsilon, jint attempts, jint flags) 329 { 330 static const char method_name[] = "core::kmeans_11()"; 331 try { 332 LOGD("%s", method_name); 333 Mat& data = *((Mat*)data_nativeObj); 334 Mat& bestLabels = *((Mat*)bestLabels_nativeObj); 335 TermCriteria criteria(criteria_type, criteria_maxCount, criteria_epsilon); 336 double _retval_ = cv::kmeans( data, (int)K, bestLabels, criteria, (int)attempts, (int)flags ); 337 return _retval_; 338 } catch(const std::exception &e) { 339 throwJavaException(env, &e, method_name); 340 } catch (...) { 341 throwJavaException(env, 0, method_name); 342 } 343 return 0; 344 } 345 346 347 348 // 349 // int borderInterpolate(int p, int len, int borderType) 350 // 351 352 JNIEXPORT jint JNICALL Java_org_opencv_core_Core_borderInterpolate_10 (JNIEnv*, jclass, jint, jint, jint); 353 354 JNIEXPORT jint JNICALL Java_org_opencv_core_Core_borderInterpolate_10 355 (JNIEnv* env, jclass , jint p, jint len, jint borderType) 356 { 357 static const char method_name[] = "core::borderInterpolate_10()"; 358 try { 359 LOGD("%s", method_name); 360 361 int _retval_ = cv::borderInterpolate( (int)p, (int)len, (int)borderType ); 362 return _retval_; 363 } catch(const std::exception &e) { 364 throwJavaException(env, &e, method_name); 365 } catch (...) { 366 throwJavaException(env, 0, method_name); 367 } 368 return 0; 369 } 370 371 372 373 // 374 // void copyMakeBorder(Mat src, Mat& dst, int top, int bottom, int left, int right, int borderType, Scalar value = Scalar()) 375 // 376 377 JNIEXPORT void JNICALL Java_org_opencv_core_Core_copyMakeBorder_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint, jint, jint, jdouble, jdouble, jdouble, jdouble); 378 379 JNIEXPORT void JNICALL Java_org_opencv_core_Core_copyMakeBorder_10 380 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint top, jint bottom, jint left, jint right, jint borderType, jdouble value_val0, jdouble value_val1, jdouble value_val2, jdouble value_val3) 381 { 382 static const char method_name[] = "core::copyMakeBorder_10()"; 383 try { 384 LOGD("%s", method_name); 385 Mat& src = *((Mat*)src_nativeObj); 386 Mat& dst = *((Mat*)dst_nativeObj); 387 Scalar value(value_val0, value_val1, value_val2, value_val3); 388 cv::copyMakeBorder( src, dst, (int)top, (int)bottom, (int)left, (int)right, (int)borderType, value ); 389 return; 390 } catch(const std::exception &e) { 391 throwJavaException(env, &e, method_name); 392 } catch (...) { 393 throwJavaException(env, 0, method_name); 394 } 395 return; 396 } 397 398 399 400 JNIEXPORT void JNICALL Java_org_opencv_core_Core_copyMakeBorder_11 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint, jint, jint); 401 402 JNIEXPORT void JNICALL Java_org_opencv_core_Core_copyMakeBorder_11 403 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint top, jint bottom, jint left, jint right, jint borderType) 404 { 405 static const char method_name[] = "core::copyMakeBorder_11()"; 406 try { 407 LOGD("%s", method_name); 408 Mat& src = *((Mat*)src_nativeObj); 409 Mat& dst = *((Mat*)dst_nativeObj); 410 cv::copyMakeBorder( src, dst, (int)top, (int)bottom, (int)left, (int)right, (int)borderType ); 411 return; 412 } catch(const std::exception &e) { 413 throwJavaException(env, &e, method_name); 414 } catch (...) { 415 throwJavaException(env, 0, method_name); 416 } 417 return; 418 } 419 420 421 422 // 423 // void add(Mat src1, Mat src2, Mat& dst, Mat mask = Mat(), int dtype = -1) 424 // 425 426 JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jint); 427 428 JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_10 429 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj, jint dtype) 430 { 431 static const char method_name[] = "core::add_10()"; 432 try { 433 LOGD("%s", method_name); 434 Mat& src1 = *((Mat*)src1_nativeObj); 435 Mat& src2 = *((Mat*)src2_nativeObj); 436 Mat& dst = *((Mat*)dst_nativeObj); 437 Mat& mask = *((Mat*)mask_nativeObj); 438 cv::add( src1, src2, dst, mask, (int)dtype ); 439 return; 440 } catch(const std::exception &e) { 441 throwJavaException(env, &e, method_name); 442 } catch (...) { 443 throwJavaException(env, 0, method_name); 444 } 445 return; 446 } 447 448 449 450 JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong); 451 452 JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_11 453 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj) 454 { 455 static const char method_name[] = "core::add_11()"; 456 try { 457 LOGD("%s", method_name); 458 Mat& src1 = *((Mat*)src1_nativeObj); 459 Mat& src2 = *((Mat*)src2_nativeObj); 460 Mat& dst = *((Mat*)dst_nativeObj); 461 Mat& mask = *((Mat*)mask_nativeObj); 462 cv::add( src1, src2, dst, mask ); 463 return; 464 } catch(const std::exception &e) { 465 throwJavaException(env, &e, method_name); 466 } catch (...) { 467 throwJavaException(env, 0, method_name); 468 } 469 return; 470 } 471 472 473 474 JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_12 (JNIEnv*, jclass, jlong, jlong, jlong); 475 476 JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_12 477 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj) 478 { 479 static const char method_name[] = "core::add_12()"; 480 try { 481 LOGD("%s", method_name); 482 Mat& src1 = *((Mat*)src1_nativeObj); 483 Mat& src2 = *((Mat*)src2_nativeObj); 484 Mat& dst = *((Mat*)dst_nativeObj); 485 cv::add( src1, src2, dst ); 486 return; 487 } catch(const std::exception &e) { 488 throwJavaException(env, &e, method_name); 489 } catch (...) { 490 throwJavaException(env, 0, method_name); 491 } 492 return; 493 } 494 495 496 497 // 498 // void subtract(Mat src1, Mat src2, Mat& dst, Mat mask = Mat(), int dtype = -1) 499 // 500 501 JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jint); 502 503 JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_10 504 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj, jint dtype) 505 { 506 static const char method_name[] = "core::subtract_10()"; 507 try { 508 LOGD("%s", method_name); 509 Mat& src1 = *((Mat*)src1_nativeObj); 510 Mat& src2 = *((Mat*)src2_nativeObj); 511 Mat& dst = *((Mat*)dst_nativeObj); 512 Mat& mask = *((Mat*)mask_nativeObj); 513 cv::subtract( src1, src2, dst, mask, (int)dtype ); 514 return; 515 } catch(const std::exception &e) { 516 throwJavaException(env, &e, method_name); 517 } catch (...) { 518 throwJavaException(env, 0, method_name); 519 } 520 return; 521 } 522 523 524 525 JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong); 526 527 JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_11 528 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj) 529 { 530 static const char method_name[] = "core::subtract_11()"; 531 try { 532 LOGD("%s", method_name); 533 Mat& src1 = *((Mat*)src1_nativeObj); 534 Mat& src2 = *((Mat*)src2_nativeObj); 535 Mat& dst = *((Mat*)dst_nativeObj); 536 Mat& mask = *((Mat*)mask_nativeObj); 537 cv::subtract( src1, src2, dst, mask ); 538 return; 539 } catch(const std::exception &e) { 540 throwJavaException(env, &e, method_name); 541 } catch (...) { 542 throwJavaException(env, 0, method_name); 543 } 544 return; 545 } 546 547 548 549 JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_12 (JNIEnv*, jclass, jlong, jlong, jlong); 550 551 JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_12 552 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj) 553 { 554 static const char method_name[] = "core::subtract_12()"; 555 try { 556 LOGD("%s", method_name); 557 Mat& src1 = *((Mat*)src1_nativeObj); 558 Mat& src2 = *((Mat*)src2_nativeObj); 559 Mat& dst = *((Mat*)dst_nativeObj); 560 cv::subtract( src1, src2, dst ); 561 return; 562 } catch(const std::exception &e) { 563 throwJavaException(env, &e, method_name); 564 } catch (...) { 565 throwJavaException(env, 0, method_name); 566 } 567 return; 568 } 569 570 571 572 // 573 // void multiply(Mat src1, Mat src2, Mat& dst, double scale = 1, int dtype = -1) 574 // 575 576 JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jint); 577 578 JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_10 579 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jdouble scale, jint dtype) 580 { 581 static const char method_name[] = "core::multiply_10()"; 582 try { 583 LOGD("%s", method_name); 584 Mat& src1 = *((Mat*)src1_nativeObj); 585 Mat& src2 = *((Mat*)src2_nativeObj); 586 Mat& dst = *((Mat*)dst_nativeObj); 587 cv::multiply( src1, src2, dst, (double)scale, (int)dtype ); 588 return; 589 } catch(const std::exception &e) { 590 throwJavaException(env, &e, method_name); 591 } catch (...) { 592 throwJavaException(env, 0, method_name); 593 } 594 return; 595 } 596 597 598 599 JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_11 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble); 600 601 JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_11 602 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jdouble scale) 603 { 604 static const char method_name[] = "core::multiply_11()"; 605 try { 606 LOGD("%s", method_name); 607 Mat& src1 = *((Mat*)src1_nativeObj); 608 Mat& src2 = *((Mat*)src2_nativeObj); 609 Mat& dst = *((Mat*)dst_nativeObj); 610 cv::multiply( src1, src2, dst, (double)scale ); 611 return; 612 } catch(const std::exception &e) { 613 throwJavaException(env, &e, method_name); 614 } catch (...) { 615 throwJavaException(env, 0, method_name); 616 } 617 return; 618 } 619 620 621 622 JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_12 (JNIEnv*, jclass, jlong, jlong, jlong); 623 624 JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_12 625 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj) 626 { 627 static const char method_name[] = "core::multiply_12()"; 628 try { 629 LOGD("%s", method_name); 630 Mat& src1 = *((Mat*)src1_nativeObj); 631 Mat& src2 = *((Mat*)src2_nativeObj); 632 Mat& dst = *((Mat*)dst_nativeObj); 633 cv::multiply( src1, src2, dst ); 634 return; 635 } catch(const std::exception &e) { 636 throwJavaException(env, &e, method_name); 637 } catch (...) { 638 throwJavaException(env, 0, method_name); 639 } 640 return; 641 } 642 643 644 645 // 646 // void divide(Mat src1, Mat src2, Mat& dst, double scale = 1, int dtype = -1) 647 // 648 649 JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jint); 650 651 JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_10 652 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jdouble scale, jint dtype) 653 { 654 static const char method_name[] = "core::divide_10()"; 655 try { 656 LOGD("%s", method_name); 657 Mat& src1 = *((Mat*)src1_nativeObj); 658 Mat& src2 = *((Mat*)src2_nativeObj); 659 Mat& dst = *((Mat*)dst_nativeObj); 660 cv::divide( src1, src2, dst, (double)scale, (int)dtype ); 661 return; 662 } catch(const std::exception &e) { 663 throwJavaException(env, &e, method_name); 664 } catch (...) { 665 throwJavaException(env, 0, method_name); 666 } 667 return; 668 } 669 670 671 672 JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_11 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble); 673 674 JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_11 675 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jdouble scale) 676 { 677 static const char method_name[] = "core::divide_11()"; 678 try { 679 LOGD("%s", method_name); 680 Mat& src1 = *((Mat*)src1_nativeObj); 681 Mat& src2 = *((Mat*)src2_nativeObj); 682 Mat& dst = *((Mat*)dst_nativeObj); 683 cv::divide( src1, src2, dst, (double)scale ); 684 return; 685 } catch(const std::exception &e) { 686 throwJavaException(env, &e, method_name); 687 } catch (...) { 688 throwJavaException(env, 0, method_name); 689 } 690 return; 691 } 692 693 694 695 JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_12 (JNIEnv*, jclass, jlong, jlong, jlong); 696 697 JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_12 698 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj) 699 { 700 static const char method_name[] = "core::divide_12()"; 701 try { 702 LOGD("%s", method_name); 703 Mat& src1 = *((Mat*)src1_nativeObj); 704 Mat& src2 = *((Mat*)src2_nativeObj); 705 Mat& dst = *((Mat*)dst_nativeObj); 706 cv::divide( src1, src2, dst ); 707 return; 708 } catch(const std::exception &e) { 709 throwJavaException(env, &e, method_name); 710 } catch (...) { 711 throwJavaException(env, 0, method_name); 712 } 713 return; 714 } 715 716 717 718 // 719 // void divide(double scale, Mat src2, Mat& dst, int dtype = -1) 720 // 721 722 JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_13 (JNIEnv*, jclass, jdouble, jlong, jlong, jint); 723 724 JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_13 725 (JNIEnv* env, jclass , jdouble scale, jlong src2_nativeObj, jlong dst_nativeObj, jint dtype) 726 { 727 static const char method_name[] = "core::divide_13()"; 728 try { 729 LOGD("%s", method_name); 730 Mat& src2 = *((Mat*)src2_nativeObj); 731 Mat& dst = *((Mat*)dst_nativeObj); 732 cv::divide( (double)scale, src2, dst, (int)dtype ); 733 return; 734 } catch(const std::exception &e) { 735 throwJavaException(env, &e, method_name); 736 } catch (...) { 737 throwJavaException(env, 0, method_name); 738 } 739 return; 740 } 741 742 743 744 JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_14 (JNIEnv*, jclass, jdouble, jlong, jlong); 745 746 JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_14 747 (JNIEnv* env, jclass , jdouble scale, jlong src2_nativeObj, jlong dst_nativeObj) 748 { 749 static const char method_name[] = "core::divide_14()"; 750 try { 751 LOGD("%s", method_name); 752 Mat& src2 = *((Mat*)src2_nativeObj); 753 Mat& dst = *((Mat*)dst_nativeObj); 754 cv::divide( (double)scale, src2, dst ); 755 return; 756 } catch(const std::exception &e) { 757 throwJavaException(env, &e, method_name); 758 } catch (...) { 759 throwJavaException(env, 0, method_name); 760 } 761 return; 762 } 763 764 765 766 // 767 // void scaleAdd(Mat src1, double alpha, Mat src2, Mat& dst) 768 // 769 770 JNIEXPORT void JNICALL Java_org_opencv_core_Core_scaleAdd_10 (JNIEnv*, jclass, jlong, jdouble, jlong, jlong); 771 772 JNIEXPORT void JNICALL Java_org_opencv_core_Core_scaleAdd_10 773 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble alpha, jlong src2_nativeObj, jlong dst_nativeObj) 774 { 775 static const char method_name[] = "core::scaleAdd_10()"; 776 try { 777 LOGD("%s", method_name); 778 Mat& src1 = *((Mat*)src1_nativeObj); 779 Mat& src2 = *((Mat*)src2_nativeObj); 780 Mat& dst = *((Mat*)dst_nativeObj); 781 cv::scaleAdd( src1, (double)alpha, src2, dst ); 782 return; 783 } catch(const std::exception &e) { 784 throwJavaException(env, &e, method_name); 785 } catch (...) { 786 throwJavaException(env, 0, method_name); 787 } 788 return; 789 } 790 791 792 793 // 794 // void addWeighted(Mat src1, double alpha, Mat src2, double beta, double gamma, Mat& dst, int dtype = -1) 795 // 796 797 JNIEXPORT void JNICALL Java_org_opencv_core_Core_addWeighted_10 (JNIEnv*, jclass, jlong, jdouble, jlong, jdouble, jdouble, jlong, jint); 798 799 JNIEXPORT void JNICALL Java_org_opencv_core_Core_addWeighted_10 800 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble alpha, jlong src2_nativeObj, jdouble beta, jdouble gamma, jlong dst_nativeObj, jint dtype) 801 { 802 static const char method_name[] = "core::addWeighted_10()"; 803 try { 804 LOGD("%s", method_name); 805 Mat& src1 = *((Mat*)src1_nativeObj); 806 Mat& src2 = *((Mat*)src2_nativeObj); 807 Mat& dst = *((Mat*)dst_nativeObj); 808 cv::addWeighted( src1, (double)alpha, src2, (double)beta, (double)gamma, dst, (int)dtype ); 809 return; 810 } catch(const std::exception &e) { 811 throwJavaException(env, &e, method_name); 812 } catch (...) { 813 throwJavaException(env, 0, method_name); 814 } 815 return; 816 } 817 818 819 820 JNIEXPORT void JNICALL Java_org_opencv_core_Core_addWeighted_11 (JNIEnv*, jclass, jlong, jdouble, jlong, jdouble, jdouble, jlong); 821 822 JNIEXPORT void JNICALL Java_org_opencv_core_Core_addWeighted_11 823 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble alpha, jlong src2_nativeObj, jdouble beta, jdouble gamma, jlong dst_nativeObj) 824 { 825 static const char method_name[] = "core::addWeighted_11()"; 826 try { 827 LOGD("%s", method_name); 828 Mat& src1 = *((Mat*)src1_nativeObj); 829 Mat& src2 = *((Mat*)src2_nativeObj); 830 Mat& dst = *((Mat*)dst_nativeObj); 831 cv::addWeighted( src1, (double)alpha, src2, (double)beta, (double)gamma, dst ); 832 return; 833 } catch(const std::exception &e) { 834 throwJavaException(env, &e, method_name); 835 } catch (...) { 836 throwJavaException(env, 0, method_name); 837 } 838 return; 839 } 840 841 842 843 // 844 // void convertScaleAbs(Mat src, Mat& dst, double alpha = 1, double beta = 0) 845 // 846 847 JNIEXPORT void JNICALL Java_org_opencv_core_Core_convertScaleAbs_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble); 848 849 JNIEXPORT void JNICALL Java_org_opencv_core_Core_convertScaleAbs_10 850 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble alpha, jdouble beta) 851 { 852 static const char method_name[] = "core::convertScaleAbs_10()"; 853 try { 854 LOGD("%s", method_name); 855 Mat& src = *((Mat*)src_nativeObj); 856 Mat& dst = *((Mat*)dst_nativeObj); 857 cv::convertScaleAbs( src, dst, (double)alpha, (double)beta ); 858 return; 859 } catch(const std::exception &e) { 860 throwJavaException(env, &e, method_name); 861 } catch (...) { 862 throwJavaException(env, 0, method_name); 863 } 864 return; 865 } 866 867 868 869 JNIEXPORT void JNICALL Java_org_opencv_core_Core_convertScaleAbs_11 (JNIEnv*, jclass, jlong, jlong); 870 871 JNIEXPORT void JNICALL Java_org_opencv_core_Core_convertScaleAbs_11 872 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj) 873 { 874 static const char method_name[] = "core::convertScaleAbs_11()"; 875 try { 876 LOGD("%s", method_name); 877 Mat& src = *((Mat*)src_nativeObj); 878 Mat& dst = *((Mat*)dst_nativeObj); 879 cv::convertScaleAbs( src, dst ); 880 return; 881 } catch(const std::exception &e) { 882 throwJavaException(env, &e, method_name); 883 } catch (...) { 884 throwJavaException(env, 0, method_name); 885 } 886 return; 887 } 888 889 890 891 // 892 // Scalar sum(Mat src) 893 // 894 895 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_sumElems_10 (JNIEnv*, jclass, jlong); 896 897 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_sumElems_10 898 (JNIEnv* env, jclass , jlong src_nativeObj) 899 { 900 static const char method_name[] = "core::sumElems_10()"; 901 try { 902 LOGD("%s", method_name); 903 Mat& src = *((Mat*)src_nativeObj); 904 Scalar _retval_ = cv::sum( src ); 905 jdoubleArray _da_retval_ = env->NewDoubleArray(4); jdouble _tmp_retval_[4] = {_retval_.val[0], _retval_.val[1], _retval_.val[2], _retval_.val[3]}; env->SetDoubleArrayRegion(_da_retval_, 0, 4, _tmp_retval_); 906 return _da_retval_; 907 } catch(const std::exception &e) { 908 throwJavaException(env, &e, method_name); 909 } catch (...) { 910 throwJavaException(env, 0, method_name); 911 } 912 return 0; 913 } 914 915 916 917 // 918 // void LUT(Mat src, Mat lut, Mat& dst) 919 // 920 921 JNIEXPORT void JNICALL Java_org_opencv_core_Core_LUT_10 (JNIEnv*, jclass, jlong, jlong, jlong); 922 923 JNIEXPORT void JNICALL Java_org_opencv_core_Core_LUT_10 924 (JNIEnv* env, jclass , jlong src_nativeObj, jlong lut_nativeObj, jlong dst_nativeObj) 925 { 926 static const char method_name[] = "core::LUT_10()"; 927 try { 928 LOGD("%s", method_name); 929 Mat& src = *((Mat*)src_nativeObj); 930 Mat& lut = *((Mat*)lut_nativeObj); 931 Mat& dst = *((Mat*)dst_nativeObj); 932 cv::LUT( src, lut, dst ); 933 return; 934 } catch(const std::exception &e) { 935 throwJavaException(env, &e, method_name); 936 } catch (...) { 937 throwJavaException(env, 0, method_name); 938 } 939 return; 940 } 941 942 943 944 // 945 // void findNonZero(Mat src, Mat& idx) 946 // 947 948 JNIEXPORT void JNICALL Java_org_opencv_core_Core_findNonZero_10 (JNIEnv*, jclass, jlong, jlong); 949 950 JNIEXPORT void JNICALL Java_org_opencv_core_Core_findNonZero_10 951 (JNIEnv* env, jclass , jlong src_nativeObj, jlong idx_nativeObj) 952 { 953 static const char method_name[] = "core::findNonZero_10()"; 954 try { 955 LOGD("%s", method_name); 956 Mat& src = *((Mat*)src_nativeObj); 957 Mat& idx = *((Mat*)idx_nativeObj); 958 cv::findNonZero( src, idx ); 959 return; 960 } catch(const std::exception &e) { 961 throwJavaException(env, &e, method_name); 962 } catch (...) { 963 throwJavaException(env, 0, method_name); 964 } 965 return; 966 } 967 968 969 970 // 971 // int countNonZero(Mat src) 972 // 973 974 JNIEXPORT jint JNICALL Java_org_opencv_core_Core_countNonZero_10 (JNIEnv*, jclass, jlong); 975 976 JNIEXPORT jint JNICALL Java_org_opencv_core_Core_countNonZero_10 977 (JNIEnv* env, jclass , jlong src_nativeObj) 978 { 979 static const char method_name[] = "core::countNonZero_10()"; 980 try { 981 LOGD("%s", method_name); 982 Mat& src = *((Mat*)src_nativeObj); 983 int _retval_ = cv::countNonZero( src ); 984 return _retval_; 985 } catch(const std::exception &e) { 986 throwJavaException(env, &e, method_name); 987 } catch (...) { 988 throwJavaException(env, 0, method_name); 989 } 990 return 0; 991 } 992 993 994 995 // 996 // Scalar mean(Mat src, Mat mask = Mat()) 997 // 998 999 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_mean_10 (JNIEnv*, jclass, jlong, jlong); 1000 1001 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_mean_10 1002 (JNIEnv* env, jclass , jlong src_nativeObj, jlong mask_nativeObj) 1003 { 1004 static const char method_name[] = "core::mean_10()"; 1005 try { 1006 LOGD("%s", method_name); 1007 Mat& src = *((Mat*)src_nativeObj); 1008 Mat& mask = *((Mat*)mask_nativeObj); 1009 Scalar _retval_ = cv::mean( src, mask ); 1010 jdoubleArray _da_retval_ = env->NewDoubleArray(4); jdouble _tmp_retval_[4] = {_retval_.val[0], _retval_.val[1], _retval_.val[2], _retval_.val[3]}; env->SetDoubleArrayRegion(_da_retval_, 0, 4, _tmp_retval_); 1011 return _da_retval_; 1012 } catch(const std::exception &e) { 1013 throwJavaException(env, &e, method_name); 1014 } catch (...) { 1015 throwJavaException(env, 0, method_name); 1016 } 1017 return 0; 1018 } 1019 1020 1021 1022 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_mean_11 (JNIEnv*, jclass, jlong); 1023 1024 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_mean_11 1025 (JNIEnv* env, jclass , jlong src_nativeObj) 1026 { 1027 static const char method_name[] = "core::mean_11()"; 1028 try { 1029 LOGD("%s", method_name); 1030 Mat& src = *((Mat*)src_nativeObj); 1031 Scalar _retval_ = cv::mean( src ); 1032 jdoubleArray _da_retval_ = env->NewDoubleArray(4); jdouble _tmp_retval_[4] = {_retval_.val[0], _retval_.val[1], _retval_.val[2], _retval_.val[3]}; env->SetDoubleArrayRegion(_da_retval_, 0, 4, _tmp_retval_); 1033 return _da_retval_; 1034 } catch(const std::exception &e) { 1035 throwJavaException(env, &e, method_name); 1036 } catch (...) { 1037 throwJavaException(env, 0, method_name); 1038 } 1039 return 0; 1040 } 1041 1042 1043 1044 // 1045 // void meanStdDev(Mat src, vector_double& mean, vector_double& stddev, Mat mask = Mat()) 1046 // 1047 1048 JNIEXPORT void JNICALL Java_org_opencv_core_Core_meanStdDev_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong); 1049 1050 JNIEXPORT void JNICALL Java_org_opencv_core_Core_meanStdDev_10 1051 (JNIEnv* env, jclass , jlong src_nativeObj, jlong mean_mat_nativeObj, jlong stddev_mat_nativeObj, jlong mask_nativeObj) 1052 { 1053 static const char method_name[] = "core::meanStdDev_10()"; 1054 try { 1055 LOGD("%s", method_name); 1056 std::vector<double> mean; 1057 Mat& mean_mat = *((Mat*)mean_mat_nativeObj); 1058 std::vector<double> stddev; 1059 Mat& stddev_mat = *((Mat*)stddev_mat_nativeObj); 1060 Mat& src = *((Mat*)src_nativeObj); 1061 Mat& mask = *((Mat*)mask_nativeObj); 1062 cv::meanStdDev( src, mean, stddev, mask ); 1063 vector_double_to_Mat( mean, mean_mat ); vector_double_to_Mat( stddev, stddev_mat ); 1064 return; 1065 } catch(const std::exception &e) { 1066 throwJavaException(env, &e, method_name); 1067 } catch (...) { 1068 throwJavaException(env, 0, method_name); 1069 } 1070 return; 1071 } 1072 1073 1074 1075 JNIEXPORT void JNICALL Java_org_opencv_core_Core_meanStdDev_11 (JNIEnv*, jclass, jlong, jlong, jlong); 1076 1077 JNIEXPORT void JNICALL Java_org_opencv_core_Core_meanStdDev_11 1078 (JNIEnv* env, jclass , jlong src_nativeObj, jlong mean_mat_nativeObj, jlong stddev_mat_nativeObj) 1079 { 1080 static const char method_name[] = "core::meanStdDev_11()"; 1081 try { 1082 LOGD("%s", method_name); 1083 std::vector<double> mean; 1084 Mat& mean_mat = *((Mat*)mean_mat_nativeObj); 1085 std::vector<double> stddev; 1086 Mat& stddev_mat = *((Mat*)stddev_mat_nativeObj); 1087 Mat& src = *((Mat*)src_nativeObj); 1088 cv::meanStdDev( src, mean, stddev ); 1089 vector_double_to_Mat( mean, mean_mat ); vector_double_to_Mat( stddev, stddev_mat ); 1090 return; 1091 } catch(const std::exception &e) { 1092 throwJavaException(env, &e, method_name); 1093 } catch (...) { 1094 throwJavaException(env, 0, method_name); 1095 } 1096 return; 1097 } 1098 1099 1100 1101 // 1102 // double norm(Mat src1, int normType = NORM_L2, Mat mask = Mat()) 1103 // 1104 1105 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_10 (JNIEnv*, jclass, jlong, jint, jlong); 1106 1107 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_10 1108 (JNIEnv* env, jclass , jlong src1_nativeObj, jint normType, jlong mask_nativeObj) 1109 { 1110 static const char method_name[] = "core::norm_10()"; 1111 try { 1112 LOGD("%s", method_name); 1113 Mat& src1 = *((Mat*)src1_nativeObj); 1114 Mat& mask = *((Mat*)mask_nativeObj); 1115 double _retval_ = cv::norm( src1, (int)normType, mask ); 1116 return _retval_; 1117 } catch(const std::exception &e) { 1118 throwJavaException(env, &e, method_name); 1119 } catch (...) { 1120 throwJavaException(env, 0, method_name); 1121 } 1122 return 0; 1123 } 1124 1125 1126 1127 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_11 (JNIEnv*, jclass, jlong, jint); 1128 1129 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_11 1130 (JNIEnv* env, jclass , jlong src1_nativeObj, jint normType) 1131 { 1132 static const char method_name[] = "core::norm_11()"; 1133 try { 1134 LOGD("%s", method_name); 1135 Mat& src1 = *((Mat*)src1_nativeObj); 1136 double _retval_ = cv::norm( src1, (int)normType ); 1137 return _retval_; 1138 } catch(const std::exception &e) { 1139 throwJavaException(env, &e, method_name); 1140 } catch (...) { 1141 throwJavaException(env, 0, method_name); 1142 } 1143 return 0; 1144 } 1145 1146 1147 1148 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_12 (JNIEnv*, jclass, jlong); 1149 1150 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_12 1151 (JNIEnv* env, jclass , jlong src1_nativeObj) 1152 { 1153 static const char method_name[] = "core::norm_12()"; 1154 try { 1155 LOGD("%s", method_name); 1156 Mat& src1 = *((Mat*)src1_nativeObj); 1157 double _retval_ = cv::norm( src1 ); 1158 return _retval_; 1159 } catch(const std::exception &e) { 1160 throwJavaException(env, &e, method_name); 1161 } catch (...) { 1162 throwJavaException(env, 0, method_name); 1163 } 1164 return 0; 1165 } 1166 1167 1168 1169 // 1170 // double norm(Mat src1, Mat src2, int normType = NORM_L2, Mat mask = Mat()) 1171 // 1172 1173 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_13 (JNIEnv*, jclass, jlong, jlong, jint, jlong); 1174 1175 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_13 1176 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jint normType, jlong mask_nativeObj) 1177 { 1178 static const char method_name[] = "core::norm_13()"; 1179 try { 1180 LOGD("%s", method_name); 1181 Mat& src1 = *((Mat*)src1_nativeObj); 1182 Mat& src2 = *((Mat*)src2_nativeObj); 1183 Mat& mask = *((Mat*)mask_nativeObj); 1184 double _retval_ = cv::norm( src1, src2, (int)normType, mask ); 1185 return _retval_; 1186 } catch(const std::exception &e) { 1187 throwJavaException(env, &e, method_name); 1188 } catch (...) { 1189 throwJavaException(env, 0, method_name); 1190 } 1191 return 0; 1192 } 1193 1194 1195 1196 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_14 (JNIEnv*, jclass, jlong, jlong, jint); 1197 1198 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_14 1199 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jint normType) 1200 { 1201 static const char method_name[] = "core::norm_14()"; 1202 try { 1203 LOGD("%s", method_name); 1204 Mat& src1 = *((Mat*)src1_nativeObj); 1205 Mat& src2 = *((Mat*)src2_nativeObj); 1206 double _retval_ = cv::norm( src1, src2, (int)normType ); 1207 return _retval_; 1208 } catch(const std::exception &e) { 1209 throwJavaException(env, &e, method_name); 1210 } catch (...) { 1211 throwJavaException(env, 0, method_name); 1212 } 1213 return 0; 1214 } 1215 1216 1217 1218 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_15 (JNIEnv*, jclass, jlong, jlong); 1219 1220 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_15 1221 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj) 1222 { 1223 static const char method_name[] = "core::norm_15()"; 1224 try { 1225 LOGD("%s", method_name); 1226 Mat& src1 = *((Mat*)src1_nativeObj); 1227 Mat& src2 = *((Mat*)src2_nativeObj); 1228 double _retval_ = cv::norm( src1, src2 ); 1229 return _retval_; 1230 } catch(const std::exception &e) { 1231 throwJavaException(env, &e, method_name); 1232 } catch (...) { 1233 throwJavaException(env, 0, method_name); 1234 } 1235 return 0; 1236 } 1237 1238 1239 1240 // 1241 // double PSNR(Mat src1, Mat src2) 1242 // 1243 1244 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_PSNR_10 (JNIEnv*, jclass, jlong, jlong); 1245 1246 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_PSNR_10 1247 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj) 1248 { 1249 static const char method_name[] = "core::PSNR_10()"; 1250 try { 1251 LOGD("%s", method_name); 1252 Mat& src1 = *((Mat*)src1_nativeObj); 1253 Mat& src2 = *((Mat*)src2_nativeObj); 1254 double _retval_ = cv::PSNR( src1, src2 ); 1255 return _retval_; 1256 } catch(const std::exception &e) { 1257 throwJavaException(env, &e, method_name); 1258 } catch (...) { 1259 throwJavaException(env, 0, method_name); 1260 } 1261 return 0; 1262 } 1263 1264 1265 1266 // 1267 // void batchDistance(Mat src1, Mat src2, Mat& dist, int dtype, Mat& nidx, int normType = NORM_L2, int K = 0, Mat mask = Mat(), int update = 0, bool crosscheck = false) 1268 // 1269 1270 JNIEXPORT void JNICALL Java_org_opencv_core_Core_batchDistance_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jlong, jint, jint, jlong, jint, jboolean); 1271 1272 JNIEXPORT void JNICALL Java_org_opencv_core_Core_batchDistance_10 1273 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dist_nativeObj, jint dtype, jlong nidx_nativeObj, jint normType, jint K, jlong mask_nativeObj, jint update, jboolean crosscheck) 1274 { 1275 static const char method_name[] = "core::batchDistance_10()"; 1276 try { 1277 LOGD("%s", method_name); 1278 Mat& src1 = *((Mat*)src1_nativeObj); 1279 Mat& src2 = *((Mat*)src2_nativeObj); 1280 Mat& dist = *((Mat*)dist_nativeObj); 1281 Mat& nidx = *((Mat*)nidx_nativeObj); 1282 Mat& mask = *((Mat*)mask_nativeObj); 1283 cv::batchDistance( src1, src2, dist, (int)dtype, nidx, (int)normType, (int)K, mask, (int)update, (bool)crosscheck ); 1284 return; 1285 } catch(const std::exception &e) { 1286 throwJavaException(env, &e, method_name); 1287 } catch (...) { 1288 throwJavaException(env, 0, method_name); 1289 } 1290 return; 1291 } 1292 1293 1294 1295 JNIEXPORT void JNICALL Java_org_opencv_core_Core_batchDistance_11 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jlong, jint, jint); 1296 1297 JNIEXPORT void JNICALL Java_org_opencv_core_Core_batchDistance_11 1298 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dist_nativeObj, jint dtype, jlong nidx_nativeObj, jint normType, jint K) 1299 { 1300 static const char method_name[] = "core::batchDistance_11()"; 1301 try { 1302 LOGD("%s", method_name); 1303 Mat& src1 = *((Mat*)src1_nativeObj); 1304 Mat& src2 = *((Mat*)src2_nativeObj); 1305 Mat& dist = *((Mat*)dist_nativeObj); 1306 Mat& nidx = *((Mat*)nidx_nativeObj); 1307 cv::batchDistance( src1, src2, dist, (int)dtype, nidx, (int)normType, (int)K ); 1308 return; 1309 } catch(const std::exception &e) { 1310 throwJavaException(env, &e, method_name); 1311 } catch (...) { 1312 throwJavaException(env, 0, method_name); 1313 } 1314 return; 1315 } 1316 1317 1318 1319 JNIEXPORT void JNICALL Java_org_opencv_core_Core_batchDistance_12 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jlong); 1320 1321 JNIEXPORT void JNICALL Java_org_opencv_core_Core_batchDistance_12 1322 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dist_nativeObj, jint dtype, jlong nidx_nativeObj) 1323 { 1324 static const char method_name[] = "core::batchDistance_12()"; 1325 try { 1326 LOGD("%s", method_name); 1327 Mat& src1 = *((Mat*)src1_nativeObj); 1328 Mat& src2 = *((Mat*)src2_nativeObj); 1329 Mat& dist = *((Mat*)dist_nativeObj); 1330 Mat& nidx = *((Mat*)nidx_nativeObj); 1331 cv::batchDistance( src1, src2, dist, (int)dtype, nidx ); 1332 return; 1333 } catch(const std::exception &e) { 1334 throwJavaException(env, &e, method_name); 1335 } catch (...) { 1336 throwJavaException(env, 0, method_name); 1337 } 1338 return; 1339 } 1340 1341 1342 1343 // 1344 // float cubeRoot(float val) 1345 // 1346 1347 JNIEXPORT jfloat JNICALL Java_org_opencv_core_Core_cubeRoot_10 (JNIEnv*, jclass, jfloat); 1348 1349 JNIEXPORT jfloat JNICALL Java_org_opencv_core_Core_cubeRoot_10 1350 (JNIEnv* env, jclass , jfloat val) 1351 { 1352 static const char method_name[] = "core::cubeRoot_10()"; 1353 try { 1354 LOGD("%s", method_name); 1355 1356 float _retval_ = cv::cubeRoot( (float)val ); 1357 return _retval_; 1358 } catch(const std::exception &e) { 1359 throwJavaException(env, &e, method_name); 1360 } catch (...) { 1361 throwJavaException(env, 0, method_name); 1362 } 1363 return 0; 1364 } 1365 1366 1367 1368 // 1369 // float fastAtan2(float y, float x) 1370 // 1371 1372 JNIEXPORT jfloat JNICALL Java_org_opencv_core_Core_fastAtan2_10 (JNIEnv*, jclass, jfloat, jfloat); 1373 1374 JNIEXPORT jfloat JNICALL Java_org_opencv_core_Core_fastAtan2_10 1375 (JNIEnv* env, jclass , jfloat y, jfloat x) 1376 { 1377 static const char method_name[] = "core::fastAtan2_10()"; 1378 try { 1379 LOGD("%s", method_name); 1380 1381 float _retval_ = cv::fastAtan2( (float)y, (float)x ); 1382 return _retval_; 1383 } catch(const std::exception &e) { 1384 throwJavaException(env, &e, method_name); 1385 } catch (...) { 1386 throwJavaException(env, 0, method_name); 1387 } 1388 return 0; 1389 } 1390 1391 1392 1393 // 1394 // void merge(vector_Mat mv, Mat& dst) 1395 // 1396 1397 JNIEXPORT void JNICALL Java_org_opencv_core_Core_merge_10 (JNIEnv*, jclass, jlong, jlong); 1398 1399 JNIEXPORT void JNICALL Java_org_opencv_core_Core_merge_10 1400 (JNIEnv* env, jclass , jlong mv_mat_nativeObj, jlong dst_nativeObj) 1401 { 1402 static const char method_name[] = "core::merge_10()"; 1403 try { 1404 LOGD("%s", method_name); 1405 std::vector<Mat> mv; 1406 Mat& mv_mat = *((Mat*)mv_mat_nativeObj); 1407 Mat_to_vector_Mat( mv_mat, mv ); 1408 Mat& dst = *((Mat*)dst_nativeObj); 1409 cv::merge( mv, dst ); 1410 return; 1411 } catch(const std::exception &e) { 1412 throwJavaException(env, &e, method_name); 1413 } catch (...) { 1414 throwJavaException(env, 0, method_name); 1415 } 1416 return; 1417 } 1418 1419 1420 1421 // 1422 // void split(Mat m, vector_Mat& mv) 1423 // 1424 1425 JNIEXPORT void JNICALL Java_org_opencv_core_Core_split_10 (JNIEnv*, jclass, jlong, jlong); 1426 1427 JNIEXPORT void JNICALL Java_org_opencv_core_Core_split_10 1428 (JNIEnv* env, jclass , jlong m_nativeObj, jlong mv_mat_nativeObj) 1429 { 1430 static const char method_name[] = "core::split_10()"; 1431 try { 1432 LOGD("%s", method_name); 1433 std::vector<Mat> mv; 1434 Mat& mv_mat = *((Mat*)mv_mat_nativeObj); 1435 Mat& m = *((Mat*)m_nativeObj); 1436 cv::split( m, mv ); 1437 vector_Mat_to_Mat( mv, mv_mat ); 1438 return; 1439 } catch(const std::exception &e) { 1440 throwJavaException(env, &e, method_name); 1441 } catch (...) { 1442 throwJavaException(env, 0, method_name); 1443 } 1444 return; 1445 } 1446 1447 1448 1449 // 1450 // void mixChannels(vector_Mat src, vector_Mat dst, vector_int fromTo) 1451 // 1452 1453 JNIEXPORT void JNICALL Java_org_opencv_core_Core_mixChannels_10 (JNIEnv*, jclass, jlong, jlong, jlong); 1454 1455 JNIEXPORT void JNICALL Java_org_opencv_core_Core_mixChannels_10 1456 (JNIEnv* env, jclass , jlong src_mat_nativeObj, jlong dst_mat_nativeObj, jlong fromTo_mat_nativeObj) 1457 { 1458 static const char method_name[] = "core::mixChannels_10()"; 1459 try { 1460 LOGD("%s", method_name); 1461 std::vector<Mat> src; 1462 Mat& src_mat = *((Mat*)src_mat_nativeObj); 1463 Mat_to_vector_Mat( src_mat, src ); 1464 std::vector<Mat> dst; 1465 Mat& dst_mat = *((Mat*)dst_mat_nativeObj); 1466 Mat_to_vector_Mat( dst_mat, dst ); 1467 std::vector<int> fromTo; 1468 Mat& fromTo_mat = *((Mat*)fromTo_mat_nativeObj); 1469 Mat_to_vector_int( fromTo_mat, fromTo ); 1470 cv::mixChannels( src, dst, fromTo ); 1471 return; 1472 } catch(const std::exception &e) { 1473 throwJavaException(env, &e, method_name); 1474 } catch (...) { 1475 throwJavaException(env, 0, method_name); 1476 } 1477 return; 1478 } 1479 1480 1481 1482 // 1483 // void extractChannel(Mat src, Mat& dst, int coi) 1484 // 1485 1486 JNIEXPORT void JNICALL Java_org_opencv_core_Core_extractChannel_10 (JNIEnv*, jclass, jlong, jlong, jint); 1487 1488 JNIEXPORT void JNICALL Java_org_opencv_core_Core_extractChannel_10 1489 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint coi) 1490 { 1491 static const char method_name[] = "core::extractChannel_10()"; 1492 try { 1493 LOGD("%s", method_name); 1494 Mat& src = *((Mat*)src_nativeObj); 1495 Mat& dst = *((Mat*)dst_nativeObj); 1496 cv::extractChannel( src, dst, (int)coi ); 1497 return; 1498 } catch(const std::exception &e) { 1499 throwJavaException(env, &e, method_name); 1500 } catch (...) { 1501 throwJavaException(env, 0, method_name); 1502 } 1503 return; 1504 } 1505 1506 1507 1508 // 1509 // void insertChannel(Mat src, Mat& dst, int coi) 1510 // 1511 1512 JNIEXPORT void JNICALL Java_org_opencv_core_Core_insertChannel_10 (JNIEnv*, jclass, jlong, jlong, jint); 1513 1514 JNIEXPORT void JNICALL Java_org_opencv_core_Core_insertChannel_10 1515 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint coi) 1516 { 1517 static const char method_name[] = "core::insertChannel_10()"; 1518 try { 1519 LOGD("%s", method_name); 1520 Mat& src = *((Mat*)src_nativeObj); 1521 Mat& dst = *((Mat*)dst_nativeObj); 1522 cv::insertChannel( src, dst, (int)coi ); 1523 return; 1524 } catch(const std::exception &e) { 1525 throwJavaException(env, &e, method_name); 1526 } catch (...) { 1527 throwJavaException(env, 0, method_name); 1528 } 1529 return; 1530 } 1531 1532 1533 1534 // 1535 // void normalize(Mat src, Mat& dst, double alpha = 1, double beta = 0, int norm_type = NORM_L2, int dtype = -1, Mat mask = Mat()) 1536 // 1537 1538 JNIEXPORT void JNICALL Java_org_opencv_core_Core_normalize_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint, jint, jlong); 1539 1540 JNIEXPORT void JNICALL Java_org_opencv_core_Core_normalize_10 1541 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble alpha, jdouble beta, jint norm_type, jint dtype, jlong mask_nativeObj) 1542 { 1543 static const char method_name[] = "core::normalize_10()"; 1544 try { 1545 LOGD("%s", method_name); 1546 Mat& src = *((Mat*)src_nativeObj); 1547 Mat& dst = *((Mat*)dst_nativeObj); 1548 Mat& mask = *((Mat*)mask_nativeObj); 1549 cv::normalize( src, dst, (double)alpha, (double)beta, (int)norm_type, (int)dtype, mask ); 1550 return; 1551 } catch(const std::exception &e) { 1552 throwJavaException(env, &e, method_name); 1553 } catch (...) { 1554 throwJavaException(env, 0, method_name); 1555 } 1556 return; 1557 } 1558 1559 1560 1561 JNIEXPORT void JNICALL Java_org_opencv_core_Core_normalize_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint, jint); 1562 1563 JNIEXPORT void JNICALL Java_org_opencv_core_Core_normalize_11 1564 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble alpha, jdouble beta, jint norm_type, jint dtype) 1565 { 1566 static const char method_name[] = "core::normalize_11()"; 1567 try { 1568 LOGD("%s", method_name); 1569 Mat& src = *((Mat*)src_nativeObj); 1570 Mat& dst = *((Mat*)dst_nativeObj); 1571 cv::normalize( src, dst, (double)alpha, (double)beta, (int)norm_type, (int)dtype ); 1572 return; 1573 } catch(const std::exception &e) { 1574 throwJavaException(env, &e, method_name); 1575 } catch (...) { 1576 throwJavaException(env, 0, method_name); 1577 } 1578 return; 1579 } 1580 1581 1582 1583 JNIEXPORT void JNICALL Java_org_opencv_core_Core_normalize_12 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint); 1584 1585 JNIEXPORT void JNICALL Java_org_opencv_core_Core_normalize_12 1586 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble alpha, jdouble beta, jint norm_type) 1587 { 1588 static const char method_name[] = "core::normalize_12()"; 1589 try { 1590 LOGD("%s", method_name); 1591 Mat& src = *((Mat*)src_nativeObj); 1592 Mat& dst = *((Mat*)dst_nativeObj); 1593 cv::normalize( src, dst, (double)alpha, (double)beta, (int)norm_type ); 1594 return; 1595 } catch(const std::exception &e) { 1596 throwJavaException(env, &e, method_name); 1597 } catch (...) { 1598 throwJavaException(env, 0, method_name); 1599 } 1600 return; 1601 } 1602 1603 1604 1605 JNIEXPORT void JNICALL Java_org_opencv_core_Core_normalize_13 (JNIEnv*, jclass, jlong, jlong); 1606 1607 JNIEXPORT void JNICALL Java_org_opencv_core_Core_normalize_13 1608 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj) 1609 { 1610 static const char method_name[] = "core::normalize_13()"; 1611 try { 1612 LOGD("%s", method_name); 1613 Mat& src = *((Mat*)src_nativeObj); 1614 Mat& dst = *((Mat*)dst_nativeObj); 1615 cv::normalize( src, dst ); 1616 return; 1617 } catch(const std::exception &e) { 1618 throwJavaException(env, &e, method_name); 1619 } catch (...) { 1620 throwJavaException(env, 0, method_name); 1621 } 1622 return; 1623 } 1624 1625 1626 1627 // 1628 // void reduce(Mat src, Mat& dst, int dim, int rtype, int dtype = -1) 1629 // 1630 1631 JNIEXPORT void JNICALL Java_org_opencv_core_Core_reduce_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint); 1632 1633 JNIEXPORT void JNICALL Java_org_opencv_core_Core_reduce_10 1634 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint dim, jint rtype, jint dtype) 1635 { 1636 static const char method_name[] = "core::reduce_10()"; 1637 try { 1638 LOGD("%s", method_name); 1639 Mat& src = *((Mat*)src_nativeObj); 1640 Mat& dst = *((Mat*)dst_nativeObj); 1641 cv::reduce( src, dst, (int)dim, (int)rtype, (int)dtype ); 1642 return; 1643 } catch(const std::exception &e) { 1644 throwJavaException(env, &e, method_name); 1645 } catch (...) { 1646 throwJavaException(env, 0, method_name); 1647 } 1648 return; 1649 } 1650 1651 1652 1653 JNIEXPORT void JNICALL Java_org_opencv_core_Core_reduce_11 (JNIEnv*, jclass, jlong, jlong, jint, jint); 1654 1655 JNIEXPORT void JNICALL Java_org_opencv_core_Core_reduce_11 1656 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint dim, jint rtype) 1657 { 1658 static const char method_name[] = "core::reduce_11()"; 1659 try { 1660 LOGD("%s", method_name); 1661 Mat& src = *((Mat*)src_nativeObj); 1662 Mat& dst = *((Mat*)dst_nativeObj); 1663 cv::reduce( src, dst, (int)dim, (int)rtype ); 1664 return; 1665 } catch(const std::exception &e) { 1666 throwJavaException(env, &e, method_name); 1667 } catch (...) { 1668 throwJavaException(env, 0, method_name); 1669 } 1670 return; 1671 } 1672 1673 1674 1675 // 1676 // int getNumberOfCPUs() 1677 // 1678 1679 JNIEXPORT jint JNICALL Java_org_opencv_core_Core_getNumberOfCPUs_10 (JNIEnv*, jclass); 1680 1681 JNIEXPORT jint JNICALL Java_org_opencv_core_Core_getNumberOfCPUs_10 1682 (JNIEnv* env, jclass ) 1683 { 1684 static const char method_name[] = "core::getNumberOfCPUs_10()"; 1685 try { 1686 LOGD("%s", method_name); 1687 1688 int _retval_ = cv::getNumberOfCPUs( ); 1689 return _retval_; 1690 } catch(const std::exception &e) { 1691 throwJavaException(env, &e, method_name); 1692 } catch (...) { 1693 throwJavaException(env, 0, method_name); 1694 } 1695 return 0; 1696 } 1697 1698 1699 1700 // 1701 // void add(Mat src1, Scalar src2, Mat& dst, Mat mask = Mat(), int dtype = -1) 1702 // 1703 1704 JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_13 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jlong, jint); 1705 1706 JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_13 1707 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj, jlong mask_nativeObj, jint dtype) 1708 { 1709 static const char method_name[] = "core::add_13()"; 1710 try { 1711 LOGD("%s", method_name); 1712 Mat& src1 = *((Mat*)src1_nativeObj); 1713 Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3); 1714 Mat& dst = *((Mat*)dst_nativeObj); 1715 Mat& mask = *((Mat*)mask_nativeObj); 1716 cv::add( src1, src2, dst, mask, (int)dtype ); 1717 return; 1718 } catch(const std::exception &e) { 1719 throwJavaException(env, &e, method_name); 1720 } catch (...) { 1721 throwJavaException(env, 0, method_name); 1722 } 1723 return; 1724 } 1725 1726 1727 1728 JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_14 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jlong); 1729 1730 JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_14 1731 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj, jlong mask_nativeObj) 1732 { 1733 static const char method_name[] = "core::add_14()"; 1734 try { 1735 LOGD("%s", method_name); 1736 Mat& src1 = *((Mat*)src1_nativeObj); 1737 Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3); 1738 Mat& dst = *((Mat*)dst_nativeObj); 1739 Mat& mask = *((Mat*)mask_nativeObj); 1740 cv::add( src1, src2, dst, mask ); 1741 return; 1742 } catch(const std::exception &e) { 1743 throwJavaException(env, &e, method_name); 1744 } catch (...) { 1745 throwJavaException(env, 0, method_name); 1746 } 1747 return; 1748 } 1749 1750 1751 1752 JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_15 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong); 1753 1754 JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_15 1755 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj) 1756 { 1757 static const char method_name[] = "core::add_15()"; 1758 try { 1759 LOGD("%s", method_name); 1760 Mat& src1 = *((Mat*)src1_nativeObj); 1761 Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3); 1762 Mat& dst = *((Mat*)dst_nativeObj); 1763 cv::add( src1, src2, dst ); 1764 return; 1765 } catch(const std::exception &e) { 1766 throwJavaException(env, &e, method_name); 1767 } catch (...) { 1768 throwJavaException(env, 0, method_name); 1769 } 1770 return; 1771 } 1772 1773 1774 1775 // 1776 // void subtract(Mat src1, Scalar src2, Mat& dst, Mat mask = Mat(), int dtype = -1) 1777 // 1778 1779 JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_13 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jlong, jint); 1780 1781 JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_13 1782 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj, jlong mask_nativeObj, jint dtype) 1783 { 1784 static const char method_name[] = "core::subtract_13()"; 1785 try { 1786 LOGD("%s", method_name); 1787 Mat& src1 = *((Mat*)src1_nativeObj); 1788 Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3); 1789 Mat& dst = *((Mat*)dst_nativeObj); 1790 Mat& mask = *((Mat*)mask_nativeObj); 1791 cv::subtract( src1, src2, dst, mask, (int)dtype ); 1792 return; 1793 } catch(const std::exception &e) { 1794 throwJavaException(env, &e, method_name); 1795 } catch (...) { 1796 throwJavaException(env, 0, method_name); 1797 } 1798 return; 1799 } 1800 1801 1802 1803 JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_14 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jlong); 1804 1805 JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_14 1806 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj, jlong mask_nativeObj) 1807 { 1808 static const char method_name[] = "core::subtract_14()"; 1809 try { 1810 LOGD("%s", method_name); 1811 Mat& src1 = *((Mat*)src1_nativeObj); 1812 Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3); 1813 Mat& dst = *((Mat*)dst_nativeObj); 1814 Mat& mask = *((Mat*)mask_nativeObj); 1815 cv::subtract( src1, src2, dst, mask ); 1816 return; 1817 } catch(const std::exception &e) { 1818 throwJavaException(env, &e, method_name); 1819 } catch (...) { 1820 throwJavaException(env, 0, method_name); 1821 } 1822 return; 1823 } 1824 1825 1826 1827 JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_15 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong); 1828 1829 JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_15 1830 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj) 1831 { 1832 static const char method_name[] = "core::subtract_15()"; 1833 try { 1834 LOGD("%s", method_name); 1835 Mat& src1 = *((Mat*)src1_nativeObj); 1836 Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3); 1837 Mat& dst = *((Mat*)dst_nativeObj); 1838 cv::subtract( src1, src2, dst ); 1839 return; 1840 } catch(const std::exception &e) { 1841 throwJavaException(env, &e, method_name); 1842 } catch (...) { 1843 throwJavaException(env, 0, method_name); 1844 } 1845 return; 1846 } 1847 1848 1849 1850 // 1851 // void multiply(Mat src1, Scalar src2, Mat& dst, double scale = 1, int dtype = -1) 1852 // 1853 1854 JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_13 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jdouble, jint); 1855 1856 JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_13 1857 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj, jdouble scale, jint dtype) 1858 { 1859 static const char method_name[] = "core::multiply_13()"; 1860 try { 1861 LOGD("%s", method_name); 1862 Mat& src1 = *((Mat*)src1_nativeObj); 1863 Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3); 1864 Mat& dst = *((Mat*)dst_nativeObj); 1865 cv::multiply( src1, src2, dst, (double)scale, (int)dtype ); 1866 return; 1867 } catch(const std::exception &e) { 1868 throwJavaException(env, &e, method_name); 1869 } catch (...) { 1870 throwJavaException(env, 0, method_name); 1871 } 1872 return; 1873 } 1874 1875 1876 1877 JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_14 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jdouble); 1878 1879 JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_14 1880 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj, jdouble scale) 1881 { 1882 static const char method_name[] = "core::multiply_14()"; 1883 try { 1884 LOGD("%s", method_name); 1885 Mat& src1 = *((Mat*)src1_nativeObj); 1886 Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3); 1887 Mat& dst = *((Mat*)dst_nativeObj); 1888 cv::multiply( src1, src2, dst, (double)scale ); 1889 return; 1890 } catch(const std::exception &e) { 1891 throwJavaException(env, &e, method_name); 1892 } catch (...) { 1893 throwJavaException(env, 0, method_name); 1894 } 1895 return; 1896 } 1897 1898 1899 1900 JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_15 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong); 1901 1902 JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_15 1903 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj) 1904 { 1905 static const char method_name[] = "core::multiply_15()"; 1906 try { 1907 LOGD("%s", method_name); 1908 Mat& src1 = *((Mat*)src1_nativeObj); 1909 Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3); 1910 Mat& dst = *((Mat*)dst_nativeObj); 1911 cv::multiply( src1, src2, dst ); 1912 return; 1913 } catch(const std::exception &e) { 1914 throwJavaException(env, &e, method_name); 1915 } catch (...) { 1916 throwJavaException(env, 0, method_name); 1917 } 1918 return; 1919 } 1920 1921 1922 1923 // 1924 // void divide(Mat src1, Scalar src2, Mat& dst, double scale = 1, int dtype = -1) 1925 // 1926 1927 JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_15 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jdouble, jint); 1928 1929 JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_15 1930 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj, jdouble scale, jint dtype) 1931 { 1932 static const char method_name[] = "core::divide_15()"; 1933 try { 1934 LOGD("%s", method_name); 1935 Mat& src1 = *((Mat*)src1_nativeObj); 1936 Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3); 1937 Mat& dst = *((Mat*)dst_nativeObj); 1938 cv::divide( src1, src2, dst, (double)scale, (int)dtype ); 1939 return; 1940 } catch(const std::exception &e) { 1941 throwJavaException(env, &e, method_name); 1942 } catch (...) { 1943 throwJavaException(env, 0, method_name); 1944 } 1945 return; 1946 } 1947 1948 1949 1950 JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_16 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jdouble); 1951 1952 JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_16 1953 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj, jdouble scale) 1954 { 1955 static const char method_name[] = "core::divide_16()"; 1956 try { 1957 LOGD("%s", method_name); 1958 Mat& src1 = *((Mat*)src1_nativeObj); 1959 Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3); 1960 Mat& dst = *((Mat*)dst_nativeObj); 1961 cv::divide( src1, src2, dst, (double)scale ); 1962 return; 1963 } catch(const std::exception &e) { 1964 throwJavaException(env, &e, method_name); 1965 } catch (...) { 1966 throwJavaException(env, 0, method_name); 1967 } 1968 return; 1969 } 1970 1971 1972 1973 JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_17 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong); 1974 1975 JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_17 1976 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj) 1977 { 1978 static const char method_name[] = "core::divide_17()"; 1979 try { 1980 LOGD("%s", method_name); 1981 Mat& src1 = *((Mat*)src1_nativeObj); 1982 Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3); 1983 Mat& dst = *((Mat*)dst_nativeObj); 1984 cv::divide( src1, src2, dst ); 1985 return; 1986 } catch(const std::exception &e) { 1987 throwJavaException(env, &e, method_name); 1988 } catch (...) { 1989 throwJavaException(env, 0, method_name); 1990 } 1991 return; 1992 } 1993 1994 1995 1996 // 1997 // void absdiff(Mat src1, Scalar src2, Mat& dst) 1998 // 1999 2000 JNIEXPORT void JNICALL Java_org_opencv_core_Core_absdiff_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong); 2001 2002 JNIEXPORT void JNICALL Java_org_opencv_core_Core_absdiff_10 2003 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj) 2004 { 2005 static const char method_name[] = "core::absdiff_10()"; 2006 try { 2007 LOGD("%s", method_name); 2008 Mat& src1 = *((Mat*)src1_nativeObj); 2009 Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3); 2010 Mat& dst = *((Mat*)dst_nativeObj); 2011 cv::absdiff( src1, src2, dst ); 2012 return; 2013 } catch(const std::exception &e) { 2014 throwJavaException(env, &e, method_name); 2015 } catch (...) { 2016 throwJavaException(env, 0, method_name); 2017 } 2018 return; 2019 } 2020 2021 2022 2023 // 2024 // void compare(Mat src1, Scalar src2, Mat& dst, int cmpop) 2025 // 2026 2027 JNIEXPORT void JNICALL Java_org_opencv_core_Core_compare_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jint); 2028 2029 JNIEXPORT void JNICALL Java_org_opencv_core_Core_compare_10 2030 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj, jint cmpop) 2031 { 2032 static const char method_name[] = "core::compare_10()"; 2033 try { 2034 LOGD("%s", method_name); 2035 Mat& src1 = *((Mat*)src1_nativeObj); 2036 Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3); 2037 Mat& dst = *((Mat*)dst_nativeObj); 2038 cv::compare( src1, src2, dst, (int)cmpop ); 2039 return; 2040 } catch(const std::exception &e) { 2041 throwJavaException(env, &e, method_name); 2042 } catch (...) { 2043 throwJavaException(env, 0, method_name); 2044 } 2045 return; 2046 } 2047 2048 2049 2050 // 2051 // void min(Mat src1, Scalar src2, Mat& dst) 2052 // 2053 2054 JNIEXPORT void JNICALL Java_org_opencv_core_Core_min_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong); 2055 2056 JNIEXPORT void JNICALL Java_org_opencv_core_Core_min_10 2057 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj) 2058 { 2059 static const char method_name[] = "core::min_10()"; 2060 try { 2061 LOGD("%s", method_name); 2062 Mat& src1 = *((Mat*)src1_nativeObj); 2063 Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3); 2064 Mat& dst = *((Mat*)dst_nativeObj); 2065 cv::min( src1, src2, dst ); 2066 return; 2067 } catch(const std::exception &e) { 2068 throwJavaException(env, &e, method_name); 2069 } catch (...) { 2070 throwJavaException(env, 0, method_name); 2071 } 2072 return; 2073 } 2074 2075 2076 2077 // 2078 // void max(Mat src1, Scalar src2, Mat& dst) 2079 // 2080 2081 JNIEXPORT void JNICALL Java_org_opencv_core_Core_max_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong); 2082 2083 JNIEXPORT void JNICALL Java_org_opencv_core_Core_max_10 2084 (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj) 2085 { 2086 static const char method_name[] = "core::max_10()"; 2087 try { 2088 LOGD("%s", method_name); 2089 Mat& src1 = *((Mat*)src1_nativeObj); 2090 Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3); 2091 Mat& dst = *((Mat*)dst_nativeObj); 2092 cv::max( src1, src2, dst ); 2093 return; 2094 } catch(const std::exception &e) { 2095 throwJavaException(env, &e, method_name); 2096 } catch (...) { 2097 throwJavaException(env, 0, method_name); 2098 } 2099 return; 2100 } 2101 2102 2103 2104 // 2105 // int64 getTickCount() 2106 // 2107 2108 JNIEXPORT jlong JNICALL Java_org_opencv_core_Core_getTickCount_10 (JNIEnv*, jclass); 2109 2110 JNIEXPORT jlong JNICALL Java_org_opencv_core_Core_getTickCount_10 2111 (JNIEnv* env, jclass ) 2112 { 2113 static const char method_name[] = "core::getTickCount_10()"; 2114 try { 2115 LOGD("%s", method_name); 2116 2117 int64 _retval_ = cv::getTickCount( ); 2118 return _retval_; 2119 } catch(const std::exception &e) { 2120 throwJavaException(env, &e, method_name); 2121 } catch (...) { 2122 throwJavaException(env, 0, method_name); 2123 } 2124 return 0; 2125 } 2126 2127 2128 2129 // 2130 // String getBuildInformation() 2131 // 2132 2133 JNIEXPORT jstring JNICALL Java_org_opencv_core_Core_getBuildInformation_10 (JNIEnv*, jclass); 2134 2135 JNIEXPORT jstring JNICALL Java_org_opencv_core_Core_getBuildInformation_10 2136 (JNIEnv* env, jclass ) 2137 { 2138 static const char method_name[] = "core::getBuildInformation_10()"; 2139 try { 2140 LOGD("%s", method_name); 2141 2142 cv::String _retval_ = cv::getBuildInformation( ); 2143 return env->NewStringUTF(_retval_.c_str()); 2144 } catch(const std::exception &e) { 2145 throwJavaException(env, &e, method_name); 2146 } catch (...) { 2147 throwJavaException(env, 0, method_name); 2148 } 2149 return env->NewStringUTF(""); 2150 } 2151 2152 2153 2154 // 2155 // void flip(Mat src, Mat& dst, int flipCode) 2156 // 2157 2158 JNIEXPORT void JNICALL Java_org_opencv_core_Core_flip_10 (JNIEnv*, jclass, jlong, jlong, jint); 2159 2160 JNIEXPORT void JNICALL Java_org_opencv_core_Core_flip_10 2161 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint flipCode) 2162 { 2163 static const char method_name[] = "core::flip_10()"; 2164 try { 2165 LOGD("%s", method_name); 2166 Mat& src = *((Mat*)src_nativeObj); 2167 Mat& dst = *((Mat*)dst_nativeObj); 2168 cv::flip( src, dst, (int)flipCode ); 2169 return; 2170 } catch(const std::exception &e) { 2171 throwJavaException(env, &e, method_name); 2172 } catch (...) { 2173 throwJavaException(env, 0, method_name); 2174 } 2175 return; 2176 } 2177 2178 2179 2180 // 2181 // void repeat(Mat src, int ny, int nx, Mat& dst) 2182 // 2183 2184 JNIEXPORT void JNICALL Java_org_opencv_core_Core_repeat_10 (JNIEnv*, jclass, jlong, jint, jint, jlong); 2185 2186 JNIEXPORT void JNICALL Java_org_opencv_core_Core_repeat_10 2187 (JNIEnv* env, jclass , jlong src_nativeObj, jint ny, jint nx, jlong dst_nativeObj) 2188 { 2189 static const char method_name[] = "core::repeat_10()"; 2190 try { 2191 LOGD("%s", method_name); 2192 Mat& src = *((Mat*)src_nativeObj); 2193 Mat& dst = *((Mat*)dst_nativeObj); 2194 cv::repeat( src, (int)ny, (int)nx, dst ); 2195 return; 2196 } catch(const std::exception &e) { 2197 throwJavaException(env, &e, method_name); 2198 } catch (...) { 2199 throwJavaException(env, 0, method_name); 2200 } 2201 return; 2202 } 2203 2204 2205 2206 // 2207 // void hconcat(vector_Mat src, Mat& dst) 2208 // 2209 2210 JNIEXPORT void JNICALL Java_org_opencv_core_Core_hconcat_10 (JNIEnv*, jclass, jlong, jlong); 2211 2212 JNIEXPORT void JNICALL Java_org_opencv_core_Core_hconcat_10 2213 (JNIEnv* env, jclass , jlong src_mat_nativeObj, jlong dst_nativeObj) 2214 { 2215 static const char method_name[] = "core::hconcat_10()"; 2216 try { 2217 LOGD("%s", method_name); 2218 std::vector<Mat> src; 2219 Mat& src_mat = *((Mat*)src_mat_nativeObj); 2220 Mat_to_vector_Mat( src_mat, src ); 2221 Mat& dst = *((Mat*)dst_nativeObj); 2222 cv::hconcat( src, dst ); 2223 return; 2224 } catch(const std::exception &e) { 2225 throwJavaException(env, &e, method_name); 2226 } catch (...) { 2227 throwJavaException(env, 0, method_name); 2228 } 2229 return; 2230 } 2231 2232 2233 2234 // 2235 // void vconcat(vector_Mat src, Mat& dst) 2236 // 2237 2238 JNIEXPORT void JNICALL Java_org_opencv_core_Core_vconcat_10 (JNIEnv*, jclass, jlong, jlong); 2239 2240 JNIEXPORT void JNICALL Java_org_opencv_core_Core_vconcat_10 2241 (JNIEnv* env, jclass , jlong src_mat_nativeObj, jlong dst_nativeObj) 2242 { 2243 static const char method_name[] = "core::vconcat_10()"; 2244 try { 2245 LOGD("%s", method_name); 2246 std::vector<Mat> src; 2247 Mat& src_mat = *((Mat*)src_mat_nativeObj); 2248 Mat_to_vector_Mat( src_mat, src ); 2249 Mat& dst = *((Mat*)dst_nativeObj); 2250 cv::vconcat( src, dst ); 2251 return; 2252 } catch(const std::exception &e) { 2253 throwJavaException(env, &e, method_name); 2254 } catch (...) { 2255 throwJavaException(env, 0, method_name); 2256 } 2257 return; 2258 } 2259 2260 2261 2262 // 2263 // void bitwise_and(Mat src1, Mat src2, Mat& dst, Mat mask = Mat()) 2264 // 2265 2266 JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1and_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong); 2267 2268 JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1and_10 2269 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj) 2270 { 2271 static const char method_name[] = "core::bitwise_1and_10()"; 2272 try { 2273 LOGD("%s", method_name); 2274 Mat& src1 = *((Mat*)src1_nativeObj); 2275 Mat& src2 = *((Mat*)src2_nativeObj); 2276 Mat& dst = *((Mat*)dst_nativeObj); 2277 Mat& mask = *((Mat*)mask_nativeObj); 2278 cv::bitwise_and( src1, src2, dst, mask ); 2279 return; 2280 } catch(const std::exception &e) { 2281 throwJavaException(env, &e, method_name); 2282 } catch (...) { 2283 throwJavaException(env, 0, method_name); 2284 } 2285 return; 2286 } 2287 2288 2289 2290 JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1and_11 (JNIEnv*, jclass, jlong, jlong, jlong); 2291 2292 JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1and_11 2293 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj) 2294 { 2295 static const char method_name[] = "core::bitwise_1and_11()"; 2296 try { 2297 LOGD("%s", method_name); 2298 Mat& src1 = *((Mat*)src1_nativeObj); 2299 Mat& src2 = *((Mat*)src2_nativeObj); 2300 Mat& dst = *((Mat*)dst_nativeObj); 2301 cv::bitwise_and( src1, src2, dst ); 2302 return; 2303 } catch(const std::exception &e) { 2304 throwJavaException(env, &e, method_name); 2305 } catch (...) { 2306 throwJavaException(env, 0, method_name); 2307 } 2308 return; 2309 } 2310 2311 2312 2313 // 2314 // void bitwise_or(Mat src1, Mat src2, Mat& dst, Mat mask = Mat()) 2315 // 2316 2317 JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1or_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong); 2318 2319 JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1or_10 2320 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj) 2321 { 2322 static const char method_name[] = "core::bitwise_1or_10()"; 2323 try { 2324 LOGD("%s", method_name); 2325 Mat& src1 = *((Mat*)src1_nativeObj); 2326 Mat& src2 = *((Mat*)src2_nativeObj); 2327 Mat& dst = *((Mat*)dst_nativeObj); 2328 Mat& mask = *((Mat*)mask_nativeObj); 2329 cv::bitwise_or( src1, src2, dst, mask ); 2330 return; 2331 } catch(const std::exception &e) { 2332 throwJavaException(env, &e, method_name); 2333 } catch (...) { 2334 throwJavaException(env, 0, method_name); 2335 } 2336 return; 2337 } 2338 2339 2340 2341 JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1or_11 (JNIEnv*, jclass, jlong, jlong, jlong); 2342 2343 JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1or_11 2344 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj) 2345 { 2346 static const char method_name[] = "core::bitwise_1or_11()"; 2347 try { 2348 LOGD("%s", method_name); 2349 Mat& src1 = *((Mat*)src1_nativeObj); 2350 Mat& src2 = *((Mat*)src2_nativeObj); 2351 Mat& dst = *((Mat*)dst_nativeObj); 2352 cv::bitwise_or( src1, src2, dst ); 2353 return; 2354 } catch(const std::exception &e) { 2355 throwJavaException(env, &e, method_name); 2356 } catch (...) { 2357 throwJavaException(env, 0, method_name); 2358 } 2359 return; 2360 } 2361 2362 2363 2364 // 2365 // void bitwise_xor(Mat src1, Mat src2, Mat& dst, Mat mask = Mat()) 2366 // 2367 2368 JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1xor_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong); 2369 2370 JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1xor_10 2371 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj) 2372 { 2373 static const char method_name[] = "core::bitwise_1xor_10()"; 2374 try { 2375 LOGD("%s", method_name); 2376 Mat& src1 = *((Mat*)src1_nativeObj); 2377 Mat& src2 = *((Mat*)src2_nativeObj); 2378 Mat& dst = *((Mat*)dst_nativeObj); 2379 Mat& mask = *((Mat*)mask_nativeObj); 2380 cv::bitwise_xor( src1, src2, dst, mask ); 2381 return; 2382 } catch(const std::exception &e) { 2383 throwJavaException(env, &e, method_name); 2384 } catch (...) { 2385 throwJavaException(env, 0, method_name); 2386 } 2387 return; 2388 } 2389 2390 2391 2392 JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1xor_11 (JNIEnv*, jclass, jlong, jlong, jlong); 2393 2394 JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1xor_11 2395 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj) 2396 { 2397 static const char method_name[] = "core::bitwise_1xor_11()"; 2398 try { 2399 LOGD("%s", method_name); 2400 Mat& src1 = *((Mat*)src1_nativeObj); 2401 Mat& src2 = *((Mat*)src2_nativeObj); 2402 Mat& dst = *((Mat*)dst_nativeObj); 2403 cv::bitwise_xor( src1, src2, dst ); 2404 return; 2405 } catch(const std::exception &e) { 2406 throwJavaException(env, &e, method_name); 2407 } catch (...) { 2408 throwJavaException(env, 0, method_name); 2409 } 2410 return; 2411 } 2412 2413 2414 2415 // 2416 // void bitwise_not(Mat src, Mat& dst, Mat mask = Mat()) 2417 // 2418 2419 JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1not_10 (JNIEnv*, jclass, jlong, jlong, jlong); 2420 2421 JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1not_10 2422 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj) 2423 { 2424 static const char method_name[] = "core::bitwise_1not_10()"; 2425 try { 2426 LOGD("%s", method_name); 2427 Mat& src = *((Mat*)src_nativeObj); 2428 Mat& dst = *((Mat*)dst_nativeObj); 2429 Mat& mask = *((Mat*)mask_nativeObj); 2430 cv::bitwise_not( src, dst, mask ); 2431 return; 2432 } catch(const std::exception &e) { 2433 throwJavaException(env, &e, method_name); 2434 } catch (...) { 2435 throwJavaException(env, 0, method_name); 2436 } 2437 return; 2438 } 2439 2440 2441 2442 JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1not_11 (JNIEnv*, jclass, jlong, jlong); 2443 2444 JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1not_11 2445 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj) 2446 { 2447 static const char method_name[] = "core::bitwise_1not_11()"; 2448 try { 2449 LOGD("%s", method_name); 2450 Mat& src = *((Mat*)src_nativeObj); 2451 Mat& dst = *((Mat*)dst_nativeObj); 2452 cv::bitwise_not( src, dst ); 2453 return; 2454 } catch(const std::exception &e) { 2455 throwJavaException(env, &e, method_name); 2456 } catch (...) { 2457 throwJavaException(env, 0, method_name); 2458 } 2459 return; 2460 } 2461 2462 2463 2464 // 2465 // void absdiff(Mat src1, Mat src2, Mat& dst) 2466 // 2467 2468 JNIEXPORT void JNICALL Java_org_opencv_core_Core_absdiff_11 (JNIEnv*, jclass, jlong, jlong, jlong); 2469 2470 JNIEXPORT void JNICALL Java_org_opencv_core_Core_absdiff_11 2471 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj) 2472 { 2473 static const char method_name[] = "core::absdiff_11()"; 2474 try { 2475 LOGD("%s", method_name); 2476 Mat& src1 = *((Mat*)src1_nativeObj); 2477 Mat& src2 = *((Mat*)src2_nativeObj); 2478 Mat& dst = *((Mat*)dst_nativeObj); 2479 cv::absdiff( src1, src2, dst ); 2480 return; 2481 } catch(const std::exception &e) { 2482 throwJavaException(env, &e, method_name); 2483 } catch (...) { 2484 throwJavaException(env, 0, method_name); 2485 } 2486 return; 2487 } 2488 2489 2490 2491 // 2492 // void inRange(Mat src, Scalar lowerb, Scalar upperb, Mat& dst) 2493 // 2494 2495 JNIEXPORT void JNICALL Java_org_opencv_core_Core_inRange_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jlong); 2496 2497 JNIEXPORT void JNICALL Java_org_opencv_core_Core_inRange_10 2498 (JNIEnv* env, jclass , jlong src_nativeObj, jdouble lowerb_val0, jdouble lowerb_val1, jdouble lowerb_val2, jdouble lowerb_val3, jdouble upperb_val0, jdouble upperb_val1, jdouble upperb_val2, jdouble upperb_val3, jlong dst_nativeObj) 2499 { 2500 static const char method_name[] = "core::inRange_10()"; 2501 try { 2502 LOGD("%s", method_name); 2503 Mat& src = *((Mat*)src_nativeObj); 2504 Scalar lowerb(lowerb_val0, lowerb_val1, lowerb_val2, lowerb_val3); 2505 Scalar upperb(upperb_val0, upperb_val1, upperb_val2, upperb_val3); 2506 Mat& dst = *((Mat*)dst_nativeObj); 2507 cv::inRange( src, lowerb, upperb, dst ); 2508 return; 2509 } catch(const std::exception &e) { 2510 throwJavaException(env, &e, method_name); 2511 } catch (...) { 2512 throwJavaException(env, 0, method_name); 2513 } 2514 return; 2515 } 2516 2517 2518 2519 // 2520 // void compare(Mat src1, Mat src2, Mat& dst, int cmpop) 2521 // 2522 2523 JNIEXPORT void JNICALL Java_org_opencv_core_Core_compare_11 (JNIEnv*, jclass, jlong, jlong, jlong, jint); 2524 2525 JNIEXPORT void JNICALL Java_org_opencv_core_Core_compare_11 2526 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jint cmpop) 2527 { 2528 static const char method_name[] = "core::compare_11()"; 2529 try { 2530 LOGD("%s", method_name); 2531 Mat& src1 = *((Mat*)src1_nativeObj); 2532 Mat& src2 = *((Mat*)src2_nativeObj); 2533 Mat& dst = *((Mat*)dst_nativeObj); 2534 cv::compare( src1, src2, dst, (int)cmpop ); 2535 return; 2536 } catch(const std::exception &e) { 2537 throwJavaException(env, &e, method_name); 2538 } catch (...) { 2539 throwJavaException(env, 0, method_name); 2540 } 2541 return; 2542 } 2543 2544 2545 2546 // 2547 // void min(Mat src1, Mat src2, Mat& dst) 2548 // 2549 2550 JNIEXPORT void JNICALL Java_org_opencv_core_Core_min_11 (JNIEnv*, jclass, jlong, jlong, jlong); 2551 2552 JNIEXPORT void JNICALL Java_org_opencv_core_Core_min_11 2553 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj) 2554 { 2555 static const char method_name[] = "core::min_11()"; 2556 try { 2557 LOGD("%s", method_name); 2558 Mat& src1 = *((Mat*)src1_nativeObj); 2559 Mat& src2 = *((Mat*)src2_nativeObj); 2560 Mat& dst = *((Mat*)dst_nativeObj); 2561 cv::min( src1, src2, dst ); 2562 return; 2563 } catch(const std::exception &e) { 2564 throwJavaException(env, &e, method_name); 2565 } catch (...) { 2566 throwJavaException(env, 0, method_name); 2567 } 2568 return; 2569 } 2570 2571 2572 2573 // 2574 // void max(Mat src1, Mat src2, Mat& dst) 2575 // 2576 2577 JNIEXPORT void JNICALL Java_org_opencv_core_Core_max_11 (JNIEnv*, jclass, jlong, jlong, jlong); 2578 2579 JNIEXPORT void JNICALL Java_org_opencv_core_Core_max_11 2580 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj) 2581 { 2582 static const char method_name[] = "core::max_11()"; 2583 try { 2584 LOGD("%s", method_name); 2585 Mat& src1 = *((Mat*)src1_nativeObj); 2586 Mat& src2 = *((Mat*)src2_nativeObj); 2587 Mat& dst = *((Mat*)dst_nativeObj); 2588 cv::max( src1, src2, dst ); 2589 return; 2590 } catch(const std::exception &e) { 2591 throwJavaException(env, &e, method_name); 2592 } catch (...) { 2593 throwJavaException(env, 0, method_name); 2594 } 2595 return; 2596 } 2597 2598 2599 2600 // 2601 // void sqrt(Mat src, Mat& dst) 2602 // 2603 2604 JNIEXPORT void JNICALL Java_org_opencv_core_Core_sqrt_10 (JNIEnv*, jclass, jlong, jlong); 2605 2606 JNIEXPORT void JNICALL Java_org_opencv_core_Core_sqrt_10 2607 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj) 2608 { 2609 static const char method_name[] = "core::sqrt_10()"; 2610 try { 2611 LOGD("%s", method_name); 2612 Mat& src = *((Mat*)src_nativeObj); 2613 Mat& dst = *((Mat*)dst_nativeObj); 2614 cv::sqrt( src, dst ); 2615 return; 2616 } catch(const std::exception &e) { 2617 throwJavaException(env, &e, method_name); 2618 } catch (...) { 2619 throwJavaException(env, 0, method_name); 2620 } 2621 return; 2622 } 2623 2624 2625 2626 // 2627 // void pow(Mat src, double power, Mat& dst) 2628 // 2629 2630 JNIEXPORT void JNICALL Java_org_opencv_core_Core_pow_10 (JNIEnv*, jclass, jlong, jdouble, jlong); 2631 2632 JNIEXPORT void JNICALL Java_org_opencv_core_Core_pow_10 2633 (JNIEnv* env, jclass , jlong src_nativeObj, jdouble power, jlong dst_nativeObj) 2634 { 2635 static const char method_name[] = "core::pow_10()"; 2636 try { 2637 LOGD("%s", method_name); 2638 Mat& src = *((Mat*)src_nativeObj); 2639 Mat& dst = *((Mat*)dst_nativeObj); 2640 cv::pow( src, (double)power, dst ); 2641 return; 2642 } catch(const std::exception &e) { 2643 throwJavaException(env, &e, method_name); 2644 } catch (...) { 2645 throwJavaException(env, 0, method_name); 2646 } 2647 return; 2648 } 2649 2650 2651 2652 // 2653 // void exp(Mat src, Mat& dst) 2654 // 2655 2656 JNIEXPORT void JNICALL Java_org_opencv_core_Core_exp_10 (JNIEnv*, jclass, jlong, jlong); 2657 2658 JNIEXPORT void JNICALL Java_org_opencv_core_Core_exp_10 2659 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj) 2660 { 2661 static const char method_name[] = "core::exp_10()"; 2662 try { 2663 LOGD("%s", method_name); 2664 Mat& src = *((Mat*)src_nativeObj); 2665 Mat& dst = *((Mat*)dst_nativeObj); 2666 cv::exp( src, dst ); 2667 return; 2668 } catch(const std::exception &e) { 2669 throwJavaException(env, &e, method_name); 2670 } catch (...) { 2671 throwJavaException(env, 0, method_name); 2672 } 2673 return; 2674 } 2675 2676 2677 2678 // 2679 // void log(Mat src, Mat& dst) 2680 // 2681 2682 JNIEXPORT void JNICALL Java_org_opencv_core_Core_log_10 (JNIEnv*, jclass, jlong, jlong); 2683 2684 JNIEXPORT void JNICALL Java_org_opencv_core_Core_log_10 2685 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj) 2686 { 2687 static const char method_name[] = "core::log_10()"; 2688 try { 2689 LOGD("%s", method_name); 2690 Mat& src = *((Mat*)src_nativeObj); 2691 Mat& dst = *((Mat*)dst_nativeObj); 2692 cv::log( src, dst ); 2693 return; 2694 } catch(const std::exception &e) { 2695 throwJavaException(env, &e, method_name); 2696 } catch (...) { 2697 throwJavaException(env, 0, method_name); 2698 } 2699 return; 2700 } 2701 2702 2703 2704 // 2705 // void polarToCart(Mat magnitude, Mat angle, Mat& x, Mat& y, bool angleInDegrees = false) 2706 // 2707 2708 JNIEXPORT void JNICALL Java_org_opencv_core_Core_polarToCart_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jboolean); 2709 2710 JNIEXPORT void JNICALL Java_org_opencv_core_Core_polarToCart_10 2711 (JNIEnv* env, jclass , jlong magnitude_nativeObj, jlong angle_nativeObj, jlong x_nativeObj, jlong y_nativeObj, jboolean angleInDegrees) 2712 { 2713 static const char method_name[] = "core::polarToCart_10()"; 2714 try { 2715 LOGD("%s", method_name); 2716 Mat& magnitude = *((Mat*)magnitude_nativeObj); 2717 Mat& angle = *((Mat*)angle_nativeObj); 2718 Mat& x = *((Mat*)x_nativeObj); 2719 Mat& y = *((Mat*)y_nativeObj); 2720 cv::polarToCart( magnitude, angle, x, y, (bool)angleInDegrees ); 2721 return; 2722 } catch(const std::exception &e) { 2723 throwJavaException(env, &e, method_name); 2724 } catch (...) { 2725 throwJavaException(env, 0, method_name); 2726 } 2727 return; 2728 } 2729 2730 2731 2732 JNIEXPORT void JNICALL Java_org_opencv_core_Core_polarToCart_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong); 2733 2734 JNIEXPORT void JNICALL Java_org_opencv_core_Core_polarToCart_11 2735 (JNIEnv* env, jclass , jlong magnitude_nativeObj, jlong angle_nativeObj, jlong x_nativeObj, jlong y_nativeObj) 2736 { 2737 static const char method_name[] = "core::polarToCart_11()"; 2738 try { 2739 LOGD("%s", method_name); 2740 Mat& magnitude = *((Mat*)magnitude_nativeObj); 2741 Mat& angle = *((Mat*)angle_nativeObj); 2742 Mat& x = *((Mat*)x_nativeObj); 2743 Mat& y = *((Mat*)y_nativeObj); 2744 cv::polarToCart( magnitude, angle, x, y ); 2745 return; 2746 } catch(const std::exception &e) { 2747 throwJavaException(env, &e, method_name); 2748 } catch (...) { 2749 throwJavaException(env, 0, method_name); 2750 } 2751 return; 2752 } 2753 2754 2755 2756 // 2757 // void cartToPolar(Mat x, Mat y, Mat& magnitude, Mat& angle, bool angleInDegrees = false) 2758 // 2759 2760 JNIEXPORT void JNICALL Java_org_opencv_core_Core_cartToPolar_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jboolean); 2761 2762 JNIEXPORT void JNICALL Java_org_opencv_core_Core_cartToPolar_10 2763 (JNIEnv* env, jclass , jlong x_nativeObj, jlong y_nativeObj, jlong magnitude_nativeObj, jlong angle_nativeObj, jboolean angleInDegrees) 2764 { 2765 static const char method_name[] = "core::cartToPolar_10()"; 2766 try { 2767 LOGD("%s", method_name); 2768 Mat& x = *((Mat*)x_nativeObj); 2769 Mat& y = *((Mat*)y_nativeObj); 2770 Mat& magnitude = *((Mat*)magnitude_nativeObj); 2771 Mat& angle = *((Mat*)angle_nativeObj); 2772 cv::cartToPolar( x, y, magnitude, angle, (bool)angleInDegrees ); 2773 return; 2774 } catch(const std::exception &e) { 2775 throwJavaException(env, &e, method_name); 2776 } catch (...) { 2777 throwJavaException(env, 0, method_name); 2778 } 2779 return; 2780 } 2781 2782 2783 2784 JNIEXPORT void JNICALL Java_org_opencv_core_Core_cartToPolar_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong); 2785 2786 JNIEXPORT void JNICALL Java_org_opencv_core_Core_cartToPolar_11 2787 (JNIEnv* env, jclass , jlong x_nativeObj, jlong y_nativeObj, jlong magnitude_nativeObj, jlong angle_nativeObj) 2788 { 2789 static const char method_name[] = "core::cartToPolar_11()"; 2790 try { 2791 LOGD("%s", method_name); 2792 Mat& x = *((Mat*)x_nativeObj); 2793 Mat& y = *((Mat*)y_nativeObj); 2794 Mat& magnitude = *((Mat*)magnitude_nativeObj); 2795 Mat& angle = *((Mat*)angle_nativeObj); 2796 cv::cartToPolar( x, y, magnitude, angle ); 2797 return; 2798 } catch(const std::exception &e) { 2799 throwJavaException(env, &e, method_name); 2800 } catch (...) { 2801 throwJavaException(env, 0, method_name); 2802 } 2803 return; 2804 } 2805 2806 2807 2808 // 2809 // void phase(Mat x, Mat y, Mat& angle, bool angleInDegrees = false) 2810 // 2811 2812 JNIEXPORT void JNICALL Java_org_opencv_core_Core_phase_10 (JNIEnv*, jclass, jlong, jlong, jlong, jboolean); 2813 2814 JNIEXPORT void JNICALL Java_org_opencv_core_Core_phase_10 2815 (JNIEnv* env, jclass , jlong x_nativeObj, jlong y_nativeObj, jlong angle_nativeObj, jboolean angleInDegrees) 2816 { 2817 static const char method_name[] = "core::phase_10()"; 2818 try { 2819 LOGD("%s", method_name); 2820 Mat& x = *((Mat*)x_nativeObj); 2821 Mat& y = *((Mat*)y_nativeObj); 2822 Mat& angle = *((Mat*)angle_nativeObj); 2823 cv::phase( x, y, angle, (bool)angleInDegrees ); 2824 return; 2825 } catch(const std::exception &e) { 2826 throwJavaException(env, &e, method_name); 2827 } catch (...) { 2828 throwJavaException(env, 0, method_name); 2829 } 2830 return; 2831 } 2832 2833 2834 2835 JNIEXPORT void JNICALL Java_org_opencv_core_Core_phase_11 (JNIEnv*, jclass, jlong, jlong, jlong); 2836 2837 JNIEXPORT void JNICALL Java_org_opencv_core_Core_phase_11 2838 (JNIEnv* env, jclass , jlong x_nativeObj, jlong y_nativeObj, jlong angle_nativeObj) 2839 { 2840 static const char method_name[] = "core::phase_11()"; 2841 try { 2842 LOGD("%s", method_name); 2843 Mat& x = *((Mat*)x_nativeObj); 2844 Mat& y = *((Mat*)y_nativeObj); 2845 Mat& angle = *((Mat*)angle_nativeObj); 2846 cv::phase( x, y, angle ); 2847 return; 2848 } catch(const std::exception &e) { 2849 throwJavaException(env, &e, method_name); 2850 } catch (...) { 2851 throwJavaException(env, 0, method_name); 2852 } 2853 return; 2854 } 2855 2856 2857 2858 // 2859 // void magnitude(Mat x, Mat y, Mat& magnitude) 2860 // 2861 2862 JNIEXPORT void JNICALL Java_org_opencv_core_Core_magnitude_10 (JNIEnv*, jclass, jlong, jlong, jlong); 2863 2864 JNIEXPORT void JNICALL Java_org_opencv_core_Core_magnitude_10 2865 (JNIEnv* env, jclass , jlong x_nativeObj, jlong y_nativeObj, jlong magnitude_nativeObj) 2866 { 2867 static const char method_name[] = "core::magnitude_10()"; 2868 try { 2869 LOGD("%s", method_name); 2870 Mat& x = *((Mat*)x_nativeObj); 2871 Mat& y = *((Mat*)y_nativeObj); 2872 Mat& magnitude = *((Mat*)magnitude_nativeObj); 2873 cv::magnitude( x, y, magnitude ); 2874 return; 2875 } catch(const std::exception &e) { 2876 throwJavaException(env, &e, method_name); 2877 } catch (...) { 2878 throwJavaException(env, 0, method_name); 2879 } 2880 return; 2881 } 2882 2883 2884 2885 // 2886 // bool checkRange(Mat a, bool quiet = true, _hidden_ * pos = 0, double minVal = -DBL_MAX, double maxVal = DBL_MAX) 2887 // 2888 2889 JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_checkRange_10 (JNIEnv*, jclass, jlong, jboolean, jdouble, jdouble); 2890 2891 JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_checkRange_10 2892 (JNIEnv* env, jclass , jlong a_nativeObj, jboolean quiet, jdouble minVal, jdouble maxVal) 2893 { 2894 static const char method_name[] = "core::checkRange_10()"; 2895 try { 2896 LOGD("%s", method_name); 2897 Mat& a = *((Mat*)a_nativeObj); 2898 bool _retval_ = cv::checkRange( a, (bool)quiet, 0, (double)minVal, (double)maxVal ); 2899 return _retval_; 2900 } catch(const std::exception &e) { 2901 throwJavaException(env, &e, method_name); 2902 } catch (...) { 2903 throwJavaException(env, 0, method_name); 2904 } 2905 return 0; 2906 } 2907 2908 2909 2910 JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_checkRange_11 (JNIEnv*, jclass, jlong); 2911 2912 JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_checkRange_11 2913 (JNIEnv* env, jclass , jlong a_nativeObj) 2914 { 2915 static const char method_name[] = "core::checkRange_11()"; 2916 try { 2917 LOGD("%s", method_name); 2918 Mat& a = *((Mat*)a_nativeObj); 2919 bool _retval_ = cv::checkRange( a ); 2920 return _retval_; 2921 } catch(const std::exception &e) { 2922 throwJavaException(env, &e, method_name); 2923 } catch (...) { 2924 throwJavaException(env, 0, method_name); 2925 } 2926 return 0; 2927 } 2928 2929 2930 2931 // 2932 // void patchNaNs(Mat& a, double val = 0) 2933 // 2934 2935 JNIEXPORT void JNICALL Java_org_opencv_core_Core_patchNaNs_10 (JNIEnv*, jclass, jlong, jdouble); 2936 2937 JNIEXPORT void JNICALL Java_org_opencv_core_Core_patchNaNs_10 2938 (JNIEnv* env, jclass , jlong a_nativeObj, jdouble val) 2939 { 2940 static const char method_name[] = "core::patchNaNs_10()"; 2941 try { 2942 LOGD("%s", method_name); 2943 Mat& a = *((Mat*)a_nativeObj); 2944 cv::patchNaNs( a, (double)val ); 2945 return; 2946 } catch(const std::exception &e) { 2947 throwJavaException(env, &e, method_name); 2948 } catch (...) { 2949 throwJavaException(env, 0, method_name); 2950 } 2951 return; 2952 } 2953 2954 2955 2956 JNIEXPORT void JNICALL Java_org_opencv_core_Core_patchNaNs_11 (JNIEnv*, jclass, jlong); 2957 2958 JNIEXPORT void JNICALL Java_org_opencv_core_Core_patchNaNs_11 2959 (JNIEnv* env, jclass , jlong a_nativeObj) 2960 { 2961 static const char method_name[] = "core::patchNaNs_11()"; 2962 try { 2963 LOGD("%s", method_name); 2964 Mat& a = *((Mat*)a_nativeObj); 2965 cv::patchNaNs( a ); 2966 return; 2967 } catch(const std::exception &e) { 2968 throwJavaException(env, &e, method_name); 2969 } catch (...) { 2970 throwJavaException(env, 0, method_name); 2971 } 2972 return; 2973 } 2974 2975 2976 2977 // 2978 // void gemm(Mat src1, Mat src2, double alpha, Mat src3, double beta, Mat& dst, int flags = 0) 2979 // 2980 2981 JNIEXPORT void JNICALL Java_org_opencv_core_Core_gemm_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jlong, jdouble, jlong, jint); 2982 2983 JNIEXPORT void JNICALL Java_org_opencv_core_Core_gemm_10 2984 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jdouble alpha, jlong src3_nativeObj, jdouble beta, jlong dst_nativeObj, jint flags) 2985 { 2986 static const char method_name[] = "core::gemm_10()"; 2987 try { 2988 LOGD("%s", method_name); 2989 Mat& src1 = *((Mat*)src1_nativeObj); 2990 Mat& src2 = *((Mat*)src2_nativeObj); 2991 Mat& src3 = *((Mat*)src3_nativeObj); 2992 Mat& dst = *((Mat*)dst_nativeObj); 2993 cv::gemm( src1, src2, (double)alpha, src3, (double)beta, dst, (int)flags ); 2994 return; 2995 } catch(const std::exception &e) { 2996 throwJavaException(env, &e, method_name); 2997 } catch (...) { 2998 throwJavaException(env, 0, method_name); 2999 } 3000 return; 3001 } 3002 3003 3004 3005 JNIEXPORT void JNICALL Java_org_opencv_core_Core_gemm_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jlong, jdouble, jlong); 3006 3007 JNIEXPORT void JNICALL Java_org_opencv_core_Core_gemm_11 3008 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jdouble alpha, jlong src3_nativeObj, jdouble beta, jlong dst_nativeObj) 3009 { 3010 static const char method_name[] = "core::gemm_11()"; 3011 try { 3012 LOGD("%s", method_name); 3013 Mat& src1 = *((Mat*)src1_nativeObj); 3014 Mat& src2 = *((Mat*)src2_nativeObj); 3015 Mat& src3 = *((Mat*)src3_nativeObj); 3016 Mat& dst = *((Mat*)dst_nativeObj); 3017 cv::gemm( src1, src2, (double)alpha, src3, (double)beta, dst ); 3018 return; 3019 } catch(const std::exception &e) { 3020 throwJavaException(env, &e, method_name); 3021 } catch (...) { 3022 throwJavaException(env, 0, method_name); 3023 } 3024 return; 3025 } 3026 3027 3028 3029 // 3030 // void mulTransposed(Mat src, Mat& dst, bool aTa, Mat delta = Mat(), double scale = 1, int dtype = -1) 3031 // 3032 3033 JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulTransposed_10 (JNIEnv*, jclass, jlong, jlong, jboolean, jlong, jdouble, jint); 3034 3035 JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulTransposed_10 3036 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jboolean aTa, jlong delta_nativeObj, jdouble scale, jint dtype) 3037 { 3038 static const char method_name[] = "core::mulTransposed_10()"; 3039 try { 3040 LOGD("%s", method_name); 3041 Mat& src = *((Mat*)src_nativeObj); 3042 Mat& dst = *((Mat*)dst_nativeObj); 3043 Mat& delta = *((Mat*)delta_nativeObj); 3044 cv::mulTransposed( src, dst, (bool)aTa, delta, (double)scale, (int)dtype ); 3045 return; 3046 } catch(const std::exception &e) { 3047 throwJavaException(env, &e, method_name); 3048 } catch (...) { 3049 throwJavaException(env, 0, method_name); 3050 } 3051 return; 3052 } 3053 3054 3055 3056 JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulTransposed_11 (JNIEnv*, jclass, jlong, jlong, jboolean, jlong, jdouble); 3057 3058 JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulTransposed_11 3059 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jboolean aTa, jlong delta_nativeObj, jdouble scale) 3060 { 3061 static const char method_name[] = "core::mulTransposed_11()"; 3062 try { 3063 LOGD("%s", method_name); 3064 Mat& src = *((Mat*)src_nativeObj); 3065 Mat& dst = *((Mat*)dst_nativeObj); 3066 Mat& delta = *((Mat*)delta_nativeObj); 3067 cv::mulTransposed( src, dst, (bool)aTa, delta, (double)scale ); 3068 return; 3069 } catch(const std::exception &e) { 3070 throwJavaException(env, &e, method_name); 3071 } catch (...) { 3072 throwJavaException(env, 0, method_name); 3073 } 3074 return; 3075 } 3076 3077 3078 3079 JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulTransposed_12 (JNIEnv*, jclass, jlong, jlong, jboolean); 3080 3081 JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulTransposed_12 3082 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jboolean aTa) 3083 { 3084 static const char method_name[] = "core::mulTransposed_12()"; 3085 try { 3086 LOGD("%s", method_name); 3087 Mat& src = *((Mat*)src_nativeObj); 3088 Mat& dst = *((Mat*)dst_nativeObj); 3089 cv::mulTransposed( src, dst, (bool)aTa ); 3090 return; 3091 } catch(const std::exception &e) { 3092 throwJavaException(env, &e, method_name); 3093 } catch (...) { 3094 throwJavaException(env, 0, method_name); 3095 } 3096 return; 3097 } 3098 3099 3100 3101 // 3102 // void transpose(Mat src, Mat& dst) 3103 // 3104 3105 JNIEXPORT void JNICALL Java_org_opencv_core_Core_transpose_10 (JNIEnv*, jclass, jlong, jlong); 3106 3107 JNIEXPORT void JNICALL Java_org_opencv_core_Core_transpose_10 3108 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj) 3109 { 3110 static const char method_name[] = "core::transpose_10()"; 3111 try { 3112 LOGD("%s", method_name); 3113 Mat& src = *((Mat*)src_nativeObj); 3114 Mat& dst = *((Mat*)dst_nativeObj); 3115 cv::transpose( src, dst ); 3116 return; 3117 } catch(const std::exception &e) { 3118 throwJavaException(env, &e, method_name); 3119 } catch (...) { 3120 throwJavaException(env, 0, method_name); 3121 } 3122 return; 3123 } 3124 3125 3126 3127 // 3128 // void transform(Mat src, Mat& dst, Mat m) 3129 // 3130 3131 JNIEXPORT void JNICALL Java_org_opencv_core_Core_transform_10 (JNIEnv*, jclass, jlong, jlong, jlong); 3132 3133 JNIEXPORT void JNICALL Java_org_opencv_core_Core_transform_10 3134 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong m_nativeObj) 3135 { 3136 static const char method_name[] = "core::transform_10()"; 3137 try { 3138 LOGD("%s", method_name); 3139 Mat& src = *((Mat*)src_nativeObj); 3140 Mat& dst = *((Mat*)dst_nativeObj); 3141 Mat& m = *((Mat*)m_nativeObj); 3142 cv::transform( src, dst, m ); 3143 return; 3144 } catch(const std::exception &e) { 3145 throwJavaException(env, &e, method_name); 3146 } catch (...) { 3147 throwJavaException(env, 0, method_name); 3148 } 3149 return; 3150 } 3151 3152 3153 3154 // 3155 // void perspectiveTransform(Mat src, Mat& dst, Mat m) 3156 // 3157 3158 JNIEXPORT void JNICALL Java_org_opencv_core_Core_perspectiveTransform_10 (JNIEnv*, jclass, jlong, jlong, jlong); 3159 3160 JNIEXPORT void JNICALL Java_org_opencv_core_Core_perspectiveTransform_10 3161 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong m_nativeObj) 3162 { 3163 static const char method_name[] = "core::perspectiveTransform_10()"; 3164 try { 3165 LOGD("%s", method_name); 3166 Mat& src = *((Mat*)src_nativeObj); 3167 Mat& dst = *((Mat*)dst_nativeObj); 3168 Mat& m = *((Mat*)m_nativeObj); 3169 cv::perspectiveTransform( src, dst, m ); 3170 return; 3171 } catch(const std::exception &e) { 3172 throwJavaException(env, &e, method_name); 3173 } catch (...) { 3174 throwJavaException(env, 0, method_name); 3175 } 3176 return; 3177 } 3178 3179 3180 3181 // 3182 // void completeSymm(Mat& mtx, bool lowerToUpper = false) 3183 // 3184 3185 JNIEXPORT void JNICALL Java_org_opencv_core_Core_completeSymm_10 (JNIEnv*, jclass, jlong, jboolean); 3186 3187 JNIEXPORT void JNICALL Java_org_opencv_core_Core_completeSymm_10 3188 (JNIEnv* env, jclass , jlong mtx_nativeObj, jboolean lowerToUpper) 3189 { 3190 static const char method_name[] = "core::completeSymm_10()"; 3191 try { 3192 LOGD("%s", method_name); 3193 Mat& mtx = *((Mat*)mtx_nativeObj); 3194 cv::completeSymm( mtx, (bool)lowerToUpper ); 3195 return; 3196 } catch(const std::exception &e) { 3197 throwJavaException(env, &e, method_name); 3198 } catch (...) { 3199 throwJavaException(env, 0, method_name); 3200 } 3201 return; 3202 } 3203 3204 3205 3206 JNIEXPORT void JNICALL Java_org_opencv_core_Core_completeSymm_11 (JNIEnv*, jclass, jlong); 3207 3208 JNIEXPORT void JNICALL Java_org_opencv_core_Core_completeSymm_11 3209 (JNIEnv* env, jclass , jlong mtx_nativeObj) 3210 { 3211 static const char method_name[] = "core::completeSymm_11()"; 3212 try { 3213 LOGD("%s", method_name); 3214 Mat& mtx = *((Mat*)mtx_nativeObj); 3215 cv::completeSymm( mtx ); 3216 return; 3217 } catch(const std::exception &e) { 3218 throwJavaException(env, &e, method_name); 3219 } catch (...) { 3220 throwJavaException(env, 0, method_name); 3221 } 3222 return; 3223 } 3224 3225 3226 3227 // 3228 // void setIdentity(Mat& mtx, Scalar s = Scalar(1)) 3229 // 3230 3231 JNIEXPORT void JNICALL Java_org_opencv_core_Core_setIdentity_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble); 3232 3233 JNIEXPORT void JNICALL Java_org_opencv_core_Core_setIdentity_10 3234 (JNIEnv* env, jclass , jlong mtx_nativeObj, jdouble s_val0, jdouble s_val1, jdouble s_val2, jdouble s_val3) 3235 { 3236 static const char method_name[] = "core::setIdentity_10()"; 3237 try { 3238 LOGD("%s", method_name); 3239 Mat& mtx = *((Mat*)mtx_nativeObj); 3240 Scalar s(s_val0, s_val1, s_val2, s_val3); 3241 cv::setIdentity( mtx, s ); 3242 return; 3243 } catch(const std::exception &e) { 3244 throwJavaException(env, &e, method_name); 3245 } catch (...) { 3246 throwJavaException(env, 0, method_name); 3247 } 3248 return; 3249 } 3250 3251 3252 3253 JNIEXPORT void JNICALL Java_org_opencv_core_Core_setIdentity_11 (JNIEnv*, jclass, jlong); 3254 3255 JNIEXPORT void JNICALL Java_org_opencv_core_Core_setIdentity_11 3256 (JNIEnv* env, jclass , jlong mtx_nativeObj) 3257 { 3258 static const char method_name[] = "core::setIdentity_11()"; 3259 try { 3260 LOGD("%s", method_name); 3261 Mat& mtx = *((Mat*)mtx_nativeObj); 3262 cv::setIdentity( mtx ); 3263 return; 3264 } catch(const std::exception &e) { 3265 throwJavaException(env, &e, method_name); 3266 } catch (...) { 3267 throwJavaException(env, 0, method_name); 3268 } 3269 return; 3270 } 3271 3272 3273 3274 // 3275 // double determinant(Mat mtx) 3276 // 3277 3278 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_determinant_10 (JNIEnv*, jclass, jlong); 3279 3280 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_determinant_10 3281 (JNIEnv* env, jclass , jlong mtx_nativeObj) 3282 { 3283 static const char method_name[] = "core::determinant_10()"; 3284 try { 3285 LOGD("%s", method_name); 3286 Mat& mtx = *((Mat*)mtx_nativeObj); 3287 double _retval_ = cv::determinant( mtx ); 3288 return _retval_; 3289 } catch(const std::exception &e) { 3290 throwJavaException(env, &e, method_name); 3291 } catch (...) { 3292 throwJavaException(env, 0, method_name); 3293 } 3294 return 0; 3295 } 3296 3297 3298 3299 // 3300 // Scalar trace(Mat mtx) 3301 // 3302 3303 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_trace_10 (JNIEnv*, jclass, jlong); 3304 3305 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_trace_10 3306 (JNIEnv* env, jclass , jlong mtx_nativeObj) 3307 { 3308 static const char method_name[] = "core::trace_10()"; 3309 try { 3310 LOGD("%s", method_name); 3311 Mat& mtx = *((Mat*)mtx_nativeObj); 3312 Scalar _retval_ = cv::trace( mtx ); 3313 jdoubleArray _da_retval_ = env->NewDoubleArray(4); jdouble _tmp_retval_[4] = {_retval_.val[0], _retval_.val[1], _retval_.val[2], _retval_.val[3]}; env->SetDoubleArrayRegion(_da_retval_, 0, 4, _tmp_retval_); 3314 return _da_retval_; 3315 } catch(const std::exception &e) { 3316 throwJavaException(env, &e, method_name); 3317 } catch (...) { 3318 throwJavaException(env, 0, method_name); 3319 } 3320 return 0; 3321 } 3322 3323 3324 3325 // 3326 // double invert(Mat src, Mat& dst, int flags = DECOMP_LU) 3327 // 3328 3329 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_invert_10 (JNIEnv*, jclass, jlong, jlong, jint); 3330 3331 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_invert_10 3332 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint flags) 3333 { 3334 static const char method_name[] = "core::invert_10()"; 3335 try { 3336 LOGD("%s", method_name); 3337 Mat& src = *((Mat*)src_nativeObj); 3338 Mat& dst = *((Mat*)dst_nativeObj); 3339 double _retval_ = cv::invert( src, dst, (int)flags ); 3340 return _retval_; 3341 } catch(const std::exception &e) { 3342 throwJavaException(env, &e, method_name); 3343 } catch (...) { 3344 throwJavaException(env, 0, method_name); 3345 } 3346 return 0; 3347 } 3348 3349 3350 3351 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_invert_11 (JNIEnv*, jclass, jlong, jlong); 3352 3353 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_invert_11 3354 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj) 3355 { 3356 static const char method_name[] = "core::invert_11()"; 3357 try { 3358 LOGD("%s", method_name); 3359 Mat& src = *((Mat*)src_nativeObj); 3360 Mat& dst = *((Mat*)dst_nativeObj); 3361 double _retval_ = cv::invert( src, dst ); 3362 return _retval_; 3363 } catch(const std::exception &e) { 3364 throwJavaException(env, &e, method_name); 3365 } catch (...) { 3366 throwJavaException(env, 0, method_name); 3367 } 3368 return 0; 3369 } 3370 3371 3372 3373 // 3374 // bool solve(Mat src1, Mat src2, Mat& dst, int flags = DECOMP_LU) 3375 // 3376 3377 JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_solve_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint); 3378 3379 JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_solve_10 3380 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jint flags) 3381 { 3382 static const char method_name[] = "core::solve_10()"; 3383 try { 3384 LOGD("%s", method_name); 3385 Mat& src1 = *((Mat*)src1_nativeObj); 3386 Mat& src2 = *((Mat*)src2_nativeObj); 3387 Mat& dst = *((Mat*)dst_nativeObj); 3388 bool _retval_ = cv::solve( src1, src2, dst, (int)flags ); 3389 return _retval_; 3390 } catch(const std::exception &e) { 3391 throwJavaException(env, &e, method_name); 3392 } catch (...) { 3393 throwJavaException(env, 0, method_name); 3394 } 3395 return 0; 3396 } 3397 3398 3399 3400 JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_solve_11 (JNIEnv*, jclass, jlong, jlong, jlong); 3401 3402 JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_solve_11 3403 (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj) 3404 { 3405 static const char method_name[] = "core::solve_11()"; 3406 try { 3407 LOGD("%s", method_name); 3408 Mat& src1 = *((Mat*)src1_nativeObj); 3409 Mat& src2 = *((Mat*)src2_nativeObj); 3410 Mat& dst = *((Mat*)dst_nativeObj); 3411 bool _retval_ = cv::solve( src1, src2, dst ); 3412 return _retval_; 3413 } catch(const std::exception &e) { 3414 throwJavaException(env, &e, method_name); 3415 } catch (...) { 3416 throwJavaException(env, 0, method_name); 3417 } 3418 return 0; 3419 } 3420 3421 3422 3423 // 3424 // void sort(Mat src, Mat& dst, int flags) 3425 // 3426 3427 JNIEXPORT void JNICALL Java_org_opencv_core_Core_sort_10 (JNIEnv*, jclass, jlong, jlong, jint); 3428 3429 JNIEXPORT void JNICALL Java_org_opencv_core_Core_sort_10 3430 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint flags) 3431 { 3432 static const char method_name[] = "core::sort_10()"; 3433 try { 3434 LOGD("%s", method_name); 3435 Mat& src = *((Mat*)src_nativeObj); 3436 Mat& dst = *((Mat*)dst_nativeObj); 3437 cv::sort( src, dst, (int)flags ); 3438 return; 3439 } catch(const std::exception &e) { 3440 throwJavaException(env, &e, method_name); 3441 } catch (...) { 3442 throwJavaException(env, 0, method_name); 3443 } 3444 return; 3445 } 3446 3447 3448 3449 // 3450 // void sortIdx(Mat src, Mat& dst, int flags) 3451 // 3452 3453 JNIEXPORT void JNICALL Java_org_opencv_core_Core_sortIdx_10 (JNIEnv*, jclass, jlong, jlong, jint); 3454 3455 JNIEXPORT void JNICALL Java_org_opencv_core_Core_sortIdx_10 3456 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint flags) 3457 { 3458 static const char method_name[] = "core::sortIdx_10()"; 3459 try { 3460 LOGD("%s", method_name); 3461 Mat& src = *((Mat*)src_nativeObj); 3462 Mat& dst = *((Mat*)dst_nativeObj); 3463 cv::sortIdx( src, dst, (int)flags ); 3464 return; 3465 } catch(const std::exception &e) { 3466 throwJavaException(env, &e, method_name); 3467 } catch (...) { 3468 throwJavaException(env, 0, method_name); 3469 } 3470 return; 3471 } 3472 3473 3474 3475 // 3476 // int solveCubic(Mat coeffs, Mat& roots) 3477 // 3478 3479 JNIEXPORT jint JNICALL Java_org_opencv_core_Core_solveCubic_10 (JNIEnv*, jclass, jlong, jlong); 3480 3481 JNIEXPORT jint JNICALL Java_org_opencv_core_Core_solveCubic_10 3482 (JNIEnv* env, jclass , jlong coeffs_nativeObj, jlong roots_nativeObj) 3483 { 3484 static const char method_name[] = "core::solveCubic_10()"; 3485 try { 3486 LOGD("%s", method_name); 3487 Mat& coeffs = *((Mat*)coeffs_nativeObj); 3488 Mat& roots = *((Mat*)roots_nativeObj); 3489 int _retval_ = cv::solveCubic( coeffs, roots ); 3490 return _retval_; 3491 } catch(const std::exception &e) { 3492 throwJavaException(env, &e, method_name); 3493 } catch (...) { 3494 throwJavaException(env, 0, method_name); 3495 } 3496 return 0; 3497 } 3498 3499 3500 3501 // 3502 // double solvePoly(Mat coeffs, Mat& roots, int maxIters = 300) 3503 // 3504 3505 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_solvePoly_10 (JNIEnv*, jclass, jlong, jlong, jint); 3506 3507 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_solvePoly_10 3508 (JNIEnv* env, jclass , jlong coeffs_nativeObj, jlong roots_nativeObj, jint maxIters) 3509 { 3510 static const char method_name[] = "core::solvePoly_10()"; 3511 try { 3512 LOGD("%s", method_name); 3513 Mat& coeffs = *((Mat*)coeffs_nativeObj); 3514 Mat& roots = *((Mat*)roots_nativeObj); 3515 double _retval_ = cv::solvePoly( coeffs, roots, (int)maxIters ); 3516 return _retval_; 3517 } catch(const std::exception &e) { 3518 throwJavaException(env, &e, method_name); 3519 } catch (...) { 3520 throwJavaException(env, 0, method_name); 3521 } 3522 return 0; 3523 } 3524 3525 3526 3527 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_solvePoly_11 (JNIEnv*, jclass, jlong, jlong); 3528 3529 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_solvePoly_11 3530 (JNIEnv* env, jclass , jlong coeffs_nativeObj, jlong roots_nativeObj) 3531 { 3532 static const char method_name[] = "core::solvePoly_11()"; 3533 try { 3534 LOGD("%s", method_name); 3535 Mat& coeffs = *((Mat*)coeffs_nativeObj); 3536 Mat& roots = *((Mat*)roots_nativeObj); 3537 double _retval_ = cv::solvePoly( coeffs, roots ); 3538 return _retval_; 3539 } catch(const std::exception &e) { 3540 throwJavaException(env, &e, method_name); 3541 } catch (...) { 3542 throwJavaException(env, 0, method_name); 3543 } 3544 return 0; 3545 } 3546 3547 3548 3549 // 3550 // bool eigen(Mat src, Mat& eigenvalues, Mat& eigenvectors = Mat()) 3551 // 3552 3553 JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_eigen_10 (JNIEnv*, jclass, jlong, jlong, jlong); 3554 3555 JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_eigen_10 3556 (JNIEnv* env, jclass , jlong src_nativeObj, jlong eigenvalues_nativeObj, jlong eigenvectors_nativeObj) 3557 { 3558 static const char method_name[] = "core::eigen_10()"; 3559 try { 3560 LOGD("%s", method_name); 3561 Mat& src = *((Mat*)src_nativeObj); 3562 Mat& eigenvalues = *((Mat*)eigenvalues_nativeObj); 3563 Mat& eigenvectors = *((Mat*)eigenvectors_nativeObj); 3564 bool _retval_ = cv::eigen( src, eigenvalues, eigenvectors ); 3565 return _retval_; 3566 } catch(const std::exception &e) { 3567 throwJavaException(env, &e, method_name); 3568 } catch (...) { 3569 throwJavaException(env, 0, method_name); 3570 } 3571 return 0; 3572 } 3573 3574 3575 3576 JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_eigen_11 (JNIEnv*, jclass, jlong, jlong); 3577 3578 JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_eigen_11 3579 (JNIEnv* env, jclass , jlong src_nativeObj, jlong eigenvalues_nativeObj) 3580 { 3581 static const char method_name[] = "core::eigen_11()"; 3582 try { 3583 LOGD("%s", method_name); 3584 Mat& src = *((Mat*)src_nativeObj); 3585 Mat& eigenvalues = *((Mat*)eigenvalues_nativeObj); 3586 bool _retval_ = cv::eigen( src, eigenvalues ); 3587 return _retval_; 3588 } catch(const std::exception &e) { 3589 throwJavaException(env, &e, method_name); 3590 } catch (...) { 3591 throwJavaException(env, 0, method_name); 3592 } 3593 return 0; 3594 } 3595 3596 3597 3598 // 3599 // void calcCovarMatrix(Mat samples, Mat& covar, Mat& mean, int flags, int ctype = CV_64F) 3600 // 3601 3602 JNIEXPORT void JNICALL Java_org_opencv_core_Core_calcCovarMatrix_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jint); 3603 3604 JNIEXPORT void JNICALL Java_org_opencv_core_Core_calcCovarMatrix_10 3605 (JNIEnv* env, jclass , jlong samples_nativeObj, jlong covar_nativeObj, jlong mean_nativeObj, jint flags, jint ctype) 3606 { 3607 static const char method_name[] = "core::calcCovarMatrix_10()"; 3608 try { 3609 LOGD("%s", method_name); 3610 Mat& samples = *((Mat*)samples_nativeObj); 3611 Mat& covar = *((Mat*)covar_nativeObj); 3612 Mat& mean = *((Mat*)mean_nativeObj); 3613 cv::calcCovarMatrix( samples, covar, mean, (int)flags, (int)ctype ); 3614 return; 3615 } catch(const std::exception &e) { 3616 throwJavaException(env, &e, method_name); 3617 } catch (...) { 3618 throwJavaException(env, 0, method_name); 3619 } 3620 return; 3621 } 3622 3623 3624 3625 JNIEXPORT void JNICALL Java_org_opencv_core_Core_calcCovarMatrix_11 (JNIEnv*, jclass, jlong, jlong, jlong, jint); 3626 3627 JNIEXPORT void JNICALL Java_org_opencv_core_Core_calcCovarMatrix_11 3628 (JNIEnv* env, jclass , jlong samples_nativeObj, jlong covar_nativeObj, jlong mean_nativeObj, jint flags) 3629 { 3630 static const char method_name[] = "core::calcCovarMatrix_11()"; 3631 try { 3632 LOGD("%s", method_name); 3633 Mat& samples = *((Mat*)samples_nativeObj); 3634 Mat& covar = *((Mat*)covar_nativeObj); 3635 Mat& mean = *((Mat*)mean_nativeObj); 3636 cv::calcCovarMatrix( samples, covar, mean, (int)flags ); 3637 return; 3638 } catch(const std::exception &e) { 3639 throwJavaException(env, &e, method_name); 3640 } catch (...) { 3641 throwJavaException(env, 0, method_name); 3642 } 3643 return; 3644 } 3645 3646 3647 3648 // 3649 // void PCACompute(Mat data, Mat& mean, Mat& eigenvectors, int maxComponents = 0) 3650 // 3651 3652 JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCACompute_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint); 3653 3654 JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCACompute_10 3655 (JNIEnv* env, jclass , jlong data_nativeObj, jlong mean_nativeObj, jlong eigenvectors_nativeObj, jint maxComponents) 3656 { 3657 static const char method_name[] = "core::PCACompute_10()"; 3658 try { 3659 LOGD("%s", method_name); 3660 Mat& data = *((Mat*)data_nativeObj); 3661 Mat& mean = *((Mat*)mean_nativeObj); 3662 Mat& eigenvectors = *((Mat*)eigenvectors_nativeObj); 3663 cv::PCACompute( data, mean, eigenvectors, (int)maxComponents ); 3664 return; 3665 } catch(const std::exception &e) { 3666 throwJavaException(env, &e, method_name); 3667 } catch (...) { 3668 throwJavaException(env, 0, method_name); 3669 } 3670 return; 3671 } 3672 3673 3674 3675 JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCACompute_11 (JNIEnv*, jclass, jlong, jlong, jlong); 3676 3677 JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCACompute_11 3678 (JNIEnv* env, jclass , jlong data_nativeObj, jlong mean_nativeObj, jlong eigenvectors_nativeObj) 3679 { 3680 static const char method_name[] = "core::PCACompute_11()"; 3681 try { 3682 LOGD("%s", method_name); 3683 Mat& data = *((Mat*)data_nativeObj); 3684 Mat& mean = *((Mat*)mean_nativeObj); 3685 Mat& eigenvectors = *((Mat*)eigenvectors_nativeObj); 3686 cv::PCACompute( data, mean, eigenvectors ); 3687 return; 3688 } catch(const std::exception &e) { 3689 throwJavaException(env, &e, method_name); 3690 } catch (...) { 3691 throwJavaException(env, 0, method_name); 3692 } 3693 return; 3694 } 3695 3696 3697 3698 // 3699 // void PCACompute(Mat data, Mat& mean, Mat& eigenvectors, double retainedVariance) 3700 // 3701 3702 JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCACompute_12 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble); 3703 3704 JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCACompute_12 3705 (JNIEnv* env, jclass , jlong data_nativeObj, jlong mean_nativeObj, jlong eigenvectors_nativeObj, jdouble retainedVariance) 3706 { 3707 static const char method_name[] = "core::PCACompute_12()"; 3708 try { 3709 LOGD("%s", method_name); 3710 Mat& data = *((Mat*)data_nativeObj); 3711 Mat& mean = *((Mat*)mean_nativeObj); 3712 Mat& eigenvectors = *((Mat*)eigenvectors_nativeObj); 3713 cv::PCACompute( data, mean, eigenvectors, (double)retainedVariance ); 3714 return; 3715 } catch(const std::exception &e) { 3716 throwJavaException(env, &e, method_name); 3717 } catch (...) { 3718 throwJavaException(env, 0, method_name); 3719 } 3720 return; 3721 } 3722 3723 3724 3725 // 3726 // void PCAProject(Mat data, Mat mean, Mat eigenvectors, Mat& result) 3727 // 3728 3729 JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCAProject_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong); 3730 3731 JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCAProject_10 3732 (JNIEnv* env, jclass , jlong data_nativeObj, jlong mean_nativeObj, jlong eigenvectors_nativeObj, jlong result_nativeObj) 3733 { 3734 static const char method_name[] = "core::PCAProject_10()"; 3735 try { 3736 LOGD("%s", method_name); 3737 Mat& data = *((Mat*)data_nativeObj); 3738 Mat& mean = *((Mat*)mean_nativeObj); 3739 Mat& eigenvectors = *((Mat*)eigenvectors_nativeObj); 3740 Mat& result = *((Mat*)result_nativeObj); 3741 cv::PCAProject( data, mean, eigenvectors, result ); 3742 return; 3743 } catch(const std::exception &e) { 3744 throwJavaException(env, &e, method_name); 3745 } catch (...) { 3746 throwJavaException(env, 0, method_name); 3747 } 3748 return; 3749 } 3750 3751 3752 3753 // 3754 // void PCABackProject(Mat data, Mat mean, Mat eigenvectors, Mat& result) 3755 // 3756 3757 JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCABackProject_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong); 3758 3759 JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCABackProject_10 3760 (JNIEnv* env, jclass , jlong data_nativeObj, jlong mean_nativeObj, jlong eigenvectors_nativeObj, jlong result_nativeObj) 3761 { 3762 static const char method_name[] = "core::PCABackProject_10()"; 3763 try { 3764 LOGD("%s", method_name); 3765 Mat& data = *((Mat*)data_nativeObj); 3766 Mat& mean = *((Mat*)mean_nativeObj); 3767 Mat& eigenvectors = *((Mat*)eigenvectors_nativeObj); 3768 Mat& result = *((Mat*)result_nativeObj); 3769 cv::PCABackProject( data, mean, eigenvectors, result ); 3770 return; 3771 } catch(const std::exception &e) { 3772 throwJavaException(env, &e, method_name); 3773 } catch (...) { 3774 throwJavaException(env, 0, method_name); 3775 } 3776 return; 3777 } 3778 3779 3780 3781 // 3782 // void SVDecomp(Mat src, Mat& w, Mat& u, Mat& vt, int flags = 0) 3783 // 3784 3785 JNIEXPORT void JNICALL Java_org_opencv_core_Core_SVDecomp_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jint); 3786 3787 JNIEXPORT void JNICALL Java_org_opencv_core_Core_SVDecomp_10 3788 (JNIEnv* env, jclass , jlong src_nativeObj, jlong w_nativeObj, jlong u_nativeObj, jlong vt_nativeObj, jint flags) 3789 { 3790 static const char method_name[] = "core::SVDecomp_10()"; 3791 try { 3792 LOGD("%s", method_name); 3793 Mat& src = *((Mat*)src_nativeObj); 3794 Mat& w = *((Mat*)w_nativeObj); 3795 Mat& u = *((Mat*)u_nativeObj); 3796 Mat& vt = *((Mat*)vt_nativeObj); 3797 cv::SVDecomp( src, w, u, vt, (int)flags ); 3798 return; 3799 } catch(const std::exception &e) { 3800 throwJavaException(env, &e, method_name); 3801 } catch (...) { 3802 throwJavaException(env, 0, method_name); 3803 } 3804 return; 3805 } 3806 3807 3808 3809 JNIEXPORT void JNICALL Java_org_opencv_core_Core_SVDecomp_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong); 3810 3811 JNIEXPORT void JNICALL Java_org_opencv_core_Core_SVDecomp_11 3812 (JNIEnv* env, jclass , jlong src_nativeObj, jlong w_nativeObj, jlong u_nativeObj, jlong vt_nativeObj) 3813 { 3814 static const char method_name[] = "core::SVDecomp_11()"; 3815 try { 3816 LOGD("%s", method_name); 3817 Mat& src = *((Mat*)src_nativeObj); 3818 Mat& w = *((Mat*)w_nativeObj); 3819 Mat& u = *((Mat*)u_nativeObj); 3820 Mat& vt = *((Mat*)vt_nativeObj); 3821 cv::SVDecomp( src, w, u, vt ); 3822 return; 3823 } catch(const std::exception &e) { 3824 throwJavaException(env, &e, method_name); 3825 } catch (...) { 3826 throwJavaException(env, 0, method_name); 3827 } 3828 return; 3829 } 3830 3831 3832 3833 // 3834 // void SVBackSubst(Mat w, Mat u, Mat vt, Mat rhs, Mat& dst) 3835 // 3836 3837 JNIEXPORT void JNICALL Java_org_opencv_core_Core_SVBackSubst_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong); 3838 3839 JNIEXPORT void JNICALL Java_org_opencv_core_Core_SVBackSubst_10 3840 (JNIEnv* env, jclass , jlong w_nativeObj, jlong u_nativeObj, jlong vt_nativeObj, jlong rhs_nativeObj, jlong dst_nativeObj) 3841 { 3842 static const char method_name[] = "core::SVBackSubst_10()"; 3843 try { 3844 LOGD("%s", method_name); 3845 Mat& w = *((Mat*)w_nativeObj); 3846 Mat& u = *((Mat*)u_nativeObj); 3847 Mat& vt = *((Mat*)vt_nativeObj); 3848 Mat& rhs = *((Mat*)rhs_nativeObj); 3849 Mat& dst = *((Mat*)dst_nativeObj); 3850 cv::SVBackSubst( w, u, vt, rhs, dst ); 3851 return; 3852 } catch(const std::exception &e) { 3853 throwJavaException(env, &e, method_name); 3854 } catch (...) { 3855 throwJavaException(env, 0, method_name); 3856 } 3857 return; 3858 } 3859 3860 3861 3862 // 3863 // double Mahalanobis(Mat v1, Mat v2, Mat icovar) 3864 // 3865 3866 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_Mahalanobis_10 (JNIEnv*, jclass, jlong, jlong, jlong); 3867 3868 JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_Mahalanobis_10 3869 (JNIEnv* env, jclass , jlong v1_nativeObj, jlong v2_nativeObj, jlong icovar_nativeObj) 3870 { 3871 static const char method_name[] = "core::Mahalanobis_10()"; 3872 try { 3873 LOGD("%s", method_name); 3874 Mat& v1 = *((Mat*)v1_nativeObj); 3875 Mat& v2 = *((Mat*)v2_nativeObj); 3876 Mat& icovar = *((Mat*)icovar_nativeObj); 3877 double _retval_ = cv::Mahalanobis( v1, v2, icovar ); 3878 return _retval_; 3879 } catch(const std::exception &e) { 3880 throwJavaException(env, &e, method_name); 3881 } catch (...) { 3882 throwJavaException(env, 0, method_name); 3883 } 3884 return 0; 3885 } 3886 3887 3888 3889 // 3890 // void dft(Mat src, Mat& dst, int flags = 0, int nonzeroRows = 0) 3891 // 3892 3893 JNIEXPORT void JNICALL Java_org_opencv_core_Core_dft_10 (JNIEnv*, jclass, jlong, jlong, jint, jint); 3894 3895 JNIEXPORT void JNICALL Java_org_opencv_core_Core_dft_10 3896 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint flags, jint nonzeroRows) 3897 { 3898 static const char method_name[] = "core::dft_10()"; 3899 try { 3900 LOGD("%s", method_name); 3901 Mat& src = *((Mat*)src_nativeObj); 3902 Mat& dst = *((Mat*)dst_nativeObj); 3903 cv::dft( src, dst, (int)flags, (int)nonzeroRows ); 3904 return; 3905 } catch(const std::exception &e) { 3906 throwJavaException(env, &e, method_name); 3907 } catch (...) { 3908 throwJavaException(env, 0, method_name); 3909 } 3910 return; 3911 } 3912 3913 3914 3915 JNIEXPORT void JNICALL Java_org_opencv_core_Core_dft_11 (JNIEnv*, jclass, jlong, jlong); 3916 3917 JNIEXPORT void JNICALL Java_org_opencv_core_Core_dft_11 3918 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj) 3919 { 3920 static const char method_name[] = "core::dft_11()"; 3921 try { 3922 LOGD("%s", method_name); 3923 Mat& src = *((Mat*)src_nativeObj); 3924 Mat& dst = *((Mat*)dst_nativeObj); 3925 cv::dft( src, dst ); 3926 return; 3927 } catch(const std::exception &e) { 3928 throwJavaException(env, &e, method_name); 3929 } catch (...) { 3930 throwJavaException(env, 0, method_name); 3931 } 3932 return; 3933 } 3934 3935 3936 3937 // 3938 // void idft(Mat src, Mat& dst, int flags = 0, int nonzeroRows = 0) 3939 // 3940 3941 JNIEXPORT void JNICALL Java_org_opencv_core_Core_idft_10 (JNIEnv*, jclass, jlong, jlong, jint, jint); 3942 3943 JNIEXPORT void JNICALL Java_org_opencv_core_Core_idft_10 3944 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint flags, jint nonzeroRows) 3945 { 3946 static const char method_name[] = "core::idft_10()"; 3947 try { 3948 LOGD("%s", method_name); 3949 Mat& src = *((Mat*)src_nativeObj); 3950 Mat& dst = *((Mat*)dst_nativeObj); 3951 cv::idft( src, dst, (int)flags, (int)nonzeroRows ); 3952 return; 3953 } catch(const std::exception &e) { 3954 throwJavaException(env, &e, method_name); 3955 } catch (...) { 3956 throwJavaException(env, 0, method_name); 3957 } 3958 return; 3959 } 3960 3961 3962 3963 JNIEXPORT void JNICALL Java_org_opencv_core_Core_idft_11 (JNIEnv*, jclass, jlong, jlong); 3964 3965 JNIEXPORT void JNICALL Java_org_opencv_core_Core_idft_11 3966 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj) 3967 { 3968 static const char method_name[] = "core::idft_11()"; 3969 try { 3970 LOGD("%s", method_name); 3971 Mat& src = *((Mat*)src_nativeObj); 3972 Mat& dst = *((Mat*)dst_nativeObj); 3973 cv::idft( src, dst ); 3974 return; 3975 } catch(const std::exception &e) { 3976 throwJavaException(env, &e, method_name); 3977 } catch (...) { 3978 throwJavaException(env, 0, method_name); 3979 } 3980 return; 3981 } 3982 3983 3984 3985 // 3986 // void dct(Mat src, Mat& dst, int flags = 0) 3987 // 3988 3989 JNIEXPORT void JNICALL Java_org_opencv_core_Core_dct_10 (JNIEnv*, jclass, jlong, jlong, jint); 3990 3991 JNIEXPORT void JNICALL Java_org_opencv_core_Core_dct_10 3992 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint flags) 3993 { 3994 static const char method_name[] = "core::dct_10()"; 3995 try { 3996 LOGD("%s", method_name); 3997 Mat& src = *((Mat*)src_nativeObj); 3998 Mat& dst = *((Mat*)dst_nativeObj); 3999 cv::dct( src, dst, (int)flags ); 4000 return; 4001 } catch(const std::exception &e) { 4002 throwJavaException(env, &e, method_name); 4003 } catch (...) { 4004 throwJavaException(env, 0, method_name); 4005 } 4006 return; 4007 } 4008 4009 4010 4011 JNIEXPORT void JNICALL Java_org_opencv_core_Core_dct_11 (JNIEnv*, jclass, jlong, jlong); 4012 4013 JNIEXPORT void JNICALL Java_org_opencv_core_Core_dct_11 4014 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj) 4015 { 4016 static const char method_name[] = "core::dct_11()"; 4017 try { 4018 LOGD("%s", method_name); 4019 Mat& src = *((Mat*)src_nativeObj); 4020 Mat& dst = *((Mat*)dst_nativeObj); 4021 cv::dct( src, dst ); 4022 return; 4023 } catch(const std::exception &e) { 4024 throwJavaException(env, &e, method_name); 4025 } catch (...) { 4026 throwJavaException(env, 0, method_name); 4027 } 4028 return; 4029 } 4030 4031 4032 4033 // 4034 // void idct(Mat src, Mat& dst, int flags = 0) 4035 // 4036 4037 JNIEXPORT void JNICALL Java_org_opencv_core_Core_idct_10 (JNIEnv*, jclass, jlong, jlong, jint); 4038 4039 JNIEXPORT void JNICALL Java_org_opencv_core_Core_idct_10 4040 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint flags) 4041 { 4042 static const char method_name[] = "core::idct_10()"; 4043 try { 4044 LOGD("%s", method_name); 4045 Mat& src = *((Mat*)src_nativeObj); 4046 Mat& dst = *((Mat*)dst_nativeObj); 4047 cv::idct( src, dst, (int)flags ); 4048 return; 4049 } catch(const std::exception &e) { 4050 throwJavaException(env, &e, method_name); 4051 } catch (...) { 4052 throwJavaException(env, 0, method_name); 4053 } 4054 return; 4055 } 4056 4057 4058 4059 JNIEXPORT void JNICALL Java_org_opencv_core_Core_idct_11 (JNIEnv*, jclass, jlong, jlong); 4060 4061 JNIEXPORT void JNICALL Java_org_opencv_core_Core_idct_11 4062 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj) 4063 { 4064 static const char method_name[] = "core::idct_11()"; 4065 try { 4066 LOGD("%s", method_name); 4067 Mat& src = *((Mat*)src_nativeObj); 4068 Mat& dst = *((Mat*)dst_nativeObj); 4069 cv::idct( src, dst ); 4070 return; 4071 } catch(const std::exception &e) { 4072 throwJavaException(env, &e, method_name); 4073 } catch (...) { 4074 throwJavaException(env, 0, method_name); 4075 } 4076 return; 4077 } 4078 4079 4080 4081 // C++: minMaxLoc(Mat src, double* minVal, double* maxVal=0, Point* minLoc=0, Point* maxLoc=0, InputArray mask=noArray()) 4082 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1minMaxLocManual (JNIEnv*, jclass, jlong, jlong); 4083 4084 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1minMaxLocManual 4085 (JNIEnv* env, jclass, jlong src_nativeObj, jlong mask_nativeObj) 4086 { 4087 try { 4088 LOGD("Core::n_1minMaxLoc()"); 4089 jdoubleArray result; 4090 result = env->NewDoubleArray(6); 4091 if (result == NULL) { 4092 return NULL; /* out of memory error thrown */ 4093 } 4094 4095 Mat& src = *((Mat*)src_nativeObj); 4096 4097 double minVal, maxVal; 4098 Point minLoc, maxLoc; 4099 if (mask_nativeObj != 0) { 4100 Mat& mask = *((Mat*)mask_nativeObj); 4101 minMaxLoc(src, &minVal, &maxVal, &minLoc, &maxLoc, mask); 4102 } else { 4103 minMaxLoc(src, &minVal, &maxVal, &minLoc, &maxLoc); 4104 } 4105 4106 jdouble fill[6]; 4107 fill[0]=minVal; 4108 fill[1]=maxVal; 4109 fill[2]=minLoc.x; 4110 fill[3]=minLoc.y; 4111 fill[4]=maxLoc.x; 4112 fill[5]=maxLoc.y; 4113 4114 env->SetDoubleArrayRegion(result, 0, 6, fill); 4115 4116 return result; 4117 4118 } catch(const cv::Exception& e) { 4119 LOGD("Core::n_1minMaxLoc() catched cv::Exception: %s", e.what()); 4120 jclass je = env->FindClass("org/opencv/core/CvException"); 4121 if(!je) je = env->FindClass("java/lang/Exception"); 4122 env->ThrowNew(je, e.what()); 4123 return NULL; 4124 } catch (...) { 4125 LOGD("Core::n_1minMaxLoc() catched unknown exception (...)"); 4126 jclass je = env->FindClass("java/lang/Exception"); 4127 env->ThrowNew(je, "Unknown exception in JNI code {core::minMaxLoc()}"); 4128 return NULL; 4129 } 4130 } 4131 4132 4133 // 4134 // void clear() 4135 // 4136 4137 JNIEXPORT void JNICALL Java_org_opencv_core_Algorithm_clear_10 (JNIEnv*, jclass, jlong); 4138 4139 JNIEXPORT void JNICALL Java_org_opencv_core_Algorithm_clear_10 4140 (JNIEnv* env, jclass , jlong self) 4141 { 4142 static const char method_name[] = "core::clear_10()"; 4143 try { 4144 LOGD("%s", method_name); 4145 cv::Algorithm* me = (cv::Algorithm*) self; //TODO: check for NULL 4146 me->clear( ); 4147 return; 4148 } catch(const std::exception &e) { 4149 throwJavaException(env, &e, method_name); 4150 } catch (...) { 4151 throwJavaException(env, 0, method_name); 4152 } 4153 return; 4154 } 4155 4156 4157 4158 // 4159 // void save(String filename) 4160 // 4161 4162 JNIEXPORT void JNICALL Java_org_opencv_core_Algorithm_save_10 (JNIEnv*, jclass, jlong, jstring); 4163 4164 JNIEXPORT void JNICALL Java_org_opencv_core_Algorithm_save_10 4165 (JNIEnv* env, jclass , jlong self, jstring filename) 4166 { 4167 static const char method_name[] = "core::save_10()"; 4168 try { 4169 LOGD("%s", method_name); 4170 cv::Algorithm* me = (cv::Algorithm*) self; //TODO: check for NULL 4171 const char* utf_filename = env->GetStringUTFChars(filename, 0); String n_filename( utf_filename ? utf_filename : "" ); env->ReleaseStringUTFChars(filename, utf_filename); 4172 me->save( n_filename ); 4173 return; 4174 } catch(const std::exception &e) { 4175 throwJavaException(env, &e, method_name); 4176 } catch (...) { 4177 throwJavaException(env, 0, method_name); 4178 } 4179 return; 4180 } 4181 4182 4183 4184 // 4185 // String getDefaultName() 4186 // 4187 4188 JNIEXPORT jstring JNICALL Java_org_opencv_core_Algorithm_getDefaultName_10 (JNIEnv*, jclass, jlong); 4189 4190 JNIEXPORT jstring JNICALL Java_org_opencv_core_Algorithm_getDefaultName_10 4191 (JNIEnv* env, jclass , jlong self) 4192 { 4193 static const char method_name[] = "core::getDefaultName_10()"; 4194 try { 4195 LOGD("%s", method_name); 4196 cv::Algorithm* me = (cv::Algorithm*) self; //TODO: check for NULL 4197 cv::String _retval_ = me->getDefaultName( ); 4198 return env->NewStringUTF(_retval_.c_str()); 4199 } catch(const std::exception &e) { 4200 throwJavaException(env, &e, method_name); 4201 } catch (...) { 4202 throwJavaException(env, 0, method_name); 4203 } 4204 return env->NewStringUTF(""); 4205 } 4206 4207 4208 4209 // 4210 // native support for java finalize() 4211 // static void cv::Algorithm::delete( __int64 self ) 4212 // 4213 JNIEXPORT void JNICALL Java_org_opencv_core_Algorithm_delete(JNIEnv*, jclass, jlong); 4214 4215 JNIEXPORT void JNICALL Java_org_opencv_core_Algorithm_delete 4216 (JNIEnv*, jclass, jlong self) 4217 { 4218 delete (cv::Algorithm*) self; 4219 } 4220 4221 4222 4223 } // extern "C" 4224 4225 #endif // HAVE_OPENCV_CORE 4226