1 2 // 3 // This file is auto-generated, please don't edit! 4 // 5 6 #define LOG_TAG "org.opencv.photo" 7 8 #include "common.h" 9 10 #include "opencv2/opencv_modules.hpp" 11 #ifdef HAVE_OPENCV_PHOTO 12 13 #include <string> 14 15 #include "opencv2/photo.hpp" 16 17 #include "../../photo/include/opencv2/photo/photo_c.h" 18 #include "../../photo/include/opencv2/photo.hpp" 19 20 using namespace cv; 21 22 /// throw java exception 23 static void throwJavaException(JNIEnv *env, const std::exception *e, const char *method) { 24 std::string what = "unknown exception"; 25 jclass je = 0; 26 27 if(e) { 28 std::string exception_type = "std::exception"; 29 30 if(dynamic_cast<const cv::Exception*>(e)) { 31 exception_type = "cv::Exception"; 32 je = env->FindClass("org/opencv/core/CvException"); 33 } 34 35 what = exception_type + ": " + e->what(); 36 } 37 38 if(!je) je = env->FindClass("java/lang/Exception"); 39 env->ThrowNew(je, what.c_str()); 40 41 LOGE("%s caught %s", method, what.c_str()); 42 (void)method; // avoid "unused" warning 43 } 44 45 46 extern "C" { 47 48 49 // 50 // int getMaxIter() 51 // 52 53 JNIEXPORT jint JNICALL Java_org_opencv_photo_CalibrateRobertson_getMaxIter_10 (JNIEnv*, jclass, jlong); 54 55 JNIEXPORT jint JNICALL Java_org_opencv_photo_CalibrateRobertson_getMaxIter_10 56 (JNIEnv* env, jclass , jlong self) 57 { 58 static const char method_name[] = "photo::getMaxIter_10()"; 59 try { 60 LOGD("%s", method_name); 61 Ptr<cv::CalibrateRobertson>* me = (Ptr<cv::CalibrateRobertson>*) self; //TODO: check for NULL 62 int _retval_ = (*me)->getMaxIter( ); 63 return _retval_; 64 } catch(const std::exception &e) { 65 throwJavaException(env, &e, method_name); 66 } catch (...) { 67 throwJavaException(env, 0, method_name); 68 } 69 return 0; 70 } 71 72 73 74 // 75 // void setMaxIter(int max_iter) 76 // 77 78 JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateRobertson_setMaxIter_10 (JNIEnv*, jclass, jlong, jint); 79 80 JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateRobertson_setMaxIter_10 81 (JNIEnv* env, jclass , jlong self, jint max_iter) 82 { 83 static const char method_name[] = "photo::setMaxIter_10()"; 84 try { 85 LOGD("%s", method_name); 86 Ptr<cv::CalibrateRobertson>* me = (Ptr<cv::CalibrateRobertson>*) self; //TODO: check for NULL 87 (*me)->setMaxIter( (int)max_iter ); 88 return; 89 } catch(const std::exception &e) { 90 throwJavaException(env, &e, method_name); 91 } catch (...) { 92 throwJavaException(env, 0, method_name); 93 } 94 return; 95 } 96 97 98 99 // 100 // float getThreshold() 101 // 102 103 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_CalibrateRobertson_getThreshold_10 (JNIEnv*, jclass, jlong); 104 105 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_CalibrateRobertson_getThreshold_10 106 (JNIEnv* env, jclass , jlong self) 107 { 108 static const char method_name[] = "photo::getThreshold_10()"; 109 try { 110 LOGD("%s", method_name); 111 Ptr<cv::CalibrateRobertson>* me = (Ptr<cv::CalibrateRobertson>*) self; //TODO: check for NULL 112 float _retval_ = (*me)->getThreshold( ); 113 return _retval_; 114 } catch(const std::exception &e) { 115 throwJavaException(env, &e, method_name); 116 } catch (...) { 117 throwJavaException(env, 0, method_name); 118 } 119 return 0; 120 } 121 122 123 124 // 125 // void setThreshold(float threshold) 126 // 127 128 JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateRobertson_setThreshold_10 (JNIEnv*, jclass, jlong, jfloat); 129 130 JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateRobertson_setThreshold_10 131 (JNIEnv* env, jclass , jlong self, jfloat threshold) 132 { 133 static const char method_name[] = "photo::setThreshold_10()"; 134 try { 135 LOGD("%s", method_name); 136 Ptr<cv::CalibrateRobertson>* me = (Ptr<cv::CalibrateRobertson>*) self; //TODO: check for NULL 137 (*me)->setThreshold( (float)threshold ); 138 return; 139 } catch(const std::exception &e) { 140 throwJavaException(env, &e, method_name); 141 } catch (...) { 142 throwJavaException(env, 0, method_name); 143 } 144 return; 145 } 146 147 148 149 // 150 // Mat getRadiance() 151 // 152 153 JNIEXPORT jlong JNICALL Java_org_opencv_photo_CalibrateRobertson_getRadiance_10 (JNIEnv*, jclass, jlong); 154 155 JNIEXPORT jlong JNICALL Java_org_opencv_photo_CalibrateRobertson_getRadiance_10 156 (JNIEnv* env, jclass , jlong self) 157 { 158 static const char method_name[] = "photo::getRadiance_10()"; 159 try { 160 LOGD("%s", method_name); 161 Ptr<cv::CalibrateRobertson>* me = (Ptr<cv::CalibrateRobertson>*) self; //TODO: check for NULL 162 ::Mat _retval_ = (*me)->getRadiance( ); 163 return (jlong) new ::Mat(_retval_); 164 } catch(const std::exception &e) { 165 throwJavaException(env, &e, method_name); 166 } catch (...) { 167 throwJavaException(env, 0, method_name); 168 } 169 return 0; 170 } 171 172 173 174 // 175 // native support for java finalize() 176 // static void Ptr<cv::CalibrateRobertson>::delete( __int64 self ) 177 // 178 JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateRobertson_delete(JNIEnv*, jclass, jlong); 179 180 JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateRobertson_delete 181 (JNIEnv*, jclass, jlong self) 182 { 183 delete (Ptr<cv::CalibrateRobertson>*) self; 184 } 185 186 187 // 188 // float getScale() 189 // 190 191 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapMantiuk_getScale_10 (JNIEnv*, jclass, jlong); 192 193 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapMantiuk_getScale_10 194 (JNIEnv* env, jclass , jlong self) 195 { 196 static const char method_name[] = "photo::getScale_10()"; 197 try { 198 LOGD("%s", method_name); 199 Ptr<cv::TonemapMantiuk>* me = (Ptr<cv::TonemapMantiuk>*) self; //TODO: check for NULL 200 float _retval_ = (*me)->getScale( ); 201 return _retval_; 202 } catch(const std::exception &e) { 203 throwJavaException(env, &e, method_name); 204 } catch (...) { 205 throwJavaException(env, 0, method_name); 206 } 207 return 0; 208 } 209 210 211 212 // 213 // void setScale(float scale) 214 // 215 216 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapMantiuk_setScale_10 (JNIEnv*, jclass, jlong, jfloat); 217 218 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapMantiuk_setScale_10 219 (JNIEnv* env, jclass , jlong self, jfloat scale) 220 { 221 static const char method_name[] = "photo::setScale_10()"; 222 try { 223 LOGD("%s", method_name); 224 Ptr<cv::TonemapMantiuk>* me = (Ptr<cv::TonemapMantiuk>*) self; //TODO: check for NULL 225 (*me)->setScale( (float)scale ); 226 return; 227 } catch(const std::exception &e) { 228 throwJavaException(env, &e, method_name); 229 } catch (...) { 230 throwJavaException(env, 0, method_name); 231 } 232 return; 233 } 234 235 236 237 // 238 // float getSaturation() 239 // 240 241 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapMantiuk_getSaturation_10 (JNIEnv*, jclass, jlong); 242 243 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapMantiuk_getSaturation_10 244 (JNIEnv* env, jclass , jlong self) 245 { 246 static const char method_name[] = "photo::getSaturation_10()"; 247 try { 248 LOGD("%s", method_name); 249 Ptr<cv::TonemapMantiuk>* me = (Ptr<cv::TonemapMantiuk>*) self; //TODO: check for NULL 250 float _retval_ = (*me)->getSaturation( ); 251 return _retval_; 252 } catch(const std::exception &e) { 253 throwJavaException(env, &e, method_name); 254 } catch (...) { 255 throwJavaException(env, 0, method_name); 256 } 257 return 0; 258 } 259 260 261 262 // 263 // void setSaturation(float saturation) 264 // 265 266 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapMantiuk_setSaturation_10 (JNIEnv*, jclass, jlong, jfloat); 267 268 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapMantiuk_setSaturation_10 269 (JNIEnv* env, jclass , jlong self, jfloat saturation) 270 { 271 static const char method_name[] = "photo::setSaturation_10()"; 272 try { 273 LOGD("%s", method_name); 274 Ptr<cv::TonemapMantiuk>* me = (Ptr<cv::TonemapMantiuk>*) self; //TODO: check for NULL 275 (*me)->setSaturation( (float)saturation ); 276 return; 277 } catch(const std::exception &e) { 278 throwJavaException(env, &e, method_name); 279 } catch (...) { 280 throwJavaException(env, 0, method_name); 281 } 282 return; 283 } 284 285 286 287 // 288 // native support for java finalize() 289 // static void Ptr<cv::TonemapMantiuk>::delete( __int64 self ) 290 // 291 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapMantiuk_delete(JNIEnv*, jclass, jlong); 292 293 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapMantiuk_delete 294 (JNIEnv*, jclass, jlong self) 295 { 296 delete (Ptr<cv::TonemapMantiuk>*) self; 297 } 298 299 300 // 301 // float getSaturation() 302 // 303 304 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDurand_getSaturation_10 (JNIEnv*, jclass, jlong); 305 306 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDurand_getSaturation_10 307 (JNIEnv* env, jclass , jlong self) 308 { 309 static const char method_name[] = "photo::getSaturation_10()"; 310 try { 311 LOGD("%s", method_name); 312 Ptr<cv::TonemapDurand>* me = (Ptr<cv::TonemapDurand>*) self; //TODO: check for NULL 313 float _retval_ = (*me)->getSaturation( ); 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 // 326 // void setSaturation(float saturation) 327 // 328 329 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_setSaturation_10 (JNIEnv*, jclass, jlong, jfloat); 330 331 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_setSaturation_10 332 (JNIEnv* env, jclass , jlong self, jfloat saturation) 333 { 334 static const char method_name[] = "photo::setSaturation_10()"; 335 try { 336 LOGD("%s", method_name); 337 Ptr<cv::TonemapDurand>* me = (Ptr<cv::TonemapDurand>*) self; //TODO: check for NULL 338 (*me)->setSaturation( (float)saturation ); 339 return; 340 } catch(const std::exception &e) { 341 throwJavaException(env, &e, method_name); 342 } catch (...) { 343 throwJavaException(env, 0, method_name); 344 } 345 return; 346 } 347 348 349 350 // 351 // float getContrast() 352 // 353 354 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDurand_getContrast_10 (JNIEnv*, jclass, jlong); 355 356 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDurand_getContrast_10 357 (JNIEnv* env, jclass , jlong self) 358 { 359 static const char method_name[] = "photo::getContrast_10()"; 360 try { 361 LOGD("%s", method_name); 362 Ptr<cv::TonemapDurand>* me = (Ptr<cv::TonemapDurand>*) self; //TODO: check for NULL 363 float _retval_ = (*me)->getContrast( ); 364 return _retval_; 365 } catch(const std::exception &e) { 366 throwJavaException(env, &e, method_name); 367 } catch (...) { 368 throwJavaException(env, 0, method_name); 369 } 370 return 0; 371 } 372 373 374 375 // 376 // void setContrast(float contrast) 377 // 378 379 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_setContrast_10 (JNIEnv*, jclass, jlong, jfloat); 380 381 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_setContrast_10 382 (JNIEnv* env, jclass , jlong self, jfloat contrast) 383 { 384 static const char method_name[] = "photo::setContrast_10()"; 385 try { 386 LOGD("%s", method_name); 387 Ptr<cv::TonemapDurand>* me = (Ptr<cv::TonemapDurand>*) self; //TODO: check for NULL 388 (*me)->setContrast( (float)contrast ); 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 // 401 // float getSigmaSpace() 402 // 403 404 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDurand_getSigmaSpace_10 (JNIEnv*, jclass, jlong); 405 406 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDurand_getSigmaSpace_10 407 (JNIEnv* env, jclass , jlong self) 408 { 409 static const char method_name[] = "photo::getSigmaSpace_10()"; 410 try { 411 LOGD("%s", method_name); 412 Ptr<cv::TonemapDurand>* me = (Ptr<cv::TonemapDurand>*) self; //TODO: check for NULL 413 float _retval_ = (*me)->getSigmaSpace( ); 414 return _retval_; 415 } catch(const std::exception &e) { 416 throwJavaException(env, &e, method_name); 417 } catch (...) { 418 throwJavaException(env, 0, method_name); 419 } 420 return 0; 421 } 422 423 424 425 // 426 // void setSigmaSpace(float sigma_space) 427 // 428 429 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_setSigmaSpace_10 (JNIEnv*, jclass, jlong, jfloat); 430 431 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_setSigmaSpace_10 432 (JNIEnv* env, jclass , jlong self, jfloat sigma_space) 433 { 434 static const char method_name[] = "photo::setSigmaSpace_10()"; 435 try { 436 LOGD("%s", method_name); 437 Ptr<cv::TonemapDurand>* me = (Ptr<cv::TonemapDurand>*) self; //TODO: check for NULL 438 (*me)->setSigmaSpace( (float)sigma_space ); 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 // 451 // float getSigmaColor() 452 // 453 454 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDurand_getSigmaColor_10 (JNIEnv*, jclass, jlong); 455 456 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDurand_getSigmaColor_10 457 (JNIEnv* env, jclass , jlong self) 458 { 459 static const char method_name[] = "photo::getSigmaColor_10()"; 460 try { 461 LOGD("%s", method_name); 462 Ptr<cv::TonemapDurand>* me = (Ptr<cv::TonemapDurand>*) self; //TODO: check for NULL 463 float _retval_ = (*me)->getSigmaColor( ); 464 return _retval_; 465 } catch(const std::exception &e) { 466 throwJavaException(env, &e, method_name); 467 } catch (...) { 468 throwJavaException(env, 0, method_name); 469 } 470 return 0; 471 } 472 473 474 475 // 476 // void setSigmaColor(float sigma_color) 477 // 478 479 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_setSigmaColor_10 (JNIEnv*, jclass, jlong, jfloat); 480 481 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_setSigmaColor_10 482 (JNIEnv* env, jclass , jlong self, jfloat sigma_color) 483 { 484 static const char method_name[] = "photo::setSigmaColor_10()"; 485 try { 486 LOGD("%s", method_name); 487 Ptr<cv::TonemapDurand>* me = (Ptr<cv::TonemapDurand>*) self; //TODO: check for NULL 488 (*me)->setSigmaColor( (float)sigma_color ); 489 return; 490 } catch(const std::exception &e) { 491 throwJavaException(env, &e, method_name); 492 } catch (...) { 493 throwJavaException(env, 0, method_name); 494 } 495 return; 496 } 497 498 499 500 // 501 // native support for java finalize() 502 // static void Ptr<cv::TonemapDurand>::delete( __int64 self ) 503 // 504 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_delete(JNIEnv*, jclass, jlong); 505 506 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_delete 507 (JNIEnv*, jclass, jlong self) 508 { 509 delete (Ptr<cv::TonemapDurand>*) self; 510 } 511 512 513 // 514 // float getLambda() 515 // 516 517 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_CalibrateDebevec_getLambda_10 (JNIEnv*, jclass, jlong); 518 519 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_CalibrateDebevec_getLambda_10 520 (JNIEnv* env, jclass , jlong self) 521 { 522 static const char method_name[] = "photo::getLambda_10()"; 523 try { 524 LOGD("%s", method_name); 525 Ptr<cv::CalibrateDebevec>* me = (Ptr<cv::CalibrateDebevec>*) self; //TODO: check for NULL 526 float _retval_ = (*me)->getLambda( ); 527 return _retval_; 528 } catch(const std::exception &e) { 529 throwJavaException(env, &e, method_name); 530 } catch (...) { 531 throwJavaException(env, 0, method_name); 532 } 533 return 0; 534 } 535 536 537 538 // 539 // void setLambda(float lambda) 540 // 541 542 JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateDebevec_setLambda_10 (JNIEnv*, jclass, jlong, jfloat); 543 544 JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateDebevec_setLambda_10 545 (JNIEnv* env, jclass , jlong self, jfloat lambda) 546 { 547 static const char method_name[] = "photo::setLambda_10()"; 548 try { 549 LOGD("%s", method_name); 550 Ptr<cv::CalibrateDebevec>* me = (Ptr<cv::CalibrateDebevec>*) self; //TODO: check for NULL 551 (*me)->setLambda( (float)lambda ); 552 return; 553 } catch(const std::exception &e) { 554 throwJavaException(env, &e, method_name); 555 } catch (...) { 556 throwJavaException(env, 0, method_name); 557 } 558 return; 559 } 560 561 562 563 // 564 // int getSamples() 565 // 566 567 JNIEXPORT jint JNICALL Java_org_opencv_photo_CalibrateDebevec_getSamples_10 (JNIEnv*, jclass, jlong); 568 569 JNIEXPORT jint JNICALL Java_org_opencv_photo_CalibrateDebevec_getSamples_10 570 (JNIEnv* env, jclass , jlong self) 571 { 572 static const char method_name[] = "photo::getSamples_10()"; 573 try { 574 LOGD("%s", method_name); 575 Ptr<cv::CalibrateDebevec>* me = (Ptr<cv::CalibrateDebevec>*) self; //TODO: check for NULL 576 int _retval_ = (*me)->getSamples( ); 577 return _retval_; 578 } catch(const std::exception &e) { 579 throwJavaException(env, &e, method_name); 580 } catch (...) { 581 throwJavaException(env, 0, method_name); 582 } 583 return 0; 584 } 585 586 587 588 // 589 // void setSamples(int samples) 590 // 591 592 JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateDebevec_setSamples_10 (JNIEnv*, jclass, jlong, jint); 593 594 JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateDebevec_setSamples_10 595 (JNIEnv* env, jclass , jlong self, jint samples) 596 { 597 static const char method_name[] = "photo::setSamples_10()"; 598 try { 599 LOGD("%s", method_name); 600 Ptr<cv::CalibrateDebevec>* me = (Ptr<cv::CalibrateDebevec>*) self; //TODO: check for NULL 601 (*me)->setSamples( (int)samples ); 602 return; 603 } catch(const std::exception &e) { 604 throwJavaException(env, &e, method_name); 605 } catch (...) { 606 throwJavaException(env, 0, method_name); 607 } 608 return; 609 } 610 611 612 613 // 614 // bool getRandom() 615 // 616 617 JNIEXPORT jboolean JNICALL Java_org_opencv_photo_CalibrateDebevec_getRandom_10 (JNIEnv*, jclass, jlong); 618 619 JNIEXPORT jboolean JNICALL Java_org_opencv_photo_CalibrateDebevec_getRandom_10 620 (JNIEnv* env, jclass , jlong self) 621 { 622 static const char method_name[] = "photo::getRandom_10()"; 623 try { 624 LOGD("%s", method_name); 625 Ptr<cv::CalibrateDebevec>* me = (Ptr<cv::CalibrateDebevec>*) self; //TODO: check for NULL 626 bool _retval_ = (*me)->getRandom( ); 627 return _retval_; 628 } catch(const std::exception &e) { 629 throwJavaException(env, &e, method_name); 630 } catch (...) { 631 throwJavaException(env, 0, method_name); 632 } 633 return 0; 634 } 635 636 637 638 // 639 // void setRandom(bool random) 640 // 641 642 JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateDebevec_setRandom_10 (JNIEnv*, jclass, jlong, jboolean); 643 644 JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateDebevec_setRandom_10 645 (JNIEnv* env, jclass , jlong self, jboolean random) 646 { 647 static const char method_name[] = "photo::setRandom_10()"; 648 try { 649 LOGD("%s", method_name); 650 Ptr<cv::CalibrateDebevec>* me = (Ptr<cv::CalibrateDebevec>*) self; //TODO: check for NULL 651 (*me)->setRandom( (bool)random ); 652 return; 653 } catch(const std::exception &e) { 654 throwJavaException(env, &e, method_name); 655 } catch (...) { 656 throwJavaException(env, 0, method_name); 657 } 658 return; 659 } 660 661 662 663 // 664 // native support for java finalize() 665 // static void Ptr<cv::CalibrateDebevec>::delete( __int64 self ) 666 // 667 JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateDebevec_delete(JNIEnv*, jclass, jlong); 668 669 JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateDebevec_delete 670 (JNIEnv*, jclass, jlong self) 671 { 672 delete (Ptr<cv::CalibrateDebevec>*) self; 673 } 674 675 676 // 677 // float getIntensity() 678 // 679 680 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapReinhard_getIntensity_10 (JNIEnv*, jclass, jlong); 681 682 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapReinhard_getIntensity_10 683 (JNIEnv* env, jclass , jlong self) 684 { 685 static const char method_name[] = "photo::getIntensity_10()"; 686 try { 687 LOGD("%s", method_name); 688 Ptr<cv::TonemapReinhard>* me = (Ptr<cv::TonemapReinhard>*) self; //TODO: check for NULL 689 float _retval_ = (*me)->getIntensity( ); 690 return _retval_; 691 } catch(const std::exception &e) { 692 throwJavaException(env, &e, method_name); 693 } catch (...) { 694 throwJavaException(env, 0, method_name); 695 } 696 return 0; 697 } 698 699 700 701 // 702 // void setIntensity(float intensity) 703 // 704 705 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapReinhard_setIntensity_10 (JNIEnv*, jclass, jlong, jfloat); 706 707 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapReinhard_setIntensity_10 708 (JNIEnv* env, jclass , jlong self, jfloat intensity) 709 { 710 static const char method_name[] = "photo::setIntensity_10()"; 711 try { 712 LOGD("%s", method_name); 713 Ptr<cv::TonemapReinhard>* me = (Ptr<cv::TonemapReinhard>*) self; //TODO: check for NULL 714 (*me)->setIntensity( (float)intensity ); 715 return; 716 } catch(const std::exception &e) { 717 throwJavaException(env, &e, method_name); 718 } catch (...) { 719 throwJavaException(env, 0, method_name); 720 } 721 return; 722 } 723 724 725 726 // 727 // float getLightAdaptation() 728 // 729 730 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapReinhard_getLightAdaptation_10 (JNIEnv*, jclass, jlong); 731 732 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapReinhard_getLightAdaptation_10 733 (JNIEnv* env, jclass , jlong self) 734 { 735 static const char method_name[] = "photo::getLightAdaptation_10()"; 736 try { 737 LOGD("%s", method_name); 738 Ptr<cv::TonemapReinhard>* me = (Ptr<cv::TonemapReinhard>*) self; //TODO: check for NULL 739 float _retval_ = (*me)->getLightAdaptation( ); 740 return _retval_; 741 } catch(const std::exception &e) { 742 throwJavaException(env, &e, method_name); 743 } catch (...) { 744 throwJavaException(env, 0, method_name); 745 } 746 return 0; 747 } 748 749 750 751 // 752 // void setLightAdaptation(float light_adapt) 753 // 754 755 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapReinhard_setLightAdaptation_10 (JNIEnv*, jclass, jlong, jfloat); 756 757 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapReinhard_setLightAdaptation_10 758 (JNIEnv* env, jclass , jlong self, jfloat light_adapt) 759 { 760 static const char method_name[] = "photo::setLightAdaptation_10()"; 761 try { 762 LOGD("%s", method_name); 763 Ptr<cv::TonemapReinhard>* me = (Ptr<cv::TonemapReinhard>*) self; //TODO: check for NULL 764 (*me)->setLightAdaptation( (float)light_adapt ); 765 return; 766 } catch(const std::exception &e) { 767 throwJavaException(env, &e, method_name); 768 } catch (...) { 769 throwJavaException(env, 0, method_name); 770 } 771 return; 772 } 773 774 775 776 // 777 // float getColorAdaptation() 778 // 779 780 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapReinhard_getColorAdaptation_10 (JNIEnv*, jclass, jlong); 781 782 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapReinhard_getColorAdaptation_10 783 (JNIEnv* env, jclass , jlong self) 784 { 785 static const char method_name[] = "photo::getColorAdaptation_10()"; 786 try { 787 LOGD("%s", method_name); 788 Ptr<cv::TonemapReinhard>* me = (Ptr<cv::TonemapReinhard>*) self; //TODO: check for NULL 789 float _retval_ = (*me)->getColorAdaptation( ); 790 return _retval_; 791 } catch(const std::exception &e) { 792 throwJavaException(env, &e, method_name); 793 } catch (...) { 794 throwJavaException(env, 0, method_name); 795 } 796 return 0; 797 } 798 799 800 801 // 802 // void setColorAdaptation(float color_adapt) 803 // 804 805 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapReinhard_setColorAdaptation_10 (JNIEnv*, jclass, jlong, jfloat); 806 807 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapReinhard_setColorAdaptation_10 808 (JNIEnv* env, jclass , jlong self, jfloat color_adapt) 809 { 810 static const char method_name[] = "photo::setColorAdaptation_10()"; 811 try { 812 LOGD("%s", method_name); 813 Ptr<cv::TonemapReinhard>* me = (Ptr<cv::TonemapReinhard>*) self; //TODO: check for NULL 814 (*me)->setColorAdaptation( (float)color_adapt ); 815 return; 816 } catch(const std::exception &e) { 817 throwJavaException(env, &e, method_name); 818 } catch (...) { 819 throwJavaException(env, 0, method_name); 820 } 821 return; 822 } 823 824 825 826 // 827 // native support for java finalize() 828 // static void Ptr<cv::TonemapReinhard>::delete( __int64 self ) 829 // 830 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapReinhard_delete(JNIEnv*, jclass, jlong); 831 832 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapReinhard_delete 833 (JNIEnv*, jclass, jlong self) 834 { 835 delete (Ptr<cv::TonemapReinhard>*) self; 836 } 837 838 839 // 840 // void fastNlMeansDenoisingColoredMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, float h = 3, float hColor = 3, int templateWindowSize = 7, int searchWindowSize = 21) 841 // 842 843 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingColoredMulti_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jfloat, jfloat, jint, jint); 844 845 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingColoredMulti_10 846 (JNIEnv* env, jclass , jlong srcImgs_mat_nativeObj, jlong dst_nativeObj, jint imgToDenoiseIndex, jint temporalWindowSize, jfloat h, jfloat hColor, jint templateWindowSize, jint searchWindowSize) 847 { 848 static const char method_name[] = "photo::fastNlMeansDenoisingColoredMulti_10()"; 849 try { 850 LOGD("%s", method_name); 851 std::vector<Mat> srcImgs; 852 Mat& srcImgs_mat = *((Mat*)srcImgs_mat_nativeObj); 853 Mat_to_vector_Mat( srcImgs_mat, srcImgs ); 854 Mat& dst = *((Mat*)dst_nativeObj); 855 cv::fastNlMeansDenoisingColoredMulti( srcImgs, dst, (int)imgToDenoiseIndex, (int)temporalWindowSize, (float)h, (float)hColor, (int)templateWindowSize, (int)searchWindowSize ); 856 return; 857 } catch(const std::exception &e) { 858 throwJavaException(env, &e, method_name); 859 } catch (...) { 860 throwJavaException(env, 0, method_name); 861 } 862 return; 863 } 864 865 866 867 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingColoredMulti_11 (JNIEnv*, jclass, jlong, jlong, jint, jint); 868 869 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingColoredMulti_11 870 (JNIEnv* env, jclass , jlong srcImgs_mat_nativeObj, jlong dst_nativeObj, jint imgToDenoiseIndex, jint temporalWindowSize) 871 { 872 static const char method_name[] = "photo::fastNlMeansDenoisingColoredMulti_11()"; 873 try { 874 LOGD("%s", method_name); 875 std::vector<Mat> srcImgs; 876 Mat& srcImgs_mat = *((Mat*)srcImgs_mat_nativeObj); 877 Mat_to_vector_Mat( srcImgs_mat, srcImgs ); 878 Mat& dst = *((Mat*)dst_nativeObj); 879 cv::fastNlMeansDenoisingColoredMulti( srcImgs, dst, (int)imgToDenoiseIndex, (int)temporalWindowSize ); 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 // void denoise_TVL1(vector_Mat observations, Mat result, double lambda = 1.0, int niters = 30) 893 // 894 895 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_denoise_1TVL1_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jint); 896 897 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_denoise_1TVL1_10 898 (JNIEnv* env, jclass , jlong observations_mat_nativeObj, jlong result_nativeObj, jdouble lambda, jint niters) 899 { 900 static const char method_name[] = "photo::denoise_1TVL1_10()"; 901 try { 902 LOGD("%s", method_name); 903 std::vector<Mat> observations; 904 Mat& observations_mat = *((Mat*)observations_mat_nativeObj); 905 Mat_to_vector_Mat( observations_mat, observations ); 906 Mat& result = *((Mat*)result_nativeObj); 907 cv::denoise_TVL1( observations, result, (double)lambda, (int)niters ); 908 return; 909 } catch(const std::exception &e) { 910 throwJavaException(env, &e, method_name); 911 } catch (...) { 912 throwJavaException(env, 0, method_name); 913 } 914 return; 915 } 916 917 918 919 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_denoise_1TVL1_11 (JNIEnv*, jclass, jlong, jlong); 920 921 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_denoise_1TVL1_11 922 (JNIEnv* env, jclass , jlong observations_mat_nativeObj, jlong result_nativeObj) 923 { 924 static const char method_name[] = "photo::denoise_1TVL1_11()"; 925 try { 926 LOGD("%s", method_name); 927 std::vector<Mat> observations; 928 Mat& observations_mat = *((Mat*)observations_mat_nativeObj); 929 Mat_to_vector_Mat( observations_mat, observations ); 930 Mat& result = *((Mat*)result_nativeObj); 931 cv::denoise_TVL1( observations, result ); 932 return; 933 } catch(const std::exception &e) { 934 throwJavaException(env, &e, method_name); 935 } catch (...) { 936 throwJavaException(env, 0, method_name); 937 } 938 return; 939 } 940 941 942 943 // 944 // Ptr_Tonemap createTonemap(float gamma = 1.0f) 945 // 946 947 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemap_10 (JNIEnv*, jclass, jfloat); 948 949 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemap_10 950 (JNIEnv* env, jclass , jfloat gamma) 951 { 952 static const char method_name[] = "photo::createTonemap_10()"; 953 try { 954 LOGD("%s", method_name); 955 typedef Ptr<cv::Tonemap> Ptr_Tonemap; 956 Ptr_Tonemap _retval_ = cv::createTonemap( (float)gamma ); 957 return (jlong)(new Ptr_Tonemap(_retval_)); 958 } catch(const std::exception &e) { 959 throwJavaException(env, &e, method_name); 960 } catch (...) { 961 throwJavaException(env, 0, method_name); 962 } 963 return 0; 964 } 965 966 967 968 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemap_11 (JNIEnv*, jclass); 969 970 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemap_11 971 (JNIEnv* env, jclass ) 972 { 973 static const char method_name[] = "photo::createTonemap_11()"; 974 try { 975 LOGD("%s", method_name); 976 typedef Ptr<cv::Tonemap> Ptr_Tonemap; 977 Ptr_Tonemap _retval_ = cv::createTonemap( ); 978 return (jlong)(new Ptr_Tonemap(_retval_)); 979 } catch(const std::exception &e) { 980 throwJavaException(env, &e, method_name); 981 } catch (...) { 982 throwJavaException(env, 0, method_name); 983 } 984 return 0; 985 } 986 987 988 989 // 990 // Ptr_TonemapDrago createTonemapDrago(float gamma = 1.0f, float saturation = 1.0f, float bias = 0.85f) 991 // 992 993 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapDrago_10 (JNIEnv*, jclass, jfloat, jfloat, jfloat); 994 995 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapDrago_10 996 (JNIEnv* env, jclass , jfloat gamma, jfloat saturation, jfloat bias) 997 { 998 static const char method_name[] = "photo::createTonemapDrago_10()"; 999 try { 1000 LOGD("%s", method_name); 1001 typedef Ptr<cv::TonemapDrago> Ptr_TonemapDrago; 1002 Ptr_TonemapDrago _retval_ = cv::createTonemapDrago( (float)gamma, (float)saturation, (float)bias ); 1003 return (jlong)(new Ptr_TonemapDrago(_retval_)); 1004 } catch(const std::exception &e) { 1005 throwJavaException(env, &e, method_name); 1006 } catch (...) { 1007 throwJavaException(env, 0, method_name); 1008 } 1009 return 0; 1010 } 1011 1012 1013 1014 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapDrago_11 (JNIEnv*, jclass); 1015 1016 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapDrago_11 1017 (JNIEnv* env, jclass ) 1018 { 1019 static const char method_name[] = "photo::createTonemapDrago_11()"; 1020 try { 1021 LOGD("%s", method_name); 1022 typedef Ptr<cv::TonemapDrago> Ptr_TonemapDrago; 1023 Ptr_TonemapDrago _retval_ = cv::createTonemapDrago( ); 1024 return (jlong)(new Ptr_TonemapDrago(_retval_)); 1025 } catch(const std::exception &e) { 1026 throwJavaException(env, &e, method_name); 1027 } catch (...) { 1028 throwJavaException(env, 0, method_name); 1029 } 1030 return 0; 1031 } 1032 1033 1034 1035 // 1036 // Ptr_TonemapDurand createTonemapDurand(float gamma = 1.0f, float contrast = 4.0f, float saturation = 1.0f, float sigma_space = 2.0f, float sigma_color = 2.0f) 1037 // 1038 1039 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapDurand_10 (JNIEnv*, jclass, jfloat, jfloat, jfloat, jfloat, jfloat); 1040 1041 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapDurand_10 1042 (JNIEnv* env, jclass , jfloat gamma, jfloat contrast, jfloat saturation, jfloat sigma_space, jfloat sigma_color) 1043 { 1044 static const char method_name[] = "photo::createTonemapDurand_10()"; 1045 try { 1046 LOGD("%s", method_name); 1047 typedef Ptr<cv::TonemapDurand> Ptr_TonemapDurand; 1048 Ptr_TonemapDurand _retval_ = cv::createTonemapDurand( (float)gamma, (float)contrast, (float)saturation, (float)sigma_space, (float)sigma_color ); 1049 return (jlong)(new Ptr_TonemapDurand(_retval_)); 1050 } catch(const std::exception &e) { 1051 throwJavaException(env, &e, method_name); 1052 } catch (...) { 1053 throwJavaException(env, 0, method_name); 1054 } 1055 return 0; 1056 } 1057 1058 1059 1060 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapDurand_11 (JNIEnv*, jclass); 1061 1062 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapDurand_11 1063 (JNIEnv* env, jclass ) 1064 { 1065 static const char method_name[] = "photo::createTonemapDurand_11()"; 1066 try { 1067 LOGD("%s", method_name); 1068 typedef Ptr<cv::TonemapDurand> Ptr_TonemapDurand; 1069 Ptr_TonemapDurand _retval_ = cv::createTonemapDurand( ); 1070 return (jlong)(new Ptr_TonemapDurand(_retval_)); 1071 } catch(const std::exception &e) { 1072 throwJavaException(env, &e, method_name); 1073 } catch (...) { 1074 throwJavaException(env, 0, method_name); 1075 } 1076 return 0; 1077 } 1078 1079 1080 1081 // 1082 // Ptr_TonemapReinhard createTonemapReinhard(float gamma = 1.0f, float intensity = 0.0f, float light_adapt = 1.0f, float color_adapt = 0.0f) 1083 // 1084 1085 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapReinhard_10 (JNIEnv*, jclass, jfloat, jfloat, jfloat, jfloat); 1086 1087 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapReinhard_10 1088 (JNIEnv* env, jclass , jfloat gamma, jfloat intensity, jfloat light_adapt, jfloat color_adapt) 1089 { 1090 static const char method_name[] = "photo::createTonemapReinhard_10()"; 1091 try { 1092 LOGD("%s", method_name); 1093 typedef Ptr<cv::TonemapReinhard> Ptr_TonemapReinhard; 1094 Ptr_TonemapReinhard _retval_ = cv::createTonemapReinhard( (float)gamma, (float)intensity, (float)light_adapt, (float)color_adapt ); 1095 return (jlong)(new Ptr_TonemapReinhard(_retval_)); 1096 } catch(const std::exception &e) { 1097 throwJavaException(env, &e, method_name); 1098 } catch (...) { 1099 throwJavaException(env, 0, method_name); 1100 } 1101 return 0; 1102 } 1103 1104 1105 1106 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapReinhard_11 (JNIEnv*, jclass); 1107 1108 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapReinhard_11 1109 (JNIEnv* env, jclass ) 1110 { 1111 static const char method_name[] = "photo::createTonemapReinhard_11()"; 1112 try { 1113 LOGD("%s", method_name); 1114 typedef Ptr<cv::TonemapReinhard> Ptr_TonemapReinhard; 1115 Ptr_TonemapReinhard _retval_ = cv::createTonemapReinhard( ); 1116 return (jlong)(new Ptr_TonemapReinhard(_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 // 1128 // Ptr_TonemapMantiuk createTonemapMantiuk(float gamma = 1.0f, float scale = 0.7f, float saturation = 1.0f) 1129 // 1130 1131 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapMantiuk_10 (JNIEnv*, jclass, jfloat, jfloat, jfloat); 1132 1133 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapMantiuk_10 1134 (JNIEnv* env, jclass , jfloat gamma, jfloat scale, jfloat saturation) 1135 { 1136 static const char method_name[] = "photo::createTonemapMantiuk_10()"; 1137 try { 1138 LOGD("%s", method_name); 1139 typedef Ptr<cv::TonemapMantiuk> Ptr_TonemapMantiuk; 1140 Ptr_TonemapMantiuk _retval_ = cv::createTonemapMantiuk( (float)gamma, (float)scale, (float)saturation ); 1141 return (jlong)(new Ptr_TonemapMantiuk(_retval_)); 1142 } catch(const std::exception &e) { 1143 throwJavaException(env, &e, method_name); 1144 } catch (...) { 1145 throwJavaException(env, 0, method_name); 1146 } 1147 return 0; 1148 } 1149 1150 1151 1152 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapMantiuk_11 (JNIEnv*, jclass); 1153 1154 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapMantiuk_11 1155 (JNIEnv* env, jclass ) 1156 { 1157 static const char method_name[] = "photo::createTonemapMantiuk_11()"; 1158 try { 1159 LOGD("%s", method_name); 1160 typedef Ptr<cv::TonemapMantiuk> Ptr_TonemapMantiuk; 1161 Ptr_TonemapMantiuk _retval_ = cv::createTonemapMantiuk( ); 1162 return (jlong)(new Ptr_TonemapMantiuk(_retval_)); 1163 } catch(const std::exception &e) { 1164 throwJavaException(env, &e, method_name); 1165 } catch (...) { 1166 throwJavaException(env, 0, method_name); 1167 } 1168 return 0; 1169 } 1170 1171 1172 1173 // 1174 // Ptr_AlignMTB createAlignMTB(int max_bits = 6, int exclude_range = 4, bool cut = true) 1175 // 1176 1177 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createAlignMTB_10 (JNIEnv*, jclass, jint, jint, jboolean); 1178 1179 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createAlignMTB_10 1180 (JNIEnv* env, jclass , jint max_bits, jint exclude_range, jboolean cut) 1181 { 1182 static const char method_name[] = "photo::createAlignMTB_10()"; 1183 try { 1184 LOGD("%s", method_name); 1185 typedef Ptr<cv::AlignMTB> Ptr_AlignMTB; 1186 Ptr_AlignMTB _retval_ = cv::createAlignMTB( (int)max_bits, (int)exclude_range, (bool)cut ); 1187 return (jlong)(new Ptr_AlignMTB(_retval_)); 1188 } catch(const std::exception &e) { 1189 throwJavaException(env, &e, method_name); 1190 } catch (...) { 1191 throwJavaException(env, 0, method_name); 1192 } 1193 return 0; 1194 } 1195 1196 1197 1198 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createAlignMTB_11 (JNIEnv*, jclass); 1199 1200 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createAlignMTB_11 1201 (JNIEnv* env, jclass ) 1202 { 1203 static const char method_name[] = "photo::createAlignMTB_11()"; 1204 try { 1205 LOGD("%s", method_name); 1206 typedef Ptr<cv::AlignMTB> Ptr_AlignMTB; 1207 Ptr_AlignMTB _retval_ = cv::createAlignMTB( ); 1208 return (jlong)(new Ptr_AlignMTB(_retval_)); 1209 } catch(const std::exception &e) { 1210 throwJavaException(env, &e, method_name); 1211 } catch (...) { 1212 throwJavaException(env, 0, method_name); 1213 } 1214 return 0; 1215 } 1216 1217 1218 1219 // 1220 // Ptr_CalibrateDebevec createCalibrateDebevec(int samples = 70, float lambda = 10.0f, bool random = false) 1221 // 1222 1223 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createCalibrateDebevec_10 (JNIEnv*, jclass, jint, jfloat, jboolean); 1224 1225 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createCalibrateDebevec_10 1226 (JNIEnv* env, jclass , jint samples, jfloat lambda, jboolean random) 1227 { 1228 static const char method_name[] = "photo::createCalibrateDebevec_10()"; 1229 try { 1230 LOGD("%s", method_name); 1231 typedef Ptr<cv::CalibrateDebevec> Ptr_CalibrateDebevec; 1232 Ptr_CalibrateDebevec _retval_ = cv::createCalibrateDebevec( (int)samples, (float)lambda, (bool)random ); 1233 return (jlong)(new Ptr_CalibrateDebevec(_retval_)); 1234 } catch(const std::exception &e) { 1235 throwJavaException(env, &e, method_name); 1236 } catch (...) { 1237 throwJavaException(env, 0, method_name); 1238 } 1239 return 0; 1240 } 1241 1242 1243 1244 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createCalibrateDebevec_11 (JNIEnv*, jclass); 1245 1246 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createCalibrateDebevec_11 1247 (JNIEnv* env, jclass ) 1248 { 1249 static const char method_name[] = "photo::createCalibrateDebevec_11()"; 1250 try { 1251 LOGD("%s", method_name); 1252 typedef Ptr<cv::CalibrateDebevec> Ptr_CalibrateDebevec; 1253 Ptr_CalibrateDebevec _retval_ = cv::createCalibrateDebevec( ); 1254 return (jlong)(new Ptr_CalibrateDebevec(_retval_)); 1255 } catch(const std::exception &e) { 1256 throwJavaException(env, &e, method_name); 1257 } catch (...) { 1258 throwJavaException(env, 0, method_name); 1259 } 1260 return 0; 1261 } 1262 1263 1264 1265 // 1266 // Ptr_CalibrateRobertson createCalibrateRobertson(int max_iter = 30, float threshold = 0.01f) 1267 // 1268 1269 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createCalibrateRobertson_10 (JNIEnv*, jclass, jint, jfloat); 1270 1271 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createCalibrateRobertson_10 1272 (JNIEnv* env, jclass , jint max_iter, jfloat threshold) 1273 { 1274 static const char method_name[] = "photo::createCalibrateRobertson_10()"; 1275 try { 1276 LOGD("%s", method_name); 1277 typedef Ptr<cv::CalibrateRobertson> Ptr_CalibrateRobertson; 1278 Ptr_CalibrateRobertson _retval_ = cv::createCalibrateRobertson( (int)max_iter, (float)threshold ); 1279 return (jlong)(new Ptr_CalibrateRobertson(_retval_)); 1280 } catch(const std::exception &e) { 1281 throwJavaException(env, &e, method_name); 1282 } catch (...) { 1283 throwJavaException(env, 0, method_name); 1284 } 1285 return 0; 1286 } 1287 1288 1289 1290 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createCalibrateRobertson_11 (JNIEnv*, jclass); 1291 1292 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createCalibrateRobertson_11 1293 (JNIEnv* env, jclass ) 1294 { 1295 static const char method_name[] = "photo::createCalibrateRobertson_11()"; 1296 try { 1297 LOGD("%s", method_name); 1298 typedef Ptr<cv::CalibrateRobertson> Ptr_CalibrateRobertson; 1299 Ptr_CalibrateRobertson _retval_ = cv::createCalibrateRobertson( ); 1300 return (jlong)(new Ptr_CalibrateRobertson(_retval_)); 1301 } catch(const std::exception &e) { 1302 throwJavaException(env, &e, method_name); 1303 } catch (...) { 1304 throwJavaException(env, 0, method_name); 1305 } 1306 return 0; 1307 } 1308 1309 1310 1311 // 1312 // Ptr_MergeDebevec createMergeDebevec() 1313 // 1314 1315 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createMergeDebevec_10 (JNIEnv*, jclass); 1316 1317 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createMergeDebevec_10 1318 (JNIEnv* env, jclass ) 1319 { 1320 static const char method_name[] = "photo::createMergeDebevec_10()"; 1321 try { 1322 LOGD("%s", method_name); 1323 typedef Ptr<cv::MergeDebevec> Ptr_MergeDebevec; 1324 Ptr_MergeDebevec _retval_ = cv::createMergeDebevec( ); 1325 return (jlong)(new Ptr_MergeDebevec(_retval_)); 1326 } catch(const std::exception &e) { 1327 throwJavaException(env, &e, method_name); 1328 } catch (...) { 1329 throwJavaException(env, 0, method_name); 1330 } 1331 return 0; 1332 } 1333 1334 1335 1336 // 1337 // Ptr_MergeMertens createMergeMertens(float contrast_weight = 1.0f, float saturation_weight = 1.0f, float exposure_weight = 0.0f) 1338 // 1339 1340 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createMergeMertens_10 (JNIEnv*, jclass, jfloat, jfloat, jfloat); 1341 1342 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createMergeMertens_10 1343 (JNIEnv* env, jclass , jfloat contrast_weight, jfloat saturation_weight, jfloat exposure_weight) 1344 { 1345 static const char method_name[] = "photo::createMergeMertens_10()"; 1346 try { 1347 LOGD("%s", method_name); 1348 typedef Ptr<cv::MergeMertens> Ptr_MergeMertens; 1349 Ptr_MergeMertens _retval_ = cv::createMergeMertens( (float)contrast_weight, (float)saturation_weight, (float)exposure_weight ); 1350 return (jlong)(new Ptr_MergeMertens(_retval_)); 1351 } catch(const std::exception &e) { 1352 throwJavaException(env, &e, method_name); 1353 } catch (...) { 1354 throwJavaException(env, 0, method_name); 1355 } 1356 return 0; 1357 } 1358 1359 1360 1361 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createMergeMertens_11 (JNIEnv*, jclass); 1362 1363 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createMergeMertens_11 1364 (JNIEnv* env, jclass ) 1365 { 1366 static const char method_name[] = "photo::createMergeMertens_11()"; 1367 try { 1368 LOGD("%s", method_name); 1369 typedef Ptr<cv::MergeMertens> Ptr_MergeMertens; 1370 Ptr_MergeMertens _retval_ = cv::createMergeMertens( ); 1371 return (jlong)(new Ptr_MergeMertens(_retval_)); 1372 } catch(const std::exception &e) { 1373 throwJavaException(env, &e, method_name); 1374 } catch (...) { 1375 throwJavaException(env, 0, method_name); 1376 } 1377 return 0; 1378 } 1379 1380 1381 1382 // 1383 // Ptr_MergeRobertson createMergeRobertson() 1384 // 1385 1386 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createMergeRobertson_10 (JNIEnv*, jclass); 1387 1388 JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createMergeRobertson_10 1389 (JNIEnv* env, jclass ) 1390 { 1391 static const char method_name[] = "photo::createMergeRobertson_10()"; 1392 try { 1393 LOGD("%s", method_name); 1394 typedef Ptr<cv::MergeRobertson> Ptr_MergeRobertson; 1395 Ptr_MergeRobertson _retval_ = cv::createMergeRobertson( ); 1396 return (jlong)(new Ptr_MergeRobertson(_retval_)); 1397 } catch(const std::exception &e) { 1398 throwJavaException(env, &e, method_name); 1399 } catch (...) { 1400 throwJavaException(env, 0, method_name); 1401 } 1402 return 0; 1403 } 1404 1405 1406 1407 // 1408 // void decolor(Mat src, Mat& grayscale, Mat& color_boost) 1409 // 1410 1411 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_decolor_10 (JNIEnv*, jclass, jlong, jlong, jlong); 1412 1413 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_decolor_10 1414 (JNIEnv* env, jclass , jlong src_nativeObj, jlong grayscale_nativeObj, jlong color_boost_nativeObj) 1415 { 1416 static const char method_name[] = "photo::decolor_10()"; 1417 try { 1418 LOGD("%s", method_name); 1419 Mat& src = *((Mat*)src_nativeObj); 1420 Mat& grayscale = *((Mat*)grayscale_nativeObj); 1421 Mat& color_boost = *((Mat*)color_boost_nativeObj); 1422 cv::decolor( src, grayscale, color_boost ); 1423 return; 1424 } catch(const std::exception &e) { 1425 throwJavaException(env, &e, method_name); 1426 } catch (...) { 1427 throwJavaException(env, 0, method_name); 1428 } 1429 return; 1430 } 1431 1432 1433 1434 // 1435 // void seamlessClone(Mat src, Mat dst, Mat mask, Point p, Mat& blend, int flags) 1436 // 1437 1438 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_seamlessClone_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jdouble, jlong, jint); 1439 1440 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_seamlessClone_10 1441 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj, jdouble p_x, jdouble p_y, jlong blend_nativeObj, jint flags) 1442 { 1443 static const char method_name[] = "photo::seamlessClone_10()"; 1444 try { 1445 LOGD("%s", method_name); 1446 Mat& src = *((Mat*)src_nativeObj); 1447 Mat& dst = *((Mat*)dst_nativeObj); 1448 Mat& mask = *((Mat*)mask_nativeObj); 1449 Point p((int)p_x, (int)p_y); 1450 Mat& blend = *((Mat*)blend_nativeObj); 1451 cv::seamlessClone( src, dst, mask, p, blend, (int)flags ); 1452 return; 1453 } catch(const std::exception &e) { 1454 throwJavaException(env, &e, method_name); 1455 } catch (...) { 1456 throwJavaException(env, 0, method_name); 1457 } 1458 return; 1459 } 1460 1461 1462 1463 // 1464 // void colorChange(Mat src, Mat mask, Mat& dst, float red_mul = 1.0f, float green_mul = 1.0f, float blue_mul = 1.0f) 1465 // 1466 1467 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_colorChange_10 (JNIEnv*, jclass, jlong, jlong, jlong, jfloat, jfloat, jfloat); 1468 1469 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_colorChange_10 1470 (JNIEnv* env, jclass , jlong src_nativeObj, jlong mask_nativeObj, jlong dst_nativeObj, jfloat red_mul, jfloat green_mul, jfloat blue_mul) 1471 { 1472 static const char method_name[] = "photo::colorChange_10()"; 1473 try { 1474 LOGD("%s", method_name); 1475 Mat& src = *((Mat*)src_nativeObj); 1476 Mat& mask = *((Mat*)mask_nativeObj); 1477 Mat& dst = *((Mat*)dst_nativeObj); 1478 cv::colorChange( src, mask, dst, (float)red_mul, (float)green_mul, (float)blue_mul ); 1479 return; 1480 } catch(const std::exception &e) { 1481 throwJavaException(env, &e, method_name); 1482 } catch (...) { 1483 throwJavaException(env, 0, method_name); 1484 } 1485 return; 1486 } 1487 1488 1489 1490 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_colorChange_11 (JNIEnv*, jclass, jlong, jlong, jlong); 1491 1492 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_colorChange_11 1493 (JNIEnv* env, jclass , jlong src_nativeObj, jlong mask_nativeObj, jlong dst_nativeObj) 1494 { 1495 static const char method_name[] = "photo::colorChange_11()"; 1496 try { 1497 LOGD("%s", method_name); 1498 Mat& src = *((Mat*)src_nativeObj); 1499 Mat& mask = *((Mat*)mask_nativeObj); 1500 Mat& dst = *((Mat*)dst_nativeObj); 1501 cv::colorChange( src, mask, dst ); 1502 return; 1503 } catch(const std::exception &e) { 1504 throwJavaException(env, &e, method_name); 1505 } catch (...) { 1506 throwJavaException(env, 0, method_name); 1507 } 1508 return; 1509 } 1510 1511 1512 1513 // 1514 // void illuminationChange(Mat src, Mat mask, Mat& dst, float alpha = 0.2f, float beta = 0.4f) 1515 // 1516 1517 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_illuminationChange_10 (JNIEnv*, jclass, jlong, jlong, jlong, jfloat, jfloat); 1518 1519 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_illuminationChange_10 1520 (JNIEnv* env, jclass , jlong src_nativeObj, jlong mask_nativeObj, jlong dst_nativeObj, jfloat alpha, jfloat beta) 1521 { 1522 static const char method_name[] = "photo::illuminationChange_10()"; 1523 try { 1524 LOGD("%s", method_name); 1525 Mat& src = *((Mat*)src_nativeObj); 1526 Mat& mask = *((Mat*)mask_nativeObj); 1527 Mat& dst = *((Mat*)dst_nativeObj); 1528 cv::illuminationChange( src, mask, dst, (float)alpha, (float)beta ); 1529 return; 1530 } catch(const std::exception &e) { 1531 throwJavaException(env, &e, method_name); 1532 } catch (...) { 1533 throwJavaException(env, 0, method_name); 1534 } 1535 return; 1536 } 1537 1538 1539 1540 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_illuminationChange_11 (JNIEnv*, jclass, jlong, jlong, jlong); 1541 1542 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_illuminationChange_11 1543 (JNIEnv* env, jclass , jlong src_nativeObj, jlong mask_nativeObj, jlong dst_nativeObj) 1544 { 1545 static const char method_name[] = "photo::illuminationChange_11()"; 1546 try { 1547 LOGD("%s", method_name); 1548 Mat& src = *((Mat*)src_nativeObj); 1549 Mat& mask = *((Mat*)mask_nativeObj); 1550 Mat& dst = *((Mat*)dst_nativeObj); 1551 cv::illuminationChange( src, mask, dst ); 1552 return; 1553 } catch(const std::exception &e) { 1554 throwJavaException(env, &e, method_name); 1555 } catch (...) { 1556 throwJavaException(env, 0, method_name); 1557 } 1558 return; 1559 } 1560 1561 1562 1563 // 1564 // void textureFlattening(Mat src, Mat mask, Mat& dst, float low_threshold = 30, float high_threshold = 45, int kernel_size = 3) 1565 // 1566 1567 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_textureFlattening_10 (JNIEnv*, jclass, jlong, jlong, jlong, jfloat, jfloat, jint); 1568 1569 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_textureFlattening_10 1570 (JNIEnv* env, jclass , jlong src_nativeObj, jlong mask_nativeObj, jlong dst_nativeObj, jfloat low_threshold, jfloat high_threshold, jint kernel_size) 1571 { 1572 static const char method_name[] = "photo::textureFlattening_10()"; 1573 try { 1574 LOGD("%s", method_name); 1575 Mat& src = *((Mat*)src_nativeObj); 1576 Mat& mask = *((Mat*)mask_nativeObj); 1577 Mat& dst = *((Mat*)dst_nativeObj); 1578 cv::textureFlattening( src, mask, dst, (float)low_threshold, (float)high_threshold, (int)kernel_size ); 1579 return; 1580 } catch(const std::exception &e) { 1581 throwJavaException(env, &e, method_name); 1582 } catch (...) { 1583 throwJavaException(env, 0, method_name); 1584 } 1585 return; 1586 } 1587 1588 1589 1590 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_textureFlattening_11 (JNIEnv*, jclass, jlong, jlong, jlong); 1591 1592 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_textureFlattening_11 1593 (JNIEnv* env, jclass , jlong src_nativeObj, jlong mask_nativeObj, jlong dst_nativeObj) 1594 { 1595 static const char method_name[] = "photo::textureFlattening_11()"; 1596 try { 1597 LOGD("%s", method_name); 1598 Mat& src = *((Mat*)src_nativeObj); 1599 Mat& mask = *((Mat*)mask_nativeObj); 1600 Mat& dst = *((Mat*)dst_nativeObj); 1601 cv::textureFlattening( src, mask, dst ); 1602 return; 1603 } catch(const std::exception &e) { 1604 throwJavaException(env, &e, method_name); 1605 } catch (...) { 1606 throwJavaException(env, 0, method_name); 1607 } 1608 return; 1609 } 1610 1611 1612 1613 // 1614 // void edgePreservingFilter(Mat src, Mat& dst, int flags = 1, float sigma_s = 60, float sigma_r = 0.4f) 1615 // 1616 1617 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_edgePreservingFilter_10 (JNIEnv*, jclass, jlong, jlong, jint, jfloat, jfloat); 1618 1619 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_edgePreservingFilter_10 1620 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint flags, jfloat sigma_s, jfloat sigma_r) 1621 { 1622 static const char method_name[] = "photo::edgePreservingFilter_10()"; 1623 try { 1624 LOGD("%s", method_name); 1625 Mat& src = *((Mat*)src_nativeObj); 1626 Mat& dst = *((Mat*)dst_nativeObj); 1627 cv::edgePreservingFilter( src, dst, (int)flags, (float)sigma_s, (float)sigma_r ); 1628 return; 1629 } catch(const std::exception &e) { 1630 throwJavaException(env, &e, method_name); 1631 } catch (...) { 1632 throwJavaException(env, 0, method_name); 1633 } 1634 return; 1635 } 1636 1637 1638 1639 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_edgePreservingFilter_11 (JNIEnv*, jclass, jlong, jlong); 1640 1641 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_edgePreservingFilter_11 1642 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj) 1643 { 1644 static const char method_name[] = "photo::edgePreservingFilter_11()"; 1645 try { 1646 LOGD("%s", method_name); 1647 Mat& src = *((Mat*)src_nativeObj); 1648 Mat& dst = *((Mat*)dst_nativeObj); 1649 cv::edgePreservingFilter( src, dst ); 1650 return; 1651 } catch(const std::exception &e) { 1652 throwJavaException(env, &e, method_name); 1653 } catch (...) { 1654 throwJavaException(env, 0, method_name); 1655 } 1656 return; 1657 } 1658 1659 1660 1661 // 1662 // void inpaint(Mat src, Mat inpaintMask, Mat& dst, double inpaintRadius, int flags) 1663 // 1664 1665 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_inpaint_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jint); 1666 1667 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_inpaint_10 1668 (JNIEnv* env, jclass , jlong src_nativeObj, jlong inpaintMask_nativeObj, jlong dst_nativeObj, jdouble inpaintRadius, jint flags) 1669 { 1670 static const char method_name[] = "photo::inpaint_10()"; 1671 try { 1672 LOGD("%s", method_name); 1673 Mat& src = *((Mat*)src_nativeObj); 1674 Mat& inpaintMask = *((Mat*)inpaintMask_nativeObj); 1675 Mat& dst = *((Mat*)dst_nativeObj); 1676 cv::inpaint( src, inpaintMask, dst, (double)inpaintRadius, (int)flags ); 1677 return; 1678 } catch(const std::exception &e) { 1679 throwJavaException(env, &e, method_name); 1680 } catch (...) { 1681 throwJavaException(env, 0, method_name); 1682 } 1683 return; 1684 } 1685 1686 1687 1688 // 1689 // void fastNlMeansDenoising(Mat src, Mat& dst, float h = 3, int templateWindowSize = 7, int searchWindowSize = 21) 1690 // 1691 1692 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoising_10 (JNIEnv*, jclass, jlong, jlong, jfloat, jint, jint); 1693 1694 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoising_10 1695 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jfloat h, jint templateWindowSize, jint searchWindowSize) 1696 { 1697 static const char method_name[] = "photo::fastNlMeansDenoising_10()"; 1698 try { 1699 LOGD("%s", method_name); 1700 Mat& src = *((Mat*)src_nativeObj); 1701 Mat& dst = *((Mat*)dst_nativeObj); 1702 cv::fastNlMeansDenoising( src, dst, (float)h, (int)templateWindowSize, (int)searchWindowSize ); 1703 return; 1704 } catch(const std::exception &e) { 1705 throwJavaException(env, &e, method_name); 1706 } catch (...) { 1707 throwJavaException(env, 0, method_name); 1708 } 1709 return; 1710 } 1711 1712 1713 1714 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoising_11 (JNIEnv*, jclass, jlong, jlong); 1715 1716 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoising_11 1717 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj) 1718 { 1719 static const char method_name[] = "photo::fastNlMeansDenoising_11()"; 1720 try { 1721 LOGD("%s", method_name); 1722 Mat& src = *((Mat*)src_nativeObj); 1723 Mat& dst = *((Mat*)dst_nativeObj); 1724 cv::fastNlMeansDenoising( src, dst ); 1725 return; 1726 } catch(const std::exception &e) { 1727 throwJavaException(env, &e, method_name); 1728 } catch (...) { 1729 throwJavaException(env, 0, method_name); 1730 } 1731 return; 1732 } 1733 1734 1735 1736 // 1737 // void fastNlMeansDenoising(Mat src, Mat& dst, vector_float h, int templateWindowSize = 7, int searchWindowSize = 21, int normType = NORM_L2) 1738 // 1739 1740 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoising_12 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jint, jint); 1741 1742 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoising_12 1743 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong h_mat_nativeObj, jint templateWindowSize, jint searchWindowSize, jint normType) 1744 { 1745 static const char method_name[] = "photo::fastNlMeansDenoising_12()"; 1746 try { 1747 LOGD("%s", method_name); 1748 std::vector<float> h; 1749 Mat& h_mat = *((Mat*)h_mat_nativeObj); 1750 Mat_to_vector_float( h_mat, h ); 1751 Mat& src = *((Mat*)src_nativeObj); 1752 Mat& dst = *((Mat*)dst_nativeObj); 1753 cv::fastNlMeansDenoising( src, dst, h, (int)templateWindowSize, (int)searchWindowSize, (int)normType ); 1754 return; 1755 } catch(const std::exception &e) { 1756 throwJavaException(env, &e, method_name); 1757 } catch (...) { 1758 throwJavaException(env, 0, method_name); 1759 } 1760 return; 1761 } 1762 1763 1764 1765 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoising_13 (JNIEnv*, jclass, jlong, jlong, jlong); 1766 1767 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoising_13 1768 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong h_mat_nativeObj) 1769 { 1770 static const char method_name[] = "photo::fastNlMeansDenoising_13()"; 1771 try { 1772 LOGD("%s", method_name); 1773 std::vector<float> h; 1774 Mat& h_mat = *((Mat*)h_mat_nativeObj); 1775 Mat_to_vector_float( h_mat, h ); 1776 Mat& src = *((Mat*)src_nativeObj); 1777 Mat& dst = *((Mat*)dst_nativeObj); 1778 cv::fastNlMeansDenoising( src, dst, h ); 1779 return; 1780 } catch(const std::exception &e) { 1781 throwJavaException(env, &e, method_name); 1782 } catch (...) { 1783 throwJavaException(env, 0, method_name); 1784 } 1785 return; 1786 } 1787 1788 1789 1790 // 1791 // void fastNlMeansDenoisingColored(Mat src, Mat& dst, float h = 3, float hColor = 3, int templateWindowSize = 7, int searchWindowSize = 21) 1792 // 1793 1794 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingColored_10 (JNIEnv*, jclass, jlong, jlong, jfloat, jfloat, jint, jint); 1795 1796 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingColored_10 1797 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jfloat h, jfloat hColor, jint templateWindowSize, jint searchWindowSize) 1798 { 1799 static const char method_name[] = "photo::fastNlMeansDenoisingColored_10()"; 1800 try { 1801 LOGD("%s", method_name); 1802 Mat& src = *((Mat*)src_nativeObj); 1803 Mat& dst = *((Mat*)dst_nativeObj); 1804 cv::fastNlMeansDenoisingColored( src, dst, (float)h, (float)hColor, (int)templateWindowSize, (int)searchWindowSize ); 1805 return; 1806 } catch(const std::exception &e) { 1807 throwJavaException(env, &e, method_name); 1808 } catch (...) { 1809 throwJavaException(env, 0, method_name); 1810 } 1811 return; 1812 } 1813 1814 1815 1816 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingColored_11 (JNIEnv*, jclass, jlong, jlong); 1817 1818 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingColored_11 1819 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj) 1820 { 1821 static const char method_name[] = "photo::fastNlMeansDenoisingColored_11()"; 1822 try { 1823 LOGD("%s", method_name); 1824 Mat& src = *((Mat*)src_nativeObj); 1825 Mat& dst = *((Mat*)dst_nativeObj); 1826 cv::fastNlMeansDenoisingColored( src, dst ); 1827 return; 1828 } catch(const std::exception &e) { 1829 throwJavaException(env, &e, method_name); 1830 } catch (...) { 1831 throwJavaException(env, 0, method_name); 1832 } 1833 return; 1834 } 1835 1836 1837 1838 // 1839 // void fastNlMeansDenoisingMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, float h = 3, int templateWindowSize = 7, int searchWindowSize = 21) 1840 // 1841 1842 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingMulti_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jfloat, jint, jint); 1843 1844 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingMulti_10 1845 (JNIEnv* env, jclass , jlong srcImgs_mat_nativeObj, jlong dst_nativeObj, jint imgToDenoiseIndex, jint temporalWindowSize, jfloat h, jint templateWindowSize, jint searchWindowSize) 1846 { 1847 static const char method_name[] = "photo::fastNlMeansDenoisingMulti_10()"; 1848 try { 1849 LOGD("%s", method_name); 1850 std::vector<Mat> srcImgs; 1851 Mat& srcImgs_mat = *((Mat*)srcImgs_mat_nativeObj); 1852 Mat_to_vector_Mat( srcImgs_mat, srcImgs ); 1853 Mat& dst = *((Mat*)dst_nativeObj); 1854 cv::fastNlMeansDenoisingMulti( srcImgs, dst, (int)imgToDenoiseIndex, (int)temporalWindowSize, (float)h, (int)templateWindowSize, (int)searchWindowSize ); 1855 return; 1856 } catch(const std::exception &e) { 1857 throwJavaException(env, &e, method_name); 1858 } catch (...) { 1859 throwJavaException(env, 0, method_name); 1860 } 1861 return; 1862 } 1863 1864 1865 1866 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingMulti_11 (JNIEnv*, jclass, jlong, jlong, jint, jint); 1867 1868 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingMulti_11 1869 (JNIEnv* env, jclass , jlong srcImgs_mat_nativeObj, jlong dst_nativeObj, jint imgToDenoiseIndex, jint temporalWindowSize) 1870 { 1871 static const char method_name[] = "photo::fastNlMeansDenoisingMulti_11()"; 1872 try { 1873 LOGD("%s", method_name); 1874 std::vector<Mat> srcImgs; 1875 Mat& srcImgs_mat = *((Mat*)srcImgs_mat_nativeObj); 1876 Mat_to_vector_Mat( srcImgs_mat, srcImgs ); 1877 Mat& dst = *((Mat*)dst_nativeObj); 1878 cv::fastNlMeansDenoisingMulti( srcImgs, dst, (int)imgToDenoiseIndex, (int)temporalWindowSize ); 1879 return; 1880 } catch(const std::exception &e) { 1881 throwJavaException(env, &e, method_name); 1882 } catch (...) { 1883 throwJavaException(env, 0, method_name); 1884 } 1885 return; 1886 } 1887 1888 1889 1890 // 1891 // void fastNlMeansDenoisingMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, vector_float h, int templateWindowSize = 7, int searchWindowSize = 21, int normType = NORM_L2) 1892 // 1893 1894 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingMulti_12 (JNIEnv*, jclass, jlong, jlong, jint, jint, jlong, jint, jint, jint); 1895 1896 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingMulti_12 1897 (JNIEnv* env, jclass , jlong srcImgs_mat_nativeObj, jlong dst_nativeObj, jint imgToDenoiseIndex, jint temporalWindowSize, jlong h_mat_nativeObj, jint templateWindowSize, jint searchWindowSize, jint normType) 1898 { 1899 static const char method_name[] = "photo::fastNlMeansDenoisingMulti_12()"; 1900 try { 1901 LOGD("%s", method_name); 1902 std::vector<Mat> srcImgs; 1903 Mat& srcImgs_mat = *((Mat*)srcImgs_mat_nativeObj); 1904 Mat_to_vector_Mat( srcImgs_mat, srcImgs ); 1905 std::vector<float> h; 1906 Mat& h_mat = *((Mat*)h_mat_nativeObj); 1907 Mat_to_vector_float( h_mat, h ); 1908 Mat& dst = *((Mat*)dst_nativeObj); 1909 cv::fastNlMeansDenoisingMulti( srcImgs, dst, (int)imgToDenoiseIndex, (int)temporalWindowSize, h, (int)templateWindowSize, (int)searchWindowSize, (int)normType ); 1910 return; 1911 } catch(const std::exception &e) { 1912 throwJavaException(env, &e, method_name); 1913 } catch (...) { 1914 throwJavaException(env, 0, method_name); 1915 } 1916 return; 1917 } 1918 1919 1920 1921 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingMulti_13 (JNIEnv*, jclass, jlong, jlong, jint, jint, jlong); 1922 1923 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingMulti_13 1924 (JNIEnv* env, jclass , jlong srcImgs_mat_nativeObj, jlong dst_nativeObj, jint imgToDenoiseIndex, jint temporalWindowSize, jlong h_mat_nativeObj) 1925 { 1926 static const char method_name[] = "photo::fastNlMeansDenoisingMulti_13()"; 1927 try { 1928 LOGD("%s", method_name); 1929 std::vector<Mat> srcImgs; 1930 Mat& srcImgs_mat = *((Mat*)srcImgs_mat_nativeObj); 1931 Mat_to_vector_Mat( srcImgs_mat, srcImgs ); 1932 std::vector<float> h; 1933 Mat& h_mat = *((Mat*)h_mat_nativeObj); 1934 Mat_to_vector_float( h_mat, h ); 1935 Mat& dst = *((Mat*)dst_nativeObj); 1936 cv::fastNlMeansDenoisingMulti( srcImgs, dst, (int)imgToDenoiseIndex, (int)temporalWindowSize, h ); 1937 return; 1938 } catch(const std::exception &e) { 1939 throwJavaException(env, &e, method_name); 1940 } catch (...) { 1941 throwJavaException(env, 0, method_name); 1942 } 1943 return; 1944 } 1945 1946 1947 1948 // 1949 // void detailEnhance(Mat src, Mat& dst, float sigma_s = 10, float sigma_r = 0.15f) 1950 // 1951 1952 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_detailEnhance_10 (JNIEnv*, jclass, jlong, jlong, jfloat, jfloat); 1953 1954 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_detailEnhance_10 1955 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jfloat sigma_s, jfloat sigma_r) 1956 { 1957 static const char method_name[] = "photo::detailEnhance_10()"; 1958 try { 1959 LOGD("%s", method_name); 1960 Mat& src = *((Mat*)src_nativeObj); 1961 Mat& dst = *((Mat*)dst_nativeObj); 1962 cv::detailEnhance( src, dst, (float)sigma_s, (float)sigma_r ); 1963 return; 1964 } catch(const std::exception &e) { 1965 throwJavaException(env, &e, method_name); 1966 } catch (...) { 1967 throwJavaException(env, 0, method_name); 1968 } 1969 return; 1970 } 1971 1972 1973 1974 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_detailEnhance_11 (JNIEnv*, jclass, jlong, jlong); 1975 1976 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_detailEnhance_11 1977 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj) 1978 { 1979 static const char method_name[] = "photo::detailEnhance_11()"; 1980 try { 1981 LOGD("%s", method_name); 1982 Mat& src = *((Mat*)src_nativeObj); 1983 Mat& dst = *((Mat*)dst_nativeObj); 1984 cv::detailEnhance( src, 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 pencilSketch(Mat src, Mat& dst1, Mat& dst2, float sigma_s = 60, float sigma_r = 0.07f, float shade_factor = 0.02f) 1998 // 1999 2000 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_pencilSketch_10 (JNIEnv*, jclass, jlong, jlong, jlong, jfloat, jfloat, jfloat); 2001 2002 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_pencilSketch_10 2003 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst1_nativeObj, jlong dst2_nativeObj, jfloat sigma_s, jfloat sigma_r, jfloat shade_factor) 2004 { 2005 static const char method_name[] = "photo::pencilSketch_10()"; 2006 try { 2007 LOGD("%s", method_name); 2008 Mat& src = *((Mat*)src_nativeObj); 2009 Mat& dst1 = *((Mat*)dst1_nativeObj); 2010 Mat& dst2 = *((Mat*)dst2_nativeObj); 2011 cv::pencilSketch( src, dst1, dst2, (float)sigma_s, (float)sigma_r, (float)shade_factor ); 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 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_pencilSketch_11 (JNIEnv*, jclass, jlong, jlong, jlong); 2024 2025 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_pencilSketch_11 2026 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst1_nativeObj, jlong dst2_nativeObj) 2027 { 2028 static const char method_name[] = "photo::pencilSketch_11()"; 2029 try { 2030 LOGD("%s", method_name); 2031 Mat& src = *((Mat*)src_nativeObj); 2032 Mat& dst1 = *((Mat*)dst1_nativeObj); 2033 Mat& dst2 = *((Mat*)dst2_nativeObj); 2034 cv::pencilSketch( src, dst1, dst2 ); 2035 return; 2036 } catch(const std::exception &e) { 2037 throwJavaException(env, &e, method_name); 2038 } catch (...) { 2039 throwJavaException(env, 0, method_name); 2040 } 2041 return; 2042 } 2043 2044 2045 2046 // 2047 // void stylization(Mat src, Mat& dst, float sigma_s = 60, float sigma_r = 0.45f) 2048 // 2049 2050 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_stylization_10 (JNIEnv*, jclass, jlong, jlong, jfloat, jfloat); 2051 2052 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_stylization_10 2053 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jfloat sigma_s, jfloat sigma_r) 2054 { 2055 static const char method_name[] = "photo::stylization_10()"; 2056 try { 2057 LOGD("%s", method_name); 2058 Mat& src = *((Mat*)src_nativeObj); 2059 Mat& dst = *((Mat*)dst_nativeObj); 2060 cv::stylization( src, dst, (float)sigma_s, (float)sigma_r ); 2061 return; 2062 } catch(const std::exception &e) { 2063 throwJavaException(env, &e, method_name); 2064 } catch (...) { 2065 throwJavaException(env, 0, method_name); 2066 } 2067 return; 2068 } 2069 2070 2071 2072 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_stylization_11 (JNIEnv*, jclass, jlong, jlong); 2073 2074 JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_stylization_11 2075 (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj) 2076 { 2077 static const char method_name[] = "photo::stylization_11()"; 2078 try { 2079 LOGD("%s", method_name); 2080 Mat& src = *((Mat*)src_nativeObj); 2081 Mat& dst = *((Mat*)dst_nativeObj); 2082 cv::stylization( src, dst ); 2083 return; 2084 } catch(const std::exception &e) { 2085 throwJavaException(env, &e, method_name); 2086 } catch (...) { 2087 throwJavaException(env, 0, method_name); 2088 } 2089 return; 2090 } 2091 2092 2093 2094 // 2095 // void process(vector_Mat src, vector_Mat dst, Mat times, Mat response) 2096 // 2097 2098 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignExposures_process_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong); 2099 2100 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignExposures_process_10 2101 (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_mat_nativeObj, jlong times_nativeObj, jlong response_nativeObj) 2102 { 2103 static const char method_name[] = "photo::process_10()"; 2104 try { 2105 LOGD("%s", method_name); 2106 std::vector<Mat> src; 2107 Mat& src_mat = *((Mat*)src_mat_nativeObj); 2108 Mat_to_vector_Mat( src_mat, src ); 2109 std::vector<Mat> dst; 2110 Mat& dst_mat = *((Mat*)dst_mat_nativeObj); 2111 Mat_to_vector_Mat( dst_mat, dst ); 2112 Ptr<cv::AlignExposures>* me = (Ptr<cv::AlignExposures>*) self; //TODO: check for NULL 2113 Mat& times = *((Mat*)times_nativeObj); 2114 Mat& response = *((Mat*)response_nativeObj); 2115 (*me)->process( src, dst, times, response ); 2116 return; 2117 } catch(const std::exception &e) { 2118 throwJavaException(env, &e, method_name); 2119 } catch (...) { 2120 throwJavaException(env, 0, method_name); 2121 } 2122 return; 2123 } 2124 2125 2126 2127 // 2128 // native support for java finalize() 2129 // static void Ptr<cv::AlignExposures>::delete( __int64 self ) 2130 // 2131 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignExposures_delete(JNIEnv*, jclass, jlong); 2132 2133 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignExposures_delete 2134 (JNIEnv*, jclass, jlong self) 2135 { 2136 delete (Ptr<cv::AlignExposures>*) self; 2137 } 2138 2139 2140 // 2141 // void process(vector_Mat src, Mat& dst, Mat times) 2142 // 2143 2144 JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateCRF_process_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong); 2145 2146 JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateCRF_process_10 2147 (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_nativeObj, jlong times_nativeObj) 2148 { 2149 static const char method_name[] = "photo::process_10()"; 2150 try { 2151 LOGD("%s", method_name); 2152 std::vector<Mat> src; 2153 Mat& src_mat = *((Mat*)src_mat_nativeObj); 2154 Mat_to_vector_Mat( src_mat, src ); 2155 Ptr<cv::CalibrateCRF>* me = (Ptr<cv::CalibrateCRF>*) self; //TODO: check for NULL 2156 Mat& dst = *((Mat*)dst_nativeObj); 2157 Mat& times = *((Mat*)times_nativeObj); 2158 (*me)->process( src, dst, times ); 2159 return; 2160 } catch(const std::exception &e) { 2161 throwJavaException(env, &e, method_name); 2162 } catch (...) { 2163 throwJavaException(env, 0, method_name); 2164 } 2165 return; 2166 } 2167 2168 2169 2170 // 2171 // native support for java finalize() 2172 // static void Ptr<cv::CalibrateCRF>::delete( __int64 self ) 2173 // 2174 JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateCRF_delete(JNIEnv*, jclass, jlong); 2175 2176 JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateCRF_delete 2177 (JNIEnv*, jclass, jlong self) 2178 { 2179 delete (Ptr<cv::CalibrateCRF>*) self; 2180 } 2181 2182 2183 // 2184 // float getSaturation() 2185 // 2186 2187 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDrago_getSaturation_10 (JNIEnv*, jclass, jlong); 2188 2189 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDrago_getSaturation_10 2190 (JNIEnv* env, jclass , jlong self) 2191 { 2192 static const char method_name[] = "photo::getSaturation_10()"; 2193 try { 2194 LOGD("%s", method_name); 2195 Ptr<cv::TonemapDrago>* me = (Ptr<cv::TonemapDrago>*) self; //TODO: check for NULL 2196 float _retval_ = (*me)->getSaturation( ); 2197 return _retval_; 2198 } catch(const std::exception &e) { 2199 throwJavaException(env, &e, method_name); 2200 } catch (...) { 2201 throwJavaException(env, 0, method_name); 2202 } 2203 return 0; 2204 } 2205 2206 2207 2208 // 2209 // void setSaturation(float saturation) 2210 // 2211 2212 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDrago_setSaturation_10 (JNIEnv*, jclass, jlong, jfloat); 2213 2214 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDrago_setSaturation_10 2215 (JNIEnv* env, jclass , jlong self, jfloat saturation) 2216 { 2217 static const char method_name[] = "photo::setSaturation_10()"; 2218 try { 2219 LOGD("%s", method_name); 2220 Ptr<cv::TonemapDrago>* me = (Ptr<cv::TonemapDrago>*) self; //TODO: check for NULL 2221 (*me)->setSaturation( (float)saturation ); 2222 return; 2223 } catch(const std::exception &e) { 2224 throwJavaException(env, &e, method_name); 2225 } catch (...) { 2226 throwJavaException(env, 0, method_name); 2227 } 2228 return; 2229 } 2230 2231 2232 2233 // 2234 // float getBias() 2235 // 2236 2237 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDrago_getBias_10 (JNIEnv*, jclass, jlong); 2238 2239 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDrago_getBias_10 2240 (JNIEnv* env, jclass , jlong self) 2241 { 2242 static const char method_name[] = "photo::getBias_10()"; 2243 try { 2244 LOGD("%s", method_name); 2245 Ptr<cv::TonemapDrago>* me = (Ptr<cv::TonemapDrago>*) self; //TODO: check for NULL 2246 float _retval_ = (*me)->getBias( ); 2247 return _retval_; 2248 } catch(const std::exception &e) { 2249 throwJavaException(env, &e, method_name); 2250 } catch (...) { 2251 throwJavaException(env, 0, method_name); 2252 } 2253 return 0; 2254 } 2255 2256 2257 2258 // 2259 // void setBias(float bias) 2260 // 2261 2262 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDrago_setBias_10 (JNIEnv*, jclass, jlong, jfloat); 2263 2264 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDrago_setBias_10 2265 (JNIEnv* env, jclass , jlong self, jfloat bias) 2266 { 2267 static const char method_name[] = "photo::setBias_10()"; 2268 try { 2269 LOGD("%s", method_name); 2270 Ptr<cv::TonemapDrago>* me = (Ptr<cv::TonemapDrago>*) self; //TODO: check for NULL 2271 (*me)->setBias( (float)bias ); 2272 return; 2273 } catch(const std::exception &e) { 2274 throwJavaException(env, &e, method_name); 2275 } catch (...) { 2276 throwJavaException(env, 0, method_name); 2277 } 2278 return; 2279 } 2280 2281 2282 2283 // 2284 // native support for java finalize() 2285 // static void Ptr<cv::TonemapDrago>::delete( __int64 self ) 2286 // 2287 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDrago_delete(JNIEnv*, jclass, jlong); 2288 2289 JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDrago_delete 2290 (JNIEnv*, jclass, jlong self) 2291 { 2292 delete (Ptr<cv::TonemapDrago>*) self; 2293 } 2294 2295 2296 // 2297 // void process(vector_Mat src, vector_Mat dst, Mat times, Mat response) 2298 // 2299 2300 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_process_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong); 2301 2302 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_process_10 2303 (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_mat_nativeObj, jlong times_nativeObj, jlong response_nativeObj) 2304 { 2305 static const char method_name[] = "photo::process_10()"; 2306 try { 2307 LOGD("%s", method_name); 2308 std::vector<Mat> src; 2309 Mat& src_mat = *((Mat*)src_mat_nativeObj); 2310 Mat_to_vector_Mat( src_mat, src ); 2311 std::vector<Mat> dst; 2312 Mat& dst_mat = *((Mat*)dst_mat_nativeObj); 2313 Mat_to_vector_Mat( dst_mat, dst ); 2314 Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL 2315 Mat& times = *((Mat*)times_nativeObj); 2316 Mat& response = *((Mat*)response_nativeObj); 2317 (*me)->process( src, dst, times, response ); 2318 return; 2319 } catch(const std::exception &e) { 2320 throwJavaException(env, &e, method_name); 2321 } catch (...) { 2322 throwJavaException(env, 0, method_name); 2323 } 2324 return; 2325 } 2326 2327 2328 2329 // 2330 // void process(vector_Mat src, vector_Mat dst) 2331 // 2332 2333 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_process_11 (JNIEnv*, jclass, jlong, jlong, jlong); 2334 2335 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_process_11 2336 (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_mat_nativeObj) 2337 { 2338 static const char method_name[] = "photo::process_11()"; 2339 try { 2340 LOGD("%s", method_name); 2341 std::vector<Mat> src; 2342 Mat& src_mat = *((Mat*)src_mat_nativeObj); 2343 Mat_to_vector_Mat( src_mat, src ); 2344 std::vector<Mat> dst; 2345 Mat& dst_mat = *((Mat*)dst_mat_nativeObj); 2346 Mat_to_vector_Mat( dst_mat, dst ); 2347 Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL 2348 (*me)->process( src, dst ); 2349 return; 2350 } catch(const std::exception &e) { 2351 throwJavaException(env, &e, method_name); 2352 } catch (...) { 2353 throwJavaException(env, 0, method_name); 2354 } 2355 return; 2356 } 2357 2358 2359 2360 // 2361 // Point calculateShift(Mat img0, Mat img1) 2362 // 2363 2364 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_photo_AlignMTB_calculateShift_10 (JNIEnv*, jclass, jlong, jlong, jlong); 2365 2366 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_photo_AlignMTB_calculateShift_10 2367 (JNIEnv* env, jclass , jlong self, jlong img0_nativeObj, jlong img1_nativeObj) 2368 { 2369 static const char method_name[] = "photo::calculateShift_10()"; 2370 try { 2371 LOGD("%s", method_name); 2372 Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL 2373 Mat& img0 = *((Mat*)img0_nativeObj); 2374 Mat& img1 = *((Mat*)img1_nativeObj); 2375 Point _retval_ = (*me)->calculateShift( img0, img1 ); 2376 jdoubleArray _da_retval_ = env->NewDoubleArray(2); jdouble _tmp_retval_[2] = {_retval_.x, _retval_.y}; env->SetDoubleArrayRegion(_da_retval_, 0, 2, _tmp_retval_); 2377 return _da_retval_; 2378 } catch(const std::exception &e) { 2379 throwJavaException(env, &e, method_name); 2380 } catch (...) { 2381 throwJavaException(env, 0, method_name); 2382 } 2383 return 0; 2384 } 2385 2386 2387 2388 // 2389 // void shiftMat(Mat src, Mat& dst, Point shift) 2390 // 2391 2392 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_shiftMat_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jdouble); 2393 2394 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_shiftMat_10 2395 (JNIEnv* env, jclass , jlong self, jlong src_nativeObj, jlong dst_nativeObj, jdouble shift_x, jdouble shift_y) 2396 { 2397 static const char method_name[] = "photo::shiftMat_10()"; 2398 try { 2399 LOGD("%s", method_name); 2400 Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL 2401 Mat& src = *((Mat*)src_nativeObj); 2402 Mat& dst = *((Mat*)dst_nativeObj); 2403 Point shift((int)shift_x, (int)shift_y); 2404 (*me)->shiftMat( src, dst, shift ); 2405 return; 2406 } catch(const std::exception &e) { 2407 throwJavaException(env, &e, method_name); 2408 } catch (...) { 2409 throwJavaException(env, 0, method_name); 2410 } 2411 return; 2412 } 2413 2414 2415 2416 // 2417 // void computeBitmaps(Mat img, Mat& tb, Mat& eb) 2418 // 2419 2420 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_computeBitmaps_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong); 2421 2422 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_computeBitmaps_10 2423 (JNIEnv* env, jclass , jlong self, jlong img_nativeObj, jlong tb_nativeObj, jlong eb_nativeObj) 2424 { 2425 static const char method_name[] = "photo::computeBitmaps_10()"; 2426 try { 2427 LOGD("%s", method_name); 2428 Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL 2429 Mat& img = *((Mat*)img_nativeObj); 2430 Mat& tb = *((Mat*)tb_nativeObj); 2431 Mat& eb = *((Mat*)eb_nativeObj); 2432 (*me)->computeBitmaps( img, tb, eb ); 2433 return; 2434 } catch(const std::exception &e) { 2435 throwJavaException(env, &e, method_name); 2436 } catch (...) { 2437 throwJavaException(env, 0, method_name); 2438 } 2439 return; 2440 } 2441 2442 2443 2444 // 2445 // int getMaxBits() 2446 // 2447 2448 JNIEXPORT jint JNICALL Java_org_opencv_photo_AlignMTB_getMaxBits_10 (JNIEnv*, jclass, jlong); 2449 2450 JNIEXPORT jint JNICALL Java_org_opencv_photo_AlignMTB_getMaxBits_10 2451 (JNIEnv* env, jclass , jlong self) 2452 { 2453 static const char method_name[] = "photo::getMaxBits_10()"; 2454 try { 2455 LOGD("%s", method_name); 2456 Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL 2457 int _retval_ = (*me)->getMaxBits( ); 2458 return _retval_; 2459 } catch(const std::exception &e) { 2460 throwJavaException(env, &e, method_name); 2461 } catch (...) { 2462 throwJavaException(env, 0, method_name); 2463 } 2464 return 0; 2465 } 2466 2467 2468 2469 // 2470 // void setMaxBits(int max_bits) 2471 // 2472 2473 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_setMaxBits_10 (JNIEnv*, jclass, jlong, jint); 2474 2475 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_setMaxBits_10 2476 (JNIEnv* env, jclass , jlong self, jint max_bits) 2477 { 2478 static const char method_name[] = "photo::setMaxBits_10()"; 2479 try { 2480 LOGD("%s", method_name); 2481 Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL 2482 (*me)->setMaxBits( (int)max_bits ); 2483 return; 2484 } catch(const std::exception &e) { 2485 throwJavaException(env, &e, method_name); 2486 } catch (...) { 2487 throwJavaException(env, 0, method_name); 2488 } 2489 return; 2490 } 2491 2492 2493 2494 // 2495 // int getExcludeRange() 2496 // 2497 2498 JNIEXPORT jint JNICALL Java_org_opencv_photo_AlignMTB_getExcludeRange_10 (JNIEnv*, jclass, jlong); 2499 2500 JNIEXPORT jint JNICALL Java_org_opencv_photo_AlignMTB_getExcludeRange_10 2501 (JNIEnv* env, jclass , jlong self) 2502 { 2503 static const char method_name[] = "photo::getExcludeRange_10()"; 2504 try { 2505 LOGD("%s", method_name); 2506 Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL 2507 int _retval_ = (*me)->getExcludeRange( ); 2508 return _retval_; 2509 } catch(const std::exception &e) { 2510 throwJavaException(env, &e, method_name); 2511 } catch (...) { 2512 throwJavaException(env, 0, method_name); 2513 } 2514 return 0; 2515 } 2516 2517 2518 2519 // 2520 // void setExcludeRange(int exclude_range) 2521 // 2522 2523 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_setExcludeRange_10 (JNIEnv*, jclass, jlong, jint); 2524 2525 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_setExcludeRange_10 2526 (JNIEnv* env, jclass , jlong self, jint exclude_range) 2527 { 2528 static const char method_name[] = "photo::setExcludeRange_10()"; 2529 try { 2530 LOGD("%s", method_name); 2531 Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL 2532 (*me)->setExcludeRange( (int)exclude_range ); 2533 return; 2534 } catch(const std::exception &e) { 2535 throwJavaException(env, &e, method_name); 2536 } catch (...) { 2537 throwJavaException(env, 0, method_name); 2538 } 2539 return; 2540 } 2541 2542 2543 2544 // 2545 // bool getCut() 2546 // 2547 2548 JNIEXPORT jboolean JNICALL Java_org_opencv_photo_AlignMTB_getCut_10 (JNIEnv*, jclass, jlong); 2549 2550 JNIEXPORT jboolean JNICALL Java_org_opencv_photo_AlignMTB_getCut_10 2551 (JNIEnv* env, jclass , jlong self) 2552 { 2553 static const char method_name[] = "photo::getCut_10()"; 2554 try { 2555 LOGD("%s", method_name); 2556 Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL 2557 bool _retval_ = (*me)->getCut( ); 2558 return _retval_; 2559 } catch(const std::exception &e) { 2560 throwJavaException(env, &e, method_name); 2561 } catch (...) { 2562 throwJavaException(env, 0, method_name); 2563 } 2564 return 0; 2565 } 2566 2567 2568 2569 // 2570 // void setCut(bool value) 2571 // 2572 2573 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_setCut_10 (JNIEnv*, jclass, jlong, jboolean); 2574 2575 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_setCut_10 2576 (JNIEnv* env, jclass , jlong self, jboolean value) 2577 { 2578 static const char method_name[] = "photo::setCut_10()"; 2579 try { 2580 LOGD("%s", method_name); 2581 Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL 2582 (*me)->setCut( (bool)value ); 2583 return; 2584 } catch(const std::exception &e) { 2585 throwJavaException(env, &e, method_name); 2586 } catch (...) { 2587 throwJavaException(env, 0, method_name); 2588 } 2589 return; 2590 } 2591 2592 2593 2594 // 2595 // native support for java finalize() 2596 // static void Ptr<cv::AlignMTB>::delete( __int64 self ) 2597 // 2598 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_delete(JNIEnv*, jclass, jlong); 2599 2600 JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_delete 2601 (JNIEnv*, jclass, jlong self) 2602 { 2603 delete (Ptr<cv::AlignMTB>*) self; 2604 } 2605 2606 2607 // 2608 // void process(vector_Mat src, Mat& dst, Mat times, Mat response) 2609 // 2610 2611 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeDebevec_process_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong); 2612 2613 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeDebevec_process_10 2614 (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_nativeObj, jlong times_nativeObj, jlong response_nativeObj) 2615 { 2616 static const char method_name[] = "photo::process_10()"; 2617 try { 2618 LOGD("%s", method_name); 2619 std::vector<Mat> src; 2620 Mat& src_mat = *((Mat*)src_mat_nativeObj); 2621 Mat_to_vector_Mat( src_mat, src ); 2622 Ptr<cv::MergeDebevec>* me = (Ptr<cv::MergeDebevec>*) self; //TODO: check for NULL 2623 Mat& dst = *((Mat*)dst_nativeObj); 2624 Mat& times = *((Mat*)times_nativeObj); 2625 Mat& response = *((Mat*)response_nativeObj); 2626 (*me)->process( src, dst, times, response ); 2627 return; 2628 } catch(const std::exception &e) { 2629 throwJavaException(env, &e, method_name); 2630 } catch (...) { 2631 throwJavaException(env, 0, method_name); 2632 } 2633 return; 2634 } 2635 2636 2637 2638 // 2639 // void process(vector_Mat src, Mat& dst, Mat times) 2640 // 2641 2642 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeDebevec_process_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong); 2643 2644 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeDebevec_process_11 2645 (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_nativeObj, jlong times_nativeObj) 2646 { 2647 static const char method_name[] = "photo::process_11()"; 2648 try { 2649 LOGD("%s", method_name); 2650 std::vector<Mat> src; 2651 Mat& src_mat = *((Mat*)src_mat_nativeObj); 2652 Mat_to_vector_Mat( src_mat, src ); 2653 Ptr<cv::MergeDebevec>* me = (Ptr<cv::MergeDebevec>*) self; //TODO: check for NULL 2654 Mat& dst = *((Mat*)dst_nativeObj); 2655 Mat& times = *((Mat*)times_nativeObj); 2656 (*me)->process( src, dst, times ); 2657 return; 2658 } catch(const std::exception &e) { 2659 throwJavaException(env, &e, method_name); 2660 } catch (...) { 2661 throwJavaException(env, 0, method_name); 2662 } 2663 return; 2664 } 2665 2666 2667 2668 // 2669 // native support for java finalize() 2670 // static void Ptr<cv::MergeDebevec>::delete( __int64 self ) 2671 // 2672 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeDebevec_delete(JNIEnv*, jclass, jlong); 2673 2674 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeDebevec_delete 2675 (JNIEnv*, jclass, jlong self) 2676 { 2677 delete (Ptr<cv::MergeDebevec>*) self; 2678 } 2679 2680 2681 // 2682 // void process(vector_Mat src, Mat& dst, Mat times, Mat response) 2683 // 2684 2685 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_process_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong); 2686 2687 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_process_10 2688 (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_nativeObj, jlong times_nativeObj, jlong response_nativeObj) 2689 { 2690 static const char method_name[] = "photo::process_10()"; 2691 try { 2692 LOGD("%s", method_name); 2693 std::vector<Mat> src; 2694 Mat& src_mat = *((Mat*)src_mat_nativeObj); 2695 Mat_to_vector_Mat( src_mat, src ); 2696 Ptr<cv::MergeMertens>* me = (Ptr<cv::MergeMertens>*) self; //TODO: check for NULL 2697 Mat& dst = *((Mat*)dst_nativeObj); 2698 Mat& times = *((Mat*)times_nativeObj); 2699 Mat& response = *((Mat*)response_nativeObj); 2700 (*me)->process( src, dst, times, response ); 2701 return; 2702 } catch(const std::exception &e) { 2703 throwJavaException(env, &e, method_name); 2704 } catch (...) { 2705 throwJavaException(env, 0, method_name); 2706 } 2707 return; 2708 } 2709 2710 2711 2712 // 2713 // void process(vector_Mat src, Mat& dst) 2714 // 2715 2716 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_process_11 (JNIEnv*, jclass, jlong, jlong, jlong); 2717 2718 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_process_11 2719 (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_nativeObj) 2720 { 2721 static const char method_name[] = "photo::process_11()"; 2722 try { 2723 LOGD("%s", method_name); 2724 std::vector<Mat> src; 2725 Mat& src_mat = *((Mat*)src_mat_nativeObj); 2726 Mat_to_vector_Mat( src_mat, src ); 2727 Ptr<cv::MergeMertens>* me = (Ptr<cv::MergeMertens>*) self; //TODO: check for NULL 2728 Mat& dst = *((Mat*)dst_nativeObj); 2729 (*me)->process( src, dst ); 2730 return; 2731 } catch(const std::exception &e) { 2732 throwJavaException(env, &e, method_name); 2733 } catch (...) { 2734 throwJavaException(env, 0, method_name); 2735 } 2736 return; 2737 } 2738 2739 2740 2741 // 2742 // float getContrastWeight() 2743 // 2744 2745 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_MergeMertens_getContrastWeight_10 (JNIEnv*, jclass, jlong); 2746 2747 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_MergeMertens_getContrastWeight_10 2748 (JNIEnv* env, jclass , jlong self) 2749 { 2750 static const char method_name[] = "photo::getContrastWeight_10()"; 2751 try { 2752 LOGD("%s", method_name); 2753 Ptr<cv::MergeMertens>* me = (Ptr<cv::MergeMertens>*) self; //TODO: check for NULL 2754 float _retval_ = (*me)->getContrastWeight( ); 2755 return _retval_; 2756 } catch(const std::exception &e) { 2757 throwJavaException(env, &e, method_name); 2758 } catch (...) { 2759 throwJavaException(env, 0, method_name); 2760 } 2761 return 0; 2762 } 2763 2764 2765 2766 // 2767 // void setContrastWeight(float contrast_weiht) 2768 // 2769 2770 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_setContrastWeight_10 (JNIEnv*, jclass, jlong, jfloat); 2771 2772 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_setContrastWeight_10 2773 (JNIEnv* env, jclass , jlong self, jfloat contrast_weiht) 2774 { 2775 static const char method_name[] = "photo::setContrastWeight_10()"; 2776 try { 2777 LOGD("%s", method_name); 2778 Ptr<cv::MergeMertens>* me = (Ptr<cv::MergeMertens>*) self; //TODO: check for NULL 2779 (*me)->setContrastWeight( (float)contrast_weiht ); 2780 return; 2781 } catch(const std::exception &e) { 2782 throwJavaException(env, &e, method_name); 2783 } catch (...) { 2784 throwJavaException(env, 0, method_name); 2785 } 2786 return; 2787 } 2788 2789 2790 2791 // 2792 // float getSaturationWeight() 2793 // 2794 2795 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_MergeMertens_getSaturationWeight_10 (JNIEnv*, jclass, jlong); 2796 2797 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_MergeMertens_getSaturationWeight_10 2798 (JNIEnv* env, jclass , jlong self) 2799 { 2800 static const char method_name[] = "photo::getSaturationWeight_10()"; 2801 try { 2802 LOGD("%s", method_name); 2803 Ptr<cv::MergeMertens>* me = (Ptr<cv::MergeMertens>*) self; //TODO: check for NULL 2804 float _retval_ = (*me)->getSaturationWeight( ); 2805 return _retval_; 2806 } catch(const std::exception &e) { 2807 throwJavaException(env, &e, method_name); 2808 } catch (...) { 2809 throwJavaException(env, 0, method_name); 2810 } 2811 return 0; 2812 } 2813 2814 2815 2816 // 2817 // void setSaturationWeight(float saturation_weight) 2818 // 2819 2820 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_setSaturationWeight_10 (JNIEnv*, jclass, jlong, jfloat); 2821 2822 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_setSaturationWeight_10 2823 (JNIEnv* env, jclass , jlong self, jfloat saturation_weight) 2824 { 2825 static const char method_name[] = "photo::setSaturationWeight_10()"; 2826 try { 2827 LOGD("%s", method_name); 2828 Ptr<cv::MergeMertens>* me = (Ptr<cv::MergeMertens>*) self; //TODO: check for NULL 2829 (*me)->setSaturationWeight( (float)saturation_weight ); 2830 return; 2831 } catch(const std::exception &e) { 2832 throwJavaException(env, &e, method_name); 2833 } catch (...) { 2834 throwJavaException(env, 0, method_name); 2835 } 2836 return; 2837 } 2838 2839 2840 2841 // 2842 // float getExposureWeight() 2843 // 2844 2845 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_MergeMertens_getExposureWeight_10 (JNIEnv*, jclass, jlong); 2846 2847 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_MergeMertens_getExposureWeight_10 2848 (JNIEnv* env, jclass , jlong self) 2849 { 2850 static const char method_name[] = "photo::getExposureWeight_10()"; 2851 try { 2852 LOGD("%s", method_name); 2853 Ptr<cv::MergeMertens>* me = (Ptr<cv::MergeMertens>*) self; //TODO: check for NULL 2854 float _retval_ = (*me)->getExposureWeight( ); 2855 return _retval_; 2856 } catch(const std::exception &e) { 2857 throwJavaException(env, &e, method_name); 2858 } catch (...) { 2859 throwJavaException(env, 0, method_name); 2860 } 2861 return 0; 2862 } 2863 2864 2865 2866 // 2867 // void setExposureWeight(float exposure_weight) 2868 // 2869 2870 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_setExposureWeight_10 (JNIEnv*, jclass, jlong, jfloat); 2871 2872 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_setExposureWeight_10 2873 (JNIEnv* env, jclass , jlong self, jfloat exposure_weight) 2874 { 2875 static const char method_name[] = "photo::setExposureWeight_10()"; 2876 try { 2877 LOGD("%s", method_name); 2878 Ptr<cv::MergeMertens>* me = (Ptr<cv::MergeMertens>*) self; //TODO: check for NULL 2879 (*me)->setExposureWeight( (float)exposure_weight ); 2880 return; 2881 } catch(const std::exception &e) { 2882 throwJavaException(env, &e, method_name); 2883 } catch (...) { 2884 throwJavaException(env, 0, method_name); 2885 } 2886 return; 2887 } 2888 2889 2890 2891 // 2892 // native support for java finalize() 2893 // static void Ptr<cv::MergeMertens>::delete( __int64 self ) 2894 // 2895 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_delete(JNIEnv*, jclass, jlong); 2896 2897 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_delete 2898 (JNIEnv*, jclass, jlong self) 2899 { 2900 delete (Ptr<cv::MergeMertens>*) self; 2901 } 2902 2903 2904 // 2905 // void process(vector_Mat src, Mat& dst, Mat times, Mat response) 2906 // 2907 2908 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeExposures_process_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong); 2909 2910 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeExposures_process_10 2911 (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_nativeObj, jlong times_nativeObj, jlong response_nativeObj) 2912 { 2913 static const char method_name[] = "photo::process_10()"; 2914 try { 2915 LOGD("%s", method_name); 2916 std::vector<Mat> src; 2917 Mat& src_mat = *((Mat*)src_mat_nativeObj); 2918 Mat_to_vector_Mat( src_mat, src ); 2919 Ptr<cv::MergeExposures>* me = (Ptr<cv::MergeExposures>*) self; //TODO: check for NULL 2920 Mat& dst = *((Mat*)dst_nativeObj); 2921 Mat& times = *((Mat*)times_nativeObj); 2922 Mat& response = *((Mat*)response_nativeObj); 2923 (*me)->process( src, dst, times, response ); 2924 return; 2925 } catch(const std::exception &e) { 2926 throwJavaException(env, &e, method_name); 2927 } catch (...) { 2928 throwJavaException(env, 0, method_name); 2929 } 2930 return; 2931 } 2932 2933 2934 2935 // 2936 // native support for java finalize() 2937 // static void Ptr<cv::MergeExposures>::delete( __int64 self ) 2938 // 2939 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeExposures_delete(JNIEnv*, jclass, jlong); 2940 2941 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeExposures_delete 2942 (JNIEnv*, jclass, jlong self) 2943 { 2944 delete (Ptr<cv::MergeExposures>*) self; 2945 } 2946 2947 2948 // 2949 // void process(vector_Mat src, Mat& dst, Mat times, Mat response) 2950 // 2951 2952 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeRobertson_process_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong); 2953 2954 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeRobertson_process_10 2955 (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_nativeObj, jlong times_nativeObj, jlong response_nativeObj) 2956 { 2957 static const char method_name[] = "photo::process_10()"; 2958 try { 2959 LOGD("%s", method_name); 2960 std::vector<Mat> src; 2961 Mat& src_mat = *((Mat*)src_mat_nativeObj); 2962 Mat_to_vector_Mat( src_mat, src ); 2963 Ptr<cv::MergeRobertson>* me = (Ptr<cv::MergeRobertson>*) self; //TODO: check for NULL 2964 Mat& dst = *((Mat*)dst_nativeObj); 2965 Mat& times = *((Mat*)times_nativeObj); 2966 Mat& response = *((Mat*)response_nativeObj); 2967 (*me)->process( src, dst, times, response ); 2968 return; 2969 } catch(const std::exception &e) { 2970 throwJavaException(env, &e, method_name); 2971 } catch (...) { 2972 throwJavaException(env, 0, method_name); 2973 } 2974 return; 2975 } 2976 2977 2978 2979 // 2980 // void process(vector_Mat src, Mat& dst, Mat times) 2981 // 2982 2983 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeRobertson_process_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong); 2984 2985 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeRobertson_process_11 2986 (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_nativeObj, jlong times_nativeObj) 2987 { 2988 static const char method_name[] = "photo::process_11()"; 2989 try { 2990 LOGD("%s", method_name); 2991 std::vector<Mat> src; 2992 Mat& src_mat = *((Mat*)src_mat_nativeObj); 2993 Mat_to_vector_Mat( src_mat, src ); 2994 Ptr<cv::MergeRobertson>* me = (Ptr<cv::MergeRobertson>*) self; //TODO: check for NULL 2995 Mat& dst = *((Mat*)dst_nativeObj); 2996 Mat& times = *((Mat*)times_nativeObj); 2997 (*me)->process( src, dst, times ); 2998 return; 2999 } catch(const std::exception &e) { 3000 throwJavaException(env, &e, method_name); 3001 } catch (...) { 3002 throwJavaException(env, 0, method_name); 3003 } 3004 return; 3005 } 3006 3007 3008 3009 // 3010 // native support for java finalize() 3011 // static void Ptr<cv::MergeRobertson>::delete( __int64 self ) 3012 // 3013 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeRobertson_delete(JNIEnv*, jclass, jlong); 3014 3015 JNIEXPORT void JNICALL Java_org_opencv_photo_MergeRobertson_delete 3016 (JNIEnv*, jclass, jlong self) 3017 { 3018 delete (Ptr<cv::MergeRobertson>*) self; 3019 } 3020 3021 3022 // 3023 // void process(Mat src, Mat& dst) 3024 // 3025 3026 JNIEXPORT void JNICALL Java_org_opencv_photo_Tonemap_process_10 (JNIEnv*, jclass, jlong, jlong, jlong); 3027 3028 JNIEXPORT void JNICALL Java_org_opencv_photo_Tonemap_process_10 3029 (JNIEnv* env, jclass , jlong self, jlong src_nativeObj, jlong dst_nativeObj) 3030 { 3031 static const char method_name[] = "photo::process_10()"; 3032 try { 3033 LOGD("%s", method_name); 3034 Ptr<cv::Tonemap>* me = (Ptr<cv::Tonemap>*) self; //TODO: check for NULL 3035 Mat& src = *((Mat*)src_nativeObj); 3036 Mat& dst = *((Mat*)dst_nativeObj); 3037 (*me)->process( src, dst ); 3038 return; 3039 } catch(const std::exception &e) { 3040 throwJavaException(env, &e, method_name); 3041 } catch (...) { 3042 throwJavaException(env, 0, method_name); 3043 } 3044 return; 3045 } 3046 3047 3048 3049 // 3050 // float getGamma() 3051 // 3052 3053 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_Tonemap_getGamma_10 (JNIEnv*, jclass, jlong); 3054 3055 JNIEXPORT jfloat JNICALL Java_org_opencv_photo_Tonemap_getGamma_10 3056 (JNIEnv* env, jclass , jlong self) 3057 { 3058 static const char method_name[] = "photo::getGamma_10()"; 3059 try { 3060 LOGD("%s", method_name); 3061 Ptr<cv::Tonemap>* me = (Ptr<cv::Tonemap>*) self; //TODO: check for NULL 3062 float _retval_ = (*me)->getGamma( ); 3063 return _retval_; 3064 } catch(const std::exception &e) { 3065 throwJavaException(env, &e, method_name); 3066 } catch (...) { 3067 throwJavaException(env, 0, method_name); 3068 } 3069 return 0; 3070 } 3071 3072 3073 3074 // 3075 // void setGamma(float gamma) 3076 // 3077 3078 JNIEXPORT void JNICALL Java_org_opencv_photo_Tonemap_setGamma_10 (JNIEnv*, jclass, jlong, jfloat); 3079 3080 JNIEXPORT void JNICALL Java_org_opencv_photo_Tonemap_setGamma_10 3081 (JNIEnv* env, jclass , jlong self, jfloat gamma) 3082 { 3083 static const char method_name[] = "photo::setGamma_10()"; 3084 try { 3085 LOGD("%s", method_name); 3086 Ptr<cv::Tonemap>* me = (Ptr<cv::Tonemap>*) self; //TODO: check for NULL 3087 (*me)->setGamma( (float)gamma ); 3088 return; 3089 } catch(const std::exception &e) { 3090 throwJavaException(env, &e, method_name); 3091 } catch (...) { 3092 throwJavaException(env, 0, method_name); 3093 } 3094 return; 3095 } 3096 3097 3098 3099 // 3100 // native support for java finalize() 3101 // static void Ptr<cv::Tonemap>::delete( __int64 self ) 3102 // 3103 JNIEXPORT void JNICALL Java_org_opencv_photo_Tonemap_delete(JNIEnv*, jclass, jlong); 3104 3105 JNIEXPORT void JNICALL Java_org_opencv_photo_Tonemap_delete 3106 (JNIEnv*, jclass, jlong self) 3107 { 3108 delete (Ptr<cv::Tonemap>*) self; 3109 } 3110 3111 3112 3113 } // extern "C" 3114 3115 #endif // HAVE_OPENCV_PHOTO 3116