diff --git a/3rdparty/tbb/CMakeLists.txt b/3rdparty/tbb/CMakeLists.txt index ce0819596..be91b5b80 100644 --- a/3rdparty/tbb/CMakeLists.txt +++ b/3rdparty/tbb/CMakeLists.txt @@ -230,9 +230,15 @@ endif() ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wmissing-declarations) string(REPLACE "-Werror=non-virtual-dtor" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +if (WIN32) + set(tbb_debug_postfix "_debug") # to fit pragmas in _windef.h inside TBB +else() + set(tbb_debug_postfix ${OPENCV_DEBUG_POSTFIX}) +endif() + set_target_properties(tbb PROPERTIES OUTPUT_NAME tbb - DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}" + DEBUG_POSTFIX "${tbb_debug_postfix}" ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH} RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} ) diff --git a/cmake/OpenCVDetectCUDA.cmake b/cmake/OpenCVDetectCUDA.cmake index 2f159a337..1e561a32e 100644 --- a/cmake/OpenCVDetectCUDA.cmake +++ b/cmake/OpenCVDetectCUDA.cmake @@ -99,7 +99,11 @@ if(CUDA_FOUND) if(CUDA_GENERATION STREQUAL "Fermi") set(__cuda_arch_bin "2.0 2.1(2.0)") elseif(CUDA_GENERATION STREQUAL "Kepler") - set(__cuda_arch_bin "3.0") + if(${CUDA_VERSION} VERSION_LESS "5.0") + set(__cuda_arch_bin "3.0") + else() + set(__cuda_arch_bin "3.0 3.5") + endif() elseif(CUDA_GENERATION STREQUAL "Auto") execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run" WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/" @@ -113,8 +117,12 @@ if(CUDA_FOUND) endif() if(NOT DEFINED __cuda_arch_bin) - set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0") - set(__cuda_arch_ptx "2.0 3.0") + if(${CUDA_VERSION} VERSION_LESS "5.0") + set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0") + else() + set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0 3.5") + endif() + set(__cuda_arch_ptx "3.0") endif() set(CUDA_ARCH_BIN ${__cuda_arch_bin} CACHE STRING "Specify 'real' GPU architectures to build binaries for, BIN(PTX) format is supported") diff --git a/doc/tutorials/introduction/windows_visual_studio_Opencv/images/PropertySheetOpenCVInclude.jpg b/doc/tutorials/introduction/windows_visual_studio_Opencv/images/PropertySheetOpenCVInclude.jpg index 5826f4dd6..bc61d3386 100644 Binary files a/doc/tutorials/introduction/windows_visual_studio_Opencv/images/PropertySheetOpenCVInclude.jpg and b/doc/tutorials/introduction/windows_visual_studio_Opencv/images/PropertySheetOpenCVInclude.jpg differ diff --git a/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.rst b/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.rst index c9988df34..f3058a74d 100644 --- a/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.rst +++ b/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.rst @@ -52,7 +52,7 @@ Use for example the *OpenCV_Debug* name. Then by selecting the sheet :menuselect .. code-block:: bash - $(OPENCV_DIR)\include + $(OPENCV_DIR)\..\..\include .. image:: images/PropertySheetOpenCVInclude.jpg :alt: Add the include dir like this. @@ -64,7 +64,7 @@ Next go to the :menuselection:`Linker --> General` and under the *"Additional Li .. code-block:: bash - $(OPENCV_DIR)\libs + $(OPENCV_DIR)\lib .. image:: images/PropertySheetOpenCVLib.jpg :alt: Add the library folder like this. diff --git a/modules/contrib/src/ba.cpp b/modules/contrib/src/ba.cpp index ff58073fc..9a8002e96 100644 --- a/modules/contrib/src/ba.cpp +++ b/modules/contrib/src/ba.cpp @@ -746,7 +746,7 @@ static void fjac(int /*i*/, int /*j*/, CvMat *point_params, CvMat* cam_params, C CvMat* _mp = cvCreateMat(1, 1, CV_64FC2 ); //projection of the point //split camera params into different matrices - CvMat _ri, _ti, _k; + CvMat _ri, _ti, _k = cvMat(0, 0, CV_64F, NULL); // dummy initialization to fix warning of cl.exe cvGetRows( cam_params, &_ri, 0, 3 ); cvGetRows( cam_params, &_ti, 3, 6 ); diff --git a/modules/contrib/src/featuretracker.cpp b/modules/contrib/src/featuretracker.cpp index 4350aec46..e13d119b9 100644 --- a/modules/contrib/src/featuretracker.cpp +++ b/modules/contrib/src/featuretracker.cpp @@ -59,6 +59,7 @@ CvFeatureTracker::CvFeatureTracker(CvFeatureTrackerParams _params) : dd->set("nOctaveLayers", 5); dd->set("contrastThreshold", 0.04); dd->set("edgeThreshold", 10.7); + break; case CvFeatureTrackerParams::SURF: dd = Algorithm::create("Feature2D.SURF"); if( dd.empty() ) @@ -66,8 +67,10 @@ CvFeatureTracker::CvFeatureTracker(CvFeatureTrackerParams _params) : dd->set("hessianThreshold", 400); dd->set("nOctaves", 3); dd->set("nOctaveLayers", 4); + break; default: CV_Error(CV_StsBadArg, "Unknown feature type"); + break; } matcher = new BFMatcher(NORM_L2); diff --git a/modules/core/include/opencv2/core/cvdef.h b/modules/core/include/opencv2/core/cvdef.h index 2fba1351f..bfc8c9cfd 100644 --- a/modules/core/include/opencv2/core/cvdef.h +++ b/modules/core/include/opencv2/core/cvdef.h @@ -84,7 +84,7 @@ #ifndef CV_INLINE # if defined __cplusplus # define CV_INLINE static inline -# elif (defined WIN32 || defined _WIN32 || defined WINCE) && !defined __GNUC__ +# elif defined _MSC_VER # define CV_INLINE __inline # else # define CV_INLINE static diff --git a/modules/features2d/src/bagofwords.cpp b/modules/features2d/src/bagofwords.cpp index b27b85123..4307983fe 100644 --- a/modules/features2d/src/bagofwords.cpp +++ b/modules/features2d/src/bagofwords.cpp @@ -147,7 +147,7 @@ void BOWImgDescriptorExtractor::compute( const Mat& image, std::vector int clusterCount = descriptorSize(); // = vocabulary.rows // Compute descriptors for the image. - Mat descriptors = _descriptors ? *_descriptors : Mat(); + Mat descriptors; dextractor->compute( image, keypoints, descriptors ); // Match keypoint descriptors to cluster center (to vocabulary) @@ -176,6 +176,11 @@ void BOWImgDescriptorExtractor::compute( const Mat& image, std::vector // Normalize image descriptor. imgDescriptor /= descriptors.rows; + + // Add the descriptors of image keypoints + if (_descriptors) { + *_descriptors = descriptors.clone(); + } } int BOWImgDescriptorExtractor::descriptorSize() const diff --git a/modules/highgui/src/cap_qtkit.mm b/modules/highgui/src/cap_qtkit.mm index db988cf81..d44b7636d 100644 --- a/modules/highgui/src/cap_qtkit.mm +++ b/modules/highgui/src/cap_qtkit.mm @@ -275,8 +275,11 @@ bool CvCaptureCAM::grabFrame(double timeOut) { double sleepTime = 0.005; double total = 0; - while (![capture updateImage] && (total += sleepTime)<=timeOut) - usleep((int)(sleepTime*1000)); + NSDate *loopUntil = [NSDate dateWithTimeIntervalSinceNow:sleepTime]; + while (![capture updateImage] && (total += sleepTime)<=timeOut && + [[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode + beforeDate:loopUntil]) + loopUntil = [NSDate dateWithTimeIntervalSinceNow:sleepTime]; [localpool drain]; diff --git a/modules/imgproc/src/distransform.cpp b/modules/imgproc/src/distransform.cpp index 8ebb206b3..29e3fc10a 100644 --- a/modules/imgproc/src/distransform.cpp +++ b/modules/imgproc/src/distransform.cpp @@ -744,6 +744,16 @@ void cv::distanceTransform( InputArray _src, OutputArray _dst, OutputArray _labe if( labelType == CV_DIST_LABEL_CCOMP ) { + #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) + if( maskSize == CV_DIST_MASK_5 ) + { + IppiSize roi = { src->cols, src->rows }; + if( ippiDistanceTransform_5x5_8u32f_C1R( + src->data.ptr, src->step, + dst->data.fl, dst->step, roi, _mask) >= 0 ) + return; + } + #endif Mat zpix = src == 0; connectedComponents(zpix, labels, 8, CV_32S); } diff --git a/modules/imgproc/src/histogram.cpp b/modules/imgproc/src/histogram.cpp index 554e59fe6..08252586a 100644 --- a/modules/imgproc/src/histogram.cpp +++ b/modules/imgproc/src/histogram.cpp @@ -266,6 +266,8 @@ public: } private: + calcHist1D_Invoker operator=(const calcHist1D_Invoker&); + T* p_[one]; uchar* mask_; int step_[one]; @@ -338,6 +340,8 @@ public: } private: + calcHist2D_Invoker operator=(const calcHist2D_Invoker&); + T* p_[two]; uchar* mask_; int step_[two]; @@ -428,6 +432,8 @@ public: } private: + calcHist3D_Invoker operator=(const calcHist3D_Invoker&); + T* p_[three]; uchar* mask_; int step_[three]; @@ -767,8 +773,7 @@ calcHist_( std::vector& _ptrs, const std::vector& _deltas, #ifdef HAVE_TBB calcHist1D_Invoker body(_ptrs, _deltas, hist, _uniranges, size[0], dims, imsize); parallel_for(BlockedRange(0, imsize.height), body); - return; -#endif +#else double a = uniranges[0], b = uniranges[1]; int sz = size[0], d0 = deltas[0], step0 = deltas[1]; const T* p0 = (const T*)ptrs[0]; @@ -791,14 +796,15 @@ calcHist_( std::vector& _ptrs, const std::vector& _deltas, ((int*)H)[idx]++; } } +#endif //HAVE_TBB + return; } else if( dims == 2 ) { #ifdef HAVE_TBB calcHist2D_Invoker body(_ptrs, _deltas, hist, _uniranges, size, dims, imsize, hstep); parallel_for(BlockedRange(0, imsize.height), body); - return; -#endif +#else double a0 = uniranges[0], b0 = uniranges[1], a1 = uniranges[2], b1 = uniranges[3]; int sz0 = size[0], sz1 = size[1]; int d0 = deltas[0], step0 = deltas[1], @@ -827,6 +833,8 @@ calcHist_( std::vector& _ptrs, const std::vector& _deltas, ((int*)(H + hstep0*idx0))[idx1]++; } } +#endif //HAVE_TBB + return; } else if( dims == 3 ) { diff --git a/modules/imgproc/src/shapedescr.cpp b/modules/imgproc/src/shapedescr.cpp index 59868a238..4258d473a 100644 --- a/modules/imgproc/src/shapedescr.cpp +++ b/modules/imgproc/src/shapedescr.cpp @@ -381,7 +381,7 @@ cv::RotatedRect cv::fitEllipse( InputArray _points ) // New fitellipse algorithm, contributed by Dr. Daniel Weiss Point2f c(0,0); double gfp[5], rp[5], t; - const double min_eps = 1e-6; + const double min_eps = 1e-8; bool is_float = depth == CV_32F; const Point* ptsi = (const Point*)points.data; const Point2f* ptsf = (const Point2f*)points.data; diff --git a/modules/imgproc/src/sumpixels.cpp b/modules/imgproc/src/sumpixels.cpp index b44197047..4ee941762 100644 --- a/modules/imgproc/src/sumpixels.cpp +++ b/modules/imgproc/src/sumpixels.cpp @@ -41,6 +41,9 @@ //M*/ #include "precomp.hpp" +#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) +static IppStatus sts = ippInit(); +#endif namespace cv { @@ -234,6 +237,53 @@ void cv::integral( InputArray _src, OutputArray _sum, OutputArray _sqsum, Output if( sdepth <= 0 ) sdepth = depth == CV_8U ? CV_32S : CV_64F; sdepth = CV_MAT_DEPTH(sdepth); + +#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) + if( ( depth == CV_8U ) && ( !_tilted.needed() ) ) + { + if( sdepth == CV_32F ) + { + if( cn == 1 ) + { + IppiSize srcRoiSize = ippiSize( src.cols, src.rows ); + _sum.create( isize, CV_MAKETYPE( sdepth, cn ) ); + sum = _sum.getMat(); + if( _sqsum.needed() ) + { + _sqsum.create( isize, CV_MAKETYPE( CV_64F, cn ) ); + sqsum = _sqsum.getMat(); + ippiSqrIntegral_8u32f64f_C1R( (const Ipp8u*)src.data, src.step, (Ipp32f*)sum.data, sum.step, (Ipp64f*)sqsum.data, sqsum.step, srcRoiSize, 0, 0 ); + } + else + { + ippiIntegral_8u32f_C1R( (const Ipp8u*)src.data, src.step, (Ipp32f*)sum.data, sum.step, srcRoiSize, 0 ); + } + return; + } + } + if( sdepth == CV_32S ) + { + if( cn == 1 ) + { + IppiSize srcRoiSize = ippiSize( src.cols, src.rows ); + _sum.create( isize, CV_MAKETYPE( sdepth, cn ) ); + sum = _sum.getMat(); + if( _sqsum.needed() ) + { + _sqsum.create( isize, CV_MAKETYPE( CV_64F, cn ) ); + sqsum = _sqsum.getMat(); + ippiSqrIntegral_8u32s64f_C1R( (const Ipp8u*)src.data, src.step, (Ipp32s*)sum.data, sum.step, (Ipp64f*)sqsum.data, sqsum.step, srcRoiSize, 0, 0 ); + } + else + { + ippiIntegral_8u32s_C1R( (const Ipp8u*)src.data, src.step, (Ipp32s*)sum.data, sum.step, srcRoiSize, 0 ); + } + return; + } + } + } +#endif + _sum.create( isize, CV_MAKETYPE(sdepth, cn) ); sum = _sum.getMat(); diff --git a/modules/java/generator/src/cpp/Mat.cpp b/modules/java/generator/src/cpp/Mat.cpp index a07f0671b..771f0ccd0 100644 --- a/modules/java/generator/src/cpp/Mat.cpp +++ b/modules/java/generator/src/cpp/Mat.cpp @@ -42,13 +42,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__III return (jlong) _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1Mat__III() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1Mat__III() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1Mat__III() catched unknown exception (...)"); + LOGD("Mat::n_1Mat__III() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1Mat__III()}"); return 0; @@ -74,13 +74,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__DDI return (jlong) _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1Mat__DDI() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1Mat__DDI() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1Mat__DDI() catched unknown exception (...)"); + LOGD("Mat::n_1Mat__DDI() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1Mat__DDI()}"); return 0; @@ -107,13 +107,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__IIIDDDD return (jlong) _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1Mat__IIIDDDD() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1Mat__IIIDDDD() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1Mat__IIIDDDD() catched unknown exception (...)"); + LOGD("Mat::n_1Mat__IIIDDDD() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1Mat__IIIDDDD()}"); return 0; @@ -140,13 +140,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__DDIDDDD return (jlong) _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1Mat__DDIDDDD() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1Mat__DDIDDDD() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1Mat__DDIDDDD() catched unknown exception (...)"); + LOGD("Mat::n_1Mat__DDIDDDD() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1Mat__DDIDDDD()}"); return 0; @@ -173,13 +173,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__JIIII return (jlong) _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1Mat__JIIII() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1Mat__JIIII() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1Mat__JIIII() catched unknown exception (...)"); + LOGD("Mat::n_1Mat__JIIII() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1Mat__JIIII()}"); return 0; @@ -201,13 +201,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__JII return (jlong) _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1Mat__JII() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1Mat__JII() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1Mat__JII() catched unknown exception (...)"); + LOGD("Mat::n_1Mat__JII() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1Mat__JII()}"); return 0; @@ -232,13 +232,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1adjustROI return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1adjustROI() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1adjustROI() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1adjustROI() catched unknown exception (...)"); + LOGD("Mat::n_1adjustROI() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1adjustROI()}"); return 0; @@ -264,13 +264,13 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1assignTo__JJI return; } catch(cv::Exception e) { - LOGD("Mat::n_1assignTo__JJI() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1assignTo__JJI() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return; } catch (...) { - LOGD("Mat::n_1assignTo__JJI() catched unknown exception (...)"); + LOGD("Mat::n_1assignTo__JJI() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1assignTo__JJI()}"); return; @@ -291,13 +291,13 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1assignTo__JJ return; } catch(cv::Exception e) { - LOGD("Mat::n_1assignTo__JJ() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1assignTo__JJ() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return; } catch (...) { - LOGD("Mat::n_1assignTo__JJ() catched unknown exception (...)"); + LOGD("Mat::n_1assignTo__JJ() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1assignTo__JJ()}"); return; @@ -323,13 +323,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1channels return _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1channels() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1channels() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1channels() catched unknown exception (...)"); + LOGD("Mat::n_1channels() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1channels()}"); return 0; @@ -355,13 +355,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JIIZ return _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1checkVector__JIIZ() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1checkVector__JIIZ() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1checkVector__JIIZ() catched unknown exception (...)"); + LOGD("Mat::n_1checkVector__JIIZ() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1checkVector__JIIZ()}"); return 0; @@ -383,13 +383,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JII return _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1checkVector__JII() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1checkVector__JII() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1checkVector__JII() catched unknown exception (...)"); + LOGD("Mat::n_1checkVector__JII() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1checkVector__JII()}"); return 0; @@ -411,13 +411,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JI return _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1checkVector__JI() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1checkVector__JI() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1checkVector__JI() catched unknown exception (...)"); + LOGD("Mat::n_1checkVector__JI() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1checkVector__JI()}"); return 0; @@ -444,13 +444,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1clone return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1clone() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1clone() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1clone() catched unknown exception (...)"); + LOGD("Mat::n_1clone() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1clone()}"); return 0; @@ -476,13 +476,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1col return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1col() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1col() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1col() catched unknown exception (...)"); + LOGD("Mat::n_1col() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1col()}"); return 0; @@ -508,13 +508,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1colRange return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1colRange() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1colRange() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1colRange() catched unknown exception (...)"); + LOGD("Mat::n_1colRange() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1colRange()}"); return 0; @@ -523,6 +523,37 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1colRange +// +// int Mat::dims() +// + +JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1dims + (JNIEnv* env, jclass, jlong self); + +JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1dims + (JNIEnv* env, jclass, jlong self) +{ + try { + LOGD("Mat::n_1dims()"); + Mat* me = (Mat*) self; //TODO: check for NULL + int _retval_ = me->dims; + + return _retval_; + } catch(cv::Exception e) { + LOGD("Mat::n_1dims() catched cv::Exception: %s", e.what()); + jclass je = env->FindClass("org/opencv/core/CvException"); + if(!je) je = env->FindClass("java/lang/Exception"); + env->ThrowNew(je, e.what()); + return 0; + } catch (...) { + LOGD("Mat::n_1dims() catched unknown exception (...)"); + jclass je = env->FindClass("java/lang/Exception"); + env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1dims()}"); + return 0; + } +} + + // // int Mat::cols() // @@ -540,13 +571,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1cols return _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1cols() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1cols() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1cols() catched unknown exception (...)"); + LOGD("Mat::n_1cols() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1cols()}"); return 0; @@ -573,13 +604,13 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJIDD return; } catch(cv::Exception e) { - LOGD("Mat::n_1convertTo__JJIDD() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1convertTo__JJIDD() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return; } catch (...) { - LOGD("Mat::n_1convertTo__JJIDD() catched unknown exception (...)"); + LOGD("Mat::n_1convertTo__JJIDD() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1convertTo__JJIDD()}"); return; @@ -601,13 +632,13 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJID return; } catch(cv::Exception e) { - LOGD("Mat::n_1convertTo__JJID() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1convertTo__JJID() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return; } catch (...) { - LOGD("Mat::n_1convertTo__JJID() catched unknown exception (...)"); + LOGD("Mat::n_1convertTo__JJID() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1convertTo__JJID()}"); return; @@ -629,13 +660,13 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJI return; } catch(cv::Exception e) { - LOGD("Mat::n_1convertTo__JJI() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1convertTo__JJI() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return; } catch (...) { - LOGD("Mat::n_1convertTo__JJI() catched unknown exception (...)"); + LOGD("Mat::n_1convertTo__JJI() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1convertTo__JJI()}"); return; @@ -662,13 +693,13 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1copyTo__JJ return; } catch(cv::Exception e) { - LOGD("Mat::n_1copyTo__JJ() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1copyTo__JJ() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return; } catch (...) { - LOGD("Mat::n_1copyTo__JJ() catched unknown exception (...)"); + LOGD("Mat::n_1copyTo__JJ() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1copyTo__JJ()}"); return; @@ -696,13 +727,13 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1copyTo__JJJ return; } catch(cv::Exception e) { - LOGD("Mat::n_1copyTo__JJJ() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1copyTo__JJJ() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return; } catch (...) { - LOGD("Mat::n_1copyTo__JJJ() catched unknown exception (...)"); + LOGD("Mat::n_1copyTo__JJJ() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1copyTo__JJJ()}"); return; @@ -728,13 +759,13 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1create__JIII return; } catch(cv::Exception e) { - LOGD("Mat::n_1create__JIII() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1create__JIII() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return; } catch (...) { - LOGD("Mat::n_1create__JIII() catched unknown exception (...)"); + LOGD("Mat::n_1create__JIII() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1create__JIII()}"); return; @@ -761,13 +792,13 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1create__JDDI return; } catch(cv::Exception e) { - LOGD("Mat::n_1create__JDDI() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1create__JDDI() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return; } catch (...) { - LOGD("Mat::n_1create__JDDI() catched unknown exception (...)"); + LOGD("Mat::n_1create__JDDI() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1create__JDDI()}"); return; @@ -794,13 +825,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1cross return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1cross() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1cross() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1cross() catched unknown exception (...)"); + LOGD("Mat::n_1cross() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1cross()}"); return 0; @@ -843,13 +874,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1depth return _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1depth() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1depth() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1depth() catched unknown exception (...)"); + LOGD("Mat::n_1depth() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1depth()}"); return 0; @@ -875,13 +906,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1diag__JI return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1diag__JI() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1diag__JI() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1diag__JI() catched unknown exception (...)"); + LOGD("Mat::n_1diag__JI() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1diag__JI()}"); return 0; @@ -908,13 +939,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1diag__J return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1diag__J() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1diag__J() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1diag__J() catched unknown exception (...)"); + LOGD("Mat::n_1diag__J() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1diag__J()}"); return 0; @@ -941,13 +972,13 @@ JNIEXPORT jdouble JNICALL Java_org_opencv_core_Mat_n_1dot return _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1dot() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1dot() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1dot() catched unknown exception (...)"); + LOGD("Mat::n_1dot() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1dot()}"); return 0; @@ -973,13 +1004,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1elemSize return _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1elemSize() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1elemSize() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1elemSize() catched unknown exception (...)"); + LOGD("Mat::n_1elemSize() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1elemSize()}"); return 0; @@ -1005,13 +1036,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1elemSize1 return _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1elemSize1() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1elemSize1() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1elemSize1() catched unknown exception (...)"); + LOGD("Mat::n_1elemSize1() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1elemSize1()}"); return 0; @@ -1037,13 +1068,13 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1empty return _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1empty() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1empty() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1empty() catched unknown exception (...)"); + LOGD("Mat::n_1empty() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1empty()}"); return 0; @@ -1069,13 +1100,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1eye__III return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1eye__III() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1eye__III() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1eye__III() catched unknown exception (...)"); + LOGD("Mat::n_1eye__III() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1eye__III()}"); return 0; @@ -1101,13 +1132,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1eye__DDI return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1eye__DDI() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1eye__DDI() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1eye__DDI() catched unknown exception (...)"); + LOGD("Mat::n_1eye__DDI() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1eye__DDI()}"); return 0; @@ -1133,13 +1164,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1inv__JI return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1inv__JI() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1inv__JI() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1inv__JI() catched unknown exception (...)"); + LOGD("Mat::n_1inv__JI() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1inv__JI()}"); return 0; @@ -1160,13 +1191,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1inv__J return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1inv__J() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1inv__J() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1inv__J() catched unknown exception (...)"); + LOGD("Mat::n_1inv__J() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1inv__J()}"); return 0; @@ -1192,13 +1223,13 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1isContinuous return _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1isContinuous() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1isContinuous() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1isContinuous() catched unknown exception (...)"); + LOGD("Mat::n_1isContinuous() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1isContinuous()}"); return 0; @@ -1224,13 +1255,13 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1isSubmatrix return _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1isSubmatrix() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1isSubmatrix() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1isSubmatrix() catched unknown exception (...)"); + LOGD("Mat::n_1isSubmatrix() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1isSubmatrix()}"); return 0; @@ -1258,13 +1289,13 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_locateROI_10 jdouble tmp_wholeSize[2] = {wholeSize.width, wholeSize.height}; env->SetDoubleArrayRegion(wholeSize_out, 0, 2, tmp_wholeSize); jdouble tmp_ofs[2] = {ofs.x, ofs.y}; env->SetDoubleArrayRegion(ofs_out, 0, 2, tmp_ofs); return; } catch(cv::Exception e) { - LOGD("Mat::locateROI_10() catched cv::Exception: %s", e.what()); + LOGD("Mat::locateROI_10() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return; } catch (...) { - LOGD("Mat::locateROI_10() catched unknown exception (...)"); + LOGD("Mat::locateROI_10() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::locateROI_10()}"); return; @@ -1291,13 +1322,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1mul__JJD return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1mul__JJD() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1mul__JJD() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1mul__JJD() catched unknown exception (...)"); + LOGD("Mat::n_1mul__JJD() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1mul__JJD()}"); return 0; @@ -1320,13 +1351,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1mul__JJ return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1mul__JJ() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1mul__JJ() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1mul__JJ() catched unknown exception (...)"); + LOGD("Mat::n_1mul__JJ() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1mul__JJ()}"); return 0; @@ -1352,13 +1383,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1ones__III return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1ones__III() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1ones__III() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1ones__III() catched unknown exception (...)"); + LOGD("Mat::n_1ones__III() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1ones__III()}"); return 0; @@ -1384,13 +1415,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1ones__DDI return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1ones__DDI() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1ones__DDI() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1ones__DDI() catched unknown exception (...)"); + LOGD("Mat::n_1ones__DDI() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1ones__DDI()}"); return 0; @@ -1416,13 +1447,13 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1push_1back return; } catch(cv::Exception e) { - LOGD("Mat::n_1push_1back() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1push_1back() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return; } catch (...) { - LOGD("Mat::n_1push_1back() catched unknown exception (...)"); + LOGD("Mat::n_1push_1back() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1push_1back()}"); return; @@ -1448,13 +1479,13 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1release return; } catch(cv::Exception e) { - LOGD("Mat::n_1release() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1release() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return; } catch (...) { - LOGD("Mat::n_1release() catched unknown exception (...)"); + LOGD("Mat::n_1release() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1release()}"); return; @@ -1480,13 +1511,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1reshape__JII return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1reshape__JII() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1reshape__JII() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1reshape__JII() catched unknown exception (...)"); + LOGD("Mat::n_1reshape__JII() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1reshape__JII()}"); return 0; @@ -1508,13 +1539,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1reshape__JI return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1reshape__JI() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1reshape__JI() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1reshape__JI() catched unknown exception (...)"); + LOGD("Mat::n_1reshape__JI() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1reshape__JI()}"); return 0; @@ -1540,13 +1571,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1row return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1row() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1row() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1row() catched unknown exception (...)"); + LOGD("Mat::n_1row() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1row()}"); return 0; @@ -1572,13 +1603,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1rowRange return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1rowRange() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1rowRange() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1rowRange() catched unknown exception (...)"); + LOGD("Mat::n_1rowRange() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1rowRange()}"); return 0; @@ -1604,13 +1635,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1rows return _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1rows() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1rows() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1rows() catched unknown exception (...)"); + LOGD("Mat::n_1rows() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1rows()}"); return 0; @@ -1637,13 +1668,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JDDDD return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1setTo__JDDDD() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1setTo__JDDDD() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1setTo__JDDDD() catched unknown exception (...)"); + LOGD("Mat::n_1setTo__JDDDD() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1setTo__JDDDD()}"); return 0; @@ -1671,13 +1702,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JDDDDJ return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1setTo__JDDDDJ() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1setTo__JDDDDJ() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1setTo__JDDDDJ() catched unknown exception (...)"); + LOGD("Mat::n_1setTo__JDDDDJ() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1setTo__JDDDDJ()}"); return 0; @@ -1705,13 +1736,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JJJ return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1setTo__JJJ() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1setTo__JJJ() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1setTo__JJJ() catched unknown exception (...)"); + LOGD("Mat::n_1setTo__JJJ() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1setTo__JJJ()}"); return 0; @@ -1734,13 +1765,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JJ return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1setTo__JJ() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1setTo__JJ() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1setTo__JJ() catched unknown exception (...)"); + LOGD("Mat::n_1setTo__JJ() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1setTo__JJ()}"); return 0; @@ -1766,13 +1797,13 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Mat_n_1size jdoubleArray _da_retval_ = env->NewDoubleArray(2); jdouble _tmp_retval_[2] = {_retval_.width, _retval_.height}; env->SetDoubleArrayRegion(_da_retval_, 0, 2, _tmp_retval_); return _da_retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1size() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1size() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1size() catched unknown exception (...)"); + LOGD("Mat::n_1size() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1size()}"); return 0; @@ -1798,13 +1829,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1step1__JI return _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1step1__JI() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1step1__JI() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1step1__JI() catched unknown exception (...)"); + LOGD("Mat::n_1step1__JI() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1step1__JI()}"); return 0; @@ -1826,13 +1857,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1step1__J return _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1step1__J() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1step1__J() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1step1__J() catched unknown exception (...)"); + LOGD("Mat::n_1step1__J() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1step1__J()}"); return 0; @@ -1858,13 +1889,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1submat_1rr return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1submat_1rr() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1submat_1rr() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1submat_1rr() catched unknown exception (...)"); + LOGD("Mat::n_1submat_1rr() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1submat_1rr()}"); return 0; @@ -1891,13 +1922,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1submat return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1submat() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1submat() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1submat() catched unknown exception (...)"); + LOGD("Mat::n_1submat() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1submat()}"); return 0; @@ -1923,13 +1954,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1t return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1t() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1t() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1t() catched unknown exception (...)"); + LOGD("Mat::n_1t() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1t()}"); return 0; @@ -1955,13 +1986,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1total return _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1total() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1total() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1total() catched unknown exception (...)"); + LOGD("Mat::n_1total() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1total()}"); return 0; @@ -1987,13 +2018,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1type return _retval_; } catch(cv::Exception e) { - LOGD("Mat::n_1type() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1type() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1type() catched unknown exception (...)"); + LOGD("Mat::n_1type() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1type()}"); return 0; @@ -2019,13 +2050,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1zeros__III return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1zeros__III() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1zeros__III() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1zeros__III() catched unknown exception (...)"); + LOGD("Mat::n_1zeros__III() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1zeros__III()}"); return 0; @@ -2051,13 +2082,13 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1zeros__DDI return (jlong) new Mat(_retval_); } catch(cv::Exception e) { - LOGD("Mat::n_1zeros__DDI() catched cv::Exception: %s", e.what()); + LOGD("Mat::n_1zeros__DDI() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::n_1zeros__DDI() catched unknown exception (...)"); + LOGD("Mat::n_1zeros__DDI() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::n_1zeros__DDI()}"); return 0; @@ -2131,13 +2162,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutD env->ReleasePrimitiveArrayCritical(vals, values, 0); return res; } catch(cv::Exception e) { - LOGD("Mat::nPutD() catched cv::Exception: %s", e.what()); + LOGD("Mat::nPutD() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::nPutD() catched unknown exception (...)"); + LOGD("Mat::nPutD() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::nPutD()}"); return 0; @@ -2198,13 +2229,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutB env->ReleasePrimitiveArrayCritical(vals, values, 0); return res; } catch(cv::Exception e) { - LOGD("Mat::nPutB() catched cv::Exception: %s", e.what()); + LOGD("Mat::nPutB() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::nPutB() catched unknown exception (...)"); + LOGD("Mat::nPutB() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::nPutB()}"); return 0; @@ -2229,13 +2260,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutS env->ReleasePrimitiveArrayCritical(vals, values, 0); return res; } catch(cv::Exception e) { - LOGD("Mat::nPutS() catched cv::Exception: %s", e.what()); + LOGD("Mat::nPutS() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::nPutS() catched unknown exception (...)"); + LOGD("Mat::nPutS() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::nPutS()}"); return 0; @@ -2260,13 +2291,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutI env->ReleasePrimitiveArrayCritical(vals, values, 0); return res; } catch(cv::Exception e) { - LOGD("Mat::nPutI() catched cv::Exception: %s", e.what()); + LOGD("Mat::nPutI() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::nPutI() catched unknown exception (...)"); + LOGD("Mat::nPutI() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::nPutI()}"); return 0; @@ -2291,13 +2322,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutF env->ReleasePrimitiveArrayCritical(vals, values, 0); return res; } catch(cv::Exception e) { - LOGD("Mat::nPutF() catched cv::Exception: %s", e.what()); + LOGD("Mat::nPutF() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::nPutF() catched unknown exception (...)"); + LOGD("Mat::nPutF() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::nPutF()}"); return 0; @@ -2357,13 +2388,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetB env->ReleasePrimitiveArrayCritical(vals, values, 0); return res; } catch(cv::Exception e) { - LOGD("Mat::nGetB() catched cv::Exception: %s", e.what()); + LOGD("Mat::nGetB() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::nGetB() catched unknown exception (...)"); + LOGD("Mat::nGetB() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::nGetB()}"); return 0; @@ -2388,13 +2419,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetS env->ReleasePrimitiveArrayCritical(vals, values, 0); return res; } catch(cv::Exception e) { - LOGD("Mat::nGetS() catched cv::Exception: %s", e.what()); + LOGD("Mat::nGetS() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::nGetS() catched unknown exception (...)"); + LOGD("Mat::nGetS() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::nGetS()}"); return 0; @@ -2419,13 +2450,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetI env->ReleasePrimitiveArrayCritical(vals, values, 0); return res; } catch(cv::Exception e) { - LOGD("Mat::nGetI() catched cv::Exception: %s", e.what()); + LOGD("Mat::nGetI() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::nGetI() catched unknown exception (...)"); + LOGD("Mat::nGetI() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::nGetI()}"); return 0; @@ -2450,13 +2481,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetF env->ReleasePrimitiveArrayCritical(vals, values, 0); return res; } catch(cv::Exception e) { - LOGD("Mat::nGetF() catched cv::Exception: %s", e.what()); + LOGD("Mat::nGetF() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::nGetF() catched unknown exception (...)"); + LOGD("Mat::nGetF() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::nGetF()}"); return 0; @@ -2481,13 +2512,13 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetD env->ReleasePrimitiveArrayCritical(vals, values, 0); return res; } catch(cv::Exception e) { - LOGD("Mat::nGetD() catched cv::Exception: %s", e.what()); + LOGD("Mat::nGetD() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::nGetD() catched unknown exception (...)"); + LOGD("Mat::nGetD() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::nGetD()}"); return 0; @@ -2523,13 +2554,13 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Mat_nGet } return res; } catch(cv::Exception e) { - LOGD("Mat::nGet() catched cv::Exception: %s", e.what()); + LOGD("Mat::nGet() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return 0; } catch (...) { - LOGD("Mat::nGet() catched unknown exception (...)"); + LOGD("Mat::nGet() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::nGet()}"); return 0; @@ -2553,13 +2584,13 @@ JNIEXPORT jstring JNICALL Java_org_opencv_core_Mat_nDump } return env->NewStringUTF(s.c_str()); } catch(cv::Exception e) { - LOGE("Mat::nDump() catched cv::Exception: %s", e.what()); + LOGE("Mat::nDump() caught cv::Exception: %s", e.what()); jclass je = env->FindClass("org/opencv/core/CvException"); if(!je) je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, e.what()); return env->NewStringUTF("ERROR"); } catch (...) { - LOGE("Mat::nDump() catched unknown exception (...)"); + LOGE("Mat::nDump() caught unknown exception (...)"); jclass je = env->FindClass("java/lang/Exception"); env->ThrowNew(je, "Unknown exception in JNI code {Mat::nDump()}"); return env->NewStringUTF("ERROR"); diff --git a/modules/java/generator/src/java/core+Mat.java b/modules/java/generator/src/java/core+Mat.java index 8dd72fb68..6db255417 100644 --- a/modules/java/generator/src/java/core+Mat.java +++ b/modules/java/generator/src/java/core+Mat.java @@ -245,6 +245,19 @@ public class Mat { return retVal; } + // + // C++: int Mat::dims() + // + + // javadoc: Mat::dims() + public int dims() + { + + int retVal = n_dims(nativeObj); + + return retVal; + } + // // C++: int Mat::cols() // @@ -1130,6 +1143,9 @@ public class Mat { // C++: Mat Mat::colRange(int startcol, int endcol) private static native long n_colRange(long nativeObj, int startcol, int endcol); + // C++: int Mat::dims() + private static native int n_dims(long nativeObj); + // C++: int Mat::cols() private static native int n_cols(long nativeObj); diff --git a/modules/java/generator/src/java/core+MatOfByte.java b/modules/java/generator/src/java/core+MatOfByte.java index b3fe5691e..7756eb94f 100644 --- a/modules/java/generator/src/java/core+MatOfByte.java +++ b/modules/java/generator/src/java/core+MatOfByte.java @@ -15,7 +15,7 @@ public class MatOfByte extends Mat { protected MatOfByte(long addr) { super(addr); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } @@ -26,7 +26,7 @@ public class MatOfByte extends Mat { public MatOfByte(Mat m) { super(m, Range.all()); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } diff --git a/modules/java/generator/src/java/core+MatOfDMatch.java b/modules/java/generator/src/java/core+MatOfDMatch.java index aec3b99e4..2c99e14d1 100644 --- a/modules/java/generator/src/java/core+MatOfDMatch.java +++ b/modules/java/generator/src/java/core+MatOfDMatch.java @@ -17,7 +17,7 @@ public class MatOfDMatch extends Mat { protected MatOfDMatch(long addr) { super(addr); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat: " + toString()); + throw new IllegalArgumentException("Incompatible Mat: " + toString()); //FIXME: do we need release() here? } @@ -28,7 +28,7 @@ public class MatOfDMatch extends Mat { public MatOfDMatch(Mat m) { super(m, Range.all()); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat: " + toString()); + throw new IllegalArgumentException("Incompatible Mat: " + toString()); //FIXME: do we need release() here? } diff --git a/modules/java/generator/src/java/core+MatOfDouble.java b/modules/java/generator/src/java/core+MatOfDouble.java index 4eb7cbc28..1a8e23ca3 100644 --- a/modules/java/generator/src/java/core+MatOfDouble.java +++ b/modules/java/generator/src/java/core+MatOfDouble.java @@ -15,7 +15,7 @@ public class MatOfDouble extends Mat { protected MatOfDouble(long addr) { super(addr); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } @@ -26,7 +26,7 @@ public class MatOfDouble extends Mat { public MatOfDouble(Mat m) { super(m, Range.all()); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } diff --git a/modules/java/generator/src/java/core+MatOfFloat.java b/modules/java/generator/src/java/core+MatOfFloat.java index 96bbeab9f..dfd6b8404 100644 --- a/modules/java/generator/src/java/core+MatOfFloat.java +++ b/modules/java/generator/src/java/core+MatOfFloat.java @@ -15,7 +15,7 @@ public class MatOfFloat extends Mat { protected MatOfFloat(long addr) { super(addr); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } @@ -26,7 +26,7 @@ public class MatOfFloat extends Mat { public MatOfFloat(Mat m) { super(m, Range.all()); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } diff --git a/modules/java/generator/src/java/core+MatOfFloat4.java b/modules/java/generator/src/java/core+MatOfFloat4.java index aaa97b799..96f9e5cde 100644 --- a/modules/java/generator/src/java/core+MatOfFloat4.java +++ b/modules/java/generator/src/java/core+MatOfFloat4.java @@ -15,7 +15,7 @@ public class MatOfFloat4 extends Mat { protected MatOfFloat4(long addr) { super(addr); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } @@ -26,7 +26,7 @@ public class MatOfFloat4 extends Mat { public MatOfFloat4(Mat m) { super(m, Range.all()); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } diff --git a/modules/java/generator/src/java/core+MatOfFloat6.java b/modules/java/generator/src/java/core+MatOfFloat6.java index 68e6249b6..140bb57a9 100644 --- a/modules/java/generator/src/java/core+MatOfFloat6.java +++ b/modules/java/generator/src/java/core+MatOfFloat6.java @@ -15,7 +15,7 @@ public class MatOfFloat6 extends Mat { protected MatOfFloat6(long addr) { super(addr); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } @@ -26,7 +26,7 @@ public class MatOfFloat6 extends Mat { public MatOfFloat6(Mat m) { super(m, Range.all()); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } diff --git a/modules/java/generator/src/java/core+MatOfInt.java b/modules/java/generator/src/java/core+MatOfInt.java index 33e5124e4..7d076878f 100644 --- a/modules/java/generator/src/java/core+MatOfInt.java +++ b/modules/java/generator/src/java/core+MatOfInt.java @@ -16,7 +16,7 @@ public class MatOfInt extends Mat { protected MatOfInt(long addr) { super(addr); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } @@ -27,7 +27,7 @@ public class MatOfInt extends Mat { public MatOfInt(Mat m) { super(m, Range.all()); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } diff --git a/modules/java/generator/src/java/core+MatOfInt4.java b/modules/java/generator/src/java/core+MatOfInt4.java index c924233a6..4ca4d9e31 100644 --- a/modules/java/generator/src/java/core+MatOfInt4.java +++ b/modules/java/generator/src/java/core+MatOfInt4.java @@ -16,7 +16,7 @@ public class MatOfInt4 extends Mat { protected MatOfInt4(long addr) { super(addr); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } @@ -27,7 +27,7 @@ public class MatOfInt4 extends Mat { public MatOfInt4(Mat m) { super(m, Range.all()); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } diff --git a/modules/java/generator/src/java/core+MatOfKeyPoint.java b/modules/java/generator/src/java/core+MatOfKeyPoint.java index 48ad3ca65..24b9a817f 100644 --- a/modules/java/generator/src/java/core+MatOfKeyPoint.java +++ b/modules/java/generator/src/java/core+MatOfKeyPoint.java @@ -17,7 +17,7 @@ public class MatOfKeyPoint extends Mat { protected MatOfKeyPoint(long addr) { super(addr); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } @@ -28,7 +28,7 @@ public class MatOfKeyPoint extends Mat { public MatOfKeyPoint(Mat m) { super(m, Range.all()); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } diff --git a/modules/java/generator/src/java/core+MatOfPoint.java b/modules/java/generator/src/java/core+MatOfPoint.java index 6d23ed116..f4d573bb7 100644 --- a/modules/java/generator/src/java/core+MatOfPoint.java +++ b/modules/java/generator/src/java/core+MatOfPoint.java @@ -15,7 +15,7 @@ public class MatOfPoint extends Mat { protected MatOfPoint(long addr) { super(addr); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } @@ -26,7 +26,7 @@ public class MatOfPoint extends Mat { public MatOfPoint(Mat m) { super(m, Range.all()); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } diff --git a/modules/java/generator/src/java/core+MatOfPoint2f.java b/modules/java/generator/src/java/core+MatOfPoint2f.java index 0c6960730..4b8c926ff 100644 --- a/modules/java/generator/src/java/core+MatOfPoint2f.java +++ b/modules/java/generator/src/java/core+MatOfPoint2f.java @@ -15,7 +15,7 @@ public class MatOfPoint2f extends Mat { protected MatOfPoint2f(long addr) { super(addr); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } @@ -26,7 +26,7 @@ public class MatOfPoint2f extends Mat { public MatOfPoint2f(Mat m) { super(m, Range.all()); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } diff --git a/modules/java/generator/src/java/core+MatOfPoint3.java b/modules/java/generator/src/java/core+MatOfPoint3.java index 0c8374f25..3b50561e9 100644 --- a/modules/java/generator/src/java/core+MatOfPoint3.java +++ b/modules/java/generator/src/java/core+MatOfPoint3.java @@ -15,7 +15,7 @@ public class MatOfPoint3 extends Mat { protected MatOfPoint3(long addr) { super(addr); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } @@ -26,7 +26,7 @@ public class MatOfPoint3 extends Mat { public MatOfPoint3(Mat m) { super(m, Range.all()); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } diff --git a/modules/java/generator/src/java/core+MatOfPoint3f.java b/modules/java/generator/src/java/core+MatOfPoint3f.java index b0d50d450..fc5fee436 100644 --- a/modules/java/generator/src/java/core+MatOfPoint3f.java +++ b/modules/java/generator/src/java/core+MatOfPoint3f.java @@ -15,7 +15,7 @@ public class MatOfPoint3f extends Mat { protected MatOfPoint3f(long addr) { super(addr); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } @@ -26,7 +26,7 @@ public class MatOfPoint3f extends Mat { public MatOfPoint3f(Mat m) { super(m, Range.all()); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } diff --git a/modules/java/generator/src/java/core+MatOfRect.java b/modules/java/generator/src/java/core+MatOfRect.java index 3844d9dfb..ec0fb01e4 100644 --- a/modules/java/generator/src/java/core+MatOfRect.java +++ b/modules/java/generator/src/java/core+MatOfRect.java @@ -16,7 +16,7 @@ public class MatOfRect extends Mat { protected MatOfRect(long addr) { super(addr); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } @@ -27,7 +27,7 @@ public class MatOfRect extends Mat { public MatOfRect(Mat m) { super(m, Range.all()); if( !empty() && checkVector(_channels, _depth) < 0 ) - throw new IllegalArgumentException("Incomatible Mat"); + throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? } diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp index 43fd53695..c59367641 100644 --- a/modules/python/src2/cv2.cpp +++ b/modules/python/src2/cv2.cpp @@ -1,6 +1,7 @@ #include #define MODULESTR "cv2" +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION #include #include "opencv2/core.hpp" @@ -200,10 +201,10 @@ public: if(!o) CV_Error_(Error::StsError, ("The numpy array of typenum=%d, ndims=%d can not be created", typenum, dims)); refcount = refcountFromPyObject(o); - npy_intp* _strides = PyArray_STRIDES(o); + npy_intp* _strides = PyArray_STRIDES((PyArrayObject*) o); for( i = 0; i < dims - (cn > 1); i++ ) step[i] = (size_t)_strides[i]; - datastart = data = (uchar*)PyArray_DATA(o); + datastart = data = (uchar*)PyArray_DATA((PyArrayObject*) o); } void deallocate(int* refcount, uchar*, uchar*) @@ -278,8 +279,10 @@ static bool pyopencv_to(PyObject* o, Mat& m, const ArgInfo info) return false; } + PyArrayObject* oarr = (PyArrayObject*) o; + bool needcopy = false, needcast = false; - int typenum = PyArray_TYPE(o), new_typenum = typenum; + int typenum = PyArray_TYPE(oarr), new_typenum = typenum; int type = typenum == NPY_UBYTE ? CV_8U : typenum == NPY_BYTE ? CV_8S : typenum == NPY_USHORT ? CV_16U : @@ -308,7 +311,7 @@ static bool pyopencv_to(PyObject* o, Mat& m, const ArgInfo info) const int CV_MAX_DIM = 32; #endif - int ndims = PyArray_NDIM(o); + int ndims = PyArray_NDIM(oarr); if(ndims >= CV_MAX_DIM) { failmsg("%s dimensionality (=%d) is too high", info.name, ndims); @@ -318,8 +321,8 @@ static bool pyopencv_to(PyObject* o, Mat& m, const ArgInfo info) int size[CV_MAX_DIM+1]; size_t step[CV_MAX_DIM+1]; size_t elemsize = CV_ELEM_SIZE1(type); - const npy_intp* _sizes = PyArray_DIMS(o); - const npy_intp* _strides = PyArray_STRIDES(o); + const npy_intp* _sizes = PyArray_DIMS(oarr); + const npy_intp* _strides = PyArray_STRIDES(oarr); bool ismultichannel = ndims == 3 && _sizes[2] <= CV_CN_MAX; for( int i = ndims-1; i >= 0 && !needcopy; i-- ) @@ -343,11 +346,17 @@ static bool pyopencv_to(PyObject* o, Mat& m, const ArgInfo info) failmsg("Layout of the output array %s is incompatible with cv::Mat (step[ndims-1] != elemsize or step[1] != elemsize*nchannels)", info.name); return false; } - if( needcast ) - o = (PyObject*)PyArray_Cast((PyArrayObject*)o, new_typenum); - else - o = (PyObject*)PyArray_GETCONTIGUOUS((PyArrayObject*)o); - _strides = PyArray_STRIDES(o); + + if( needcast ) { + o = PyArray_Cast(oarr, new_typenum); + oarr = (PyArrayObject*) o; + } + else { + oarr = PyArray_GETCONTIGUOUS(oarr); + o = (PyObject*) oarr; + } + + _strides = PyArray_STRIDES(oarr); } for(int i = 0; i < ndims; i++) @@ -375,7 +384,7 @@ static bool pyopencv_to(PyObject* o, Mat& m, const ArgInfo info) return false; } - m = Mat(ndims, size, type, PyArray_DATA(o), step); + m = Mat(ndims, size, type, PyArray_DATA(oarr), step); if( m.data ) { diff --git a/modules/ts/misc/xls-report.py b/modules/ts/misc/xls-report.py index d5db73d48..1ca3fada7 100755 --- a/modules/ts/misc/xls-report.py +++ b/modules/ts/misc/xls-report.py @@ -291,6 +291,7 @@ def main(): sheet.write_merge(row, row + 1, col, col, caption, header_style) else: sheet.write(row, col, caption, header_style) + col += 1 row += 2 if args.show_times_per_pixel else 1 diff --git a/modules/ts/src/ts_perf.cpp b/modules/ts/src/ts_perf.cpp index aafdf30c3..f0fdf268e 100644 --- a/modules/ts/src/ts_perf.cpp +++ b/modules/ts/src/ts_perf.cpp @@ -552,13 +552,6 @@ Regression& Regression::operator() (const std::string& name, cv::InputArray arra std::string nodename = getCurrentTestNodeName(); - // This is a hack for compatibility and it should eventually get removed. - // gpu's tests don't even have CPU sanity data anymore. - if(suiteName == "gpu") - { - nodename = (PERF_RUN_GPU() ? "GPU_" : "CPU_") + nodename; - } - cv::FileNode n = rootIn[nodename]; if(n.isNone()) {