aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Presler <noahp@google.com>2015-08-09 14:38:37 -0700
committerNoah Presler <noahp@google.com>2015-08-10 11:10:54 -0700
commit43a3f2149b5d3417cc5dc843032ecf05a890c147 (patch)
tree6500f86b0aea94a6e118d37fd58e0e288d024021
parent793ee12c6df9cad3806238d32528c49a3ff9331d (diff)
downloadopencv3-43a3f2149b5d3417cc5dc843032ecf05a890c147.tar.gz
Porting build from CMake to Android.mk
Builds within the android source tree all opencv modules by default.
-rw-r--r--3rdparty/libtiff/tif_config.h162
-rw-r--r--3rdparty/openexr/IlmBaseConfig.h30
-rw-r--r--3rdparty/openexr/IlmImf/OpenEXRConfig.h36
-rw-r--r--Android.mk1342
-rw-r--r--cvconfig.h183
-rw-r--r--modules/calib3d/opencl_kernels_calib3d.cpp255
-rw-r--r--modules/calib3d/opencl_kernels_calib3d.hpp17
-rw-r--r--modules/calib3d/precomp.hpp120
-rw-r--r--modules/core/src/opencl_kernels_core.cpp3302
-rw-r--r--modules/core/src/opencl_kernels_core.hpp55
-rw-r--r--modules/core/src/version_string.inc106
-rw-r--r--modules/features2d/opencl_kernels_features2d.cpp780
-rw-r--r--modules/features2d/opencl_kernels_features2d.hpp21
-rw-r--r--modules/features2d/precomp.hpp25
-rw-r--r--modules/hal/precomp.hpp49
-rw-r--r--modules/highgui/precomp.hpp132
-rw-r--r--modules/imgcodecs/precomp.hpp80
-rw-r--r--modules/imgproc/opencl_kernels_imgproc.cpp7821
-rw-r--r--modules/imgproc/opencl_kernels_imgproc.hpp81
-rw-r--r--modules/imgproc/precomp.hpp96
-rw-r--r--modules/java/src/calib3d+Calib3d.java1312
-rw-r--r--modules/java/src/calib3d+StereoBM.java330
-rw-r--r--modules/java/src/calib3d+StereoMatcher.java253
-rw-r--r--modules/java/src/calib3d+StereoSGBM.java228
-rw-r--r--modules/java/src/calib3d.cpp3671
-rw-r--r--modules/java/src/core+Algorithm.java78
-rw-r--r--modules/java/src/core+Core.java2544
-rw-r--r--modules/java/src/core.cpp4225
-rw-r--r--modules/java/src/features2d+DescriptorExtractor.java195
-rw-r--r--modules/java/src/features2d+DescriptorMatcher.java394
-rw-r--r--modules/java/src/features2d+FeatureDetector.java216
-rw-r--r--modules/java/src/features2d+Features2d.java120
-rw-r--r--modules/java/src/features2d.cpp1345
-rw-r--r--modules/java/src/imgcodecs+Imgcodecs.java193
-rw-r--r--modules/java/src/imgcodecs.cpp283
-rw-r--r--modules/java/src/imgproc+CLAHE.java130
-rw-r--r--modules/java/src/imgproc+Imgproc.java3290
-rw-r--r--modules/java/src/imgproc+LineSegmentDetector.java99
-rw-r--r--modules/java/src/imgproc+Subdiv2D.java386
-rw-r--r--modules/java/src/imgproc.cpp6239
-rw-r--r--modules/java/src/ml+ANN_MLP.java449
-rw-r--r--modules/java/src/ml+Boost.java152
-rw-r--r--modules/java/src/ml+DTrees.java356
-rw-r--r--modules/java/src/ml+EM.java290
-rw-r--r--modules/java/src/ml+KNearest.java211
-rw-r--r--modules/java/src/ml+LogisticRegression.java300
-rw-r--r--modules/java/src/ml+Ml.java23
-rw-r--r--modules/java/src/ml+NormalBayesClassifier.java70
-rw-r--r--modules/java/src/ml+RTrees.java163
-rw-r--r--modules/java/src/ml+SVM.java439
-rw-r--r--modules/java/src/ml+StatModel.java160
-rw-r--r--modules/java/src/ml+TrainData.java642
-rw-r--r--modules/java/src/ml.cpp4508
-rw-r--r--modules/java/src/objdetect+BaseCascadeClassifier.java26
-rw-r--r--modules/java/src/objdetect+CascadeClassifier.java263
-rw-r--r--modules/java/src/objdetect+HOGDescriptor.java591
-rw-r--r--modules/java/src/objdetect+Objdetect.java52
-rw-r--r--modules/java/src/objdetect.cpp1449
-rw-r--r--modules/java/src/photo+AlignExposures.java48
-rw-r--r--modules/java/src/photo+AlignMTB.java219
-rw-r--r--modules/java/src/photo+CalibrateCRF.java47
-rw-r--r--modules/java/src/photo+CalibrateDebevec.java128
-rw-r--r--modules/java/src/photo+CalibrateRobertson.java111
-rw-r--r--modules/java/src/photo+MergeDebevec.java63
-rw-r--r--modules/java/src/photo+MergeExposures.java47
-rw-r--r--modules/java/src/photo+MergeMertens.java165
-rw-r--r--modules/java/src/photo+MergeRobertson.java63
-rw-r--r--modules/java/src/photo+Photo.java742
-rw-r--r--modules/java/src/photo+Tonemap.java78
-rw-r--r--modules/java/src/photo+TonemapDrago.java94
-rw-r--r--modules/java/src/photo+TonemapDurand.java162
-rw-r--r--modules/java/src/photo+TonemapMantiuk.java94
-rw-r--r--modules/java/src/photo+TonemapReinhard.java128
-rw-r--r--modules/java/src/photo.cpp3115
-rw-r--r--modules/java/src/video+BackgroundSubtractor.java71
-rw-r--r--modules/java/src/video+BackgroundSubtractorKNN.java264
-rw-r--r--modules/java/src/video+BackgroundSubtractorMOG2.java434
-rw-r--r--modules/java/src/video+DenseOpticalFlow.java61
-rw-r--r--modules/java/src/video+DualTVL1OpticalFlow.java26
-rw-r--r--modules/java/src/video+KalmanFilter.java455
-rw-r--r--modules/java/src/video+Video.java289
-rw-r--r--modules/java/src/video.cpp2324
-rw-r--r--modules/java/src/videoio+VideoCapture.java258
-rw-r--r--modules/java/src/videoio+Videoio.java369
-rw-r--r--modules/java/src/videoio.cpp412
-rw-r--r--modules/ml/precomp.hpp383
-rw-r--r--modules/objdetect/opencl_kernels_objdetect.cpp1130
-rw-r--r--modules/objdetect/opencl_kernels_objdetect.hpp19
-rw-r--r--modules/objdetect/precomp.hpp65
-rw-r--r--modules/photo/opencl_kernels_photo.cpp258
-rw-r--r--modules/photo/opencl_kernels_photo.hpp17
-rw-r--r--modules/photo/precomp.hpp56
-rw-r--r--modules/python/src2/hdr_parser.pycbin0 -> 23839 bytes
-rw-r--r--modules/shape/precomp.hpp59
-rw-r--r--modules/stitching/opencl_kernels_stitching.cpp332
-rw-r--r--modules/stitching/opencl_kernels_stitching.hpp19
-rw-r--r--modules/stitching/precomp.hpp102
-rw-r--r--modules/superres/opencl_kernels_superres.cpp127
-rw-r--r--modules/superres/opencl_kernels_superres.hpp17
-rw-r--r--modules/superres/precomp.hpp97
-rw-r--r--modules/ts/precomp.hpp8
-rw-r--r--modules/video/opencl_kernels_video.cpp1239
-rw-r--r--modules/video/opencl_kernels_video.hpp23
-rw-r--r--modules/video/precomp.hpp56
-rw-r--r--modules/videoio/precomp.hpp194
-rw-r--r--opencv2/cvconfig.h183
-rw-r--r--opencv2/opencv_modules.hpp27
107 files changed, 65046 insertions, 0 deletions
diff --git a/3rdparty/libtiff/tif_config.h b/3rdparty/libtiff/tif_config.h
new file mode 100644
index 0000000..afb1d8d
--- /dev/null
+++ b/3rdparty/libtiff/tif_config.h
@@ -0,0 +1,162 @@
+/* libtiff/tif_config.h. Generated from tif_config.h.in by configure. */
+/* libtiff/tif_config.h.in. Generated from configure.ac by autoheader. */
+
+/* Support CCITT Group 3 & 4 algorithms */
+#define CCITT_SUPPORT 1
+
+/* Pick up YCbCr subsampling info from the JPEG data stream to support files
+ lacking the tag (default enabled). */
+#define CHECK_JPEG_YCBCR_SUBSAMPLING 1
+
+/* enable partial strip reading for large strips (experimental) */
+#undef CHUNKY_STRIP_READ_SUPPORT
+
+/* Treat extra sample as alpha (default enabled). The RGBA interface will
+ treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many
+ packages produce RGBA files but don't mark the alpha properly. */
+#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1
+
+/* enable deferred strip/tile offset/size loading (experimental) */
+#undef DEFER_STRILE_LOAD
+
+/* Define to 1 if you have the <assert.h> header file. */
+#define HAVE_ASSERT_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H
+
+/* Define as 0 or 1 according to the floating point format suported by the
+ machine */
+#define HAVE_IEEEFP 1
+
+/* Define to 1 if you have the <io.h> header file. */
+/* #undef HAVE_IO_H */
+
+/* Define to 1 if you have the `jbg_newlen' function. */
+/* #undef HAVE_JBG_NEWLEN */
+
+/* Define to 1 if you have the `mmap' function. */
+#define HAVE_MMAP
+
+/* Define to 1 if you have the <search.h> header file. */
+/* #undef HAVE_SEARCH_H */
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#ifndef HAVE_UNISTD_H
+#define HAVE_UNISTD_H
+#endif
+
+/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian
+ (Intel) */
+#define HOST_BIGENDIAN 0
+
+/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */
+#define HOST_FILLORDER FILLORDER_LSB2MSB
+
+/* Support ISO JBIG compression (requires JBIG-KIT library) */
+#undef JBIG_SUPPORT
+
+/* 8/12 bit libjpeg dual mode enabled */
+/* #undef JPEG_DUAL_MODE_8_12 */
+
+/* Support JPEG compression (requires IJG JPEG library) */
+#undef JPEG_SUPPORT
+
+/* 12bit libjpeg primary include file with path */
+/* #undef LIBJPEG_12_PATH */
+
+/* Support LogLuv high dynamic range encoding */
+#define LOGLUV_SUPPORT 1
+
+/* Support LZMA2 compression */
+/* #undef LZMA_SUPPORT */
+
+/* Support LZW algorithm */
+#define LZW_SUPPORT 1
+
+/* Support Microsoft Document Imaging format */
+#define MDI_SUPPORT 1
+
+/* Support NeXT 2-bit RLE algorithm */
+#define NEXT_SUPPORT 1
+
+/* Support Old JPEG compresson (read-only) */
+#undef OJPEG_SUPPORT
+
+/* Support Macintosh PackBits algorithm */
+#define PACKBITS_SUPPORT 1
+
+/* Support Pixar log-format algorithm (requires Zlib) */
+#define PIXARLOG_SUPPORT 1
+
+/* The size of `unsigned long', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_LONG 8
+
+/* Support strip chopping (whether or not to convert single-strip uncompressed
+ images to mutiple strips of specified size to reduce memory usage) */
+#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP
+
+/* Default size of the strip in bytes (when strip chopping enabled) */
+//#define STRIP_SIZE_DEFAULT 8192
+
+/* Support ThunderScan 4-bit RLE algorithm */
+#define THUNDER_SUPPORT 1
+
+/* Signed 8-bit type */
+#define TIFF_INT8_T signed char
+
+/* Signed 16-bit type */
+#define TIFF_INT16_T signed short
+
+/* Signed 32-bit type */
+#define TIFF_INT32_T signed int
+
+/* Signed size type */
+#define TIFF_SSIZE_T size_t
+
+/* Unsigned 8-bit type */
+#define TIFF_UINT8_T unsigned char
+
+/* Unsigned 16-bit type */
+#define TIFF_UINT16_T unsigned short
+
+/* Unsigned 32-bit type */
+#define TIFF_UINT32_T unsigned int
+
+#ifdef _MSC_VER
+/* Signed 64-bit type */
+# define TIFF_INT64_T signed __int64
+/* Unsigned 64-bit type */
+# define TIFF_UINT64_T unsigned __int64
+#else
+/* Signed 64-bit type */
+# define TIFF_INT64_T long long
+/* Signed 64-bit type */
+# define TIFF_UINT64_T unsigned long long
+#endif
+
+/* Signed 64-bit type formatter */
+/* Unsigned 64-bit type formatter */
+#if defined _MSC_VER || defined __MINGW__ || defined __MINGW32__
+# define TIFF_UINT64_FORMAT "%I64u"
+# define TIFF_SSIZE_FORMAT "%Iu"
+#else
+# define TIFF_UINT64_FORMAT "%llu"
+# define TIFF_SSIZE_FORMAT "%zd"
+#endif
+
+/* define to use win32 IO system */
+/* #undef USE_WIN32_FILEIO */
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+/* #undef WORDS_BIGENDIAN */
+
+/* Support Deflate compression */
+#define ZIP_SUPPORT 1
diff --git a/3rdparty/openexr/IlmBaseConfig.h b/3rdparty/openexr/IlmBaseConfig.h
new file mode 100644
index 0000000..35bc43a
--- /dev/null
+++ b/3rdparty/openexr/IlmBaseConfig.h
@@ -0,0 +1,30 @@
+//
+// Define and set to 1 if the target system has POSIX thread support
+// and you want IlmBase to use it for multithreaded file I/O.
+//
+
+#define HAVE_PTHREAD 1
+
+//
+// Define and set to 1 if the target system supports POSIX semaphores
+// and you want OpenEXR to use them; otherwise, OpenEXR will use its
+// own semaphore implementation.
+//
+
+#define HAVE_POSIX_SEMAPHORES 1
+
+#undef HAVE_UCONTEXT_H
+
+//
+// Define and set to 1 if the target system has support for large
+// stack sizes.
+//
+
+#undef ILMBASE_HAVE_LARGE_STACK
+
+
+//
+// Version string for runtime access
+//
+#define ILMBASE_VERSION_STRING "1.0.3"
+#define ILMBASE_PACKAGE_STRING "IlmBase 1.0.3"
diff --git a/3rdparty/openexr/IlmImf/OpenEXRConfig.h b/3rdparty/openexr/IlmImf/OpenEXRConfig.h
new file mode 100644
index 0000000..0a6b592
--- /dev/null
+++ b/3rdparty/openexr/IlmImf/OpenEXRConfig.h
@@ -0,0 +1,36 @@
+//
+// Define and set to 1 if the target system supports a proc filesystem
+// compatible with the Linux kernel's proc filesystem. Note that this
+// is only used by a program in the IlmImfTest test suite, it's not
+// used by any OpenEXR library or application code.
+//
+
+#undef HAVE_LINUX_PROCFS
+
+//
+// Define and set to 1 if the target system is a Darwin-based system
+// (e.g., OS X).
+//
+
+#undef HAVE_DARWIN
+
+//
+// Define and set to 1 if the target system has a complete <iomanip>
+// implementation, specifically if it supports the std::right
+// formatter.
+//
+
+#undef HAVE_COMPLETE_IOMANIP
+
+//
+// Define and set to 1 if the target system has support for large
+// stack sizes.
+//
+
+#undef HAVE_LARGE_STACK
+
+//
+// Version string for runtime access
+//
+#define OPENEXR_VERSION_STRING "1.7.1"
+#define OPENEXR_PACKAGE_STRING "OpenEXR 1.7.1"
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..cdaa9f4
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,1342 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_MODULE := libopencv_core
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/core/include \
+ $(LOCAL_PATH)/opencv2 \
+ $(LOCAL_PATH)/modules/hal/include \
+ $(LOCAL_PATH)/../zlib \
+ $(LOCAL_PATH)/../zlib/src
+
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -D__OPENCV_BUILD=1 -DCVAPI_EXPORTS
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog -lz -ldl
+
+# cxmathfuncs.cpp has implicit cast of int struct fields.
+LOCAL_CLANG_CFLAGS += -Wno-c++11-narrowing
+
+LOCAL_SRC_FILES := \
+ modules/core/src/algorithm.cpp \
+ modules/core/src/copy.cpp \
+ modules/core/src/lda.cpp \
+ modules/core/src/opengl.cpp \
+ modules/core/src/stat.cpp \
+ modules/core/src/alloc.cpp \
+ modules/core/src/downhill_simplex.cpp \
+ modules/core/src/lpsolver.cpp \
+ modules/core/src/out.cpp \
+ modules/core/src/stl.cpp \
+ modules/core/src/arithm.cpp \
+ modules/core/src/cuda_gpu_mat.cpp \
+ modules/core/src/dxt.cpp \
+ modules/core/src/mathfuncs.cpp \
+ modules/core/src/parallel.cpp \
+ modules/core/src/system.cpp \
+ modules/core/src/array.cpp \
+ modules/core/src/cuda_host_mem.cpp \
+ modules/core/src/matmul.cpp \
+ modules/core/src/parallel_pthreads.cpp \
+ modules/core/src/tables.cpp \
+ modules/core/src/cuda_info.cpp \
+ modules/core/src/matop.cpp \
+ modules/core/src/pca.cpp \
+ modules/core/src/types.cpp \
+ modules/core/src/command_line_parser.cpp \
+ modules/core/src/cuda_stream.cpp \
+ modules/core/src/glob.cpp \
+ modules/core/src/matrix.cpp \
+ modules/core/src/persistence.cpp \
+ modules/core/src/umatrix.cpp \
+ modules/core/src/conjugate_gradient.cpp \
+ modules/core/src/datastructs.cpp \
+ modules/core/src/kmeans.cpp \
+ modules/core/src/ocl.cpp \
+ modules/core/src/convert.cpp \
+ modules/core/src/directx.cpp \
+ modules/core/src/lapack.cpp \
+ modules/core/src/rand.cpp
+
+LOCAL_STATIC_LIBRARIES += libopencv_hal
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_MODULE := libopencv_calib3d
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/calib3d/include \
+ $(LOCAL_PATH)/modules/core/include \
+ $(LOCAL_PATH)/modules/hal/include \
+ $(LOCAL_PATH)/modules/features2d/include \
+ $(LOCAL_PATH)/modules/flann/include \
+ $(LOCAL_PATH)/modules/imgproc/include \
+ $(LOCAL_PATH)/modules/calib3d/src \
+ $(LOCAL_PATH)/modules/calib3d \
+ $(LOCAL_PATH)/opencv2 \
+ $(LOCAL_PATH)/modules/java/generator/src/cpp/common.h
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -D__OPENCV_BUILD=1 -DCVAPI_EXPORTS
+
+LOCAL_SRC_FILES := \
+ modules/calib3d/src/calibinit.cpp \
+ modules/calib3d/src/calibration.cpp \
+ modules/calib3d/src/checkchessboard.cpp \
+ modules/calib3d/src/circlesgrid.cpp \
+ modules/calib3d/src/compat_ptsetreg.cpp \
+ modules/calib3d/src/compat_stereo.cpp \
+ modules/calib3d/src/dls.cpp \
+ modules/calib3d/src/epnp.cpp \
+ modules/calib3d/src/fisheye.cpp \
+ modules/calib3d/src/five-point.cpp \
+ modules/calib3d/src/fundam.cpp \
+ modules/calib3d/src/homography_decomp.cpp \
+ modules/calib3d/src/levmarq.cpp \
+ modules/calib3d/src/p3p.cpp \
+ modules/calib3d/src/polynom_solver.cpp \
+ modules/calib3d/src/posit.cpp \
+ modules/calib3d/src/ptsetreg.cpp \
+ modules/calib3d/src/quadsubpix.cpp \
+ modules/calib3d/src/rho.cpp \
+ modules/calib3d/src/solvepnp.cpp \
+ modules/calib3d/src/stereobm.cpp \
+ modules/calib3d/src/stereosgbm.cpp \
+ modules/calib3d/src/triangulate.cpp \
+ modules/calib3d/src/upnp.cpp \
+ modules/calib3d/opencl_kernels_calib3d.cpp
+
+LOCAL_SHARED_LIBRARIES := libopencv_imgproc libopencv_flann libopencv_core libopencv_ml libopencv_imgcodecs libopencv_videoio libopencv_highgui libopencv_features2d
+LOCAL_STATIC_LIBRARIES := libopencv_hal
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_MODULE := libopencv_features2d
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/features2d \
+ $(LOCAL_PATH)/modules/features2d/include \
+ $(LOCAL_PATH)/modules/core/include \
+ $(LOCAL_PATH)/modules/hal/include \
+ $(LOCAL_PATH)/modules/flann/include \
+ $(LOCAL_PATH)/modules/imgproc/include \
+ $(LOCAL_PATH)/opencv2 \
+ $(LOCAL_PATH)/features2d/src/kaze \
+ $(LOCAL_PATH)/modules/java/generator/src/cpp
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -D__OPENCV_BUILD=1 -DCVAPI_EXPORTS
+
+LOCAL_SRC_FILES := \
+ modules/features2d/src/agast.cpp \
+ modules/features2d/src/agast_score.cpp \
+ modules/features2d/src/akaze.cpp \
+ modules/features2d/src/bagofwords.cpp \
+ modules/features2d/src/blobdetector.cpp \
+ modules/features2d/src/brisk.cpp \
+ modules/features2d/src/draw.cpp \
+ modules/features2d/src/dynamic.cpp \
+ modules/features2d/src/evaluation.cpp \
+ modules/features2d/src/fast.cpp \
+ modules/features2d/src/fast_score.cpp \
+ modules/features2d/src/feature2d.cpp \
+ modules/features2d/src/gftt.cpp \
+ modules/features2d/src/kaze.cpp \
+ modules/features2d/src/keypoint.cpp \
+ modules/features2d/src/matchers.cpp \
+ modules/features2d/src/mser.cpp \
+ modules/features2d/src/orb.cpp \
+ modules/features2d/src/kaze/KAZEFeatures.cpp \
+ modules/features2d/src/kaze/nldiffusion_functions.cpp \
+ modules/features2d/src/kaze/AKAZEFeatures.cpp \
+ modules/features2d/src/kaze/fed.cpp \
+ modules/features2d/src/opencl/brute_force_match.cl \
+ modules/features2d/src/opencl/orb.cl \
+ modules/features2d/src/opencln/fast.cl \
+ modules/features2d/opencl_kernels_features2d.cpp \
+ modules/features2d/misc/java/src/cpp/features2d_converters.cpp \
+ modules/java/generator/src/cpp/converters.cpp
+
+
+LOCAL_SHARED_LIBRARIES := libopencv_core libopencv_flann libopencv_imgproc libopencv_ml libopencv_imgcodecs libopencv_videoio libopencv_highgui
+LOCAL_STATIC_LIBRARIES := libopencv_hal
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl
+
+LOCAL_MODULE := libopencv_flann
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/flann/include \
+ $(LOCAL_PATH)/modules/core/include \
+ $(LOCAL_PATH)/modules/hal/include \
+ $(LOCAL_PATH)/opencv2
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -D__OPENCV_BUILD=1 -DCVAPI_EXPORTS
+
+LOCAL_SRC_FILES := \
+ modules/flann/src/miniflann.cpp
+
+LOCAL_SHARED_LIBRARIES := libopencv_core
+LOCAL_STATIC_LIBRARIES := libopencv_hal
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_MODULE := libopencv_hal
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/hal \
+ $(LOCAL_PATH)/modules/hal/include
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -D__OPENCV_BUILD=1 -DCVAPI_EXPORTS
+
+LOCAL_SRC_FILES := \
+ modules/hal/src/arithm.cpp \
+ modules/hal/src/color.cpp \
+ modules/hal/src/filter.cpp \
+ modules/hal/src/mathfuncs.cpp \
+ modules/hal/src/matrix.cpp \
+ modules/hal/src/resize.cpp \
+ modules/hal/src/stat.cpp \
+ modules/hal/src/warp.cpp
+
+LOCAL_SHARED_LIBRARIES := libopencv_core
+
+include $(BUILD_STATIC_LIBRARY)
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_MODULE := libopencv_highgui
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/highgui/include \
+ $(LOCAL_PATH)/modules/core/include \
+ $(LOCAL_PATH)/modules/hal/include \
+ $(LOCAL_PATH)/modules/imgcodecs/include \
+ $(LOCAL_PATH)/modules/imgproc/include \
+ $(LOCAL_PATH)/modules/videoio/include \
+ $(LOCAL_PATH)/modules/highgui \
+ $(LOCAL_PATH)/opencv2
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -D__OPENCV_BUILD=1 -DCVAPI_EXPORTS
+
+LOCAL_SRC_FILES := \
+ modules/highgui/src/window.cpp
+
+LOCAL_SHARED_LIBRARIES := libopencv_core libopencv_imgproc libopencv_imgcodecs libopencv_videoio
+LOCAL_STATIC_LIBRARIES := libopencv_hal
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+LOCAL_MODULE := libjasper
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -DEXCLUDE_MIF_SUPPORT -DEXCLUDE_PNM_SUPPORT -DEXCLUDE_BMP_SUPPORT -DEXCLUDE_RAS_SUPPORT -DEXCLUDE_JPG_SUPPORT -DEXCLUDE_PGX_SUPPORT
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH)/3rdparty/libjasper \
+ $(LOCAL_PATH)/3rdparty/libjasper/jasper
+
+LOCAL_SRC_FILES := \
+ 3rdparty/libjasper/jpc_enc.c \
+ 3rdparty/libjasper/jas_getopt.c \
+ 3rdparty/libjasper/jas_stream.c \
+ 3rdparty/libjasper/jas_string.c \
+ 3rdparty/libjasper/jpc_util.c \
+ 3rdparty/libjasper/jpc_bs.c \
+ 3rdparty/libjasper/jpc_tsfb.c \
+ 3rdparty/libjasper/jpc_math.c \
+ 3rdparty/libjasper/jas_version.c \
+ 3rdparty/libjasper/jpc_t2cod.c \
+ 3rdparty/libjasper/jpc_t2enc.c \
+ 3rdparty/libjasper/jpc_qmfb.c \
+ 3rdparty/libjasper/jas_init.c \
+ 3rdparty/libjasper/jpc_mct.c \
+ 3rdparty/libjasper/jp2_dec.c \
+ 3rdparty/libjasper/jas_iccdata.c \
+ 3rdparty/libjasper/jpc_cs.c \
+ 3rdparty/libjasper/jpc_t2dec.c \
+ 3rdparty/libjasper/jas_cm.c \
+ 3rdparty/libjasper/jpc_t1cod.c \
+ 3rdparty/libjasper/jas_tvp.c \
+ 3rdparty/libjasper/jp2_cod.c \
+ 3rdparty/libjasper/jpc_mqenc.c \
+ 3rdparty/libjasper/jp2_enc.c \
+ 3rdparty/libjasper/jas_seq.c \
+ 3rdparty/libjasper/jas_icc.c \
+ 3rdparty/libjasper/jpc_t1enc.c \
+ 3rdparty/libjasper/jas_malloc.c \
+ 3rdparty/libjasper/jas_debug.c \
+ 3rdparty/libjasper/jpc_tagtree.c \
+ 3rdparty/libjasper/jpc_mqdec.c \
+ 3rdparty/libjasper/jpc_mqcod.c \
+ 3rdparty/libjasper/jas_image.c \
+ 3rdparty/libjasper/jas_tmr.c \
+ 3rdparty/libjasper/jpc_dec.c \
+ 3rdparty/libjasper/jpc_t1dec.c
+
+include $(BUILD_STATIC_LIBRARY)
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+LOCAL_MODULE := libjpeg
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%)
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH)/3rdparty/libjpeg
+
+LOCAL_SRC_FILES := \
+ 3rdparty/libjpeg/jdapistd.c \
+ 3rdparty/libjpeg/jquant2.c \
+ 3rdparty/libjpeg/jdmerge.c \
+ 3rdparty/libjpeg/jdmaster.c \
+ 3rdparty/libjpeg/jmemmgr.c \
+ 3rdparty/libjpeg/jfdctint.c \
+ 3rdparty/libjpeg/jcmainct.c \
+ 3rdparty/libjpeg/jdapimin.c \
+ 3rdparty/libjpeg/jdatasrc.c \
+ 3rdparty/libjpeg/jdmarker.c \
+ 3rdparty/libjpeg/jdcolor.c \
+ 3rdparty/libjpeg/jctrans.c \
+ 3rdparty/libjpeg/jcapimin.c \
+ 3rdparty/libjpeg/jmemnobs.c \
+ 3rdparty/libjpeg/jchuff.c \
+ 3rdparty/libjpeg/jdpostct.c \
+ 3rdparty/libjpeg/jdcoefct.c \
+ 3rdparty/libjpeg/jcapistd.c \
+ 3rdparty/libjpeg/jutils.c \
+ 3rdparty/libjpeg/jdmainct.c \
+ 3rdparty/libjpeg/jdatadst.c \
+ 3rdparty/libjpeg/jquant1.c \
+ 3rdparty/libjpeg/jcinit.c \
+ 3rdparty/libjpeg/jddctmgr.c \
+ 3rdparty/libjpeg/jdinput.c \
+ 3rdparty/libjpeg/jidctfst.c \
+ 3rdparty/libjpeg/jcarith.c \
+ 3rdparty/libjpeg/jcomapi.c \
+ 3rdparty/libjpeg/jidctint.c \
+ 3rdparty/libjpeg/jcmarker.c \
+ 3rdparty/libjpeg/jdtrans.c \
+ 3rdparty/libjpeg/jccolor.c \
+ 3rdparty/libjpeg/jfdctfst.c \
+ 3rdparty/libjpeg/jdsample.c \
+ 3rdparty/libjpeg/jcmaster.c \
+ 3rdparty/libjpeg/jccoefct.c \
+ 3rdparty/libjpeg/jcparam.c \
+ 3rdparty/libjpeg/jaricom.c \
+ 3rdparty/libjpeg/jdhuff.c \
+ 3rdparty/libjpeg/jdarith.c \
+ 3rdparty/libjpeg/jfdctflt.c \
+ 3rdparty/libjpeg/jcprepct.c \
+ 3rdparty/libjpeg/jcsample.c \
+ 3rdparty/libjpeg/jidctflt.c \
+ 3rdparty/libjpeg/jcdctmgr.c \
+ 3rdparty/libjpeg/jerror.c
+
+include $(BUILD_STATIC_LIBRARY)
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+LOCAL_MODULE := libtiff
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -lz
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%)
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH)/3rdparty/libtiff \
+ $(LOCAL_PATH)/../zlib \
+ $(LOCAL_PATH)/../zlib/src
+
+LOCAL_SRC_FILES := \
+ 3rdparty/libtiff/tif_jpeg.c \
+ 3rdparty/libtiff/tif_write.c \
+ 3rdparty/libtiff/tif_error.c \
+ 3rdparty/libtiff/tif_swab.c \
+ 3rdparty/libtiff/tif_strip.c \
+ 3rdparty/libtiff/tif_extension.c \
+ 3rdparty/libtiff/tif_jpeg_12.c \
+ 3rdparty/libtiff/tif_pixarlog.c \
+ 3rdparty/libtiff/tif_dirwrite.c \
+ 3rdparty/libtiff/tif_dirread.c \
+ 3rdparty/libtiff/tif_flush.c \
+ 3rdparty/libtiff/tif_lzma.c \
+ 3rdparty/libtiff/tif_packbits.c \
+ 3rdparty/libtiff/tif_luv.c \
+ 3rdparty/libtiff/tif_next.c \
+ 3rdparty/libtiff/tif_aux.c \
+ 3rdparty/libtiff/tif_thunder.c \
+ 3rdparty/libtiff/tif_compress.c \
+ 3rdparty/libtiff/tif_codec.c \
+ 3rdparty/libtiff/tif_print.c \
+ 3rdparty/libtiff/tif_dumpmode.c \
+ 3rdparty/libtiff/tif_open.c \
+ 3rdparty/libtiff/tif_close.c \
+ 3rdparty/libtiff/tif_dir.c \
+ 3rdparty/libtiff/tif_fax3sm.c \
+ 3rdparty/libtiff/tif_read.c \
+ 3rdparty/libtiff/tif_zip.c \
+ 3rdparty/libtiff/tif_lzw.c \
+ 3rdparty/libtiff/tif_tile.c \
+ 3rdparty/libtiff/tif_warning.c \
+ 3rdparty/libtiff/tif_color.c \
+ 3rdparty/libtiff/tif_dirinfo.c \
+ 3rdparty/libtiff/tif_version.c \
+ 3rdparty/libtiff/tif_jbig.c \
+ 3rdparty/libtiff/tif_fax3.c \
+ 3rdparty/libtiff/tif_ojpeg.c \
+ 3rdparty/libtiff/tif_predict.c \
+ 3rdparty/libtiff/tif_getimage.c \
+ 3rdparty/libtiff/tif_unix.c
+
+include $(BUILD_STATIC_LIBRARY)
+
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+LOCAL_MODULE := libIlmImf
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -lz -ldl
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH)/3rdparty/openexr \
+ $(LOCAL_PATH)/3rdparty/openexr/IlmImf \
+ $(LOCAL_PATH)/3rdparty/openexr/Half \
+ $(LOCAL_PATH)/3rdparty/openexr/Iex \
+ $(LOCAL_PATH)/3rdparty/openexr/IlmThread \
+ $(LOCAL_PATH)/3rdparty/openexr/Imath \
+ $(LOCAL_PATH)/../zlib \
+ $(LOCAL_PATH)/../zlib/src
+
+
+LOCAL_SRC_FILES := \
+ 3rdparty/openexr/IlmImf/ImfChannelList.cpp \
+ 3rdparty/openexr/IlmImf/ImfStdIO.cpp \
+ 3rdparty/openexr/IlmImf/ImfPreviewImageAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfFloatAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfLineOrderAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfTestFile.cpp \
+ 3rdparty/openexr/IlmImf/ImfInputFile.cpp \
+ 3rdparty/openexr/IlmImf/ImfTiledRgbaFile.cpp \
+ 3rdparty/openexr/IlmImf/ImfVecAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfRationalAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfBoxAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfRgbaFile.cpp \
+ 3rdparty/openexr/IlmImf/ImfTiledOutputFile.cpp \
+ 3rdparty/openexr/IlmImf/ImfCRgbaFile.cpp \
+ 3rdparty/openexr/IlmImf/ImfChromaticitiesAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfRleCompressor.cpp \
+ 3rdparty/openexr/IlmImf/ImfStandardAttributes.cpp \
+ 3rdparty/openexr/IlmImf/ImfChannelListAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfOpaqueAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfIntAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfThreading.cpp \
+ 3rdparty/openexr/IlmImf/ImfTiledInputFile.cpp \
+ 3rdparty/openexr/IlmImf/ImfEnvmapAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfKeyCodeAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfRgbaYca.cpp \
+ 3rdparty/openexr/IlmImf/ImfHuf.cpp \
+ 3rdparty/openexr/IlmImf/ImfTileDescriptionAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfVersion.cpp \
+ 3rdparty/openexr/IlmImf/ImfChromaticities.cpp \
+ 3rdparty/openexr/IlmImf/ImfStringVectorAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfStringAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfKeyCode.cpp \
+ 3rdparty/openexr/IlmImf/ImfOutputFile.cpp \
+ 3rdparty/openexr/IlmImf/ImfMatrixAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfAcesFile.cpp \
+ 3rdparty/openexr/IlmImf/ImfScanLineInputFile.cpp \
+ 3rdparty/openexr/IlmImf/ImfCompressor.cpp \
+ 3rdparty/openexr/IlmImf/ImfHeader.cpp \
+ 3rdparty/openexr/IlmImf/ImfFramesPerSecond.cpp \
+ 3rdparty/openexr/IlmImf/ImfEnvmap.cpp \
+ 3rdparty/openexr/IlmImf/ImfZipCompressor.cpp \
+ 3rdparty/openexr/IlmImf/ImfMultiView.cpp \
+ 3rdparty/openexr/IlmImf/ImfPizCompressor.cpp \
+ 3rdparty/openexr/IlmImf/ImfMisc.cpp \
+ 3rdparty/openexr/IlmImf/ImfRational.cpp \
+ 3rdparty/openexr/IlmImf/ImfAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfDoubleAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfFrameBuffer.cpp \
+ 3rdparty/openexr/IlmImf/ImfTiledMisc.cpp \
+ 3rdparty/openexr/IlmImf/ImfB44Compressor.cpp \
+ 3rdparty/openexr/IlmImf/ImfPxr24Compressor.cpp \
+ 3rdparty/openexr/IlmImf/ImfTimeCode.cpp \
+ 3rdparty/openexr/IlmImf/ImfLut.cpp \
+ 3rdparty/openexr/IlmImf/ImfTileOffsets.cpp \
+ 3rdparty/openexr/IlmImf/ImfConvert.cpp \
+ 3rdparty/openexr/IlmImf/ImfIO.cpp \
+ 3rdparty/openexr/IlmImf/ImfPreviewImage.cpp \
+ 3rdparty/openexr/IlmImf/ImfCompressionAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfTimeCodeAttribute.cpp \
+ 3rdparty/openexr/IlmImf/ImfWav.cpp \
+ 3rdparty/openexr/Half/eLut.cpp \
+ 3rdparty/openexr/Half/toFloat.cpp \
+ 3rdparty/openexr/Half/half.cpp \
+ 3rdparty/openexr/Iex/IexThrowErrnoExc.cpp \
+ 3rdparty/openexr/Iex/IexBaseExc.cpp \
+ 3rdparty/openexr/IlmThread/IlmThreadMutex.cpp \
+ 3rdparty/openexr/IlmThread/IlmThreadPool.cpp \
+ 3rdparty/openexr/IlmThread/IlmThreadPosix.cpp \
+ 3rdparty/openexr/IlmThread/IlmThreadMutexPosix.cpp \
+ 3rdparty/openexr/IlmThread/IlmThreadSemaphorePosixCompat.cpp \
+ 3rdparty/openexr/IlmThread/IlmThreadSemaphore.cpp \
+ 3rdparty/openexr/IlmThread/IlmThreadSemaphorePosix.cpp \
+ 3rdparty/openexr/IlmThread/IlmThread.cpp \
+ 3rdparty/openexr/Imath/ImathRandom.cpp \
+ 3rdparty/openexr/Imath/ImathFun.cpp \
+ 3rdparty/openexr/Imath/ImathMatrixAlgo.cpp \
+ 3rdparty/openexr/Imath/ImathVec.cpp \
+ 3rdparty/openexr/Imath/ImathColorAlgo.cpp
+
+
+include $(BUILD_STATIC_LIBRARY)
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_MODULE := libopencv_imgcodecs
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -lz -ldl
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/imgcodecs \
+ $(LOCAL_PATH)/modules/imgcodecs/include \
+ $(LOCAL_PATH)/modules/core/include \
+ $(LOCAL_PATH)/opencv2 \
+ $(LOCAL_PATH)/modules/imgproc/include \
+ $(LOCAL_PATH)/modules/hal/include \
+ $(LOCAL_PATH)/3rdparty/openexr/IlmImf \
+ $(LOCAL_PATH)/3rdparty/openexr/Imath \
+ $(LOCAL_PATH)/3rdparty/openexr/Iex \
+ $(LOCAL_PATH)/3rdparty/openexr/Half \
+ $(LOCAL_PATH)/3rdparty/libjasper \
+ $(LOCAL_PATH)/3rdparty/libjasper/jasper \
+ $(LOCAL_PATH)/3rdparty/libjpeg \
+ $(LOCAL_PATH)/3rdparty/libtiff \
+ $(LOCAL_PATH)/3rdparty/libpng \
+ $(LOCAL_PATH)/../zlib \
+ $(LOCAL_PATH)/../zlib/src
+
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -D__OPENCV_BUILD=1 -DCVAPI_EXPORTS -lz
+
+LOCAL_SRC_FILES := \
+ modules/imgcodecs/src/bitstrm.cpp \
+ modules/imgcodecs/src/grfmt_base.cpp \
+ modules/imgcodecs/src/grfmt_bmp.cpp \
+ modules/imgcodecs/src/grfmt_exr.cpp \
+ modules/imgcodecs/src/grfmt_gdal.cpp \
+ modules/imgcodecs/src/grfmt_hdr.cpp \
+ modules/imgcodecs/src/grfmt_jpeg2000.cpp \
+ modules/imgcodecs/src/grfmt_jpeg.cpp \
+ modules/imgcodecs/src/grfmt_png.cpp \
+ modules/imgcodecs/src/grfmt_pxm.cpp \
+ modules/imgcodecs/src/grfmt_sunras.cpp \
+ modules/imgcodecs/src/grfmt_tiff.cpp \
+ modules/imgcodecs/src/grfmt_webp.cpp \
+ modules/imgcodecs/src/loadsave.cpp \
+ modules/imgcodecs/src/rgbe.cpp \
+ modules/imgcodecs/src/utils.cpp
+
+LOCAL_STATIC_LIBRARIES += libopencv_hal libjasper libjpeg libtiff libIlmImf
+LOCAL_SHARED_LIBRARIES := libopencv_core libopencv_imgproc libpng
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_MODULE := libopencv_imgproc
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/imgproc/include \
+ $(LOCAL_PATH)/modules/imgproc \
+ $(LOCAL_PATH)/modules/imgproc/src \
+ $(LOCAL_PATH)/modules/core/include \
+ $(LOCAL_PATH)/modules/hal/include \
+ $(LOCAL_PATH)/opencv2
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -D__OPENCV_BUILD=1 -DCVAPI_EXPORTS
+
+LOCAL_SRC_FILES := \
+ modules/imgproc/src/accum.cpp \
+ modules/imgproc/src/approx.cpp \
+ modules/imgproc/src/blend.cpp \
+ modules/imgproc/src/canny.cpp \
+ modules/imgproc/src/clahe.cpp \
+ modules/imgproc/src/color.cpp \
+ modules/imgproc/src/colormap.cpp \
+ modules/imgproc/src/connectedcomponents.cpp \
+ modules/imgproc/src/contours.cpp \
+ modules/imgproc/src/convhull.cpp \
+ modules/imgproc/src/corner.cpp \
+ modules/imgproc/src/cornersubpix.cpp \
+ modules/imgproc/src/demosaicing.cpp \
+ modules/imgproc/src/deriv.cpp \
+ modules/imgproc/src/distransform.cpp \
+ modules/imgproc/src/drawing.cpp \
+ modules/imgproc/src/emd.cpp \
+ modules/imgproc/src/featureselect.cpp \
+ modules/imgproc/src/filter.cpp \
+ modules/imgproc/src/floodfill.cpp \
+ modules/imgproc/src/gabor.cpp \
+ modules/imgproc/src/generalized_hough.cpp \
+ modules/imgproc/src/geometry.cpp \
+ modules/imgproc/src/grabcut.cpp \
+ modules/imgproc/src/hershey_fonts.cpp \
+ modules/imgproc/src/histogram.cpp \
+ modules/imgproc/src/hough.cpp \
+ modules/imgproc/src/imgwarp.cpp \
+ modules/imgproc/src/intersection.cpp \
+ modules/imgproc/src/linefit.cpp \
+ modules/imgproc/src/lsd.cpp \
+ modules/imgproc/src/matchcontours.cpp \
+ modules/imgproc/src/min_enclosing_triangle.cpp \
+ modules/imgproc/src/moments.cpp \
+ modules/imgproc/src/morph.cpp \
+ modules/imgproc/src/phasecorr.cpp \
+ modules/imgproc/src/pyramids.cpp \
+ modules/imgproc/src/rotcalipers.cpp \
+ modules/imgproc/src/samplers.cpp \
+ modules/imgproc/src/segmentation.cpp \
+ modules/imgproc/src/shapedescr.cpp \
+ modules/imgproc/src/smooth.cpp \
+ modules/imgproc/src/subdivision2d.cpp \
+ modules/imgproc/src/sumpixels.cpp \
+ modules/imgproc/src/tables.cpp \
+ modules/imgproc/src/templmatch.cpp \
+ modules/imgproc/src/thresh.cpp \
+ modules/imgproc/src/undistort.cpp \
+ modules/imgproc/src/utils.cpp \
+ modules/imgproc/opencl_kernels_imgproc.cpp \
+
+LOCAL_SHARED_LIBRARIES := libopencv_core
+LOCAL_STATIC_LIBRARIES := libopencv_hal
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_MODULE := libopencv_ml
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/core/include \
+ $(LOCAL_PATH)/modules/ml \
+ $(LOCAL_PATH)/modules/hal/include \
+ $(LOCAL_PATH)/modules/ml/include
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -D__OPENCV_BUILD=1 -DCVAPI_EXPORTS
+
+LOCAL_SRC_FILES := \
+ modules/ml/src/ann_mlp.cpp \
+ modules/ml/src/boost.cpp \
+ modules/ml/src/data.cpp \
+ modules/ml/src/em.cpp \
+ modules/ml/src/gbt.cpp \
+ modules/ml/src/inner_functions.cpp \
+ modules/ml/src/kdtree.cpp \
+ modules/ml/src/knearest.cpp \
+ modules/ml/src/lr.cpp \
+ modules/ml/src/nbayes.cpp \
+ modules/ml/src/rtrees.cpp \
+ modules/ml/src/svm.cpp \
+ modules/ml/src/testset.cpp \
+ modules/ml/src/tree.cpp
+
+LOCAL_SHARED_LIBRARIES := libopencv_core
+LOCAL_STATIC_LIBRARIES := libopencv_hal
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_MODULE := libopencv_objdetect
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog -ldl
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/objdetect \
+ $(LOCAL_PATH)/modules/core/include \
+ $(LOCAL_PATH)/modules/hal/include \
+ $(LOCAL_PATH)/modules/objdetect/include \
+ $(LOCAL_PATH)/modules/flann/include \
+ $(LOCAL_PATH)/modules/imgproc/include \
+ $(LOCAL_PATH)/modules/objdetect \
+ $(LOCAL_PATH)/modules/ml/include \
+ $(LOCAL_PATH)/modules/highgui/include \
+ $(LOCAL_PATH)/modules/imgcodecs/include \
+ $(LOCAL_PATH)/modules/videoio/include \
+ $(LOCAL_PATH)/opencv2
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -D__OPENCV_BUILD=1 -DCVAPI_EXPORTS
+
+LOCAL_SRC_FILES := \
+ modules/objdetect/src/cascadedetect_convert.cpp \
+ modules/objdetect/src/cascadedetect.cpp \
+ modules/objdetect/src/detection_based_tracker.cpp \
+ modules/objdetect/src/haar.cpp \
+ modules/objdetect/src/hog.cpp \
+ modules/objdetect/opencl_kernels_objdetect.cpp \
+ modules/java/generator/src/cpp/converters.cpp
+
+LOCAL_SHARED_LIBRARIES := libopencv_core libopencv_imgproc libopencv_ml libopencv_imgcodecs libopencv_videoio libopencv_highgui
+LOCAL_STATIC_LBIRARIES := libopencv_hal
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_MODULE := libopencv_photo
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/photo \
+ $(LOCAL_PATH)/modules/core/include \
+ $(LOCAL_PATH)/modules/hal/include \
+ $(LOCAL_PATH)/modules/photo/include \
+ $(LOCAL_PATH)/modules/flann/include \
+ $(LOCAL_PATH)/modules/imgproc/include \
+ $(LOCAL_PATH)/modules/highgui/include \
+ $(LOCAL_PATH)/modules/imgcodecs/include \
+ $(LOCAL_PATH)/modules/videoio/include \
+ $(LOCAL_PATH)/modules/photo
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -D__OPENCV_BUILD=1 -DCVAPI_EXPORTS -lpng -ljpeg -lz
+
+LOCAL_SRC_FILES := \
+ modules/photo/src/align.cpp \
+ modules/photo/src/calibrate.cpp \
+ modules/photo/src/contrast_preserve.cpp \
+ modules/photo/src/denoise_tvl1.cpp \
+ modules/photo/src/denoising.cpp \
+ modules/photo/src/denoising.cuda.cpp \
+ modules/photo/src/hdr_common.cpp \
+ modules/photo/src/inpaint.cpp \
+ modules/photo/src/merge.cpp \
+ modules/photo/src/npr.cpp \
+ modules/photo/src/seamless_cloning.cpp \
+ modules/photo/src/seamless_cloning_impl.cpp \
+ modules/photo/src/tonemap.cpp \
+ modules/photo/opencl_kernels_photo.cpp
+
+LOCAL_SHARED_LIBRARIES := libopencv_core libopencv_imgproc
+LOCAL_STATIC_LIBRARIES := libopencv_hal
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl
+
+LOCAL_MODULE := libopencv_shape
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/core/include \
+ $(LOCAL_PATH)/modules/hal/include \
+ $(LOCAL_PATH)/modules/shape \
+ $(LOCAL_PATH)/modules/video/include \
+ $(LOCAL_PATH)/modules/imgproc/include \
+ $(LOCAL_PATH)/modules/shape/include
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -D__OPENCV_BUILD=1 -DCVAPI_EXPORTS
+
+LOCAL_SRC_FILES := \
+ modules/shape/src/aff_trans.cpp \
+ modules/shape/src/emdL1.cpp \
+ modules/shape/src/haus_dis.cpp \
+ modules/shape/src/hist_cost.cpp \
+ modules/shape/src/precomp.cpp \
+ modules/shape/src/sc_dis.cpp \
+ modules/shape/src/tps_trans.cpp
+
+LOCAL_SHARED_LIBRARIES := libopencv_core libopencv_imgproc libopencv_video
+LOCAL_STATIC_LIBRARIES := libopencv_hal
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_MODULE := libopencv_stitching
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/core/include \
+ $(LOCAL_PATH)/modules/hal/include \
+ $(LOCAL_PATH)/modules/stitching \
+ $(LOCAL_PATH)/modules/flann/include \
+ $(LOCAL_PATH)/modules/features2d/include \
+ $(LOCAL_PATH)/modules/imgproc/include \
+ $(LOCAL_PATH)/modules/calib3d/include \
+ $(LOCAL_PATH)/modules/stitching/include \
+ $(LOCAL_PATH)/modules/stitching
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -D__OPENCV_BUILD=1 -DCVAPI_EXPORTS
+
+LOCAL_SRC_FILES := \
+ modules/stitching/src/autocalib.cpp \
+ modules/stitching/src/blenders.cpp \
+ modules/stitching/src/camera.cpp \
+ modules/stitching/src/exposure_compensate.cpp \
+ modules/stitching/src/matchers.cpp \
+ modules/stitching/src/motion_estimators.cpp \
+ modules/stitching/src/seam_finders.cpp \
+ modules/stitching/src/stitcher.cpp \
+ modules/stitching/src/timelapsers.cpp \
+ modules/stitching/src/util.cpp \
+ modules/stitching/src/warpers.cpp \
+ modules/stitching/src/warpers_cuda.cpp \
+ modules/stitching/opencl_kernels_stitching.cpp
+
+LOCAL_SHARED_LIBRARIES := libopencv_core libopencv_flann libopencv_imgproc libopencv_ml libopencv_imgcodecs libopencv_videoio libopencv_highgui libopencv_objdetect libopencv_features2d libopencv_calib3d
+LOCAL_STATIC_LIBRARIES := libopencv_hal
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_MODULE := libopencv_superres
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/core/include \
+ $(LOCAL_PATH)/modules/hal/include \
+ $(LOCAL_PATH)/modules/superres \
+ $(LOCAL_PATH)/modules/video/include \
+ $(LOCAL_PATH)/modules/imgproc/include \
+ $(LOCAL_PATH)/modules/videoio/include \
+ $(LOCAL_PATH)/modules/superres/include \
+ $(LOCAL_PATH)/modules/superres/src
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -D__OPENCV_BUILD=1 -DCVAPI_EXPORTS
+
+LOCAL_SRC_FILES := \
+ modules/superres/src/btv_l1.cpp \
+ modules/superres/src/btv_l1_cuda.cpp \
+ modules/superres/src/frame_source.cpp \
+ modules/superres/src/input_array_utility.cpp \
+ modules/superres/src/optical_flow.cpp \
+ modules/superres/src/super_resolution.cpp \
+ modules/superres/opencl_kernels_superres.cpp
+
+LOCAL_SHARED_LIBRARIES := libopencv_core libopencv_imgproc libopencv_video libopencv_imgcodecs libopencv_videoio
+LOCAL_STATIC_LIBRARIES := libopencv_hal
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_MODULE := libopencv_ts
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/core/include \
+ $(LOCAL_PATH)/modules/hal/include \
+ $(LOCAL_PATH)/modules/ts \
+ $(LOCAL_PATH)/modules/highgui/include \
+ $(LOCAL_PATH)/modules/videoio/include \
+ $(LOCAL_PATH)/modules/imgproc/include \
+ $(LOCAL_PATH)/modules/imgcodecs/include \
+ $(LOCAL_PATH)/modules/ts/include
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -D__OPENCV_BUILD=1 -DCVAPI_EXPORTS
+
+LOCAL_SRC_FILES := \
+ modules/ts/src/cuda_perf.cpp \
+ modules/ts/src/cuda_test.cpp \
+ modules/ts/src/ocl_perf.cpp \
+ modules/ts/src/ocl_test.cpp \
+ modules/ts/src/ts_arrtest.cpp \
+ modules/ts/src/ts.cpp \
+ modules/ts/src/ts_func.cpp \
+ modules/ts/src/ts_gtest.cpp \
+ modules/ts/src/ts_perf.cpp
+
+include $(BUILD_STATIC_LIBRARY)
+
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_MODULE := libopencv_video
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_LDLIBS := -lz -ldl
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/core/include \
+ $(LOCAL_PATH)/modules/video \
+ $(LOCAL_PATH)/modules/hal/include \
+ $(LOCAL_PATH)/modules/imgproc/include \
+ $(LOCAL_PATH)/modules/video/include \
+ $(LOCAL_PATH)/modules/imgcodecs/include
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -D__OPENCV_BUILD=1 -DCVAPI_EXPORTS
+
+LOCAL_SRC_FILES := \
+ modules/video/src/bgfg_gaussmix2.cpp \
+ modules/video/src/bgfg_KNN.cpp \
+ modules/video/src/camshift.cpp \
+ modules/video/src/compat_video.cpp \
+ modules/video/src/ecc.cpp \
+ modules/video/src/kalman.cpp \
+ modules/video/src/lkpyramid.cpp \
+ modules/video/src/optflowgf.cpp \
+ modules/video/src/tvl1flow.cpp \
+ modules/video/opencl_kernels_video.cpp
+
+LOCAL_SHARED_LIBRARIES := libopencv_core libopencv_imgproc
+LOCAL_STATIC_LIBRARIES := libopencv_hal
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_MODULE := libopencv_videoio
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/videoio \
+ $(LOCAL_PATH)/modules/core/include \
+ $(LOCAL_PATH)/modules/imgcodecs/include \
+ $(LOCAL_PATH)/modules/imgproc/include \
+ $(LOCAL_PATH)/modules/hal/include \
+ $(LOCAL_PATH)/modules/videoio/include \
+ $(LOCAL_PATH)/modules/video
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -D__OPENCV_BUILD=1 -DCVAPI_EXPORTS
+
+LOCAL_SRC_FILES := \
+ modules/videoio/src/cap_cmu.cpp \
+ modules/videoio/src/cap.cpp \
+ modules/videoio/src/cap_dc1394.cpp \
+ modules/videoio/src/cap_dc1394_v2.cpp \
+ modules/videoio/src/cap_dshow.cpp \
+ modules/videoio/src/cap_ffmpeg.cpp \
+ modules/videoio/src/cap_gphoto2.cpp \
+ modules/videoio/src/cap_images.cpp \
+ modules/videoio/src/cap_intelperc.cpp \
+ modules/videoio/src/cap_libv4l.cpp \
+ modules/videoio/src/cap_mjpeg_decoder.cpp \
+ modules/videoio/src/cap_mjpeg_encoder.cpp \
+ modules/videoio/src/cap_msmf.cpp \
+ modules/videoio/src/cap_openni2.cpp \
+ modules/videoio/src/cap_openni.cpp \
+ modules/videoio/src/cap_pvapi.cpp \
+ modules/videoio/src/cap_v4l.cpp
+
+LOCAL_SHARED_LIBRARIES := libopencv_core libopencv_imgproc libopencv_imgcodecs
+LOCAL_STATIC_LIBRARIES := libopencv_hal
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_MODULE := libopencv_videostab
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/core/include \
+ $(LOCAL_PATH)/modules/videostab \
+ $(LOCAL_PATH)/modules/hal/include \
+ $(LOCAL_PATH)/modules/imgproc/include \
+ $(LOCAL_PATH)/modules/video/include \
+ $(LOCAL_PATH)/modules/features2d/include \
+ $(LOCAL_PATH)/modules/flann/include \
+ $(LOCAL_PATH)/modules/photo/include \
+ $(LOCAL_PATH)/modules/videoio/include \
+ $(LOCAL_PATH)/modules/calib3d/include \
+ $(LOCAL_PATH)/modules/videostab/include
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -D__OPENCV_BUILD=1 -DCVAPI_EXPORTS
+
+LOCAL_SRC_FILES := \
+ modules/videostab/src/deblurring.cpp \
+ modules/videostab/src/fast_marching.cpp \
+ modules/videostab/src/frame_source.cpp \
+ modules/videostab/src/global_motion.cpp \
+ modules/videostab/src/inpainting.cpp \
+ modules/videostab/src/log.cpp \
+ modules/videostab/src/motion_stabilizing.cpp \
+ modules/videostab/src/optical_flow.cpp \
+ modules/videostab/src/outlier_rejection.cpp \
+ modules/videostab/src/stabilizer.cpp \
+ modules/videostab/src/wobble_suppression.cpp
+LOCAL_SHARED_LIBRARIES:= libopencv_core libopencv_flann libopencv_imgproc libopencv_ml libopencv_photo libopencv_video libopencv_imgcodecs libopencv_videoio libopencv_highgui libopencv_features2d libopencv_calib3d
+
+LOCAL_STATIC_LIBRARIES := libopencv_hal
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+
+
+
+include $(CLEAR_VARS)
+
+LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_SDK_VERSION := 21
+
+LOCAL_MODULE := libopencv_java
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog -lz -ljnigraphics -ldl
+
+LOCAL_RTTI_FLAG := -frtti
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -fexceptions -DANDROID -D__OPENCV_BUILD=1 -Dopencv_java_EXPORTS -DCAP_PROP_ANDROID_PREVIEW_SIZES_STRING=1025
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(LOCAL_PATH)/modules/java/include \
+ $(LOCAL_PATH)/modules/java/src \
+ $(LOCAL_PATH)/modules \
+ $(LOCAL_PATH)/modules/hal/include \
+ $(LOCAL_PATH)/modules/core/include \
+ $(LOCAL_PATH)/modules/flann/include \
+ $(LOCAL_PATH)/modules/imgproc/include \
+ $(LOCAL_PATH)/modules/ml/include \
+ $(LOCAL_PATH)/modules/photo/include \
+ $(LOCAL_PATH)/modules/video/include \
+ $(LOCAL_PATH)/modules/androidcamera/include \
+ $(LOCAL_PATH)/modules/imgcodecs/include \
+ $(LOCAL_PATH)/modules/videoio/include \
+ $(LOCAL_PATH)/modules/highgui/include \
+ $(LOCAL_PATH)/modules/objdetect/include \
+ $(LOCAL_PATH)/modules/features2d/include \
+ $(LOCAL_PATH)/modules/calib3d/include \
+ $(LOCAL_PATH)/modules/java/generator/src/cpp
+
+LOCAL_SRC_FILES := \
+ modules/java/src/photo+MergeExposures.java \
+ modules/java/src/calib3d+Calib3d.java \
+ modules/java/src/ml+LogisticRegression.java \
+ modules/java/src/photo+AlignMTB.java \
+ modules/java/src/video+DenseOpticalFlow.java \
+ modules/java/src/objdetect+CascadeClassifier.java \
+ modules/java/src/video+BackgroundSubtractor.java \
+ modules/java/src/photo+TonemapDurand.java \
+ modules/java/src/imgproc+Subdiv2D.java \
+ modules/java/src/video+KalmanFilter.java \
+ modules/java/src/ml+EM.java \
+ modules/java/src/photo+Photo.java \
+ modules/java/src/imgcodecs+Imgcodecs.java \
+ modules/java/src/photo+AlignExposures.java \
+ modules/java/src/objdetect+HOGDescriptor.java \
+ modules/java/src/calib3d+StereoBM.java \
+ modules/java/src/ml+RTrees.java \
+ modules/java/src/ml+Boost.java \
+ modules/java/src/photo+CalibrateCRF.java \
+ modules/java/src/calib3d+StereoSGBM.java \
+ modules/java/src/photo+MergeMertens.java \
+ modules/java/src/video+DualTVL1OpticalFlow.java \
+ modules/java/src/ml+DTrees.java \
+ modules/java/src/calib3d+StereoMatcher.java \
+ modules/java/src/ml+StatModel.java \
+ modules/java/src/videoio+Videoio.java \
+ modules/java/src/photo+CalibrateDebevec.java \
+ modules/java/src/photo+MergeRobertson.java \
+ modules/java/src/video+BackgroundSubtractorKNN.java \
+ modules/java/src/photo+Tonemap.java \
+ modules/java/src/core+Core.java \
+ modules/java/src/ml+Ml.java \
+ modules/java/src/objdetect+BaseCascadeClassifier.java \
+ modules/java/src/video+BackgroundSubtractorMOG2.java \
+ modules/java/src/imgproc+Imgproc.java \
+ modules/java/src/photo+CalibrateRobertson.java \
+ modules/java/src/features2d+Features2d.java \
+ modules/java/src/ml+TrainData.java \
+ modules/java/src/photo+TonemapReinhard.java \
+ modules/java/src/ml+SVM.java \
+ modules/java/src/core+Algorithm.java \
+ modules/java/src/imgproc+CLAHE.java \
+ modules/java/src/imgproc+LineSegmentDetector.java \
+ modules/java/src/videoio+VideoCapture.java \
+ modules/java/src/photo+TonemapDrago.java \
+ modules/java/src/photo+MergeDebevec.java \
+ modules/java/src/features2d+DescriptorExtractor.java \
+ modules/java/src/objdetect+Objdetect.java \
+ modules/java/src/ml+ANN_MLP.java \
+ modules/java/src/ml+NormalBayesClassifier.java \
+ modules/java/src/ml+KNearest.java \
+ modules/java/src/video+Video.java \
+ modules/java/src/features2d+FeatureDetector.java \
+ modules/java/src/photo+TonemapMantiuk.java \
+ modules/java/src/features2d+DescriptorMatcher.java \
+ modules/java/src/ml.cpp \
+ modules/java/src/video.cpp \
+ modules/java/src/photo.cpp \
+ modules/java/src/calib3d.cpp \
+ modules/java/src/features2d.cpp \
+ modules/java/src/core.cpp \
+ modules/java/src/imgproc.cpp \
+ modules/java/src/objdetect.cpp \
+ modules/java/src/videoio.cpp \
+ modules/java/src/imgcodecs.cpp \
+ modules/java/generator/src/cpp/jni_part.cpp \
+ modules/java/generator/src/cpp/utils.cpp \
+ modules/java/generator/src/cpp/converters.cpp \
+ modules/java/generator/src/cpp/Mat.cpp \
+ modules/java/generator/src/java/android+LoaderCallbackInterface.java \
+ modules/java/generator/src/java/android+CameraBridgeViewBase.java \
+ modules/java/generator/src/java/android+BaseLoaderCallback.java \
+ modules/java/generator/src/java/android+JavaCameraView.java \
+ modules/java/generator/src/java/android+Utils.java \
+ modules/java/generator/src/java/android+sync.py \
+ modules/java/generator/src/java/android+OpenCVLoader.java \
+ modules/java/generator/src/java/android+StaticHelper.java \
+ modules/java/generator/src/java/android+FpsMeter.java \
+ modules/java/generator/src/java/android+AsyncServiceHelper.java \
+ modules/java/generator/src/java/android+InstallCallbackInterface.java \
+ modules/java/generator/src/java/utils+Converters.java \
+ modules/java/generator/src/java/engine+OpenCVEngineInterface.aidl \
+ modules/core/misc/java/src/cpp/core_manual.cpp
+
+LOCAL_SHARED_LIBRARIES := libopencv_core libopencv_flann libopencv_imgproc libopencv_ml libopencv_photo libopencv_video libopencv_imgcodecs libopencv_videoio libopencv_highgui libopencv_objdetect libopencv_features2d libopencv_calib3d
+LOCAL_STATIC_LIBRARIES := libopencv_hal
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/cvconfig.h b/cvconfig.h
new file mode 100644
index 0000000..7442235
--- /dev/null
+++ b/cvconfig.h
@@ -0,0 +1,183 @@
+/* OpenCV compiled as static or dynamic libs */
+/* #undef BUILD_SHARED_LIBS */
+
+/* Compile for 'real' NVIDIA GPU architectures */
+#define CUDA_ARCH_BIN ""
+
+/* Create PTX or BIN for 1.0 compute capability */
+/* #undef CUDA_ARCH_BIN_OR_PTX_10 */
+
+/* NVIDIA GPU features are used */
+#define CUDA_ARCH_FEATURES ""
+
+/* Compile for 'virtual' NVIDIA PTX architectures */
+#define CUDA_ARCH_PTX ""
+
+/* AVFoundation video libraries */
+/* #undef HAVE_AVFOUNDATION */
+
+/* V4L capturing support */
+/* #undef HAVE_CAMV4L */
+
+/* V4L2 capturing support */
+/* #undef HAVE_CAMV4L2 */
+
+/* Carbon windowing environment */
+/* #undef HAVE_CARBON */
+
+/* AMD's Basic Linear Algebra Subprograms Library*/
+/* #undef HAVE_CLAMDBLAS */
+
+/* AMD's OpenCL Fast Fourier Transform Library*/
+/* #undef HAVE_CLAMDFFT */
+
+/* Clp support */
+/* #undef HAVE_CLP */
+
+/* Cocoa API */
+/* #undef HAVE_COCOA */
+
+/* C= */
+/* #undef HAVE_CSTRIPES */
+
+/* NVidia Cuda Basic Linear Algebra Subprograms (BLAS) API*/
+/* #undef HAVE_CUBLAS */
+
+/* NVidia Cuda Runtime API*/
+/* #undef HAVE_CUDA */
+
+/* NVidia Cuda Fast Fourier Transform (FFT) API*/
+/* #undef HAVE_CUFFT */
+
+/* IEEE1394 capturing support */
+/* #undef HAVE_DC1394 */
+
+/* IEEE1394 capturing support - libdc1394 v2.x */
+/* #undef HAVE_DC1394_2 */
+
+/* DirectX */
+/* #undef HAVE_DIRECTX */
+/* #undef HAVE_D3D11 */
+/* #undef HAVE_D3D10 */
+/* #undef HAVE_D3D9 */
+
+/* DirectShow Video Capture library */
+/* #undef HAVE_DSHOW */
+
+/* Eigen Matrix & Linear Algebra Library */
+/* #undef HAVE_EIGEN */
+
+/* FFMpeg video library */
+/* #undef HAVE_FFMPEG */
+
+/* ffmpeg's libswscale */
+/* #undef HAVE_FFMPEG_SWSCALE */
+
+/* ffmpeg in Gentoo */
+/* #undef HAVE_GENTOO_FFMPEG */
+
+/* Geospatial Data Abstraction Library */
+/* #undef HAVE_GDAL */
+
+/* GStreamer multimedia framework */
+/* #undef HAVE_GSTREAMER */
+
+/* GTK+ 2.0 Thread support */
+/* #undef HAVE_GTHREAD */
+
+/* GTK+ 2.x toolkit */
+/* #undef HAVE_GTK */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+/* #undef HAVE_INTTYPES_H */
+
+/* Intel Perceptual Computing SDK library */
+/* #undef HAVE_INTELPERC */
+
+/* Intel Integrated Performance Primitives */
+/* #undef HAVE_IPP */
+/* #undef HAVE_IPP_ICV_ONLY */
+
+/* Intel IPP Async */
+/* #undef HAVE_IPP_A */
+
+/* JPEG-2000 codec */
+#define HAVE_JASPER
+
+/* IJG JPEG codec */
+#define HAVE_JPEG
+
+/* libpng/png.h needs to be included */
+/* #undef HAVE_LIBPNG_PNG_H */
+
+/* V4L/V4L2 capturing support via libv4l */
+/* #undef HAVE_LIBV4L */
+
+/* Microsoft Media Foundation Capture library */
+/* #undef HAVE_MSMF */
+
+/* NVidia Video Decoding API*/
+/* #undef HAVE_NVCUVID */
+
+/* OpenCL Support */
+/* #undef HAVE_OPENCL */
+/* #undef HAVE_OPENCL_STATIC */
+/* #undef HAVE_OPENCL_SVM */
+
+/* OpenEXR codec */
+#define HAVE_OPENEXR
+
+/* OpenGL support*/
+/* #undef HAVE_OPENGL */
+
+/* OpenNI library */
+/* #undef HAVE_OPENNI */
+
+/* OpenNI library */
+/* #undef HAVE_OPENNI2 */
+
+/* PNG codec */
+#define HAVE_PNG
+
+/* Qt support */
+/* #undef HAVE_QT */
+
+/* Qt OpenGL support */
+/* #undef HAVE_QT_OPENGL */
+
+/* QuickTime video libraries */
+/* #undef HAVE_QUICKTIME */
+
+/* QTKit video libraries */
+/* #undef HAVE_QTKIT */
+
+/* Intel Threading Building Blocks */
+/* #undef HAVE_TBB */
+
+/* TIFF codec */
+#define HAVE_TIFF
+
+/* Unicap video capture library */
+/* #undef HAVE_UNICAP */
+
+/* Video for Windows support */
+/* #undef HAVE_VFW */
+
+/* V4L2 capturing support in videoio.h */
+/* #undef HAVE_VIDEOIO */
+
+/* Win32 UI */
+/* #undef HAVE_WIN32UI */
+
+/* XIMEA camera support */
+/* #undef HAVE_XIMEA */
+
+/* Xine video library */
+/* #undef HAVE_XINE */
+
+/* Define if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+/* #undef WORDS_BIGENDIAN */
+
+/* gPhoto2 library */
+/* #undef HAVE_GPHOTO2 */
diff --git a/modules/calib3d/opencl_kernels_calib3d.cpp b/modules/calib3d/opencl_kernels_calib3d.cpp
new file mode 100644
index 0000000..abe4b6f
--- /dev/null
+++ b/modules/calib3d/opencl_kernels_calib3d.cpp
@@ -0,0 +1,255 @@
+// This file is auto-generated. Do not edit!
+
+#include "precomp.hpp"
+#include "opencl_kernels_calib3d.hpp"
+
+namespace cv
+{
+namespace ocl
+{
+namespace calib3d
+{
+
+const struct ProgramEntry stereobm={"stereobm",
+"#define MAX_VAL 32767\n"
+"#ifndef WSZ\n"
+"#define WSZ 2\n"
+"#endif\n"
+"#define WSZ2 (WSZ / 2)\n"
+"#ifdef DEFINE_KERNEL_STEREOBM\n"
+"#define DISPARITY_SHIFT 4\n"
+"#define FILTERED ((MIN_DISP - 1) << DISPARITY_SHIFT)\n"
+"void calcDisp(__local short * cost, __global short * disp, int uniquenessRatio,\n"
+"__local int * bestDisp, __local int * bestCost, int d, int x, int y, int cols, int rows)\n"
+"{\n"
+"int best_disp = *bestDisp, best_cost = *bestCost;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"short c = cost[0];\n"
+"int thresh = best_cost + (best_cost * uniquenessRatio / 100);\n"
+"bool notUniq = ( (c <= thresh) && (d < (best_disp - 1) || d > (best_disp + 1) ) );\n"
+"if (notUniq)\n"
+"*bestCost = FILTERED;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if( *bestCost != FILTERED && x < cols - WSZ2 - MIN_DISP && y < rows - WSZ2 && d == best_disp)\n"
+"{\n"
+"int d_aprox = 0;\n"
+"int yp =0, yn = 0;\n"
+"if ((0 < best_disp) && (best_disp < NUM_DISP - 1))\n"
+"{\n"
+"yp = cost[-2 * BLOCK_SIZE_Y];\n"
+"yn = cost[2 * BLOCK_SIZE_Y];\n"
+"d_aprox = yp + yn - 2 * c + abs(yp - yn);\n"
+"}\n"
+"disp[0] = (short)(((best_disp + MIN_DISP)*256 + (d_aprox != 0 ? (yp - yn) * 256 / d_aprox : 0) + 15) >> 4);\n"
+"}\n"
+"}\n"
+"short calcCostBorder(__global const uchar * leftptr, __global const uchar * rightptr, int x, int y, int nthread,\n"
+"short * costbuf, int *h, int cols, int d, short cost)\n"
+"{\n"
+"int head = (*h) % WSZ;\n"
+"__global const uchar * left, * right;\n"
+"int idx = mad24(y + WSZ2 * (2 * nthread - 1), cols, x + WSZ2 * (1 - 2 * nthread));\n"
+"left = leftptr + idx;\n"
+"right = rightptr + (idx - d);\n"
+"short costdiff = 0;\n"
+"if (0 == nthread)\n"
+"{\n"
+"#pragma unroll\n"
+"for (int i = 0; i < WSZ; i++)\n"
+"{\n"
+"costdiff += abs( left[0] - right[0] );\n"
+"left += cols;\n"
+"right += cols;\n"
+"}\n"
+"}\n"
+"else\n"
+"{\n"
+"#pragma unroll\n"
+"for (int i = 0; i < WSZ; i++)\n"
+"{\n"
+"costdiff += abs(left[i] - right[i]);\n"
+"}\n"
+"}\n"
+"cost += costdiff - costbuf[head];\n"
+"costbuf[head] = costdiff;\n"
+"*h = head + 1;\n"
+"return cost;\n"
+"}\n"
+"short calcCostInside(__global const uchar * leftptr, __global const uchar * rightptr, int x, int y,\n"
+"int cols, int d, short cost_up_left, short cost_up, short cost_left)\n"
+"{\n"
+"__global const uchar * left, * right;\n"
+"int idx = mad24(y - WSZ2 - 1, cols, x - WSZ2 - 1);\n"
+"left = leftptr + idx;\n"
+"right = rightptr + (idx - d);\n"
+"int idx2 = WSZ*cols;\n"
+"uchar corrner1 = abs(left[0] - right[0]),\n"
+"corrner2 = abs(left[WSZ] - right[WSZ]),\n"
+"corrner3 = abs(left[idx2] - right[idx2]),\n"
+"corrner4 = abs(left[idx2 + WSZ] - right[idx2 + WSZ]);\n"
+"return cost_up + cost_left - cost_up_left + corrner1 -\n"
+"corrner2 - corrner3 + corrner4;\n"
+"}\n"
+"__kernel void stereoBM(__global const uchar * leftptr,\n"
+"__global const uchar * rightptr,\n"
+"__global uchar * dispptr, int disp_step, int disp_offset,\n"
+"int rows, int cols,\n"
+"int textureTreshold, int uniquenessRatio)\n"
+"{\n"
+"int lz = get_local_id(0);\n"
+"int gx = get_global_id(1) * BLOCK_SIZE_X;\n"
+"int gy = get_global_id(2) * BLOCK_SIZE_Y;\n"
+"int nthread = lz / NUM_DISP;\n"
+"int disp_idx = lz % NUM_DISP;\n"
+"__global short * disp;\n"
+"__global const uchar * left, * right;\n"
+"__local short costFunc[2 * BLOCK_SIZE_Y * NUM_DISP];\n"
+"__local short * cost;\n"
+"__local int best_disp[2];\n"
+"__local int best_cost[2];\n"
+"best_cost[nthread] = MAX_VAL;\n"
+"best_disp[nthread] = -1;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"short costbuf[WSZ];\n"
+"int head = 0;\n"
+"int shiftX = WSZ2 + NUM_DISP + MIN_DISP - 1;\n"
+"int shiftY = WSZ2;\n"
+"int x = gx + shiftX, y = gy + shiftY, lx = 0, ly = 0;\n"
+"int costIdx = disp_idx * 2 * BLOCK_SIZE_Y + (BLOCK_SIZE_Y - 1);\n"
+"cost = costFunc + costIdx;\n"
+"int tempcost = 0;\n"
+"if (x < cols - WSZ2 - MIN_DISP && y < rows - WSZ2)\n"
+"{\n"
+"if (0 == nthread)\n"
+"{\n"
+"#pragma unroll\n"
+"for (int i = 0; i < WSZ; i++)\n"
+"{\n"
+"int idx = mad24(y - WSZ2, cols, x - WSZ2 + i);\n"
+"left = leftptr + idx;\n"
+"right = rightptr + (idx - disp_idx);\n"
+"short costdiff = 0;\n"
+"for(int j = 0; j < WSZ; j++)\n"
+"{\n"
+"costdiff += abs( left[0] - right[0] );\n"
+"left += cols;\n"
+"right += cols;\n"
+"}\n"
+"costbuf[i] = costdiff;\n"
+"}\n"
+"}\n"
+"else\n"
+"{\n"
+"#pragma unroll\n"
+"for (int i = 0; i < WSZ; i++)\n"
+"{\n"
+"int idx = mad24(y - WSZ2 + i, cols, x - WSZ2);\n"
+"left = leftptr + idx;\n"
+"right = rightptr + (idx - disp_idx);\n"
+"short costdiff = 0;\n"
+"for (int j = 0; j < WSZ; j++)\n"
+"{\n"
+"costdiff += abs( left[j] - right[j]);\n"
+"}\n"
+"tempcost += costdiff;\n"
+"costbuf[i] = costdiff;\n"
+"}\n"
+"}\n"
+"}\n"
+"if (nthread == 1)\n"
+"{\n"
+"cost[0] = tempcost;\n"
+"atomic_min(best_cost + 1, tempcost);\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (best_cost[1] == tempcost)\n"
+"atomic_max(best_disp + 1, disp_idx);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"int dispIdx = mad24(gy, disp_step, mad24((int)sizeof(short), gx, disp_offset));\n"
+"disp = (__global short *)(dispptr + dispIdx);\n"
+"calcDisp(cost, disp, uniquenessRatio, best_disp + 1, best_cost + 1, disp_idx, x, y, cols, rows);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"lx = 1 - nthread;\n"
+"ly = nthread;\n"
+"for (int i = 0; i < BLOCK_SIZE_Y * BLOCK_SIZE_X / 2; i++)\n"
+"{\n"
+"x = (lx < BLOCK_SIZE_X) ? gx + shiftX + lx : cols;\n"
+"y = (ly < BLOCK_SIZE_Y) ? gy + shiftY + ly : rows;\n"
+"best_cost[nthread] = MAX_VAL;\n"
+"best_disp[nthread] = -1;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"costIdx = mad24(2 * BLOCK_SIZE_Y, disp_idx, (BLOCK_SIZE_Y - 1 - ly + lx));\n"
+"if (0 > costIdx)\n"
+"costIdx = BLOCK_SIZE_Y - 1;\n"
+"cost = costFunc + costIdx;\n"
+"if (x < cols - WSZ2 - MIN_DISP && y < rows - WSZ2)\n"
+"{\n"
+"tempcost = (ly * (1 - nthread) + lx * nthread == 0) ?\n"
+"calcCostBorder(leftptr, rightptr, x, y, nthread, costbuf, &head, cols, disp_idx, cost[2*nthread-1]) :\n"
+"calcCostInside(leftptr, rightptr, x, y, cols, disp_idx, cost[0], cost[1], cost[-1]);\n"
+"}\n"
+"cost[0] = tempcost;\n"
+"atomic_min(best_cost + nthread, tempcost);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (best_cost[nthread] == tempcost)\n"
+"atomic_max(best_disp + nthread, disp_idx);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"dispIdx = mad24(gy + ly, disp_step, mad24((int)sizeof(short), (gx + lx), disp_offset));\n"
+"disp = (__global short *)(dispptr + dispIdx);\n"
+"calcDisp(cost, disp, uniquenessRatio, best_disp + nthread, best_cost + nthread, disp_idx, x, y, cols, rows);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (lx + nthread - 1 == ly)\n"
+"{\n"
+"lx = (lx + nthread + 1) * (1 - nthread);\n"
+"ly = (ly + 1) * nthread;\n"
+"}\n"
+"else\n"
+"{\n"
+"lx += nthread;\n"
+"ly = ly - nthread + 1;\n"
+"}\n"
+"}\n"
+"}\n"
+"#endif\n"
+"__kernel void prefilter_norm(__global unsigned char *input, __global unsigned char *output,\n"
+"int rows, int cols, int prefilterCap, int scale_g, int scale_s)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if(x < cols && y < rows)\n"
+"{\n"
+"int cov1 = input[ max(y-1, 0) * cols + x] * 1 +\n"
+"input[y * cols + max(x-1,0)] * 1 + input[ y * cols + x] * 4 + input[y * cols + min(x+1, cols-1)] * 1 +\n"
+"input[min(y+1, rows-1) * cols + x] * 1;\n"
+"int cov2 = 0;\n"
+"for(int i = -WSZ2; i < WSZ2+1; i++)\n"
+"for(int j = -WSZ2; j < WSZ2+1; j++)\n"
+"cov2 += input[clamp(y+i, 0, rows-1) * cols + clamp(x+j, 0, cols-1)];\n"
+"int res = (cov1*scale_g - cov2*scale_s)>>10;\n"
+"res = clamp(res, -prefilterCap, prefilterCap) + prefilterCap;\n"
+"output[y * cols + x] = res;\n"
+"}\n"
+"}\n"
+"__kernel void prefilter_xsobel(__global unsigned char *input, __global unsigned char *output,\n"
+"int rows, int cols, int prefilterCap)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if(x < cols && y < rows)\n"
+"{\n"
+"if (0 < x && !((y == rows-1) & (rows%2==1) ) )\n"
+"{\n"
+"int cov = input[ ((y > 0) ? y-1 : y+1) * cols + (x-1)] * (-1) + input[ ((y > 0) ? y-1 : y+1) * cols + ((x<cols-1) ? x+1 : x-1)] * (1) +\n"
+"input[ (y) * cols + (x-1)] * (-2) + input[ (y) * cols + ((x<cols-1) ? x+1 : x-1)] * (2) +\n"
+"input[((y<rows-1)?(y+1):(y-1))* cols + (x-1)] * (-1) + input[((y<rows-1)?(y+1):(y-1))* cols + ((x<cols-1) ? x+1 : x-1)] * (1);\n"
+"cov = clamp(cov, -prefilterCap, prefilterCap) + prefilterCap;\n"
+"output[y * cols + x] = cov;\n"
+"}\n"
+"else\n"
+"output[y * cols + x] = prefilterCap;\n"
+"}\n"
+"}\n"
+, "8ede5990f0c9582639e5bef29cfd6cf9"};
+ProgramSource stereobm_oclsrc(stereobm.programStr);
+}
+}}
diff --git a/modules/calib3d/opencl_kernels_calib3d.hpp b/modules/calib3d/opencl_kernels_calib3d.hpp
new file mode 100644
index 0000000..4392775
--- /dev/null
+++ b/modules/calib3d/opencl_kernels_calib3d.hpp
@@ -0,0 +1,17 @@
+// This file is auto-generated. Do not edit!
+
+#include "opencv2/core/ocl.hpp"
+#include "opencv2/core/ocl_genbase.hpp"
+#include "opencv2/core/opencl/ocl_defs.hpp"
+
+namespace cv
+{
+namespace ocl
+{
+namespace calib3d
+{
+
+extern const struct ProgramEntry stereobm;
+extern ProgramSource stereobm_oclsrc;
+}
+}}
diff --git a/modules/calib3d/precomp.hpp b/modules/calib3d/precomp.hpp
new file mode 100644
index 0000000..83a513d
--- /dev/null
+++ b/modules/calib3d/precomp.hpp
@@ -0,0 +1,120 @@
+/*M///////////////////////////////////////////////////////////////////////////////////////
+//
+// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+//
+// By downloading, copying, installing or using the software you agree to this license.
+// If you do not agree to this license, do not download, install,
+// copy or use the software.
+//
+//
+// License Agreement
+// For Open Source Computer Vision Library
+//
+// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
+// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// * Redistribution's of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// * Redistribution's in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// * The name of the copyright holders may not be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// This software is provided by the copyright holders and contributors "as is" and
+// any express or implied warranties, including, but not limited to, the implied
+// warranties of merchantability and fitness for a particular purpose are disclaimed.
+// In no event shall the Intel Corporation or contributors be liable for any direct,
+// indirect, incidental, special, exemplary, or consequential damages
+// (including, but not limited to, procurement of substitute goods or services;
+// loss of use, data, or profits; or business interruption) however caused
+// and on any theory of liability, whether in contract, strict liability,
+// or tort (including negligence or otherwise) arising in any way out of
+// the use of this software, even if advised of the possibility of such damage.
+//
+//M*/
+#ifndef __OPENCV_PRECOMP_H__
+#define __OPENCV_PRECOMP_H__
+
+#include "opencv2/calib3d.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/features2d.hpp"
+#include "opencv2/core/utility.hpp"
+
+#include "opencv2/core/private.hpp"
+
+#include "opencv2/core/ocl.hpp"
+
+#ifdef HAVE_TEGRA_OPTIMIZATION
+#include "opencv2/calib3d/calib3d_tegra.hpp"
+#else
+#define GET_OPTIMIZED(func) (func)
+#endif
+
+
+namespace cv
+{
+
+int RANSACUpdateNumIters( double p, double ep, int modelPoints, int maxIters );
+
+class CV_EXPORTS LMSolver : public Algorithm
+{
+public:
+ class CV_EXPORTS Callback
+ {
+ public:
+ virtual ~Callback() {}
+ virtual bool compute(InputArray param, OutputArray err, OutputArray J) const = 0;
+ };
+
+ virtual void setCallback(const Ptr<LMSolver::Callback>& cb) = 0;
+ virtual int run(InputOutputArray _param0) const = 0;
+};
+
+CV_EXPORTS Ptr<LMSolver> createLMSolver(const Ptr<LMSolver::Callback>& cb, int maxIters);
+
+class CV_EXPORTS PointSetRegistrator : public Algorithm
+{
+public:
+ class CV_EXPORTS Callback
+ {
+ public:
+ virtual ~Callback() {}
+ virtual int runKernel(InputArray m1, InputArray m2, OutputArray model) const = 0;
+ virtual void computeError(InputArray m1, InputArray m2, InputArray model, OutputArray err) const = 0;
+ virtual bool checkSubset(InputArray, InputArray, int) const { return true; }
+ };
+
+ virtual void setCallback(const Ptr<PointSetRegistrator::Callback>& cb) = 0;
+ virtual bool run(InputArray m1, InputArray m2, OutputArray model, OutputArray mask) const = 0;
+};
+
+CV_EXPORTS Ptr<PointSetRegistrator> createRANSACPointSetRegistrator(const Ptr<PointSetRegistrator::Callback>& cb,
+ int modelPoints, double threshold,
+ double confidence=0.99, int maxIters=1000 );
+
+CV_EXPORTS Ptr<PointSetRegistrator> createLMeDSPointSetRegistrator(const Ptr<PointSetRegistrator::Callback>& cb,
+ int modelPoints, double confidence=0.99, int maxIters=1000 );
+
+template<typename T> inline int compressElems( T* ptr, const uchar* mask, int mstep, int count )
+{
+ int i, j;
+ for( i = j = 0; i < count; i++ )
+ if( mask[i*mstep] )
+ {
+ if( i > j )
+ ptr[j] = ptr[i];
+ j++;
+ }
+ return j;
+}
+
+}
+
+#endif
diff --git a/modules/core/src/opencl_kernels_core.cpp b/modules/core/src/opencl_kernels_core.cpp
new file mode 100644
index 0000000..e5ae9aa
--- /dev/null
+++ b/modules/core/src/opencl_kernels_core.cpp
@@ -0,0 +1,3302 @@
+// This file is auto-generated. Do not edit!
+
+#include "precomp.hpp"
+#include "opencl_kernels_core.hpp"
+
+namespace cv
+{
+namespace ocl
+{
+namespace core
+{
+
+const struct ProgramEntry arithm={"arithm",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined cl_khr_fp64\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#ifdef INTEL_DEVICE\n"
+"#pragma OPENCL FP_CONTRACT ON\n"
+"#pragma OPENCL FP_FAST_FMAF ON\n"
+"#pragma OPENCL FP_FAST_FMA ON\n"
+"#endif\n"
+"#if depth <= 5\n"
+"#define CV_PI M_PI_F\n"
+"#else\n"
+"#define CV_PI M_PI\n"
+"#endif\n"
+"#ifndef cn\n"
+"#define cn 1\n"
+"#endif\n"
+"#if cn == 1\n"
+"#undef srcT1_C1\n"
+"#undef srcT2_C1\n"
+"#undef dstT_C1\n"
+"#define srcT1_C1 srcT1\n"
+"#define srcT2_C1 srcT2\n"
+"#define dstT_C1 dstT\n"
+"#endif\n"
+"#if cn != 3\n"
+"#define storedst(val) *(__global dstT *)(dstptr + dst_index) = val\n"
+"#define storedst2(val) *(__global dstT *)(dstptr2 + dst_index2) = val\n"
+"#else\n"
+"#define storedst(val) vstore3(val, 0, (__global dstT_C1 *)(dstptr + dst_index))\n"
+"#define storedst2(val) vstore3(val, 0, (__global dstT_C1 *)(dstptr2 + dst_index2))\n"
+"#endif\n"
+"#define noconvert\n"
+"#ifndef workT\n"
+"#ifndef srcT1\n"
+"#define srcT1 dstT\n"
+"#endif\n"
+"#ifndef srcT1_C1\n"
+"#define srcT1_C1 dstT_C1\n"
+"#endif\n"
+"#ifndef srcT2\n"
+"#define srcT2 dstT\n"
+"#endif\n"
+"#ifndef srcT2_C1\n"
+"#define srcT2_C1 dstT_C1\n"
+"#endif\n"
+"#define workT dstT\n"
+"#if cn != 3\n"
+"#define srcelem1 *(__global srcT1 *)(srcptr1 + src1_index)\n"
+"#define srcelem2 *(__global srcT2 *)(srcptr2 + src2_index)\n"
+"#else\n"
+"#define srcelem1 vload3(0, (__global srcT1_C1 *)(srcptr1 + src1_index))\n"
+"#define srcelem2 vload3(0, (__global srcT2_C1 *)(srcptr2 + src2_index))\n"
+"#endif\n"
+"#ifndef convertToDT\n"
+"#define convertToDT noconvert\n"
+"#endif\n"
+"#else\n"
+"#ifndef convertToWT2\n"
+"#define convertToWT2 convertToWT1\n"
+"#endif\n"
+"#if cn != 3\n"
+"#define srcelem1 convertToWT1(*(__global srcT1 *)(srcptr1 + src1_index))\n"
+"#define srcelem2 convertToWT2(*(__global srcT2 *)(srcptr2 + src2_index))\n"
+"#else\n"
+"#define srcelem1 convertToWT1(vload3(0, (__global srcT1_C1 *)(srcptr1 + src1_index)))\n"
+"#define srcelem2 convertToWT2(vload3(0, (__global srcT2_C1 *)(srcptr2 + src2_index)))\n"
+"#endif\n"
+"#endif\n"
+"#ifndef workST\n"
+"#define workST workT\n"
+"#endif\n"
+"#define EXTRA_PARAMS\n"
+"#define EXTRA_INDEX\n"
+"#define EXTRA_INDEX_ADD\n"
+"#if defined OP_ADD\n"
+"#define PROCESS_ELEM storedst(convertToDT(srcelem1 + srcelem2))\n"
+"#elif defined OP_SUB\n"
+"#define PROCESS_ELEM storedst(convertToDT(srcelem1 - srcelem2))\n"
+"#elif defined OP_RSUB\n"
+"#define PROCESS_ELEM storedst(convertToDT(srcelem2 - srcelem1))\n"
+"#elif defined OP_ABSDIFF\n"
+"#if wdepth <= 4\n"
+"#define PROCESS_ELEM \\\n"
+"storedst(convertToDT(convertFromU(abs_diff(srcelem1, srcelem2))))\n"
+"#else\n"
+"#define PROCESS_ELEM \\\n"
+"storedst(convertToDT(fabs(srcelem1 - srcelem2)))\n"
+"#endif\n"
+"#elif defined OP_AND\n"
+"#define PROCESS_ELEM storedst(srcelem1 & srcelem2)\n"
+"#elif defined OP_OR\n"
+"#define PROCESS_ELEM storedst(srcelem1 | srcelem2)\n"
+"#elif defined OP_XOR\n"
+"#define PROCESS_ELEM storedst(srcelem1 ^ srcelem2)\n"
+"#elif defined OP_NOT\n"
+"#define PROCESS_ELEM storedst(~srcelem1)\n"
+"#elif defined OP_MIN\n"
+"#define PROCESS_ELEM storedst(min(srcelem1, srcelem2))\n"
+"#elif defined OP_MAX\n"
+"#define PROCESS_ELEM storedst(max(srcelem1, srcelem2))\n"
+"#elif defined OP_MUL\n"
+"#define PROCESS_ELEM storedst(convertToDT(srcelem1 * srcelem2))\n"
+"#elif defined OP_MUL_SCALE\n"
+"#undef EXTRA_PARAMS\n"
+"#ifdef UNARY_OP\n"
+"#define EXTRA_PARAMS , workST srcelem2_, scaleT scale\n"
+"#undef srcelem2\n"
+"#define srcelem2 srcelem2_\n"
+"#else\n"
+"#define EXTRA_PARAMS , scaleT scale\n"
+"#endif\n"
+"#define PROCESS_ELEM storedst(convertToDT(srcelem1 * scale * srcelem2))\n"
+"#elif defined OP_DIV\n"
+"#define PROCESS_ELEM \\\n"
+"workT e2 = srcelem2, zero = (workT)(0); \\\n"
+"storedst(convertToDT(e2 != zero ? srcelem1 / e2 : zero))\n"
+"#elif defined OP_DIV_SCALE\n"
+"#undef EXTRA_PARAMS\n"
+"#ifdef UNARY_OP\n"
+"#define EXTRA_PARAMS , workST srcelem2_, scaleT scale\n"
+"#undef srcelem2\n"
+"#define srcelem2 srcelem2_\n"
+"#else\n"
+"#define EXTRA_PARAMS , scaleT scale\n"
+"#endif\n"
+"#define PROCESS_ELEM \\\n"
+"workT e2 = srcelem2, zero = (workT)(0); \\\n"
+"storedst(convertToDT(e2 == zero ? zero : (srcelem1 * (workT)(scale) / e2)))\n"
+"#elif defined OP_RDIV_SCALE\n"
+"#undef EXTRA_PARAMS\n"
+"#ifdef UNARY_OP\n"
+"#define EXTRA_PARAMS , workST srcelem2_, scaleT scale\n"
+"#undef srcelem2\n"
+"#define srcelem2 srcelem2_\n"
+"#else\n"
+"#define EXTRA_PARAMS , scaleT scale\n"
+"#endif\n"
+"#define PROCESS_ELEM \\\n"
+"workT e1 = srcelem1, zero = (workT)(0); \\\n"
+"storedst(convertToDT(e1 == zero ? zero : (srcelem2 * (workT)(scale) / e1)))\n"
+"#elif defined OP_RECIP_SCALE\n"
+"#undef EXTRA_PARAMS\n"
+"#define EXTRA_PARAMS , scaleT scale\n"
+"#define PROCESS_ELEM \\\n"
+"workT e1 = srcelem1, zero = (workT)(0); \\\n"
+"storedst(convertToDT(e1 != zero ? scale / e1 : zero))\n"
+"#elif defined OP_ADDW\n"
+"#undef EXTRA_PARAMS\n"
+"#define EXTRA_PARAMS , scaleT alpha, scaleT beta, scaleT gamma\n"
+"#if wdepth <= 4\n"
+"#define PROCESS_ELEM storedst(convertToDT(mad24(srcelem1, alpha, mad24(srcelem2, beta, gamma))))\n"
+"#else\n"
+"#define PROCESS_ELEM storedst(convertToDT(fma(srcelem1, alpha, fma(srcelem2, beta, gamma))))\n"
+"#endif\n"
+"#elif defined OP_MAG\n"
+"#define PROCESS_ELEM storedst(hypot(srcelem1, srcelem2))\n"
+"#elif defined OP_PHASE_RADIANS\n"
+"#define PROCESS_ELEM \\\n"
+"workT tmp = atan2(srcelem2, srcelem1); \\\n"
+"if (tmp < 0) \\\n"
+"tmp += 2 * CV_PI; \\\n"
+"storedst(tmp)\n"
+"#elif defined OP_PHASE_DEGREES\n"
+"#define PROCESS_ELEM \\\n"
+"workT tmp = degrees(atan2(srcelem2, srcelem1)); \\\n"
+"if (tmp < 0) \\\n"
+"tmp += 360; \\\n"
+"storedst(tmp)\n"
+"#elif defined OP_EXP\n"
+"#if wdepth == 5\n"
+"#define PROCESS_ELEM storedst(native_exp(srcelem1))\n"
+"#else\n"
+"#define PROCESS_ELEM storedst(exp(srcelem1))\n"
+"#endif\n"
+"#elif defined OP_POW\n"
+"#define PROCESS_ELEM storedst(pow(srcelem1, srcelem2))\n"
+"#elif defined OP_POWN\n"
+"#undef workT\n"
+"#define workT int\n"
+"#define PROCESS_ELEM storedst(pown(srcelem1, srcelem2))\n"
+"#elif defined OP_SQRT\n"
+"#if depth <= 5\n"
+"#define PROCESS_ELEM storedst(native_sqrt(srcelem1))\n"
+"#else\n"
+"#define PROCESS_ELEM storedst(sqrt(srcelem1))\n"
+"#endif\n"
+"#elif defined OP_LOG\n"
+"#define PROCESS_ELEM \\\n"
+"storedst(log(fabs(srcelem1)))\n"
+"#elif defined OP_CMP\n"
+"#define srcT2 srcT1\n"
+"#ifndef convertToWT1\n"
+"#define convertToWT1\n"
+"#endif\n"
+"#define PROCESS_ELEM \\\n"
+"storedst(srcelem1 CMP_OPERATOR srcelem2 ? (dstT)(255) : (dstT)(0))\n"
+"#elif defined OP_CONVERT_SCALE_ABS\n"
+"#undef EXTRA_PARAMS\n"
+"#define EXTRA_PARAMS , workT1 alpha, workT1 beta\n"
+"#if wdepth <= 4\n"
+"#define PROCESS_ELEM \\\n"
+"workT value = mad24(srcelem1, (workT)(alpha), (workT)(beta)); \\\n"
+"storedst(convertToDT(abs(value)))\n"
+"#else\n"
+"#define PROCESS_ELEM \\\n"
+"workT value = fma(srcelem1, (workT)(alpha), (workT)(beta)); \\\n"
+"storedst(convertToDT(fabs(value)))\n"
+"#endif\n"
+"#elif defined OP_SCALE_ADD\n"
+"#undef EXTRA_PARAMS\n"
+"#define EXTRA_PARAMS , workT1 alpha\n"
+"#if wdepth <= 4\n"
+"#define PROCESS_ELEM storedst(convertToDT(mad24(srcelem1, (workT)(alpha), srcelem2)))\n"
+"#else\n"
+"#define PROCESS_ELEM storedst(convertToDT(fma(srcelem1, (workT)(alpha), srcelem2)))\n"
+"#endif\n"
+"#elif defined OP_CTP_AD || defined OP_CTP_AR\n"
+"#if depth <= 5\n"
+"#define CV_EPSILON FLT_EPSILON\n"
+"#else\n"
+"#define CV_EPSILON DBL_EPSILON\n"
+"#endif\n"
+"#ifdef OP_CTP_AD\n"
+"#define TO_DEGREE cartToPolar = degrees(cartToPolar);\n"
+"#elif defined OP_CTP_AR\n"
+"#define TO_DEGREE\n"
+"#endif\n"
+"#define PROCESS_ELEM \\\n"
+"dstT x = srcelem1, y = srcelem2; \\\n"
+"dstT x2 = x * x, y2 = y * y; \\\n"
+"dstT magnitude = sqrt(x2 + y2); \\\n"
+"dstT tmp = y >= 0 ? 0 : CV_PI * 2; \\\n"
+"tmp = x < 0 ? CV_PI : tmp; \\\n"
+"dstT tmp1 = y >= 0 ? CV_PI * 0.5f : CV_PI * 1.5f; \\\n"
+"dstT cartToPolar = y2 <= x2 ? x * y / mad((dstT)(0.28f), y2, x2 + CV_EPSILON) + tmp : (tmp1 - x * y / mad((dstT)(0.28f), x2, y2 + CV_EPSILON)); \\\n"
+"TO_DEGREE \\\n"
+"storedst(magnitude); \\\n"
+"storedst2(cartToPolar)\n"
+"#elif defined OP_PTC_AD || defined OP_PTC_AR\n"
+"#ifdef OP_PTC_AD\n"
+"#define FROM_DEGREE y = radians(y)\n"
+"#else\n"
+"#define FROM_DEGREE\n"
+"#endif\n"
+"#define PROCESS_ELEM \\\n"
+"dstT x = srcelem1, y = srcelem2, cosval; \\\n"
+"FROM_DEGREE; \\\n"
+"storedst2(sincos(y, &cosval) * x); \\\n"
+"storedst(cosval * x);\n"
+"#elif defined OP_PATCH_NANS\n"
+"#undef EXTRA_PARAMS\n"
+"#define EXTRA_PARAMS , dstT val\n"
+"#define PROCESS_ELEM \\\n"
+"if (isnan(srcelem1)) \\\n"
+"storedst(val)\n"
+"#else\n"
+"#error \"unknown op type\"\n"
+"#endif\n"
+"#if defined OP_CTP_AD || defined OP_CTP_AR || defined OP_PTC_AD || defined OP_PTC_AR\n"
+"#undef EXTRA_PARAMS\n"
+"#define EXTRA_PARAMS , __global uchar* dstptr2, int dststep2, int dstoffset2\n"
+"#undef EXTRA_INDEX\n"
+"#define EXTRA_INDEX int dst_index2 = mad24(y0, dststep2, mad24(x, (int)sizeof(dstT_C1) * cn, dstoffset2))\n"
+"#undef EXTRA_INDEX_ADD\n"
+"#define EXTRA_INDEX_ADD dst_index2 += dststep2\n"
+"#endif\n"
+"#if defined UNARY_OP || defined MASK_UNARY_OP\n"
+"#if defined OP_AND || defined OP_OR || defined OP_XOR || defined OP_ADD || defined OP_SAT_ADD || \\\n"
+"defined OP_SUB || defined OP_SAT_SUB || defined OP_RSUB || defined OP_SAT_RSUB || \\\n"
+"defined OP_ABSDIFF || defined OP_CMP || defined OP_MIN || defined OP_MAX || defined OP_POW || \\\n"
+"defined OP_MUL || defined OP_DIV || defined OP_POWN || defined OP_POWR || defined OP_ROOTN\n"
+"#undef EXTRA_PARAMS\n"
+"#define EXTRA_PARAMS , workST srcelem2_\n"
+"#undef srcelem2\n"
+"#define srcelem2 srcelem2_\n"
+"#endif\n"
+"#if cn == 3\n"
+"#undef srcelem2\n"
+"#define srcelem2 (workT)(srcelem2_.x, srcelem2_.y, srcelem2_.z)\n"
+"#endif\n"
+"#endif\n"
+"#if defined BINARY_OP\n"
+"__kernel void KF(__global const uchar * srcptr1, int srcstep1, int srcoffset1,\n"
+"__global const uchar * srcptr2, int srcstep2, int srcoffset2,\n"
+"__global uchar * dstptr, int dststep, int dstoffset,\n"
+"int rows, int cols EXTRA_PARAMS )\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1) * rowsPerWI;\n"
+"if (x < cols)\n"
+"{\n"
+"int src1_index = mad24(y0, srcstep1, mad24(x, (int)sizeof(srcT1_C1) * cn, srcoffset1));\n"
+"#if !(defined(OP_RECIP_SCALE) || defined(OP_NOT))\n"
+"int src2_index = mad24(y0, srcstep2, mad24(x, (int)sizeof(srcT2_C1) * cn, srcoffset2));\n"
+"#endif\n"
+"int dst_index = mad24(y0, dststep, mad24(x, (int)sizeof(dstT_C1) * cn, dstoffset));\n"
+"EXTRA_INDEX;\n"
+"for (int y = y0, y1 = min(rows, y0 + rowsPerWI); y < y1; ++y, src1_index += srcstep1, dst_index += dststep)\n"
+"{\n"
+"PROCESS_ELEM;\n"
+"#if !(defined(OP_RECIP_SCALE) || defined(OP_NOT))\n"
+"src2_index += srcstep2;\n"
+"#endif\n"
+"EXTRA_INDEX_ADD;\n"
+"}\n"
+"}\n"
+"}\n"
+"#elif defined MASK_BINARY_OP\n"
+"__kernel void KF(__global const uchar * srcptr1, int srcstep1, int srcoffset1,\n"
+"__global const uchar * srcptr2, int srcstep2, int srcoffset2,\n"
+"__global const uchar * mask, int maskstep, int maskoffset,\n"
+"__global uchar * dstptr, int dststep, int dstoffset,\n"
+"int rows, int cols EXTRA_PARAMS )\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1) * rowsPerWI;\n"
+"if (x < cols)\n"
+"{\n"
+"int mask_index = mad24(y0, maskstep, x + maskoffset);\n"
+"int src1_index = mad24(y0, srcstep1, mad24(x, (int)sizeof(srcT1_C1) * cn, srcoffset1));\n"
+"int src2_index = mad24(y0, srcstep2, mad24(x, (int)sizeof(srcT2_C1) * cn, srcoffset2));\n"
+"int dst_index = mad24(y0, dststep, mad24(x, (int)sizeof(dstT_C1) * cn, dstoffset));\n"
+"for (int y = y0, y1 = min(rows, y0 + rowsPerWI); y < y1; ++y, src1_index += srcstep1, src2_index += srcstep2,\n"
+"mask_index += maskstep, dst_index += dststep)\n"
+"if (mask[mask_index])\n"
+"{\n"
+"PROCESS_ELEM;\n"
+"}\n"
+"}\n"
+"}\n"
+"#elif defined UNARY_OP\n"
+"__kernel void KF(__global const uchar * srcptr1, int srcstep1, int srcoffset1,\n"
+"__global uchar * dstptr, int dststep, int dstoffset,\n"
+"int rows, int cols EXTRA_PARAMS )\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1) * rowsPerWI;\n"
+"if (x < cols)\n"
+"{\n"
+"int src1_index = mad24(y0, srcstep1, mad24(x, (int)sizeof(srcT1_C1) * cn, srcoffset1));\n"
+"int dst_index = mad24(y0, dststep, mad24(x, (int)sizeof(dstT_C1) * cn, dstoffset));\n"
+"for (int y = y0, y1 = min(rows, y0 + rowsPerWI); y < y1; ++y, src1_index += srcstep1, dst_index += dststep)\n"
+"{\n"
+"PROCESS_ELEM;\n"
+"}\n"
+"}\n"
+"}\n"
+"#elif defined MASK_UNARY_OP\n"
+"__kernel void KF(__global const uchar * srcptr1, int srcstep1, int srcoffset1,\n"
+"__global const uchar * mask, int maskstep, int maskoffset,\n"
+"__global uchar * dstptr, int dststep, int dstoffset,\n"
+"int rows, int cols EXTRA_PARAMS )\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1) * rowsPerWI;\n"
+"if (x < cols)\n"
+"{\n"
+"int mask_index = mad24(y0, maskstep, x + maskoffset);\n"
+"int src1_index = mad24(y0, srcstep1, mad24(x, (int)sizeof(srcT1_C1) * cn, srcoffset1));\n"
+"int dst_index = mad24(y0, dststep, mad24(x, (int)sizeof(dstT_C1) * cn, dstoffset));\n"
+"for (int y = y0, y1 = min(rows, y0 + rowsPerWI); y < y1; ++y, src1_index += srcstep1, mask_index += maskstep, dst_index += dststep)\n"
+"if (mask[mask_index])\n"
+"{\n"
+"PROCESS_ELEM;\n"
+"}\n"
+"}\n"
+"}\n"
+"#else\n"
+"#error \"Unknown operation type\"\n"
+"#endif\n"
+, "ed0d3325149acdde26581a72052260a5"};
+ProgramSource arithm_oclsrc(arithm.programStr);
+const struct ProgramEntry convert={"convert",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#define noconvert\n"
+"__kernel void convertTo(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"WT alpha, WT beta, int rowsPerWI)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1) * rowsPerWI;\n"
+"if (x < dst_cols)\n"
+"{\n"
+"int src_index = mad24(y0, src_step, mad24(x, (int)sizeof(srcT), src_offset));\n"
+"int dst_index = mad24(y0, dst_step, mad24(x, (int)sizeof(dstT), dst_offset));\n"
+"for (int y = y0, y1 = min(dst_rows, y0 + rowsPerWI); y < y1; ++y, src_index += src_step, dst_index += dst_step)\n"
+"{\n"
+"__global const srcT * src = (__global const srcT *)(srcptr + src_index);\n"
+"__global dstT * dst = (__global dstT *)(dstptr + dst_index);\n"
+"dst[0] = convertToDT(fma(convertToWT(src[0]), alpha, beta));\n"
+"}\n"
+"}\n"
+"}\n"
+, "04c460dd0be049cd132d4c4611c93a5b"};
+ProgramSource convert_oclsrc(convert.programStr);
+const struct ProgramEntry copymakeborder={"copymakeborder",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const T*)(addr)\n"
+"#define storepix(val, addr) *(__global T*)(addr) = val\n"
+"#define TSIZE ((int)sizeof(T))\n"
+"#define convertScalar(a) (a)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const T1*)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global T1*)(addr))\n"
+"#define TSIZE ((int)sizeof(T1)*3)\n"
+"#define convertScalar(a) (T)(a.x, a.y, a.z)\n"
+"#endif\n"
+"#ifdef BORDER_CONSTANT\n"
+"#define EXTRAPOLATE(x, cols) \\\n"
+";\n"
+"#elif defined BORDER_REPLICATE\n"
+"#define EXTRAPOLATE(x, cols) \\\n"
+"x = clamp(x, 0, cols - 1);\n"
+"#elif defined BORDER_WRAP\n"
+"#define EXTRAPOLATE(x, cols) \\\n"
+"{ \\\n"
+"if (x < 0) \\\n"
+"x -= ((x - cols + 1) / cols) * cols; \\\n"
+"if (x >= cols) \\\n"
+"x %= cols; \\\n"
+"}\n"
+"#elif defined(BORDER_REFLECT) || defined(BORDER_REFLECT_101)\n"
+"#ifdef BORDER_REFLECT\n"
+"#define DELTA int delta = 0\n"
+"#else\n"
+"#define DELTA int delta = 1\n"
+"#endif\n"
+"#define EXTRAPOLATE(x, cols) \\\n"
+"{ \\\n"
+"DELTA; \\\n"
+"if (cols == 1) \\\n"
+"x = 0; \\\n"
+"else \\\n"
+"do \\\n"
+"{ \\\n"
+"if( x < 0 ) \\\n"
+"x = -x - 1 + delta; \\\n"
+"else \\\n"
+"x = cols - 1 - (x - cols) - delta; \\\n"
+"} \\\n"
+"while (x >= cols || x < 0); \\\n"
+"}\n"
+"#else\n"
+"#error \"No extrapolation method\"\n"
+"#endif\n"
+"#define NEED_EXTRAPOLATION(x, cols) (x >= cols || x < 0)\n"
+"__kernel void copyMakeBorder(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"int top, int left, ST nVal)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1) * rowsPerWI;\n"
+"#ifdef BORDER_CONSTANT\n"
+"T scalar = convertScalar(nVal);\n"
+"#endif\n"
+"if (x < dst_cols)\n"
+"{\n"
+"int src_x = x - left, src_y;\n"
+"int dst_index = mad24(y0, dst_step, mad24(x, (int)TSIZE, dst_offset));\n"
+"if (NEED_EXTRAPOLATION(src_x, src_cols))\n"
+"{\n"
+"#ifdef BORDER_CONSTANT\n"
+"for (int y = y0, y1 = min(y0 + rowsPerWI, dst_rows); y < y1; ++y, dst_index += dst_step)\n"
+"storepix(scalar, dstptr + dst_index);\n"
+"return;\n"
+"#endif\n"
+"EXTRAPOLATE(src_x, src_cols)\n"
+"}\n"
+"src_x = mad24(src_x, TSIZE, src_offset);\n"
+"for (int y = y0, y1 = min(y0 + rowsPerWI, dst_rows); y < y1; ++y, dst_index += dst_step)\n"
+"{\n"
+"src_y = y - top;\n"
+"if (NEED_EXTRAPOLATION(src_y, src_rows))\n"
+"{\n"
+"EXTRAPOLATE(src_y, src_rows)\n"
+"#ifdef BORDER_CONSTANT\n"
+"storepix(scalar, dstptr + dst_index);\n"
+"continue;\n"
+"#endif\n"
+"}\n"
+"int src_index = mad24(src_y, src_step, src_x);\n"
+"storepix(loadpix(srcptr + src_index), dstptr + dst_index);\n"
+"}\n"
+"}\n"
+"}\n"
+, "64f03714b8763ec6c2ac2f4b2ad0cf5d"};
+ProgramSource copymakeborder_oclsrc(copymakeborder.programStr);
+const struct ProgramEntry copyset={"copyset",
+"#ifdef COPY_TO_MASK\n"
+"#define DEFINE_DATA \\\n"
+"int src_index = mad24(y, src_step, mad24(x, (int)sizeof(T1) * scn, src_offset)); \\\n"
+"int dst_index = mad24(y, dst_step, mad24(x, (int)sizeof(T1) * scn, dst_offset)); \\\n"
+"\\\n"
+"__global const T1 * src = (__global const T1 *)(srcptr + src_index); \\\n"
+"__global T1 * dst = (__global T1 *)(dstptr + dst_index)\n"
+"__kernel void copyToMask(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global const uchar * mask, int mask_step, int mask_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset,\n"
+"int dst_rows, int dst_cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (x < dst_cols && y < dst_rows)\n"
+"{\n"
+"mask += mad24(y, mask_step, mad24(x, mcn, mask_offset));\n"
+"#if mcn == 1\n"
+"if (mask[0])\n"
+"{\n"
+"DEFINE_DATA;\n"
+"#pragma unroll\n"
+"for (int c = 0; c < scn; ++c)\n"
+"dst[c] = src[c];\n"
+"}\n"
+"#ifdef HAVE_DST_UNINIT\n"
+"else\n"
+"{\n"
+"DEFINE_DATA;\n"
+"#pragma unroll\n"
+"for (int c = 0; c < scn; ++c)\n"
+"dst[c] = (T1)(0);\n"
+"}\n"
+"#endif\n"
+"#elif scn == mcn\n"
+"DEFINE_DATA;\n"
+"#pragma unroll\n"
+"for (int c = 0; c < scn; ++c)\n"
+"if (mask[c])\n"
+"dst[c] = src[c];\n"
+"#ifdef HAVE_DST_UNINIT\n"
+"else\n"
+"dst[c] = (T1)(0);\n"
+"#endif\n"
+"#else\n"
+"#error \"(mcn == 1 || mcn == scn) should be true\"\n"
+"#endif\n"
+"}\n"
+"}\n"
+"#else\n"
+"#ifndef dstST\n"
+"#define dstST dstT\n"
+"#endif\n"
+"#if cn != 3\n"
+"#define value value_\n"
+"#define storedst(val) *(__global dstT *)(dstptr + dst_index) = val\n"
+"#else\n"
+"#define value (dstT)(value_.x, value_.y, value_.z)\n"
+"#define storedst(val) vstore3(val, 0, (__global dstT1 *)(dstptr + dst_index))\n"
+"#endif\n"
+"__kernel void setMask(__global const uchar* mask, int maskstep, int maskoffset,\n"
+"__global uchar* dstptr, int dststep, int dstoffset,\n"
+"int rows, int cols, dstST value_)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1) * rowsPerWI;\n"
+"if (x < cols)\n"
+"{\n"
+"int mask_index = mad24(y0, maskstep, x + maskoffset);\n"
+"int dst_index = mad24(y0, dststep, mad24(x, (int)sizeof(dstT1) * cn, dstoffset));\n"
+"for (int y = y0, y1 = min(rows, y0 + rowsPerWI); y < y1; ++y)\n"
+"{\n"
+"if( mask[mask_index] )\n"
+"storedst(value);\n"
+"mask_index += maskstep;\n"
+"dst_index += dststep;\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void set(__global uchar* dstptr, int dststep, int dstoffset,\n"
+"int rows, int cols, dstST value_)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1) * rowsPerWI;\n"
+"if (x < cols)\n"
+"{\n"
+"int dst_index = mad24(y0, dststep, mad24(x, (int)sizeof(dstT1) * cn, dstoffset));\n"
+"for (int y = y0, y1 = min(rows, y0 + rowsPerWI); y < y1; ++y, dst_index += dststep)\n"
+"storedst(value);\n"
+"}\n"
+"}\n"
+"#endif\n"
+, "f8f028f1776dc5c98bf03411d3b72318"};
+ProgramSource copyset_oclsrc(copyset.programStr);
+const struct ProgramEntry fft={"fft",
+"#define SQRT_2 0.707106781188f\n"
+"#define sin_120 0.866025403784f\n"
+"#define fft5_2 0.559016994374f\n"
+"#define fft5_3 -0.951056516295f\n"
+"#define fft5_4 -1.538841768587f\n"
+"#define fft5_5 0.363271264002f\n"
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"__attribute__((always_inline))\n"
+"CT mul_complex(CT a, CT b) {\n"
+"return (CT)(fma(a.x, b.x, -a.y * b.y), fma(a.x, b.y, a.y * b.x));\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"CT twiddle(CT a) {\n"
+"return (CT)(a.y, -a.x);\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void butterfly2(CT a0, CT a1, __local CT* smem, __global const CT* twiddles,\n"
+"const int x, const int block_size)\n"
+"{\n"
+"const int k = x & (block_size - 1);\n"
+"a1 = mul_complex(twiddles[k], a1);\n"
+"const int dst_ind = (x << 1) - k;\n"
+"smem[dst_ind] = a0 + a1;\n"
+"smem[dst_ind+block_size] = a0 - a1;\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void butterfly4(CT a0, CT a1, CT a2, CT a3, __local CT* smem, __global const CT* twiddles,\n"
+"const int x, const int block_size)\n"
+"{\n"
+"const int k = x & (block_size - 1);\n"
+"a1 = mul_complex(twiddles[k], a1);\n"
+"a2 = mul_complex(twiddles[k + block_size], a2);\n"
+"a3 = mul_complex(twiddles[k + 2*block_size], a3);\n"
+"const int dst_ind = ((x - k) << 2) + k;\n"
+"CT b0 = a0 + a2;\n"
+"a2 = a0 - a2;\n"
+"CT b1 = a1 + a3;\n"
+"a3 = twiddle(a1 - a3);\n"
+"smem[dst_ind] = b0 + b1;\n"
+"smem[dst_ind + block_size] = a2 + a3;\n"
+"smem[dst_ind + 2*block_size] = b0 - b1;\n"
+"smem[dst_ind + 3*block_size] = a2 - a3;\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void butterfly3(CT a0, CT a1, CT a2, __local CT* smem, __global const CT* twiddles,\n"
+"const int x, const int block_size)\n"
+"{\n"
+"const int k = x % block_size;\n"
+"a1 = mul_complex(twiddles[k], a1);\n"
+"a2 = mul_complex(twiddles[k+block_size], a2);\n"
+"const int dst_ind = ((x - k) * 3) + k;\n"
+"CT b1 = a1 + a2;\n"
+"a2 = twiddle(sin_120*(a1 - a2));\n"
+"CT b0 = a0 - (CT)(0.5f)*b1;\n"
+"smem[dst_ind] = a0 + b1;\n"
+"smem[dst_ind + block_size] = b0 + a2;\n"
+"smem[dst_ind + 2*block_size] = b0 - a2;\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void butterfly5(CT a0, CT a1, CT a2, CT a3, CT a4, __local CT* smem, __global const CT* twiddles,\n"
+"const int x, const int block_size)\n"
+"{\n"
+"const int k = x % block_size;\n"
+"a1 = mul_complex(twiddles[k], a1);\n"
+"a2 = mul_complex(twiddles[k + block_size], a2);\n"
+"a3 = mul_complex(twiddles[k+2*block_size], a3);\n"
+"a4 = mul_complex(twiddles[k+3*block_size], a4);\n"
+"const int dst_ind = ((x - k) * 5) + k;\n"
+"__local CT* dst = smem + dst_ind;\n"
+"CT b0, b1, b5;\n"
+"b1 = a1 + a4;\n"
+"a1 -= a4;\n"
+"a4 = a3 + a2;\n"
+"a3 -= a2;\n"
+"a2 = b1 + a4;\n"
+"b0 = a0 - (CT)0.25f * a2;\n"
+"b1 = fft5_2 * (b1 - a4);\n"
+"a4 = fft5_3 * (CT)(-a1.y - a3.y, a1.x + a3.x);\n"
+"b5 = (CT)(a4.x - fft5_5 * a1.y, a4.y + fft5_5 * a1.x);\n"
+"a4.x += fft5_4 * a3.y;\n"
+"a4.y -= fft5_4 * a3.x;\n"
+"a1 = b0 + b1;\n"
+"b0 -= b1;\n"
+"dst[0] = a0 + a2;\n"
+"dst[block_size] = a1 + a4;\n"
+"dst[2 * block_size] = b0 + b5;\n"
+"dst[3 * block_size] = b0 - b5;\n"
+"dst[4 * block_size] = a1 - a4;\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void fft_radix2(__local CT* smem, __global const CT* twiddles, const int x, const int block_size, const int t)\n"
+"{\n"
+"CT a0, a1;\n"
+"if (x < t)\n"
+"{\n"
+"a0 = smem[x];\n"
+"a1 = smem[x+t];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x < t)\n"
+"butterfly2(a0, a1, smem, twiddles, x, block_size);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void fft_radix2_B2(__local CT* smem, __global const CT* twiddles, const int x1, const int block_size, const int t)\n"
+"{\n"
+"const int x2 = x1 + t/2;\n"
+"CT a0, a1, a2, a3;\n"
+"if (x1 < t/2)\n"
+"{\n"
+"a0 = smem[x1]; a1 = smem[x1+t];\n"
+"a2 = smem[x2]; a3 = smem[x2+t];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x1 < t/2)\n"
+"{\n"
+"butterfly2(a0, a1, smem, twiddles, x1, block_size);\n"
+"butterfly2(a2, a3, smem, twiddles, x2, block_size);\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void fft_radix2_B3(__local CT* smem, __global const CT* twiddles, const int x1, const int block_size, const int t)\n"
+"{\n"
+"const int x2 = x1 + t/3;\n"
+"const int x3 = x1 + 2*t/3;\n"
+"CT a0, a1, a2, a3, a4, a5;\n"
+"if (x1 < t/3)\n"
+"{\n"
+"a0 = smem[x1]; a1 = smem[x1+t];\n"
+"a2 = smem[x2]; a3 = smem[x2+t];\n"
+"a4 = smem[x3]; a5 = smem[x3+t];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x1 < t/3)\n"
+"{\n"
+"butterfly2(a0, a1, smem, twiddles, x1, block_size);\n"
+"butterfly2(a2, a3, smem, twiddles, x2, block_size);\n"
+"butterfly2(a4, a5, smem, twiddles, x3, block_size);\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void fft_radix2_B4(__local CT* smem, __global const CT* twiddles, const int x1, const int block_size, const int t)\n"
+"{\n"
+"const int thread_block = t/4;\n"
+"const int x2 = x1 + thread_block;\n"
+"const int x3 = x1 + 2*thread_block;\n"
+"const int x4 = x1 + 3*thread_block;\n"
+"CT a0, a1, a2, a3, a4, a5, a6, a7;\n"
+"if (x1 < t/4)\n"
+"{\n"
+"a0 = smem[x1]; a1 = smem[x1+t];\n"
+"a2 = smem[x2]; a3 = smem[x2+t];\n"
+"a4 = smem[x3]; a5 = smem[x3+t];\n"
+"a6 = smem[x4]; a7 = smem[x4+t];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x1 < t/4)\n"
+"{\n"
+"butterfly2(a0, a1, smem, twiddles, x1, block_size);\n"
+"butterfly2(a2, a3, smem, twiddles, x2, block_size);\n"
+"butterfly2(a4, a5, smem, twiddles, x3, block_size);\n"
+"butterfly2(a6, a7, smem, twiddles, x4, block_size);\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void fft_radix2_B5(__local CT* smem, __global const CT* twiddles, const int x1, const int block_size, const int t)\n"
+"{\n"
+"const int thread_block = t/5;\n"
+"const int x2 = x1 + thread_block;\n"
+"const int x3 = x1 + 2*thread_block;\n"
+"const int x4 = x1 + 3*thread_block;\n"
+"const int x5 = x1 + 4*thread_block;\n"
+"CT a0, a1, a2, a3, a4, a5, a6, a7, a8, a9;\n"
+"if (x1 < t/5)\n"
+"{\n"
+"a0 = smem[x1]; a1 = smem[x1+t];\n"
+"a2 = smem[x2]; a3 = smem[x2+t];\n"
+"a4 = smem[x3]; a5 = smem[x3+t];\n"
+"a6 = smem[x4]; a7 = smem[x4+t];\n"
+"a8 = smem[x5]; a9 = smem[x5+t];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x1 < t/5)\n"
+"{\n"
+"butterfly2(a0, a1, smem, twiddles, x1, block_size);\n"
+"butterfly2(a2, a3, smem, twiddles, x2, block_size);\n"
+"butterfly2(a4, a5, smem, twiddles, x3, block_size);\n"
+"butterfly2(a6, a7, smem, twiddles, x4, block_size);\n"
+"butterfly2(a8, a9, smem, twiddles, x5, block_size);\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void fft_radix4(__local CT* smem, __global const CT* twiddles, const int x, const int block_size, const int t)\n"
+"{\n"
+"CT a0, a1, a2, a3;\n"
+"if (x < t)\n"
+"{\n"
+"a0 = smem[x]; a1 = smem[x+t]; a2 = smem[x+2*t]; a3 = smem[x+3*t];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x < t)\n"
+"butterfly4(a0, a1, a2, a3, smem, twiddles, x, block_size);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void fft_radix4_B2(__local CT* smem, __global const CT* twiddles, const int x1, const int block_size, const int t)\n"
+"{\n"
+"const int x2 = x1 + t/2;\n"
+"CT a0, a1, a2, a3, a4, a5, a6, a7;\n"
+"if (x1 < t/2)\n"
+"{\n"
+"a0 = smem[x1]; a1 = smem[x1+t]; a2 = smem[x1+2*t]; a3 = smem[x1+3*t];\n"
+"a4 = smem[x2]; a5 = smem[x2+t]; a6 = smem[x2+2*t]; a7 = smem[x2+3*t];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x1 < t/2)\n"
+"{\n"
+"butterfly4(a0, a1, a2, a3, smem, twiddles, x1, block_size);\n"
+"butterfly4(a4, a5, a6, a7, smem, twiddles, x2, block_size);\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void fft_radix4_B3(__local CT* smem, __global const CT* twiddles, const int x1, const int block_size, const int t)\n"
+"{\n"
+"const int x2 = x1 + t/3;\n"
+"const int x3 = x2 + t/3;\n"
+"CT a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11;\n"
+"if (x1 < t/3)\n"
+"{\n"
+"a0 = smem[x1]; a1 = smem[x1+t]; a2 = smem[x1+2*t]; a3 = smem[x1+3*t];\n"
+"a4 = smem[x2]; a5 = smem[x2+t]; a6 = smem[x2+2*t]; a7 = smem[x2+3*t];\n"
+"a8 = smem[x3]; a9 = smem[x3+t]; a10 = smem[x3+2*t]; a11 = smem[x3+3*t];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x1 < t/3)\n"
+"{\n"
+"butterfly4(a0, a1, a2, a3, smem, twiddles, x1, block_size);\n"
+"butterfly4(a4, a5, a6, a7, smem, twiddles, x2, block_size);\n"
+"butterfly4(a8, a9, a10, a11, smem, twiddles, x3, block_size);\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void fft_radix8(__local CT* smem, __global const CT* twiddles, const int x, const int block_size, const int t)\n"
+"{\n"
+"const int k = x % block_size;\n"
+"CT a0, a1, a2, a3, a4, a5, a6, a7;\n"
+"if (x < t)\n"
+"{\n"
+"int tw_ind = block_size / 8;\n"
+"a0 = smem[x];\n"
+"a1 = mul_complex(twiddles[k], smem[x + t]);\n"
+"a2 = mul_complex(twiddles[k + block_size],smem[x+2*t]);\n"
+"a3 = mul_complex(twiddles[k+2*block_size],smem[x+3*t]);\n"
+"a4 = mul_complex(twiddles[k+3*block_size],smem[x+4*t]);\n"
+"a5 = mul_complex(twiddles[k+4*block_size],smem[x+5*t]);\n"
+"a6 = mul_complex(twiddles[k+5*block_size],smem[x+6*t]);\n"
+"a7 = mul_complex(twiddles[k+6*block_size],smem[x+7*t]);\n"
+"CT b0, b1, b6, b7;\n"
+"b0 = a0 + a4;\n"
+"a4 = a0 - a4;\n"
+"b1 = a1 + a5;\n"
+"a5 = a1 - a5;\n"
+"a5 = (CT)(SQRT_2) * (CT)(a5.x + a5.y, -a5.x + a5.y);\n"
+"b6 = twiddle(a2 - a6);\n"
+"a2 = a2 + a6;\n"
+"b7 = a3 - a7;\n"
+"b7 = (CT)(SQRT_2) * (CT)(-b7.x + b7.y, -b7.x - b7.y);\n"
+"a3 = a3 + a7;\n"
+"a0 = b0 + a2;\n"
+"a2 = b0 - a2;\n"
+"a1 = b1 + a3;\n"
+"a3 = twiddle(b1 - a3);\n"
+"a6 = a4 - b6;\n"
+"a4 = a4 + b6;\n"
+"a7 = twiddle(a5 - b7);\n"
+"a5 = a5 + b7;\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x < t)\n"
+"{\n"
+"const int dst_ind = ((x - k) << 3) + k;\n"
+"__local CT* dst = smem + dst_ind;\n"
+"dst[0] = a0 + a1;\n"
+"dst[block_size] = a4 + a5;\n"
+"dst[2 * block_size] = a2 + a3;\n"
+"dst[3 * block_size] = a6 + a7;\n"
+"dst[4 * block_size] = a0 - a1;\n"
+"dst[5 * block_size] = a4 - a5;\n"
+"dst[6 * block_size] = a2 - a3;\n"
+"dst[7 * block_size] = a6 - a7;\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void fft_radix3(__local CT* smem, __global const CT* twiddles, const int x, const int block_size, const int t)\n"
+"{\n"
+"CT a0, a1, a2;\n"
+"if (x < t)\n"
+"{\n"
+"a0 = smem[x]; a1 = smem[x+t]; a2 = smem[x+2*t];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x < t)\n"
+"butterfly3(a0, a1, a2, smem, twiddles, x, block_size);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void fft_radix3_B2(__local CT* smem, __global const CT* twiddles, const int x1, const int block_size, const int t)\n"
+"{\n"
+"const int x2 = x1 + t/2;\n"
+"CT a0, a1, a2, a3, a4, a5;\n"
+"if (x1 < t/2)\n"
+"{\n"
+"a0 = smem[x1]; a1 = smem[x1+t]; a2 = smem[x1+2*t];\n"
+"a3 = smem[x2]; a4 = smem[x2+t]; a5 = smem[x2+2*t];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x1 < t/2)\n"
+"{\n"
+"butterfly3(a0, a1, a2, smem, twiddles, x1, block_size);\n"
+"butterfly3(a3, a4, a5, smem, twiddles, x2, block_size);\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void fft_radix3_B3(__local CT* smem, __global const CT* twiddles, const int x1, const int block_size, const int t)\n"
+"{\n"
+"const int x2 = x1 + t/3;\n"
+"const int x3 = x2 + t/3;\n"
+"CT a0, a1, a2, a3, a4, a5, a6, a7, a8;\n"
+"if (x1 < t/3)\n"
+"{\n"
+"a0 = smem[x1]; a1 = smem[x1+t]; a2 = smem[x1+2*t];\n"
+"a3 = smem[x2]; a4 = smem[x2+t]; a5 = smem[x2+2*t];\n"
+"a6 = smem[x3]; a7 = smem[x3+t]; a8 = smem[x3+2*t];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x1 < t/3)\n"
+"{\n"
+"butterfly3(a0, a1, a2, smem, twiddles, x1, block_size);\n"
+"butterfly3(a3, a4, a5, smem, twiddles, x2, block_size);\n"
+"butterfly3(a6, a7, a8, smem, twiddles, x3, block_size);\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void fft_radix3_B4(__local CT* smem, __global const CT* twiddles, const int x1, const int block_size, const int t)\n"
+"{\n"
+"const int thread_block = t/4;\n"
+"const int x2 = x1 + thread_block;\n"
+"const int x3 = x1 + 2*thread_block;\n"
+"const int x4 = x1 + 3*thread_block;\n"
+"CT a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11;\n"
+"if (x1 < t/4)\n"
+"{\n"
+"a0 = smem[x1]; a1 = smem[x1+t]; a2 = smem[x1+2*t];\n"
+"a3 = smem[x2]; a4 = smem[x2+t]; a5 = smem[x2+2*t];\n"
+"a6 = smem[x3]; a7 = smem[x3+t]; a8 = smem[x3+2*t];\n"
+"a9 = smem[x4]; a10 = smem[x4+t]; a11 = smem[x4+2*t];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x1 < t/4)\n"
+"{\n"
+"butterfly3(a0, a1, a2, smem, twiddles, x1, block_size);\n"
+"butterfly3(a3, a4, a5, smem, twiddles, x2, block_size);\n"
+"butterfly3(a6, a7, a8, smem, twiddles, x3, block_size);\n"
+"butterfly3(a9, a10, a11, smem, twiddles, x4, block_size);\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void fft_radix5(__local CT* smem, __global const CT* twiddles, const int x, const int block_size, const int t)\n"
+"{\n"
+"const int k = x % block_size;\n"
+"CT a0, a1, a2, a3, a4;\n"
+"if (x < t)\n"
+"{\n"
+"a0 = smem[x]; a1 = smem[x + t]; a2 = smem[x+2*t]; a3 = smem[x+3*t]; a4 = smem[x+4*t];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x < t)\n"
+"butterfly5(a0, a1, a2, a3, a4, smem, twiddles, x, block_size);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"__attribute__((always_inline))\n"
+"void fft_radix5_B2(__local CT* smem, __global const CT* twiddles, const int x1, const int block_size, const int t)\n"
+"{\n"
+"const int x2 = x1+t/2;\n"
+"CT a0, a1, a2, a3, a4, a5, a6, a7, a8, a9;\n"
+"if (x1 < t/2)\n"
+"{\n"
+"a0 = smem[x1]; a1 = smem[x1 + t]; a2 = smem[x1+2*t]; a3 = smem[x1+3*t]; a4 = smem[x1+4*t];\n"
+"a5 = smem[x2]; a6 = smem[x2 + t]; a7 = smem[x2+2*t]; a8 = smem[x2+3*t]; a9 = smem[x2+4*t];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x1 < t/2)\n"
+"{\n"
+"butterfly5(a0, a1, a2, a3, a4, smem, twiddles, x1, block_size);\n"
+"butterfly5(a5, a6, a7, a8, a9, smem, twiddles, x2, block_size);\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"#ifdef DFT_SCALE\n"
+"#define SCALE_VAL(x, scale) x*scale\n"
+"#else\n"
+"#define SCALE_VAL(x, scale) x\n"
+"#endif\n"
+"__kernel void fft_multi_radix_rows(__global const uchar* src_ptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar* dst_ptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__global CT* twiddles_ptr, int twiddles_step, int twiddles_offset, const int t, const int nz)\n"
+"{\n"
+"const int x = get_global_id(0);\n"
+"const int y = get_group_id(1);\n"
+"const int block_size = LOCAL_SIZE/kercn;\n"
+"if (y < nz)\n"
+"{\n"
+"__local CT smem[LOCAL_SIZE];\n"
+"__global const CT* twiddles = (__global const CT*)(twiddles_ptr + twiddles_offset);\n"
+"const int ind = x;\n"
+"#ifdef IS_1D\n"
+"FT scale = (FT) 1/dst_cols;\n"
+"#else\n"
+"FT scale = (FT) 1/(dst_cols*dst_rows);\n"
+"#endif\n"
+"#ifdef COMPLEX_INPUT\n"
+"__global const CT* src = (__global const CT*)(src_ptr + mad24(y, src_step, mad24(x, (int)(sizeof(CT)), src_offset)));\n"
+"#pragma unroll\n"
+"for (int i=0; i<kercn; i++)\n"
+"smem[x+i*block_size] = src[i*block_size];\n"
+"#else\n"
+"__global const FT* src = (__global const FT*)(src_ptr + mad24(y, src_step, mad24(x, (int)sizeof(FT), src_offset)));\n"
+"#pragma unroll\n"
+"for (int i=0; i<kercn; i++)\n"
+"smem[x+i*block_size] = (CT)(src[i*block_size], 0.f);\n"
+"#endif\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"RADIX_PROCESS;\n"
+"#ifdef COMPLEX_OUTPUT\n"
+"#ifdef NO_CONJUGATE\n"
+"const int cols = dst_cols/2 + 1;\n"
+"#else\n"
+"const int cols = dst_cols;\n"
+"#endif\n"
+"__global CT* dst = (__global CT*)(dst_ptr + mad24(y, dst_step, dst_offset));\n"
+"#pragma unroll\n"
+"for (int i=x; i<cols; i+=block_size)\n"
+"dst[i] = SCALE_VAL(smem[i], scale);\n"
+"#ifdef REAL_INPUT\n"
+"#ifdef COMPLEX_OUTPUT\n"
+"#ifdef IS_1D\n"
+"for(int i=x+1; i < (dst_cols+1)/2; i+=block_size)\n"
+"{\n"
+"dst[dst_cols-i] = (CT)(SCALE_VAL(smem[i].x, scale), SCALE_VAL(-smem[i].y, scale));\n"
+"}\n"
+"#endif\n"
+"#endif\n"
+"#endif\n"
+"#else\n"
+"__local FT* smem_1cn = (__local FT*) smem;\n"
+"__global FT* dst = (__global FT*)(dst_ptr + mad24(y, dst_step, dst_offset));\n"
+"for (int i=x; i<dst_cols-1; i+=block_size)\n"
+"dst[i+1] = SCALE_VAL(smem_1cn[i+2], scale);\n"
+"if (x == 0)\n"
+"dst[0] = SCALE_VAL(smem_1cn[0], scale);\n"
+"#endif\n"
+"}\n"
+"else\n"
+"{\n"
+"#ifdef COMPLEX_OUTPUT\n"
+"__global CT* dst = (__global CT*)(dst_ptr + mad24(y, dst_step, dst_offset));\n"
+"#else\n"
+"__global FT* dst = (__global FT*)(dst_ptr + mad24(y, dst_step, dst_offset));\n"
+"#endif\n"
+"#pragma unroll\n"
+"for (int i=x; i<dst_cols; i+=block_size)\n"
+"dst[i] = 0.f;\n"
+"}\n"
+"}\n"
+"__kernel void fft_multi_radix_cols(__global const uchar* src_ptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar* dst_ptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__global CT* twiddles_ptr, int twiddles_step, int twiddles_offset, const int t, const int nz)\n"
+"{\n"
+"const int x = get_group_id(0);\n"
+"const int y = get_global_id(1);\n"
+"if (x < nz)\n"
+"{\n"
+"__local CT smem[LOCAL_SIZE];\n"
+"__global const uchar* src = src_ptr + mad24(y, src_step, mad24(x, (int)(sizeof(CT)), src_offset));\n"
+"__global const CT* twiddles = (__global const CT*)(twiddles_ptr + twiddles_offset);\n"
+"const int ind = y;\n"
+"const int block_size = LOCAL_SIZE/kercn;\n"
+"FT scale = 1.f/(dst_rows*dst_cols);\n"
+"#pragma unroll\n"
+"for (int i=0; i<kercn; i++)\n"
+"smem[y+i*block_size] = *((__global const CT*)(src + i*block_size*src_step));\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"RADIX_PROCESS;\n"
+"#ifdef COMPLEX_OUTPUT\n"
+"__global uchar* dst = dst_ptr + mad24(y, dst_step, mad24(x, (int)(sizeof(CT)), dst_offset));\n"
+"#pragma unroll\n"
+"for (int i=0; i<kercn; i++)\n"
+"*((__global CT*)(dst + i*block_size*dst_step)) = SCALE_VAL(smem[y + i*block_size], scale);\n"
+"#else\n"
+"if (x == 0)\n"
+"{\n"
+"__local FT* smem_1cn = (__local FT*) smem;\n"
+"__global uchar* dst = dst_ptr + mad24(y+1, dst_step, dst_offset);\n"
+"for (int i=y; i<dst_rows-1; i+=block_size, dst+=dst_step*block_size)\n"
+"*((__global FT*) dst) = SCALE_VAL(smem_1cn[i+2], scale);\n"
+"if (y == 0)\n"
+"*((__global FT*) (dst_ptr + dst_offset)) = SCALE_VAL(smem_1cn[0], scale);\n"
+"}\n"
+"else if (x == (dst_cols+1)/2)\n"
+"{\n"
+"__local FT* smem_1cn = (__local FT*) smem;\n"
+"__global uchar* dst = dst_ptr + mad24(dst_cols-1, (int)sizeof(FT), mad24(y+1, dst_step, dst_offset));\n"
+"for (int i=y; i<dst_rows-1; i+=block_size, dst+=dst_step*block_size)\n"
+"*((__global FT*) dst) = SCALE_VAL(smem_1cn[i+2], scale);\n"
+"if (y == 0)\n"
+"*((__global FT*) (dst_ptr + mad24(dst_cols-1, (int)sizeof(FT), dst_offset))) = SCALE_VAL(smem_1cn[0], scale);\n"
+"}\n"
+"else\n"
+"{\n"
+"__global uchar* dst = dst_ptr + mad24(x, (int)sizeof(FT)*2, mad24(y, dst_step, dst_offset - (int)sizeof(FT)));\n"
+"#pragma unroll\n"
+"for (int i=y; i<dst_rows; i+=block_size, dst+=block_size*dst_step)\n"
+"vstore2(SCALE_VAL(smem[i], scale), 0, (__global FT*) dst);\n"
+"}\n"
+"#endif\n"
+"}\n"
+"}\n"
+"__kernel void ifft_multi_radix_rows(__global const uchar* src_ptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar* dst_ptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__global CT* twiddles_ptr, int twiddles_step, int twiddles_offset, const int t, const int nz)\n"
+"{\n"
+"const int x = get_global_id(0);\n"
+"const int y = get_group_id(1);\n"
+"const int block_size = LOCAL_SIZE/kercn;\n"
+"#ifdef IS_1D\n"
+"const FT scale = (FT) 1/dst_cols;\n"
+"#else\n"
+"const FT scale = (FT) 1/(dst_cols*dst_rows);\n"
+"#endif\n"
+"if (y < nz)\n"
+"{\n"
+"__local CT smem[LOCAL_SIZE];\n"
+"__global const CT* twiddles = (__global const CT*)(twiddles_ptr + twiddles_offset);\n"
+"const int ind = x;\n"
+"#if defined(COMPLEX_INPUT) && !defined(NO_CONJUGATE)\n"
+"__global const CT* src = (__global const CT*)(src_ptr + mad24(y, src_step, mad24(x, (int)(sizeof(CT)), src_offset)));\n"
+"#pragma unroll\n"
+"for (int i=0; i<kercn; i++)\n"
+"{\n"
+"smem[x+i*block_size].x = src[i*block_size].x;\n"
+"smem[x+i*block_size].y = -src[i*block_size].y;\n"
+"}\n"
+"#else\n"
+"#if !defined(REAL_INPUT) && defined(NO_CONJUGATE)\n"
+"__global const CT* src = (__global const CT*)(src_ptr + mad24(y, src_step, mad24(2, (int)sizeof(FT), src_offset)));\n"
+"#pragma unroll\n"
+"for (int i=x; i<(LOCAL_SIZE-1)/2; i+=block_size)\n"
+"{\n"
+"smem[i+1].x = src[i].x;\n"
+"smem[i+1].y = -src[i].y;\n"
+"smem[LOCAL_SIZE-i-1] = src[i];\n"
+"}\n"
+"#else\n"
+"#pragma unroll\n"
+"for (int i=x; i<(LOCAL_SIZE-1)/2; i+=block_size)\n"
+"{\n"
+"CT src = vload2(0, (__global const FT*)(src_ptr + mad24(y, src_step, mad24(2*i+1, (int)sizeof(FT), src_offset))));\n"
+"smem[i+1].x = src.x;\n"
+"smem[i+1].y = -src.y;\n"
+"smem[LOCAL_SIZE-i-1] = src;\n"
+"}\n"
+"#endif\n"
+"if (x==0)\n"
+"{\n"
+"smem[0].x = *(__global const FT*)(src_ptr + mad24(y, src_step, src_offset));\n"
+"smem[0].y = 0.f;\n"
+"if(LOCAL_SIZE % 2 ==0)\n"
+"{\n"
+"#if !defined(REAL_INPUT) && defined(NO_CONJUGATE)\n"
+"smem[LOCAL_SIZE/2].x = src[LOCAL_SIZE/2-1].x;\n"
+"#else\n"
+"smem[LOCAL_SIZE/2].x = *(__global const FT*)(src_ptr + mad24(y, src_step, mad24(LOCAL_SIZE-1, (int)sizeof(FT), src_offset)));\n"
+"#endif\n"
+"smem[LOCAL_SIZE/2].y = 0.f;\n"
+"}\n"
+"}\n"
+"#endif\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"RADIX_PROCESS;\n"
+"#ifdef COMPLEX_OUTPUT\n"
+"__global CT* dst = (__global CT*)(dst_ptr + mad24(y, dst_step, mad24(x, (int)(sizeof(CT)), dst_offset)));\n"
+"#pragma unroll\n"
+"for (int i=0; i<kercn; i++)\n"
+"{\n"
+"dst[i*block_size].x = SCALE_VAL(smem[x + i*block_size].x, scale);\n"
+"dst[i*block_size].y = SCALE_VAL(-smem[x + i*block_size].y, scale);\n"
+"}\n"
+"#else\n"
+"__global FT* dst = (__global FT*)(dst_ptr + mad24(y, dst_step, mad24(x, (int)(sizeof(FT)), dst_offset)));\n"
+"#pragma unroll\n"
+"for (int i=0; i<kercn; i++)\n"
+"{\n"
+"dst[i*block_size] = SCALE_VAL(smem[x + i*block_size].x, scale);\n"
+"}\n"
+"#endif\n"
+"}\n"
+"else\n"
+"{\n"
+"#ifdef COMPLEX_OUTPUT\n"
+"__global CT* dst = (__global CT*)(dst_ptr + mad24(y, dst_step, dst_offset));\n"
+"#else\n"
+"__global FT* dst = (__global FT*)(dst_ptr + mad24(y, dst_step, dst_offset));\n"
+"#endif\n"
+"#pragma unroll\n"
+"for (int i=x; i<dst_cols; i+=block_size)\n"
+"dst[i] = 0.f;\n"
+"}\n"
+"}\n"
+"__kernel void ifft_multi_radix_cols(__global const uchar* src_ptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar* dst_ptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__global CT* twiddles_ptr, int twiddles_step, int twiddles_offset, const int t, const int nz)\n"
+"{\n"
+"const int x = get_group_id(0);\n"
+"const int y = get_global_id(1);\n"
+"#ifdef COMPLEX_INPUT\n"
+"if (x < nz)\n"
+"{\n"
+"__local CT smem[LOCAL_SIZE];\n"
+"__global const uchar* src = src_ptr + mad24(y, src_step, mad24(x, (int)(sizeof(CT)), src_offset));\n"
+"__global uchar* dst = dst_ptr + mad24(y, dst_step, mad24(x, (int)(sizeof(CT)), dst_offset));\n"
+"__global const CT* twiddles = (__global const CT*)(twiddles_ptr + twiddles_offset);\n"
+"const int ind = y;\n"
+"const int block_size = LOCAL_SIZE/kercn;\n"
+"#pragma unroll\n"
+"for (int i=0; i<kercn; i++)\n"
+"{\n"
+"CT temp = *((__global const CT*)(src + i*block_size*src_step));\n"
+"smem[y+i*block_size].x = temp.x;\n"
+"smem[y+i*block_size].y = -temp.y;\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"RADIX_PROCESS;\n"
+"#pragma unroll\n"
+"for (int i=0; i<kercn; i++)\n"
+"{\n"
+"__global CT* res = (__global CT*)(dst + i*block_size*dst_step);\n"
+"res[0].x = smem[y + i*block_size].x;\n"
+"res[0].y = -smem[y + i*block_size].y;\n"
+"}\n"
+"}\n"
+"#else\n"
+"if (x < nz)\n"
+"{\n"
+"__global const CT* twiddles = (__global const CT*)(twiddles_ptr + twiddles_offset);\n"
+"const int ind = y;\n"
+"const int block_size = LOCAL_SIZE/kercn;\n"
+"__local CT smem[LOCAL_SIZE];\n"
+"#ifdef EVEN\n"
+"if (x!=0 && (x!=(nz-1)))\n"
+"#else\n"
+"if (x!=0)\n"
+"#endif\n"
+"{\n"
+"__global const uchar* src = src_ptr + mad24(y, src_step, mad24(2*x-1, (int)sizeof(FT), src_offset));\n"
+"#pragma unroll\n"
+"for (int i=0; i<kercn; i++)\n"
+"{\n"
+"CT temp = vload2(0, (__global const FT*)(src + i*block_size*src_step));\n"
+"smem[y+i*block_size].x = temp.x;\n"
+"smem[y+i*block_size].y = -temp.y;\n"
+"}\n"
+"}\n"
+"else\n"
+"{\n"
+"int ind = x==0 ? 0: 2*x-1;\n"
+"__global const FT* src = (__global const FT*)(src_ptr + mad24(1, src_step, mad24(ind, (int)sizeof(FT), src_offset)));\n"
+"int step = src_step/(int)sizeof(FT);\n"
+"#pragma unroll\n"
+"for (int i=y; i<(LOCAL_SIZE-1)/2; i+=block_size)\n"
+"{\n"
+"smem[i+1].x = src[2*i*step];\n"
+"smem[i+1].y = -src[(2*i+1)*step];\n"
+"smem[LOCAL_SIZE-i-1].x = src[2*i*step];;\n"
+"smem[LOCAL_SIZE-i-1].y = src[(2*i+1)*step];\n"
+"}\n"
+"if (y==0)\n"
+"{\n"
+"smem[0].x = *(__global const FT*)(src_ptr + mad24(ind, (int)sizeof(FT), src_offset));\n"
+"smem[0].y = 0.f;\n"
+"if(LOCAL_SIZE % 2 ==0)\n"
+"{\n"
+"smem[LOCAL_SIZE/2].x = src[(LOCAL_SIZE-2)*step];\n"
+"smem[LOCAL_SIZE/2].y = 0.f;\n"
+"}\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"RADIX_PROCESS;\n"
+"__global uchar* dst = dst_ptr + mad24(y, dst_step, mad24(x, (int)(sizeof(CT)), dst_offset));\n"
+"#pragma unroll\n"
+"for (int i=0; i<kercn; i++)\n"
+"{\n"
+"__global CT* res = (__global CT*)(dst + i*block_size*dst_step);\n"
+"res[0].x = smem[y + i*block_size].x;\n"
+"res[0].y = -smem[y + i*block_size].y;\n"
+"}\n"
+"}\n"
+"#endif\n"
+"}\n"
+, "3d61276324844b5841beb34e245f270a"};
+ProgramSource fft_oclsrc(fft.programStr);
+const struct ProgramEntry flip={"flip",
+"#if kercn != 3\n"
+"#define loadpix(addr) *(__global const T *)(addr)\n"
+"#define storepix(val, addr) *(__global T *)(addr) = val\n"
+"#define TSIZE (int)sizeof(T)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const T1 *)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global T1 *)(addr))\n"
+"#define TSIZE ((int)sizeof(T1)*3)\n"
+"#endif\n"
+"__kernel void arithm_flip_rows(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset,\n"
+"int rows, int cols, int thread_rows, int thread_cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index0 = mad24(y0, src_step, mad24(x, TSIZE, src_offset));\n"
+"int src_index1 = mad24(rows - y0 - 1, src_step, mad24(x, TSIZE, src_offset));\n"
+"int dst_index0 = mad24(y0, dst_step, mad24(x, TSIZE, dst_offset));\n"
+"int dst_index1 = mad24(rows - y0 - 1, dst_step, mad24(x, TSIZE, dst_offset));\n"
+"#pragma unroll\n"
+"for (int y = y0, y1 = min(thread_rows, y0 + PIX_PER_WI_Y); y < y1; ++y)\n"
+"{\n"
+"T src0 = loadpix(srcptr + src_index0);\n"
+"T src1 = loadpix(srcptr + src_index1);\n"
+"storepix(src1, dstptr + dst_index0);\n"
+"storepix(src0, dstptr + dst_index1);\n"
+"src_index0 += src_step;\n"
+"src_index1 -= src_step;\n"
+"dst_index0 += dst_step;\n"
+"dst_index1 -= dst_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void arithm_flip_rows_cols(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset,\n"
+"int rows, int cols, int thread_rows, int thread_cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1)*PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index0 = mad24(y0, src_step, mad24(x, TSIZE, src_offset));\n"
+"int src_index1 = mad24(rows - y0 - 1, src_step, mad24(cols - x - 1, TSIZE, src_offset));\n"
+"int dst_index0 = mad24(y0, dst_step, mad24(x, TSIZE, dst_offset));\n"
+"int dst_index1 = mad24(rows - y0 - 1, dst_step, mad24(cols - x - 1, TSIZE, dst_offset));\n"
+"#pragma unroll\n"
+"for (int y = y0, y1 = min(thread_rows, y0 + PIX_PER_WI_Y); y < y1; ++y)\n"
+"{\n"
+"T src0 = loadpix(srcptr + src_index0);\n"
+"T src1 = loadpix(srcptr + src_index1);\n"
+"#if kercn == 2\n"
+"#if cn == 1\n"
+"src0 = src0.s10;\n"
+"src1 = src1.s10;\n"
+"#endif\n"
+"#elif kercn == 4\n"
+"#if cn == 1\n"
+"src0 = src0.s3210;\n"
+"src1 = src1.s3210;\n"
+"#elif cn == 2\n"
+"src0 = src0.s2301;\n"
+"src1 = src1.s2301;\n"
+"#endif\n"
+"#endif\n"
+"storepix(src1, dstptr + dst_index0);\n"
+"storepix(src0, dstptr + dst_index1);\n"
+"src_index0 += src_step;\n"
+"src_index1 -= src_step;\n"
+"dst_index0 += dst_step;\n"
+"dst_index1 -= dst_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void arithm_flip_cols(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset,\n"
+"int rows, int cols, int thread_rows, int thread_cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1)*PIX_PER_WI_Y;\n"
+"if (x < thread_cols)\n"
+"{\n"
+"int src_index0 = mad24(y0, src_step, mad24(x, TSIZE, src_offset));\n"
+"int src_index1 = mad24(y0, src_step, mad24(cols - x - 1, TSIZE, src_offset));\n"
+"int dst_index0 = mad24(y0, dst_step, mad24(x, TSIZE, dst_offset));\n"
+"int dst_index1 = mad24(y0, dst_step, mad24(cols - x - 1, TSIZE, dst_offset));\n"
+"#pragma unroll\n"
+"for (int y = y0, y1 = min(rows, y0 + PIX_PER_WI_Y); y < y1; ++y)\n"
+"{\n"
+"T src0 = loadpix(srcptr + src_index0);\n"
+"T src1 = loadpix(srcptr + src_index1);\n"
+"#if kercn == 2\n"
+"#if cn == 1\n"
+"src0 = src0.s10;\n"
+"src1 = src1.s10;\n"
+"#endif\n"
+"#elif kercn == 4\n"
+"#if cn == 1\n"
+"src0 = src0.s3210;\n"
+"src1 = src1.s3210;\n"
+"#elif cn == 2\n"
+"src0 = src0.s2301;\n"
+"src1 = src1.s2301;\n"
+"#endif\n"
+"#endif\n"
+"storepix(src1, dstptr + dst_index0);\n"
+"storepix(src0, dstptr + dst_index1);\n"
+"src_index0 += src_step;\n"
+"src_index1 += src_step;\n"
+"dst_index0 += dst_step;\n"
+"dst_index1 += dst_step;\n"
+"}\n"
+"}\n"
+"}\n"
+, "296714e8641b2d8359104d11b332b14b"};
+ProgramSource flip_oclsrc(flip.programStr);
+const struct ProgramEntry gemm={"gemm",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#define TSIZE (int)sizeof(T)\n"
+"#define WTSIZE (int)sizeof(WT)\n"
+"#define IND_A mad24(y, A_step, A_offset)\n"
+"#define IND_B mad24(x, WTSIZE, B_offset)\n"
+"#define STEP_B B_step / WTSIZE\n"
+"#define LOCAL_SIZE_ODD (LOCAL_SIZE + 1)\n"
+"#if cn==2\n"
+"#if kercn==2\n"
+"#define MUL(a, b)\\\n"
+"{\\\n"
+"sum.x += fma(a.x, b.x, - a.y * b.y);\\\n"
+"sum.y += fma(a.x, b.y, a.y * b.x);\\\n"
+"}\n"
+"#else\n"
+"#define MUL(a, b)\\\n"
+"{\\\n"
+"sum.x += fma(a.x, b.x, - a.y * b.y);\\\n"
+"sum.y += fma(a.x, b.y, a.y * b.x);\\\n"
+"sum.z += fma(a.x, b.z, - a.y * b.w);\\\n"
+"sum.w += fma(a.x, b.w, a.y * b.z);\\\n"
+"}\n"
+"#endif\n"
+"#else\n"
+"#define MUL(a, b) sum = fma(a, b, sum);\n"
+"#endif\n"
+"__kernel void gemm(__global const uchar * A_ptr, int A_step, int A_offset,\n"
+"__global const uchar * B_ptr, int B_step, int B_offset,\n"
+"__global uchar * D_ptr, int D_step, int D_offset, int D_rows, int D_cols,\n"
+"int n, T1 alpha, T1 beta)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"int lidx = get_local_id(0);\n"
+"int lidy = get_local_id(1);\n"
+"__global const T* A = (__global const T*)(A_ptr + IND_A);\n"
+"__global const WT* B = (__global const WT*)(B_ptr + IND_B);\n"
+"WT sum = (WT)(0);\n"
+"#if LOCAL_SIZE == 1\n"
+"if (x < D_cols && y < D_rows)\n"
+"{\n"
+"for (int i = 0; i < n; ++i)\n"
+"MUL(A[i], B[i*STEP_B]);\n"
+"#else\n"
+"__local T a_local[LOCAL_SIZE_ODD*LOCAL_SIZE];\n"
+"__local WT b_local[LOCAL_SIZE_ODD*LOCAL_SIZE];\n"
+"int reps;\n"
+"#if NO_MULT\n"
+"reps = (n + LOCAL_SIZE-1)/LOCAL_SIZE;\n"
+"#else\n"
+"reps = n/LOCAL_SIZE;\n"
+"#endif\n"
+"for (int p = 0; p < reps; ++p)\n"
+"{\n"
+"if (p * LOCAL_SIZE + lidx < n && y < D_rows)\n"
+"a_local[mad24(lidy, LOCAL_SIZE_ODD, lidx)] = A[mad24(p, LOCAL_SIZE, lidx)];\n"
+"if (p * LOCAL_SIZE + lidy < n && x < D_cols)\n"
+"b_local[mad24(lidy, LOCAL_SIZE_ODD, lidx)] = B[mad24(p, LOCAL_SIZE, lidy)*STEP_B];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x < D_cols && y < D_rows)\n"
+"{\n"
+"#if NO_MULT\n"
+"int ie = min(LOCAL_SIZE, n - p * LOCAL_SIZE);\n"
+"for (int i = 0; i < ie; ++i)\n"
+"#else\n"
+"for (int i = 0; i < LOCAL_SIZE; ++i)\n"
+"#endif\n"
+"MUL(a_local[mad24(lidy, LOCAL_SIZE_ODD, i)], b_local[mad24(i, LOCAL_SIZE_ODD, lidx)]);\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"if (x < D_cols && y < D_rows)\n"
+"{\n"
+"#endif\n"
+"__global WT* D = (__global WT*)(D_ptr + mad24(y, D_step, mad24(x, WTSIZE, D_offset)));\n"
+"#if HAVE_C\n"
+"D[0] = mad(alpha, sum, D[0]*beta);\n"
+"#else\n"
+"D[0] = alpha * sum;\n"
+"#endif\n"
+"}\n"
+"}\n"
+, "0a79f557db56fcdce22ea905e7fc899f"};
+ProgramSource gemm_oclsrc(gemm.programStr);
+const struct ProgramEntry inrange={"inrange",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"__kernel void inrange(__global const uchar * src1ptr, int src1_step, int src1_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"#ifdef HAVE_SCALAR\n"
+"__global const srcT1 * src2, __global const srcT1 * src3,\n"
+"#else\n"
+"__global const uchar * src2ptr, int src2_step, int src2_offset,\n"
+"__global const uchar * src3ptr, int src3_step, int src3_offset,\n"
+"#endif\n"
+"int rowsPerWI)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1) * rowsPerWI;\n"
+"if (x < dst_cols)\n"
+"{\n"
+"int src1_index = mad24(y0, src1_step, mad24(x, (int)sizeof(srcT1) * kercn, src1_offset));\n"
+"int dst_index = mad24(y0, dst_step, mad24(x, colsPerWI, dst_offset));\n"
+"#ifndef HAVE_SCALAR\n"
+"int src2_index = mad24(y0, src2_step, mad24(x, (int)sizeof(srcT1) * kercn, src2_offset));\n"
+"int src3_index = mad24(y0, src3_step, mad24(x, (int)sizeof(srcT1) * kercn, src3_offset));\n"
+"#endif\n"
+"for (int y = y0, y1 = min(dst_rows, y0 + rowsPerWI); y < y1; ++y, src1_index += src1_step, dst_index += dst_step)\n"
+"{\n"
+"#if kercn >= cn && kercn == 4 && depth <= 4 && !defined HAVE_SCALAR\n"
+"srcT src1 = *(__global const srcT *)(src1ptr + src1_index);\n"
+"srcT src2 = *(__global const srcT *)(src2ptr + src2_index);\n"
+"srcT src3 = *(__global const srcT *)(src3ptr + src3_index);\n"
+"__global dstT * dst = (__global dstT *)(dstptr + dst_index);\n"
+"#if cn == 1\n"
+"dst[0] = src2 > src1 || src3 < src1 ? (dstT)(0) : (dstT)(255);\n"
+"#elif cn == 2\n"
+"dst[0] = (dstT)(src2.xy > src1.xy || src3.xy < src1.xy ||\n"
+"src2.zw > src1.zw || src3.zw < src1.zw ? (dstT)(0) : (dstT)(255);\n"
+"#elif cn == 4\n"
+"dst[0] = (dstT)(src2.x > src1.x || src3.x < src1.x ||\n"
+"src2.y > src1.y || src3.y < src1.y ||\n"
+"src2.z > src1.z || src3.z < src1.z ||\n"
+"src2.w > src1.w || src3.w < src1.w ? 0 : 255);\n"
+"#endif\n"
+"#else\n"
+"__global const srcT1 * src1 = (__global const srcT1 *)(src1ptr + src1_index);\n"
+"__global uchar * dst = dstptr + dst_index;\n"
+"#ifndef HAVE_SCALAR\n"
+"__global const srcT1 * src2 = (__global const srcT1 *)(src2ptr + src2_index);\n"
+"__global const srcT1 * src3 = (__global const srcT1 *)(src3ptr + src3_index);\n"
+"#endif\n"
+"#pragma unroll\n"
+"for (int px = 0; px < colsPerWI; ++px, src1 += cn\n"
+"#ifndef HAVE_SCALAR\n"
+", src2 += cn, src3 += cn\n"
+"#endif\n"
+")\n"
+"{\n"
+"dst[px] = 255;\n"
+"for (int c = 0; c < cn; ++c)\n"
+"if (src2[c] > src1[c] || src3[c] < src1[c])\n"
+"{\n"
+"dst[px] = 0;\n"
+"break;\n"
+"}\n"
+"}\n"
+"#endif\n"
+"#ifndef HAVE_SCALAR\n"
+"src2_index += src2_step;\n"
+"src3_index += src3_step;\n"
+"#endif\n"
+"}\n"
+"}\n"
+"}\n"
+, "e7220f9dc5b30fc5558622a452890287"};
+ProgramSource inrange_oclsrc(inrange.programStr);
+const struct ProgramEntry lut={"lut",
+"#if lcn == 1\n"
+"#if dcn == 4\n"
+"#define LUT_OP \\\n"
+"int idx = *(__global const int *)(srcptr + src_index); \\\n"
+"dst = (__global dstT *)(dstptr + dst_index); \\\n"
+"dst[0] = lut_l[idx & 0xff]; \\\n"
+"dst[1] = lut_l[(idx >> 8) & 0xff]; \\\n"
+"dst[2] = lut_l[(idx >> 16) & 0xff]; \\\n"
+"dst[3] = lut_l[(idx >> 24) & 0xff];\n"
+"#elif dcn == 3\n"
+"#define LUT_OP \\\n"
+"uchar3 idx = vload3(0, srcptr + src_index); \\\n"
+"dst = (__global dstT *)(dstptr + dst_index); \\\n"
+"dst[0] = lut_l[idx.x]; \\\n"
+"dst[1] = lut_l[idx.y]; \\\n"
+"dst[2] = lut_l[idx.z];\n"
+"#elif dcn == 2\n"
+"#define LUT_OP \\\n"
+"short idx = *(__global const short *)(srcptr + src_index); \\\n"
+"dst = (__global dstT *)(dstptr + dst_index); \\\n"
+"dst[0] = lut_l[idx & 0xff]; \\\n"
+"dst[1] = lut_l[(idx >> 8) & 0xff];\n"
+"#elif dcn == 1\n"
+"#define LUT_OP \\\n"
+"uchar idx = (srcptr + src_index)[0]; \\\n"
+"dst = (__global dstT *)(dstptr + dst_index); \\\n"
+"dst[0] = lut_l[idx];\n"
+"#else\n"
+"#define LUT_OP \\\n"
+"__global const srcT * src = (__global const srcT *)(srcptr + src_index); \\\n"
+"dst = (__global dstT *)(dstptr + dst_index); \\\n"
+"for (int cn = 0; cn < dcn; ++cn) \\\n"
+"dst[cn] = lut_l[src[cn]];\n"
+"#endif\n"
+"#else\n"
+"#if dcn == 4\n"
+"#define LUT_OP \\\n"
+"__global const uchar4 * src_pixel = (__global const uchar4 *)(srcptr + src_index); \\\n"
+"int4 idx = mad24(convert_int4(src_pixel[0]), (int4)(lcn), (int4)(0, 1, 2, 3)); \\\n"
+"dst = (__global dstT *)(dstptr + dst_index); \\\n"
+"dst[0] = lut_l[idx.x]; \\\n"
+"dst[1] = lut_l[idx.y]; \\\n"
+"dst[2] = lut_l[idx.z]; \\\n"
+"dst[3] = lut_l[idx.w];\n"
+"#elif dcn == 3\n"
+"#define LUT_OP \\\n"
+"uchar3 src_pixel = vload3(0, srcptr + src_index); \\\n"
+"int3 idx = mad24(convert_int3(src_pixel), (int3)(lcn), (int3)(0, 1, 2)); \\\n"
+"dst = (__global dstT *)(dstptr + dst_index); \\\n"
+"dst[0] = lut_l[idx.x]; \\\n"
+"dst[1] = lut_l[idx.y]; \\\n"
+"dst[2] = lut_l[idx.z];\n"
+"#elif dcn == 2\n"
+"#define LUT_OP \\\n"
+"__global const uchar2 * src_pixel = (__global const uchar2 *)(srcptr + src_index); \\\n"
+"int2 idx = mad24(convert_int2(src_pixel[0]), lcn, (int2)(0, 1)); \\\n"
+"dst = (__global dstT *)(dstptr + dst_index); \\\n"
+"dst[0] = lut_l[idx.x]; \\\n"
+"dst[1] = lut_l[idx.y];\n"
+"#elif dcn == 1\n"
+"#define LUT_OP \\\n"
+"uchar idx = (srcptr + src_index)[0]; \\\n"
+"dst = (__global dstT *)(dstptr + dst_index); \\\n"
+"dst[0] = lut_l[idx];\n"
+"#else\n"
+"#define LUT_OP \\\n"
+"__global const srcT * src = (__global const srcT *)(srcptr + src_index); \\\n"
+"dst = (__global dstT *)(dstptr + dst_index); \\\n"
+"for (int cn = 0; cn < dcn; ++cn) \\\n"
+"dst[cn] = lut_l[mad24(src[cn], lcn, cn)];\n"
+"#endif\n"
+"#endif\n"
+"__kernel void LUT(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global const uchar * lutptr, int lut_step, int lut_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) << 2;\n"
+"__local dstT lut_l[256 * lcn];\n"
+"__global const dstT * lut = (__global const dstT *)(lutptr + lut_offset);\n"
+"for (int i = mad24((int)get_local_id(1), (int)get_local_size(0), (int)get_local_id(0)),\n"
+"step = get_local_size(0) * get_local_size(1); i < 256 * lcn; i += step)\n"
+"lut_l[i] = lut[i];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x < cols && y < rows)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, (int)sizeof(srcT) * dcn, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, (int)sizeof(dstT) * dcn, dst_offset));\n"
+"__global dstT * dst;\n"
+"LUT_OP;\n"
+"if (y < rows - 1)\n"
+"{\n"
+"src_index += src_step;\n"
+"dst_index += dst_step;\n"
+"LUT_OP;\n"
+"if (y < rows - 2)\n"
+"{\n"
+"src_index += src_step;\n"
+"dst_index += dst_step;\n"
+"LUT_OP;\n"
+"if (y < rows - 3)\n"
+"{\n"
+"src_index += src_step;\n"
+"dst_index += dst_step;\n"
+"LUT_OP;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+, "02217d060320fc126306ad16885be711"};
+ProgramSource lut_oclsrc(lut.programStr);
+const struct ProgramEntry meanstddev={"meanstddev",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#define noconvert\n"
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const srcT *)(addr)\n"
+"#define storepix(val, addr) *(__global dstT *)(addr) = val\n"
+"#define storesqpix(val, addr) *(__global sqdstT *)(addr) = val\n"
+"#define srcTSIZE (int)sizeof(srcT)\n"
+"#define dstTSIZE (int)sizeof(dstT)\n"
+"#define sqdstTSIZE (int)sizeof(sqdstT)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const srcT1 *)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global dstT1 *)(addr))\n"
+"#define storesqpix(val, addr) vstore3(val, 0, (__global sqdstT1 *)(addr))\n"
+"#define srcTSIZE ((int)sizeof(srcT1)*3)\n"
+"#define dstTSIZE ((int)sizeof(dstT1)*3)\n"
+"#define sqdstTSIZE ((int)sizeof(sqdstT1)*3)\n"
+"#endif\n"
+"__kernel void meanStdDev(__global const uchar * srcptr, int src_step, int src_offset, int cols,\n"
+"int total, int groups, __global uchar * dstptr\n"
+"#ifdef HAVE_MASK\n"
+", __global const uchar * mask, int mask_step, int mask_offset\n"
+"#endif\n"
+")\n"
+"{\n"
+"int lid = get_local_id(0);\n"
+"int gid = get_group_id(0);\n"
+"int id = get_global_id(0);\n"
+"__local dstT localMemSum[WGS2_ALIGNED];\n"
+"__local sqdstT localMemSqSum[WGS2_ALIGNED];\n"
+"#ifdef HAVE_MASK\n"
+"__local int localMemNonZero[WGS2_ALIGNED];\n"
+"#endif\n"
+"dstT accSum = (dstT)(0);\n"
+"sqdstT accSqSum = (sqdstT)(0);\n"
+"#ifdef HAVE_MASK\n"
+"int accNonZero = 0;\n"
+"mask += mask_offset;\n"
+"#endif\n"
+"srcptr += src_offset;\n"
+"for (int grain = groups * WGS; id < total; id += grain)\n"
+"{\n"
+"#ifdef HAVE_MASK\n"
+"#ifdef HAVE_MASK_CONT\n"
+"int mask_index = id;\n"
+"#else\n"
+"int mask_index = mad24(id / cols, mask_step, id % cols);\n"
+"#endif\n"
+"if (mask[mask_index])\n"
+"#endif\n"
+"{\n"
+"#ifdef HAVE_SRC_CONT\n"
+"int src_index = id * srcTSIZE;\n"
+"#else\n"
+"int src_index = mad24(id / cols, src_step, mul24(id % cols, srcTSIZE));\n"
+"#endif\n"
+"srcT value = loadpix(srcptr + src_index);\n"
+"accSum += convertToDT(value);\n"
+"sqdstT dvalue = convertToSDT(value);\n"
+"accSqSum = fma(dvalue, dvalue, accSqSum);\n"
+"#ifdef HAVE_MASK\n"
+"++accNonZero;\n"
+"#endif\n"
+"}\n"
+"}\n"
+"if (lid < WGS2_ALIGNED)\n"
+"{\n"
+"localMemSum[lid] = accSum;\n"
+"localMemSqSum[lid] = accSqSum;\n"
+"#ifdef HAVE_MASK\n"
+"localMemNonZero[lid] = accNonZero;\n"
+"#endif\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (lid >= WGS2_ALIGNED && total >= WGS2_ALIGNED)\n"
+"{\n"
+"localMemSum[lid - WGS2_ALIGNED] += accSum;\n"
+"localMemSqSum[lid - WGS2_ALIGNED] += accSqSum;\n"
+"#ifdef HAVE_MASK\n"
+"localMemNonZero[lid - WGS2_ALIGNED] += accNonZero;\n"
+"#endif\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"for (int lsize = WGS2_ALIGNED >> 1; lsize > 0; lsize >>= 1)\n"
+"{\n"
+"if (lid < lsize)\n"
+"{\n"
+"int lid2 = lsize + lid;\n"
+"localMemSum[lid] += localMemSum[lid2];\n"
+"localMemSqSum[lid] += localMemSqSum[lid2];\n"
+"#ifdef HAVE_MASK\n"
+"localMemNonZero[lid] += localMemNonZero[lid2];\n"
+"#endif\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"if (lid == 0)\n"
+"{\n"
+"storepix(localMemSum[0], dstptr + dstTSIZE * gid);\n"
+"storesqpix(localMemSqSum[0], dstptr + mad24(dstTSIZE, groups, sqdstTSIZE * gid));\n"
+"#ifdef HAVE_MASK\n"
+"*(__global int *)(dstptr + mad24(dstTSIZE + sqdstTSIZE, groups, (int)sizeof(int) * gid)) = localMemNonZero[0];\n"
+"#endif\n"
+"}\n"
+"}\n"
+, "1284edd21da32ce135cd26c0c897bd08"};
+ProgramSource meanstddev_oclsrc(meanstddev.programStr);
+const struct ProgramEntry minmaxloc={"minmaxloc",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#ifdef DEPTH_0\n"
+"#define MIN_VAL 0\n"
+"#define MAX_VAL UCHAR_MAX\n"
+"#elif defined DEPTH_1\n"
+"#define MIN_VAL SCHAR_MIN\n"
+"#define MAX_VAL SCHAR_MAX\n"
+"#elif defined DEPTH_2\n"
+"#define MIN_VAL 0\n"
+"#define MAX_VAL USHRT_MAX\n"
+"#elif defined DEPTH_3\n"
+"#define MIN_VAL SHRT_MIN\n"
+"#define MAX_VAL SHRT_MAX\n"
+"#elif defined DEPTH_4\n"
+"#define MIN_VAL INT_MIN\n"
+"#define MAX_VAL INT_MAX\n"
+"#elif defined DEPTH_5\n"
+"#define MIN_VAL (-FLT_MAX)\n"
+"#define MAX_VAL FLT_MAX\n"
+"#elif defined DEPTH_6\n"
+"#define MIN_VAL (-DBL_MAX)\n"
+"#define MAX_VAL DBL_MAX\n"
+"#endif\n"
+"#define noconvert\n"
+"#define INDEX_MAX UINT_MAX\n"
+"#if wdepth <= 4\n"
+"#define MIN_ABS(a) convertFromU(abs(a))\n"
+"#define MIN_ABS2(a, b) convertFromU(abs_diff(a, b))\n"
+"#define MIN(a, b) min(a, b)\n"
+"#define MAX(a, b) max(a, b)\n"
+"#else\n"
+"#define MIN_ABS(a) fabs(a)\n"
+"#define MIN_ABS2(a, b) fabs(a - b)\n"
+"#define MIN(a, b) fmin(a, b)\n"
+"#define MAX(a, b) fmax(a, b)\n"
+"#endif\n"
+"#if kercn != 3\n"
+"#define loadpix(addr) *(__global const srcT *)(addr)\n"
+"#define srcTSIZE (int)sizeof(srcT)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const srcT1 *)(addr))\n"
+"#define srcTSIZE ((int)sizeof(srcT1) * 3)\n"
+"#endif\n"
+"#ifndef HAVE_MASK\n"
+"#undef srcTSIZE\n"
+"#define srcTSIZE (int)sizeof(srcT1)\n"
+"#endif\n"
+"#ifdef NEED_MINVAL\n"
+"#ifdef NEED_MINLOC\n"
+"#define CALC_MIN(p, inc) \\\n"
+"if (minval > temp.p) \\\n"
+"{ \\\n"
+"minval = temp.p; \\\n"
+"minloc = id + inc; \\\n"
+"}\n"
+"#else\n"
+"#define CALC_MIN(p, inc) \\\n"
+"minval = MIN(minval, temp.p);\n"
+"#endif\n"
+"#else\n"
+"#define CALC_MIN(p, inc)\n"
+"#endif\n"
+"#ifdef NEED_MAXVAL\n"
+"#ifdef NEED_MAXLOC\n"
+"#define CALC_MAX(p, inc) \\\n"
+"if (maxval < temp.p) \\\n"
+"{ \\\n"
+"maxval = temp.p; \\\n"
+"maxloc = id + inc; \\\n"
+"}\n"
+"#else\n"
+"#define CALC_MAX(p, inc) \\\n"
+"maxval = MAX(maxval, temp.p);\n"
+"#endif\n"
+"#else\n"
+"#define CALC_MAX(p, inc)\n"
+"#endif\n"
+"#ifdef OP_CALC2\n"
+"#define CALC_MAX2(p) \\\n"
+"maxval2 = MAX(maxval2, temp2.p);\n"
+"#else\n"
+"#define CALC_MAX2(p)\n"
+"#endif\n"
+"#define CALC_P(p, inc) \\\n"
+"CALC_MIN(p, inc) \\\n"
+"CALC_MAX(p, inc) \\\n"
+"CALC_MAX2(p)\n"
+"__kernel void minmaxloc(__global const uchar * srcptr, int src_step, int src_offset, int cols,\n"
+"int total, int groupnum, __global uchar * dstptr\n"
+"#ifdef HAVE_MASK\n"
+", __global const uchar * mask, int mask_step, int mask_offset\n"
+"#endif\n"
+"#ifdef HAVE_SRC2\n"
+", __global const uchar * src2ptr, int src2_step, int src2_offset\n"
+"#endif\n"
+")\n"
+"{\n"
+"int lid = get_local_id(0);\n"
+"int gid = get_group_id(0);\n"
+"int id = get_global_id(0)\n"
+"#ifndef HAVE_MASK\n"
+"* kercn;\n"
+"#else\n"
+";\n"
+"#endif\n"
+"srcptr += src_offset;\n"
+"#ifdef HAVE_MASK\n"
+"mask += mask_offset;\n"
+"#endif\n"
+"#ifdef HAVE_SRC2\n"
+"src2ptr += src2_offset;\n"
+"#endif\n"
+"#ifdef NEED_MINVAL\n"
+"__local dstT1 localmem_min[WGS2_ALIGNED];\n"
+"dstT1 minval = MAX_VAL;\n"
+"#ifdef NEED_MINLOC\n"
+"__local uint localmem_minloc[WGS2_ALIGNED];\n"
+"uint minloc = INDEX_MAX;\n"
+"#endif\n"
+"#endif\n"
+"#ifdef NEED_MAXVAL\n"
+"dstT1 maxval = MIN_VAL;\n"
+"__local dstT1 localmem_max[WGS2_ALIGNED];\n"
+"#ifdef NEED_MAXLOC\n"
+"__local uint localmem_maxloc[WGS2_ALIGNED];\n"
+"uint maxloc = INDEX_MAX;\n"
+"#endif\n"
+"#endif\n"
+"#ifdef OP_CALC2\n"
+"__local dstT1 localmem_max2[WGS2_ALIGNED];\n"
+"dstT1 maxval2 = MIN_VAL;\n"
+"#endif\n"
+"int src_index;\n"
+"#ifdef HAVE_MASK\n"
+"int mask_index;\n"
+"#endif\n"
+"#ifdef HAVE_SRC2\n"
+"int src2_index;\n"
+"#endif\n"
+"dstT temp;\n"
+"#ifdef HAVE_SRC2\n"
+"dstT temp2;\n"
+"#endif\n"
+"for (int grain = groupnum * WGS\n"
+"#ifndef HAVE_MASK\n"
+"* kercn\n"
+"#endif\n"
+"; id < total; id += grain)\n"
+"{\n"
+"#ifdef HAVE_MASK\n"
+"#ifdef HAVE_MASK_CONT\n"
+"mask_index = id;\n"
+"#else\n"
+"mask_index = mad24(id / cols, mask_step, id % cols);\n"
+"#endif\n"
+"if (mask[mask_index])\n"
+"#endif\n"
+"{\n"
+"#ifdef HAVE_SRC_CONT\n"
+"src_index = id * srcTSIZE;\n"
+"#else\n"
+"src_index = mad24(id / cols, src_step, mul24(id % cols, srcTSIZE));\n"
+"#endif\n"
+"temp = convertToDT(loadpix(srcptr + src_index));\n"
+"#ifdef OP_ABS\n"
+"temp = MIN_ABS(temp);\n"
+"#endif\n"
+"#ifdef HAVE_SRC2\n"
+"#ifdef HAVE_SRC2_CONT\n"
+"src2_index = id * srcTSIZE;\n"
+"#else\n"
+"src2_index = mad24(id / cols, src2_step, mul24(id % cols, srcTSIZE));\n"
+"#endif\n"
+"temp2 = convertToDT(loadpix(src2ptr + src2_index));\n"
+"temp = MIN_ABS2(temp, temp2);\n"
+"#ifdef OP_CALC2\n"
+"temp2 = MIN_ABS(temp2);\n"
+"#endif\n"
+"#endif\n"
+"#if kercn == 1\n"
+"#ifdef NEED_MINVAL\n"
+"#ifdef NEED_MINLOC\n"
+"if (minval > temp)\n"
+"{\n"
+"minval = temp;\n"
+"minloc = id;\n"
+"}\n"
+"#else\n"
+"minval = MIN(minval, temp);\n"
+"#endif\n"
+"#endif\n"
+"#ifdef NEED_MAXVAL\n"
+"#ifdef NEED_MAXLOC\n"
+"if (maxval < temp)\n"
+"{\n"
+"maxval = temp;\n"
+"maxloc = id;\n"
+"}\n"
+"#else\n"
+"maxval = MAX(maxval, temp);\n"
+"#endif\n"
+"#ifdef OP_CALC2\n"
+"maxval2 = MAX(maxval2, temp2);\n"
+"#endif\n"
+"#endif\n"
+"#elif kercn >= 2\n"
+"CALC_P(s0, 0)\n"
+"CALC_P(s1, 1)\n"
+"#if kercn >= 3\n"
+"CALC_P(s2, 2)\n"
+"#if kercn >= 4\n"
+"CALC_P(s3, 3)\n"
+"#if kercn >= 8\n"
+"CALC_P(s4, 4)\n"
+"CALC_P(s5, 5)\n"
+"CALC_P(s6, 6)\n"
+"CALC_P(s7, 7)\n"
+"#if kercn == 16\n"
+"CALC_P(s8, 8)\n"
+"CALC_P(s9, 9)\n"
+"CALC_P(sA, 10)\n"
+"CALC_P(sB, 11)\n"
+"CALC_P(sC, 12)\n"
+"CALC_P(sD, 13)\n"
+"CALC_P(sE, 14)\n"
+"CALC_P(sF, 15)\n"
+"#endif\n"
+"#endif\n"
+"#endif\n"
+"#endif\n"
+"#endif\n"
+"}\n"
+"}\n"
+"if (lid < WGS2_ALIGNED)\n"
+"{\n"
+"#ifdef NEED_MINVAL\n"
+"localmem_min[lid] = minval;\n"
+"#endif\n"
+"#ifdef NEED_MAXVAL\n"
+"localmem_max[lid] = maxval;\n"
+"#endif\n"
+"#ifdef NEED_MINLOC\n"
+"localmem_minloc[lid] = minloc;\n"
+"#endif\n"
+"#ifdef NEED_MAXLOC\n"
+"localmem_maxloc[lid] = maxloc;\n"
+"#endif\n"
+"#ifdef OP_CALC2\n"
+"localmem_max2[lid] = maxval2;\n"
+"#endif\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (lid >= WGS2_ALIGNED && total >= WGS2_ALIGNED)\n"
+"{\n"
+"int lid3 = lid - WGS2_ALIGNED;\n"
+"#ifdef NEED_MINVAL\n"
+"#ifdef NEED_MINLOC\n"
+"if (localmem_min[lid3] >= minval)\n"
+"{\n"
+"if (localmem_min[lid3] == minval)\n"
+"localmem_minloc[lid3] = min(localmem_minloc[lid3], minloc);\n"
+"else\n"
+"localmem_minloc[lid3] = minloc,\n"
+"localmem_min[lid3] = minval;\n"
+"}\n"
+"#else\n"
+"localmem_min[lid3] = MIN(localmem_min[lid3], minval);\n"
+"#endif\n"
+"#endif\n"
+"#ifdef NEED_MAXVAL\n"
+"#ifdef NEED_MAXLOC\n"
+"if (localmem_max[lid3] <= maxval)\n"
+"{\n"
+"if (localmem_max[lid3] == maxval)\n"
+"localmem_maxloc[lid3] = min(localmem_maxloc[lid3], maxloc);\n"
+"else\n"
+"localmem_maxloc[lid3] = maxloc,\n"
+"localmem_max[lid3] = maxval;\n"
+"}\n"
+"#else\n"
+"localmem_max[lid3] = MAX(localmem_max[lid3], maxval);\n"
+"#endif\n"
+"#endif\n"
+"#ifdef OP_CALC2\n"
+"localmem_max2[lid3] = MAX(localmem_max2[lid3], maxval2);\n"
+"#endif\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"for (int lsize = WGS2_ALIGNED >> 1; lsize > 0; lsize >>= 1)\n"
+"{\n"
+"if (lid < lsize)\n"
+"{\n"
+"int lid2 = lsize + lid;\n"
+"#ifdef NEED_MINVAL\n"
+"#ifdef NEED_MINLOC\n"
+"if (localmem_min[lid] >= localmem_min[lid2])\n"
+"{\n"
+"if (localmem_min[lid] == localmem_min[lid2])\n"
+"localmem_minloc[lid] = min(localmem_minloc[lid2], localmem_minloc[lid]);\n"
+"else\n"
+"localmem_minloc[lid] = localmem_minloc[lid2],\n"
+"localmem_min[lid] = localmem_min[lid2];\n"
+"}\n"
+"#else\n"
+"localmem_min[lid] = MIN(localmem_min[lid], localmem_min[lid2]);\n"
+"#endif\n"
+"#endif\n"
+"#ifdef NEED_MAXVAL\n"
+"#ifdef NEED_MAXLOC\n"
+"if (localmem_max[lid] <= localmem_max[lid2])\n"
+"{\n"
+"if (localmem_max[lid] == localmem_max[lid2])\n"
+"localmem_maxloc[lid] = min(localmem_maxloc[lid2], localmem_maxloc[lid]);\n"
+"else\n"
+"localmem_maxloc[lid] = localmem_maxloc[lid2],\n"
+"localmem_max[lid] = localmem_max[lid2];\n"
+"}\n"
+"#else\n"
+"localmem_max[lid] = MAX(localmem_max[lid], localmem_max[lid2]);\n"
+"#endif\n"
+"#endif\n"
+"#ifdef OP_CALC2\n"
+"localmem_max2[lid] = MAX(localmem_max2[lid], localmem_max2[lid2]);\n"
+"#endif\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"if (lid == 0)\n"
+"{\n"
+"int pos = 0;\n"
+"#ifdef NEED_MINVAL\n"
+"*(__global dstT1 *)(dstptr + mad24(gid, (int)sizeof(dstT1), pos)) = localmem_min[0];\n"
+"pos = mad24(groupnum, (int)sizeof(dstT1), pos);\n"
+"#endif\n"
+"#ifdef NEED_MAXVAL\n"
+"*(__global dstT1 *)(dstptr + mad24(gid, (int)sizeof(dstT1), pos)) = localmem_max[0];\n"
+"pos = mad24(groupnum, (int)sizeof(dstT1), pos);\n"
+"#endif\n"
+"#ifdef NEED_MINLOC\n"
+"*(__global uint *)(dstptr + mad24(gid, (int)sizeof(uint), pos)) = localmem_minloc[0];\n"
+"pos = mad24(groupnum, (int)sizeof(uint), pos);\n"
+"#endif\n"
+"#ifdef NEED_MAXLOC\n"
+"*(__global uint *)(dstptr + mad24(gid, (int)sizeof(uint), pos)) = localmem_maxloc[0];\n"
+"#ifdef OP_CALC2\n"
+"pos = mad24(groupnum, (int)sizeof(uint), pos);\n"
+"#endif\n"
+"#endif\n"
+"#ifdef OP_CALC2\n"
+"*(__global dstT1 *)(dstptr + mad24(gid, (int)sizeof(dstT1), pos)) = localmem_max2[0];\n"
+"#endif\n"
+"}\n"
+"}\n"
+, "c2741330ed8390675ed210edd54f5258"};
+ProgramSource minmaxloc_oclsrc(minmaxloc.programStr);
+const struct ProgramEntry mixchannels={"mixchannels",
+"#define DECLARE_INPUT_MAT(i) \\\n"
+"__global const uchar * src##i##ptr, int src##i##_step, int src##i##_offset,\n"
+"#define DECLARE_OUTPUT_MAT(i) \\\n"
+"__global uchar * dst##i##ptr, int dst##i##_step, int dst##i##_offset,\n"
+"#define DECLARE_INDEX(i) \\\n"
+"int src##i##_index = mad24(src##i##_step, y0, mad24(x, (int)sizeof(T) * scn##i, src##i##_offset)); \\\n"
+"int dst##i##_index = mad24(dst##i##_step, y0, mad24(x, (int)sizeof(T) * dcn##i, dst##i##_offset));\n"
+"#define PROCESS_ELEM(i) \\\n"
+"__global const T * src##i = (__global const T *)(src##i##ptr + src##i##_index); \\\n"
+"__global T * dst##i = (__global T *)(dst##i##ptr + dst##i##_index); \\\n"
+"dst##i[0] = src##i[0]; \\\n"
+"src##i##_index += src##i##_step; \\\n"
+"dst##i##_index += dst##i##_step;\n"
+"__kernel void mixChannels(DECLARE_INPUT_MAT_N DECLARE_OUTPUT_MAT_N int rows, int cols, int rowsPerWI)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1) * rowsPerWI;\n"
+"if (x < cols)\n"
+"{\n"
+"DECLARE_INDEX_N\n"
+"for (int y = y0, y1 = min(y0 + rowsPerWI, rows); y < y1; ++y)\n"
+"{\n"
+"PROCESS_ELEM_N\n"
+"}\n"
+"}\n"
+"}\n"
+, "26a27b81c3e2524a8eb918b3a518da0a"};
+ProgramSource mixchannels_oclsrc(mixchannels.programStr);
+const struct ProgramEntry mulspectrums={"mulspectrums",
+"inline float2 cmulf(float2 a, float2 b)\n"
+"{\n"
+"return (float2)(mad(a.x, b.x, - a.y * b.y), mad(a.x, b.y, a.y * b.x));\n"
+"}\n"
+"inline float2 conjf(float2 a)\n"
+"{\n"
+"return (float2)(a.x, - a.y);\n"
+"}\n"
+"__kernel void mulAndScaleSpectrums(__global const uchar * src1ptr, int src1_step, int src1_offset,\n"
+"__global const uchar * src2ptr, int src2_step, int src2_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset,\n"
+"int dst_rows, int dst_cols, int rowsPerWI)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1) * rowsPerWI;\n"
+"if (x < dst_cols)\n"
+"{\n"
+"int src1_index = mad24(y0, src1_step, mad24(x, (int)sizeof(float2), src1_offset));\n"
+"int src2_index = mad24(y0, src2_step, mad24(x, (int)sizeof(float2), src2_offset));\n"
+"int dst_index = mad24(y0, dst_step, mad24(x, (int)sizeof(float2), dst_offset));\n"
+"for (int y = y0, y1 = min(dst_rows, y0 + rowsPerWI); y < y1; ++y,\n"
+"src1_index += src1_step, src2_index += src2_step, dst_index += dst_step)\n"
+"{\n"
+"float2 src0 = *(__global const float2 *)(src1ptr + src1_index);\n"
+"float2 src1 = *(__global const float2 *)(src2ptr + src2_index);\n"
+"__global float2 * dst = (__global float2 *)(dstptr + dst_index);\n"
+"#ifdef CONJ\n"
+"float2 v = cmulf(src0, conjf(src1));\n"
+"#else\n"
+"float2 v = cmulf(src0, src1);\n"
+"#endif\n"
+"dst[0] = v;\n"
+"}\n"
+"}\n"
+"}\n"
+, "0ffb2c858f6664aa3e56efb81f025f5c"};
+ProgramSource mulspectrums_oclsrc(mulspectrums.programStr);
+const struct ProgramEntry normalize={"normalize",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#define noconvert\n"
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const srcT *)(addr)\n"
+"#define storepix(val, addr) *(__global dstT *)(addr) = val\n"
+"#define srcTSIZE (int)sizeof(srcT)\n"
+"#define dstTSIZE (int)sizeof(dstT)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const srcT1 *)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global dstT1 *)(addr))\n"
+"#define srcTSIZE ((int)sizeof(srcT1)*3)\n"
+"#define dstTSIZE ((int)sizeof(dstT1)*3)\n"
+"#endif\n"
+"__kernel void normalizek(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global const uchar * mask, int mask_step, int mask_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols\n"
+"#ifdef HAVE_SCALE\n"
+", float scale\n"
+"#endif\n"
+"#ifdef HAVE_DELTA\n"
+", float delta\n"
+"#endif\n"
+")\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1) * rowsPerWI;\n"
+"if (x < dst_cols)\n"
+"{\n"
+"int src_index = mad24(y0, src_step, mad24(x, srcTSIZE, src_offset));\n"
+"int mask_index = mad24(y0, mask_step, x + mask_offset);\n"
+"int dst_index = mad24(y0, dst_step, mad24(x, dstTSIZE, dst_offset));\n"
+"for (int y = y0, y1 = min(y0 + rowsPerWI, dst_rows); y < y1;\n"
+"++y, src_index += src_step, dst_index += dst_step, mask_index += mask_step)\n"
+"{\n"
+"if (mask[mask_index])\n"
+"{\n"
+"workT value = convertToWT(loadpix(srcptr + src_index));\n"
+"#ifdef HAVE_SCALE\n"
+"#ifdef HAVE_DELTA\n"
+"value = fma(value, (workT)(scale), (workT)(delta));\n"
+"#else\n"
+"value *= (workT)(scale);\n"
+"#endif\n"
+"#else\n"
+"#ifdef HAVE_DELTA\n"
+"value += (workT)(delta);\n"
+"#endif\n"
+"#endif\n"
+"storepix(convertToDT(value), dstptr + dst_index);\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+, "05e23451b4bf16c50a0eba9d6c5c0012"};
+ProgramSource normalize_oclsrc(normalize.programStr);
+const struct ProgramEntry reduce={"reduce",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#if defined OP_NORM_INF_MASK\n"
+"#ifdef DEPTH_0\n"
+"#define MIN_VAL 0\n"
+"#define MAX_VAL 255\n"
+"#elif defined DEPTH_1\n"
+"#define MIN_VAL -128\n"
+"#define MAX_VAL 127\n"
+"#elif defined DEPTH_2\n"
+"#define MIN_VAL 0\n"
+"#define MAX_VAL 65535\n"
+"#elif defined DEPTH_3\n"
+"#define MIN_VAL -32768\n"
+"#define MAX_VAL 32767\n"
+"#elif defined DEPTH_4\n"
+"#define MIN_VAL INT_MIN\n"
+"#define MAX_VAL INT_MAX\n"
+"#elif defined DEPTH_5\n"
+"#define MIN_VAL (-FLT_MAX)\n"
+"#define MAX_VAL FLT_MAX\n"
+"#elif defined DEPTH_6\n"
+"#define MIN_VAL (-DBL_MAX)\n"
+"#define MAX_VAL DBL_MAX\n"
+"#endif\n"
+"#define dstT srcT\n"
+"#define dstT1 srcT1\n"
+"#endif\n"
+"#define noconvert\n"
+"#ifndef kercn\n"
+"#define kercn 1\n"
+"#endif\n"
+"#ifdef HAVE_MASK_CONT\n"
+"#define MASK_INDEX int mask_index = id + mask_offset;\n"
+"#else\n"
+"#define MASK_INDEX int mask_index = mad24(id / cols, mask_step, mask_offset + (id % cols))\n"
+"#endif\n"
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const srcT *)(addr)\n"
+"#define storepix(val, addr) *(__global dstT *)(addr) = val\n"
+"#if kercn == 1\n"
+"#define srcTSIZE (int)sizeof(srcT)\n"
+"#else\n"
+"#define srcTSIZE (int)sizeof(srcT1)\n"
+"#endif\n"
+"#define dstTSIZE (int)sizeof(dstT)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const srcT1 *)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global dstT1 *)(addr))\n"
+"#define srcTSIZE ((int)sizeof(srcT1)*3)\n"
+"#define dstTSIZE ((int)sizeof(dstT1)*3)\n"
+"#endif\n"
+"#if ddepth <= 4\n"
+"#define SUM_ABS(a) convertFromU(abs(a))\n"
+"#define SUM_ABS2(a, b) convertFromU(abs_diff(a, b))\n"
+"#else\n"
+"#define SUM_ABS(a) fabs(a)\n"
+"#define SUM_ABS2(a, b) fabs(a - b)\n"
+"#endif\n"
+"#ifdef HAVE_MASK\n"
+"#ifdef HAVE_SRC2\n"
+"#define EXTRA_PARAMS , __global const uchar * mask, int mask_step, int mask_offset, __global const uchar * src2ptr, int src2_step, int src2_offset\n"
+"#else\n"
+"#define EXTRA_PARAMS , __global const uchar * mask, int mask_step, int mask_offset\n"
+"#endif\n"
+"#else\n"
+"#ifdef HAVE_SRC2\n"
+"#define EXTRA_PARAMS , __global const uchar * src2ptr, int src2_step, int src2_offset\n"
+"#else\n"
+"#define EXTRA_PARAMS\n"
+"#endif\n"
+"#endif\n"
+"#if defined OP_SUM || defined OP_SUM_ABS || defined OP_SUM_SQR || defined OP_DOT\n"
+"#ifdef OP_DOT\n"
+"#if ddepth <= 4\n"
+"#define FUNC(a, b, c) a = mad24(b, c, a)\n"
+"#else\n"
+"#define FUNC(a, b, c) a = mad(b, c, a)\n"
+"#endif\n"
+"#elif defined OP_SUM\n"
+"#define FUNC(a, b) a += b\n"
+"#elif defined OP_SUM_ABS\n"
+"#define FUNC(a, b) a += SUM_ABS(b)\n"
+"#elif defined OP_SUM_SQR\n"
+"#if ddepth <= 4\n"
+"#define FUNC(a, b) a = mad24(b, b, a)\n"
+"#else\n"
+"#define FUNC(a, b) a = mad(b, b, a)\n"
+"#endif\n"
+"#endif\n"
+"#ifdef OP_CALC2\n"
+"#define DECLARE_LOCAL_MEM \\\n"
+"__local dstT localmem[WGS2_ALIGNED], localmem2[WGS2_ALIGNED]\n"
+"#define DEFINE_ACCUMULATOR \\\n"
+"dstT accumulator = (dstT)(0), accumulator2 = (dstT)(0)\n"
+"#else\n"
+"#define DECLARE_LOCAL_MEM \\\n"
+"__local dstT localmem[WGS2_ALIGNED]\n"
+"#define DEFINE_ACCUMULATOR \\\n"
+"dstT accumulator = (dstT)(0)\n"
+"#endif\n"
+"#ifdef HAVE_SRC2\n"
+"#ifdef OP_CALC2\n"
+"#define PROCESS_ELEMS \\\n"
+"dstT temp = convertToDT(loadpix(srcptr + src_index)); \\\n"
+"dstT temp2 = convertToDT(loadpix(src2ptr + src2_index)); \\\n"
+"temp = SUM_ABS2(temp, temp2); \\\n"
+"temp2 = SUM_ABS(temp2); \\\n"
+"FUNC(accumulator2, temp2); \\\n"
+"FUNC(accumulator, temp)\n"
+"#else\n"
+"#define PROCESS_ELEMS \\\n"
+"dstT temp = convertToDT(loadpix(srcptr + src_index)); \\\n"
+"dstT temp2 = convertToDT(loadpix(src2ptr + src2_index)); \\\n"
+"temp = SUM_ABS2(temp, temp2); \\\n"
+"FUNC(accumulator, temp)\n"
+"#endif\n"
+"#else\n"
+"#define PROCESS_ELEMS \\\n"
+"dstT temp = convertToDT(loadpix(srcptr + src_index)); \\\n"
+"FUNC(accumulator, temp)\n"
+"#endif\n"
+"#ifdef HAVE_MASK\n"
+"#define REDUCE_GLOBAL \\\n"
+"MASK_INDEX; \\\n"
+"if (mask[mask_index]) \\\n"
+"{ \\\n"
+"PROCESS_ELEMS; \\\n"
+"}\n"
+"#elif defined OP_DOT\n"
+"#ifdef HAVE_SRC2_CONT\n"
+"#define SRC2_INDEX int src2_index = mad24(id, srcTSIZE, src2_offset);\n"
+"#else\n"
+"#define SRC2_INDEX int src2_index = mad24(id / cols, src2_step, mad24(id % cols, srcTSIZE, src2_offset))\n"
+"#endif\n"
+"#if kercn == 1\n"
+"#define REDUCE_GLOBAL \\\n"
+"SRC2_INDEX; \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)), temp2 = convertToDT(loadpix(src2ptr + src2_index)); \\\n"
+"FUNC(accumulator, temp, temp2)\n"
+"#elif kercn == 2\n"
+"#define REDUCE_GLOBAL \\\n"
+"SRC2_INDEX; \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)), temp2 = convertToDT(loadpix(src2ptr + src2_index)); \\\n"
+"FUNC(accumulator, temp.s0, temp2.s0); \\\n"
+"FUNC(accumulator, temp.s1, temp2.s1)\n"
+"#elif kercn == 4\n"
+"#define REDUCE_GLOBAL \\\n"
+"SRC2_INDEX; \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)), temp2 = convertToDT(loadpix(src2ptr + src2_index)); \\\n"
+"FUNC(accumulator, temp.s0, temp2.s0); \\\n"
+"FUNC(accumulator, temp.s1, temp2.s1); \\\n"
+"FUNC(accumulator, temp.s2, temp2.s2); \\\n"
+"FUNC(accumulator, temp.s3, temp2.s3)\n"
+"#elif kercn == 8\n"
+"#define REDUCE_GLOBAL \\\n"
+"SRC2_INDEX; \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)), temp2 = convertToDT(loadpix(src2ptr + src2_index)); \\\n"
+"FUNC(accumulator, temp.s0, temp2.s0); \\\n"
+"FUNC(accumulator, temp.s1, temp2.s1); \\\n"
+"FUNC(accumulator, temp.s2, temp2.s2); \\\n"
+"FUNC(accumulator, temp.s3, temp2.s3); \\\n"
+"FUNC(accumulator, temp.s4, temp2.s4); \\\n"
+"FUNC(accumulator, temp.s5, temp2.s5); \\\n"
+"FUNC(accumulator, temp.s6, temp2.s6); \\\n"
+"FUNC(accumulator, temp.s7, temp2.s7)\n"
+"#elif kercn == 16\n"
+"#define REDUCE_GLOBAL \\\n"
+"SRC2_INDEX; \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)), temp2 = convertToDT(loadpix(src2ptr + src2_index)); \\\n"
+"FUNC(accumulator, temp.s0, temp2.s0); \\\n"
+"FUNC(accumulator, temp.s1, temp2.s1); \\\n"
+"FUNC(accumulator, temp.s2, temp2.s2); \\\n"
+"FUNC(accumulator, temp.s3, temp2.s3); \\\n"
+"FUNC(accumulator, temp.s4, temp2.s4); \\\n"
+"FUNC(accumulator, temp.s5, temp2.s5); \\\n"
+"FUNC(accumulator, temp.s6, temp2.s6); \\\n"
+"FUNC(accumulator, temp.s7, temp2.s7); \\\n"
+"FUNC(accumulator, temp.s8, temp2.s8); \\\n"
+"FUNC(accumulator, temp.s9, temp2.s9); \\\n"
+"FUNC(accumulator, temp.sA, temp2.sA); \\\n"
+"FUNC(accumulator, temp.sB, temp2.sB); \\\n"
+"FUNC(accumulator, temp.sC, temp2.sC); \\\n"
+"FUNC(accumulator, temp.sD, temp2.sD); \\\n"
+"FUNC(accumulator, temp.sE, temp2.sE); \\\n"
+"FUNC(accumulator, temp.sF, temp2.sF)\n"
+"#endif\n"
+"#else\n"
+"#ifdef HAVE_SRC2\n"
+"#ifdef OP_CALC2\n"
+"#if kercn == 1\n"
+"#define REDUCE_GLOBAL \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)); \\\n"
+"dstTK temp2 = convertToDT(loadpix(src2ptr + src2_index)); \\\n"
+"temp = SUM_ABS2(temp, temp2); \\\n"
+"temp2 = SUM_ABS(temp2); \\\n"
+"FUNC(accumulator, temp); \\\n"
+"FUNC(accumulator2, temp2)\n"
+"#elif kercn == 2\n"
+"#define REDUCE_GLOBAL \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)); \\\n"
+"dstTK temp2 = convertToDT(loadpix(src2ptr + src2_index)); \\\n"
+"temp = SUM_ABS2(temp, temp2); \\\n"
+"temp2 = SUM_ABS(temp2); \\\n"
+"FUNC(accumulator, temp.s0); \\\n"
+"FUNC(accumulator, temp.s1); \\\n"
+"FUNC(accumulator2, temp2.s0); \\\n"
+"FUNC(accumulator2, temp2.s1)\n"
+"#elif kercn == 4\n"
+"#define REDUCE_GLOBAL \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)); \\\n"
+"dstTK temp2 = convertToDT(loadpix(src2ptr + src2_index)); \\\n"
+"temp = SUM_ABS2(temp, temp2); \\\n"
+"temp2 = SUM_ABS(temp2); \\\n"
+"FUNC(accumulator, temp.s0); \\\n"
+"FUNC(accumulator, temp.s1); \\\n"
+"FUNC(accumulator, temp.s2); \\\n"
+"FUNC(accumulator, temp.s3); \\\n"
+"FUNC(accumulator2, temp2.s0); \\\n"
+"FUNC(accumulator2, temp2.s1); \\\n"
+"FUNC(accumulator2, temp2.s2); \\\n"
+"FUNC(accumulator2, temp2.s3)\n"
+"#elif kercn == 8\n"
+"#define REDUCE_GLOBAL \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)); \\\n"
+"dstTK temp2 = convertToDT(loadpix(src2ptr + src2_index)); \\\n"
+"temp = SUM_ABS2(temp, temp2); \\\n"
+"temp2 = SUM_ABS(temp2); \\\n"
+"FUNC(accumulator, temp.s0); \\\n"
+"FUNC(accumulator, temp.s1); \\\n"
+"FUNC(accumulator, temp.s2); \\\n"
+"FUNC(accumulator, temp.s3); \\\n"
+"FUNC(accumulator, temp.s4); \\\n"
+"FUNC(accumulator, temp.s5); \\\n"
+"FUNC(accumulator, temp.s6); \\\n"
+"FUNC(accumulator, temp.s7); \\\n"
+"FUNC(accumulator2, temp2.s0); \\\n"
+"FUNC(accumulator2, temp2.s1); \\\n"
+"FUNC(accumulator2, temp2.s2); \\\n"
+"FUNC(accumulator2, temp2.s3); \\\n"
+"FUNC(accumulator2, temp2.s4); \\\n"
+"FUNC(accumulator2, temp2.s5); \\\n"
+"FUNC(accumulator2, temp2.s6); \\\n"
+"FUNC(accumulator2, temp2.s7)\n"
+"#elif kercn == 16\n"
+"#define REDUCE_GLOBAL \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)); \\\n"
+"dstTK temp2 = convertToDT(loadpix(src2ptr + src2_index)); \\\n"
+"temp = SUM_ABS2(temp, temp2); \\\n"
+"temp2 = SUM_ABS(temp2); \\\n"
+"FUNC(accumulator, temp.s0); \\\n"
+"FUNC(accumulator, temp.s1); \\\n"
+"FUNC(accumulator, temp.s2); \\\n"
+"FUNC(accumulator, temp.s3); \\\n"
+"FUNC(accumulator, temp.s4); \\\n"
+"FUNC(accumulator, temp.s5); \\\n"
+"FUNC(accumulator, temp.s6); \\\n"
+"FUNC(accumulator, temp.s7); \\\n"
+"FUNC(accumulator, temp.s8); \\\n"
+"FUNC(accumulator, temp.s9); \\\n"
+"FUNC(accumulator, temp.sA); \\\n"
+"FUNC(accumulator, temp.sB); \\\n"
+"FUNC(accumulator, temp.sC); \\\n"
+"FUNC(accumulator, temp.sD); \\\n"
+"FUNC(accumulator, temp.sE); \\\n"
+"FUNC(accumulator, temp.sF); \\\n"
+"FUNC(accumulator2, temp2.s0); \\\n"
+"FUNC(accumulator2, temp2.s1); \\\n"
+"FUNC(accumulator2, temp2.s2); \\\n"
+"FUNC(accumulator2, temp2.s3); \\\n"
+"FUNC(accumulator2, temp2.s4); \\\n"
+"FUNC(accumulator2, temp2.s5); \\\n"
+"FUNC(accumulator2, temp2.s6); \\\n"
+"FUNC(accumulator2, temp2.s7); \\\n"
+"FUNC(accumulator2, temp2.s8); \\\n"
+"FUNC(accumulator2, temp2.s9); \\\n"
+"FUNC(accumulator2, temp2.sA); \\\n"
+"FUNC(accumulator2, temp2.sB); \\\n"
+"FUNC(accumulator2, temp2.sC); \\\n"
+"FUNC(accumulator2, temp2.sD); \\\n"
+"FUNC(accumulator2, temp2.sE); \\\n"
+"FUNC(accumulator2, temp2.sF)\n"
+"#endif\n"
+"#else\n"
+"#if kercn == 1\n"
+"#define REDUCE_GLOBAL \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)); \\\n"
+"dstTK temp2 = convertToDT(loadpix(src2ptr + src2_index)); \\\n"
+"temp = SUM_ABS2(temp, temp2); \\\n"
+"FUNC(accumulator, temp)\n"
+"#elif kercn == 2\n"
+"#define REDUCE_GLOBAL \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)); \\\n"
+"dstTK temp2 = convertToDT(loadpix(src2ptr + src2_index)); \\\n"
+"temp = SUM_ABS2(temp, temp2); \\\n"
+"FUNC(accumulator, temp.s0); \\\n"
+"FUNC(accumulator, temp.s1)\n"
+"#elif kercn == 4\n"
+"#define REDUCE_GLOBAL \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)); \\\n"
+"dstTK temp2 = convertToDT(loadpix(src2ptr + src2_index)); \\\n"
+"temp = SUM_ABS2(temp, temp2); \\\n"
+"FUNC(accumulator, temp.s0); \\\n"
+"FUNC(accumulator, temp.s1); \\\n"
+"FUNC(accumulator, temp.s2); \\\n"
+"FUNC(accumulator, temp.s3)\n"
+"#elif kercn == 8\n"
+"#define REDUCE_GLOBAL \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)); \\\n"
+"dstTK temp2 = convertToDT(loadpix(src2ptr + src2_index)); \\\n"
+"temp = SUM_ABS2(temp, temp2); \\\n"
+"FUNC(accumulator, temp.s0); \\\n"
+"FUNC(accumulator, temp.s1); \\\n"
+"FUNC(accumulator, temp.s2); \\\n"
+"FUNC(accumulator, temp.s3); \\\n"
+"FUNC(accumulator, temp.s4); \\\n"
+"FUNC(accumulator, temp.s5); \\\n"
+"FUNC(accumulator, temp.s6); \\\n"
+"FUNC(accumulator, temp.s7)\n"
+"#elif kercn == 16\n"
+"#define REDUCE_GLOBAL \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)); \\\n"
+"dstTK temp2 = convertToDT(loadpix(src2ptr + src2_index)); \\\n"
+"temp = SUM_ABS2(temp, temp2); \\\n"
+"FUNC(accumulator, temp.s0); \\\n"
+"FUNC(accumulator, temp.s1); \\\n"
+"FUNC(accumulator, temp.s2); \\\n"
+"FUNC(accumulator, temp.s3); \\\n"
+"FUNC(accumulator, temp.s4); \\\n"
+"FUNC(accumulator, temp.s5); \\\n"
+"FUNC(accumulator, temp.s6); \\\n"
+"FUNC(accumulator, temp.s7); \\\n"
+"FUNC(accumulator, temp.s8); \\\n"
+"FUNC(accumulator, temp.s9); \\\n"
+"FUNC(accumulator, temp.sA); \\\n"
+"FUNC(accumulator, temp.sB); \\\n"
+"FUNC(accumulator, temp.sC); \\\n"
+"FUNC(accumulator, temp.sD); \\\n"
+"FUNC(accumulator, temp.sE); \\\n"
+"FUNC(accumulator, temp.sF)\n"
+"#endif\n"
+"#endif\n"
+"#else\n"
+"#if kercn == 1\n"
+"#define REDUCE_GLOBAL \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)); \\\n"
+"FUNC(accumulator, temp)\n"
+"#elif kercn == 2\n"
+"#define REDUCE_GLOBAL \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)); \\\n"
+"FUNC(accumulator, temp.s0); \\\n"
+"FUNC(accumulator, temp.s1)\n"
+"#elif kercn == 4\n"
+"#define REDUCE_GLOBAL \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)); \\\n"
+"FUNC(accumulator, temp.s0); \\\n"
+"FUNC(accumulator, temp.s1); \\\n"
+"FUNC(accumulator, temp.s2); \\\n"
+"FUNC(accumulator, temp.s3)\n"
+"#elif kercn == 8\n"
+"#define REDUCE_GLOBAL \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)); \\\n"
+"FUNC(accumulator, temp.s0); \\\n"
+"FUNC(accumulator, temp.s1); \\\n"
+"FUNC(accumulator, temp.s2); \\\n"
+"FUNC(accumulator, temp.s3); \\\n"
+"FUNC(accumulator, temp.s4); \\\n"
+"FUNC(accumulator, temp.s5); \\\n"
+"FUNC(accumulator, temp.s6); \\\n"
+"FUNC(accumulator, temp.s7)\n"
+"#elif kercn == 16\n"
+"#define REDUCE_GLOBAL \\\n"
+"dstTK temp = convertToDT(loadpix(srcptr + src_index)); \\\n"
+"FUNC(accumulator, temp.s0); \\\n"
+"FUNC(accumulator, temp.s1); \\\n"
+"FUNC(accumulator, temp.s2); \\\n"
+"FUNC(accumulator, temp.s3); \\\n"
+"FUNC(accumulator, temp.s4); \\\n"
+"FUNC(accumulator, temp.s5); \\\n"
+"FUNC(accumulator, temp.s6); \\\n"
+"FUNC(accumulator, temp.s7); \\\n"
+"FUNC(accumulator, temp.s8); \\\n"
+"FUNC(accumulator, temp.s9); \\\n"
+"FUNC(accumulator, temp.sA); \\\n"
+"FUNC(accumulator, temp.sB); \\\n"
+"FUNC(accumulator, temp.sC); \\\n"
+"FUNC(accumulator, temp.sD); \\\n"
+"FUNC(accumulator, temp.sE); \\\n"
+"FUNC(accumulator, temp.sF)\n"
+"#endif\n"
+"#endif\n"
+"#endif\n"
+"#ifdef OP_CALC2\n"
+"#define SET_LOCAL_1 \\\n"
+"localmem[lid] = accumulator; \\\n"
+"localmem2[lid] = accumulator2\n"
+"#define REDUCE_LOCAL_1 \\\n"
+"localmem[lid - WGS2_ALIGNED] += accumulator; \\\n"
+"localmem2[lid - WGS2_ALIGNED] += accumulator2\n"
+"#define REDUCE_LOCAL_2 \\\n"
+"localmem[lid] += localmem[lid2]; \\\n"
+"localmem2[lid] += localmem2[lid2]\n"
+"#define CALC_RESULT \\\n"
+"storepix(localmem[0], dstptr + dstTSIZE * gid); \\\n"
+"storepix(localmem2[0], dstptr + mad24(groupnum, dstTSIZE, dstTSIZE * gid))\n"
+"#else\n"
+"#define SET_LOCAL_1 \\\n"
+"localmem[lid] = accumulator\n"
+"#define REDUCE_LOCAL_1 \\\n"
+"localmem[lid - WGS2_ALIGNED] += accumulator\n"
+"#define REDUCE_LOCAL_2 \\\n"
+"localmem[lid] += localmem[lid2]\n"
+"#define CALC_RESULT \\\n"
+"storepix(localmem[0], dstptr + dstTSIZE * gid)\n"
+"#endif\n"
+"#elif defined OP_COUNT_NON_ZERO\n"
+"#define dstT int\n"
+"#define DECLARE_LOCAL_MEM \\\n"
+"__local dstT localmem[WGS2_ALIGNED]\n"
+"#define DEFINE_ACCUMULATOR \\\n"
+"dstT accumulator = (dstT)(0); \\\n"
+"srcT1 zero = (srcT1)(0), one = (srcT1)(1)\n"
+"#if kercn == 1\n"
+"#define REDUCE_GLOBAL \\\n"
+"accumulator += loadpix(srcptr + src_index) == zero ? zero : one\n"
+"#elif kercn == 2\n"
+"#define REDUCE_GLOBAL \\\n"
+"srcT value = loadpix(srcptr + src_index); \\\n"
+"accumulator += value.s0 == zero ? zero : one; \\\n"
+"accumulator += value.s1 == zero ? zero : one\n"
+"#elif kercn == 4\n"
+"#define REDUCE_GLOBAL \\\n"
+"srcT value = loadpix(srcptr + src_index); \\\n"
+"accumulator += value.s0 == zero ? zero : one; \\\n"
+"accumulator += value.s1 == zero ? zero : one; \\\n"
+"accumulator += value.s2 == zero ? zero : one; \\\n"
+"accumulator += value.s3 == zero ? zero : one\n"
+"#elif kercn == 8\n"
+"#define REDUCE_GLOBAL \\\n"
+"srcT value = loadpix(srcptr + src_index); \\\n"
+"accumulator += value.s0 == zero ? zero : one; \\\n"
+"accumulator += value.s1 == zero ? zero : one; \\\n"
+"accumulator += value.s2 == zero ? zero : one; \\\n"
+"accumulator += value.s3 == zero ? zero : one; \\\n"
+"accumulator += value.s4 == zero ? zero : one; \\\n"
+"accumulator += value.s5 == zero ? zero : one; \\\n"
+"accumulator += value.s6 == zero ? zero : one; \\\n"
+"accumulator += value.s7 == zero ? zero : one\n"
+"#elif kercn == 16\n"
+"#define REDUCE_GLOBAL \\\n"
+"srcT value = loadpix(srcptr + src_index); \\\n"
+"accumulator += value.s0 == zero ? zero : one; \\\n"
+"accumulator += value.s1 == zero ? zero : one; \\\n"
+"accumulator += value.s2 == zero ? zero : one; \\\n"
+"accumulator += value.s3 == zero ? zero : one; \\\n"
+"accumulator += value.s4 == zero ? zero : one; \\\n"
+"accumulator += value.s5 == zero ? zero : one; \\\n"
+"accumulator += value.s6 == zero ? zero : one; \\\n"
+"accumulator += value.s7 == zero ? zero : one; \\\n"
+"accumulator += value.s8 == zero ? zero : one; \\\n"
+"accumulator += value.s9 == zero ? zero : one; \\\n"
+"accumulator += value.sA == zero ? zero : one; \\\n"
+"accumulator += value.sB == zero ? zero : one; \\\n"
+"accumulator += value.sC == zero ? zero : one; \\\n"
+"accumulator += value.sD == zero ? zero : one; \\\n"
+"accumulator += value.sE == zero ? zero : one; \\\n"
+"accumulator += value.sF == zero ? zero : one\n"
+"#endif\n"
+"#define SET_LOCAL_1 \\\n"
+"localmem[lid] = accumulator\n"
+"#define REDUCE_LOCAL_1 \\\n"
+"localmem[lid - WGS2_ALIGNED] += accumulator\n"
+"#define REDUCE_LOCAL_2 \\\n"
+"localmem[lid] += localmem[lid2]\n"
+"#define CALC_RESULT \\\n"
+"storepix(localmem[0], dstptr + dstTSIZE * gid)\n"
+"#else\n"
+"#error \"No operation\"\n"
+"#endif\n"
+"#ifdef OP_DOT\n"
+"#undef EXTRA_PARAMS\n"
+"#define EXTRA_PARAMS , __global uchar * src2ptr, int src2_step, int src2_offset\n"
+"#endif\n"
+"__kernel void reduce(__global const uchar * srcptr, int src_step, int src_offset, int cols,\n"
+"int total, int groupnum, __global uchar * dstptr EXTRA_PARAMS)\n"
+"{\n"
+"int lid = get_local_id(0);\n"
+"int gid = get_group_id(0);\n"
+"int id = get_global_id(0) * kercn;\n"
+"srcptr += src_offset;\n"
+"#ifdef HAVE_SRC2\n"
+"src2ptr += src2_offset;\n"
+"#endif\n"
+"DECLARE_LOCAL_MEM;\n"
+"DEFINE_ACCUMULATOR;\n"
+"for (int grain = groupnum * WGS * kercn; id < total; id += grain)\n"
+"{\n"
+"#ifdef HAVE_SRC_CONT\n"
+"int src_index = id * srcTSIZE;\n"
+"#else\n"
+"int src_index = mad24(id / cols, src_step, mul24(id % cols, srcTSIZE));\n"
+"#endif\n"
+"#ifdef HAVE_SRC2\n"
+"#ifdef HAVE_SRC2_CONT\n"
+"int src2_index = id * srcTSIZE;\n"
+"#else\n"
+"int src2_index = mad24(id / cols, src2_step, mul24(id % cols, srcTSIZE));\n"
+"#endif\n"
+"#endif\n"
+"REDUCE_GLOBAL;\n"
+"}\n"
+"if (lid < WGS2_ALIGNED)\n"
+"{\n"
+"SET_LOCAL_1;\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (lid >= WGS2_ALIGNED && total >= WGS2_ALIGNED)\n"
+"{\n"
+"REDUCE_LOCAL_1;\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"for (int lsize = WGS2_ALIGNED >> 1; lsize > 0; lsize >>= 1)\n"
+"{\n"
+"if (lid < lsize)\n"
+"{\n"
+"int lid2 = lsize + lid;\n"
+"REDUCE_LOCAL_2;\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"if (lid == 0)\n"
+"{\n"
+"CALC_RESULT;\n"
+"}\n"
+"}\n"
+, "2bd554448b0b0af7e1a1ddd57a55f5a6"};
+ProgramSource reduce_oclsrc(reduce.programStr);
+const struct ProgramEntry reduce2={"reduce2",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#if ddepth == 0\n"
+"#define MIN_VAL 0\n"
+"#define MAX_VAL 255\n"
+"#elif ddepth == 1\n"
+"#define MIN_VAL -128\n"
+"#define MAX_VAL 127\n"
+"#elif ddepth == 2\n"
+"#define MIN_VAL 0\n"
+"#define MAX_VAL 65535\n"
+"#elif ddepth == 3\n"
+"#define MIN_VAL -32768\n"
+"#define MAX_VAL 32767\n"
+"#elif ddepth == 4\n"
+"#define MIN_VAL INT_MIN\n"
+"#define MAX_VAL INT_MAX\n"
+"#elif ddepth == 5\n"
+"#define MIN_VAL (-FLT_MAX)\n"
+"#define MAX_VAL FLT_MAX\n"
+"#elif ddepth == 6\n"
+"#define MIN_VAL (-DBL_MAX)\n"
+"#define MAX_VAL DBL_MAX\n"
+"#else\n"
+"#error \"Unsupported depth\"\n"
+"#endif\n"
+"#define noconvert\n"
+"#if defined OCL_CV_REDUCE_SUM || defined OCL_CV_REDUCE_AVG\n"
+"#define INIT_VALUE 0\n"
+"#define PROCESS_ELEM(acc, value) acc += value\n"
+"#elif defined OCL_CV_REDUCE_MAX\n"
+"#define INIT_VALUE MIN_VAL\n"
+"#define PROCESS_ELEM(acc, value) acc = max(value, acc)\n"
+"#elif defined OCL_CV_REDUCE_MIN\n"
+"#define INIT_VALUE MAX_VAL\n"
+"#define PROCESS_ELEM(acc, value) acc = min(value, acc)\n"
+"#else\n"
+"#error \"No operation is specified\"\n"
+"#endif\n"
+"#ifdef OP_REDUCE_PRE\n"
+"__kernel void reduce_horz_opt(__global const uchar * srcptr, int src_step, int src_offset, int rows, int cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset\n"
+"#ifdef OCL_CV_REDUCE_AVG\n"
+", float fscale\n"
+"#endif\n"
+")\n"
+"{\n"
+"__local bufT lsmem[TILE_HEIGHT][BUF_COLS][cn];\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"int liy = get_local_id(1);\n"
+"if ((x < BUF_COLS) && (y < rows))\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, (int)sizeof(srcT) * cn, src_offset));\n"
+"__global const srcT * src = (__global const srcT *)(srcptr + src_index);\n"
+"bufT tmp[cn];\n"
+"#pragma unroll\n"
+"for (int c = 0; c < cn; ++c)\n"
+"tmp[c] = INIT_VALUE;\n"
+"int src_step_mul = BUF_COLS * cn;\n"
+"for (int idx = x; idx < cols; idx += BUF_COLS, src += src_step_mul)\n"
+"{\n"
+"#pragma unroll\n"
+"for (int c = 0; c < cn; ++c)\n"
+"{\n"
+"bufT value = convertToBufT(src[c]);\n"
+"PROCESS_ELEM(tmp[c], value);\n"
+"}\n"
+"}\n"
+"#pragma unroll\n"
+"for (int c = 0; c < cn; ++c)\n"
+"lsmem[liy][x][c] = tmp[c];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if ((x < BUF_COLS / 2) && (y < rows))\n"
+"{\n"
+"#pragma unroll\n"
+"for (int c = 0; c < cn; ++c)\n"
+"{\n"
+"PROCESS_ELEM(lsmem[liy][x][c], lsmem[liy][x + BUF_COLS / 2][c]);\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if ((x == 0) && (y < rows))\n"
+"{\n"
+"int dst_index = mad24(y, dst_step, dst_offset);\n"
+"__global dstT * dst = (__global dstT *)(dstptr + dst_index);\n"
+"bufT tmp[cn];\n"
+"#pragma unroll\n"
+"for (int c = 0; c < cn; ++c)\n"
+"tmp[c] = INIT_VALUE;\n"
+"#pragma unroll\n"
+"for (int xin = 0; xin < BUF_COLS / 2; xin ++)\n"
+"{\n"
+"#pragma unroll\n"
+"for (int c = 0; c < cn; ++c)\n"
+"{\n"
+"PROCESS_ELEM(tmp[c], lsmem[liy][xin][c]);\n"
+"}\n"
+"}\n"
+"#pragma unroll\n"
+"for (int c = 0; c < cn; ++c)\n"
+"#ifdef OCL_CV_REDUCE_AVG\n"
+"dst[c] = convertToDT(convertToWT(tmp[c]) * fscale);\n"
+"#else\n"
+"dst[c] = convertToDT(tmp[c]);\n"
+"#endif\n"
+"}\n"
+"}\n"
+"#else\n"
+"__kernel void reduce(__global const uchar * srcptr, int src_step, int src_offset, int rows, int cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset\n"
+"#ifdef OCL_CV_REDUCE_AVG\n"
+", float fscale\n"
+"#endif\n"
+")\n"
+"{\n"
+"#if dim == 0\n"
+"int x = get_global_id(0);\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(x, (int)sizeof(srcT) * cn, src_offset);\n"
+"int dst_index = mad24(x, (int)sizeof(dstT0) * cn, dst_offset);\n"
+"__global dstT0 * dst = (__global dstT0 *)(dstptr + dst_index);\n"
+"dstT tmp[cn];\n"
+"#pragma unroll\n"
+"for (int c = 0; c < cn; ++c)\n"
+"tmp[c] = INIT_VALUE;\n"
+"for (int y = 0; y < rows; ++y, src_index += src_step)\n"
+"{\n"
+"__global const srcT * src = (__global const srcT *)(srcptr + src_index);\n"
+"#pragma unroll\n"
+"for (int c = 0; c < cn; ++c)\n"
+"{\n"
+"dstT value = convertToDT(src[c]);\n"
+"PROCESS_ELEM(tmp[c], value);\n"
+"}\n"
+"}\n"
+"#pragma unroll\n"
+"for (int c = 0; c < cn; ++c)\n"
+"#ifdef OCL_CV_REDUCE_AVG\n"
+"dst[c] = convertToDT0(convertToWT(tmp[c]) * fscale);\n"
+"#else\n"
+"dst[c] = convertToDT0(tmp[c]);\n"
+"#endif\n"
+"}\n"
+"#elif dim == 1\n"
+"int y = get_global_id(0);\n"
+"if (y < rows)\n"
+"{\n"
+"int src_index = mad24(y, src_step, src_offset);\n"
+"int dst_index = mad24(y, dst_step, dst_offset);\n"
+"__global const srcT * src = (__global const srcT *)(srcptr + src_index);\n"
+"__global dstT * dst = (__global dstT *)(dstptr + dst_index);\n"
+"dstT tmp[cn];\n"
+"#pragma unroll\n"
+"for (int c = 0; c < cn; ++c)\n"
+"tmp[c] = INIT_VALUE;\n"
+"for (int x = 0; x < cols; ++x, src += cn)\n"
+"{\n"
+"#pragma unroll\n"
+"for (int c = 0; c < cn; ++c)\n"
+"{\n"
+"dstT value = convertToDT(src[c]);\n"
+"PROCESS_ELEM(tmp[c], value);\n"
+"}\n"
+"}\n"
+"#pragma unroll\n"
+"for (int c = 0; c < cn; ++c)\n"
+"#ifdef OCL_CV_REDUCE_AVG\n"
+"dst[c] = convertToDT0(convertToWT(tmp[c]) * fscale);\n"
+"#else\n"
+"dst[c] = convertToDT0(tmp[c]);\n"
+"#endif\n"
+"}\n"
+"#else\n"
+"#error \"Dims must be either 0 or 1\"\n"
+"#endif\n"
+"}\n"
+"#endif\n"
+, "675811294a4da68880f2ace25764d371"};
+ProgramSource reduce2_oclsrc(reduce2.programStr);
+const struct ProgramEntry repeat={"repeat",
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const T *)(addr)\n"
+"#define storepix(val, addr) *(__global T *)(addr) = val\n"
+"#define TSIZE (int)sizeof(T)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const T1 *)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global T1 *)(addr))\n"
+"#define TSIZE ((int)sizeof(T1)*3)\n"
+"#endif\n"
+"__kernel void repeat(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1) * rowsPerWI;\n"
+"if (x < src_cols)\n"
+"{\n"
+"int src_index = mad24(y0, src_step, mad24(x, (int)sizeof(T), src_offset));\n"
+"int dst_index0 = mad24(y0, dst_step, mad24(x, (int)sizeof(T), dst_offset));\n"
+"for (int y = y0, y1 = min(src_rows, y0 + rowsPerWI); y < y1; ++y, src_index += src_step, dst_index0 += dst_step)\n"
+"{\n"
+"T srcelem = loadpix(srcptr + src_index);\n"
+"#pragma unroll\n"
+"for (int ey = 0; ey < ny; ++ey)\n"
+"{\n"
+"int dst_index = mad24(ey * src_rows, dst_step, dst_index0);\n"
+"#pragma unroll\n"
+"for (int ex = 0; ex < nx; ++ex)\n"
+"{\n"
+"storepix(srcelem, dstptr + dst_index);\n"
+"dst_index = mad24(src_cols, (int)sizeof(T), dst_index);\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+, "d7a6b479ac9abf39f50a2d86c0b50863"};
+ProgramSource repeat_oclsrc(repeat.programStr);
+const struct ProgramEntry set_identity={"set_identity",
+"#if kercn != 3\n"
+"#define storepix(val, addr) *(__global T *)(addr) = val\n"
+"#define TSIZE (int)sizeof(T)\n"
+"#define scalar scalar_\n"
+"#else\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global T1 *)(addr))\n"
+"#define TSIZE ((int)sizeof(T1)*3)\n"
+"#define scalar (T)(scalar_.x, scalar_.y, scalar_.z)\n"
+"#endif\n"
+"__kernel void setIdentity(__global uchar * srcptr, int src_step, int src_offset, int rows, int cols,\n"
+"ST scalar_)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1) * rowsPerWI;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y0, src_step, mad24(x, TSIZE, src_offset));\n"
+"#if kercn == cn\n"
+"#pragma unroll\n"
+"for (int y = y0, i = 0, y1 = min(rows, y0 + rowsPerWI); i < rowsPerWI; ++y, ++i, src_index += src_step)\n"
+"if (y < y1)\n"
+"storepix(x == y ? scalar : (T)(0), srcptr + src_index);\n"
+"#elif kercn == 4 && cn == 1\n"
+"if (y0 < rows)\n"
+"{\n"
+"storepix(x == y0 >> 2 ? (T)(scalar, 0, 0, 0) : (T)(0), srcptr + src_index);\n"
+"if (++y0 < rows)\n"
+"{\n"
+"src_index += src_step;\n"
+"storepix(x == y0 >> 2 ? (T)(0, scalar, 0, 0) : (T)(0), srcptr + src_index);\n"
+"if (++y0 < rows)\n"
+"{\n"
+"src_index += src_step;\n"
+"storepix(x == y0 >> 2 ? (T)(0, 0, scalar, 0) : (T)(0), srcptr + src_index);\n"
+"if (++y0 < rows)\n"
+"{\n"
+"src_index += src_step;\n"
+"storepix(x == y0 >> 2 ? (T)(0, 0, 0, scalar) : (T)(0), srcptr + src_index);\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"#else\n"
+"#error \"Incorrect combination of cn && kercn\"\n"
+"#endif\n"
+"}\n"
+"}\n"
+, "75020e8c1da6cf8aece6bd5cc5b9ed4f"};
+ProgramSource set_identity_oclsrc(set_identity.programStr);
+const struct ProgramEntry split_merge={"split_merge",
+"#ifdef OP_MERGE\n"
+"#define DECLARE_SRC_PARAM(index) __global const uchar * src##index##ptr, int src##index##_step, int src##index##_offset,\n"
+"#define DECLARE_INDEX(index) int src##index##_index = mad24(src##index##_step, y0, mad24(x, (int)sizeof(T) * scn##index, src##index##_offset));\n"
+"#define PROCESS_ELEM(index) \\\n"
+"__global const T * src##index = (__global const T *)(src##index##ptr + src##index##_index); \\\n"
+"dst[index] = src##index[0]; \\\n"
+"src##index##_index += src##index##_step;\n"
+"__kernel void merge(DECLARE_SRC_PARAMS_N\n"
+"__global uchar * dstptr, int dst_step, int dst_offset,\n"
+"int rows, int cols, int rowsPerWI)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1) * rowsPerWI;\n"
+"if (x < cols)\n"
+"{\n"
+"DECLARE_INDEX_N\n"
+"int dst_index = mad24(dst_step, y0, mad24(x, (int)sizeof(T) * cn, dst_offset));\n"
+"for (int y = y0, y1 = min(rows, y0 + rowsPerWI); y < y1; ++y, dst_index += dst_step)\n"
+"{\n"
+"__global T * dst = (__global T *)(dstptr + dst_index);\n"
+"PROCESS_ELEMS_N\n"
+"}\n"
+"}\n"
+"}\n"
+"#elif defined OP_SPLIT\n"
+"#define DECLARE_DST_PARAM(index) , __global uchar * dst##index##ptr, int dst##index##_step, int dst##index##_offset\n"
+"#define DECLARE_INDEX(index) int dst##index##_index = mad24(y0, dst##index##_step, mad24(x, (int)sizeof(T), dst##index##_offset));\n"
+"#define PROCESS_ELEM(index) \\\n"
+"__global T * dst##index = (__global T *)(dst##index##ptr + dst##index##_index); \\\n"
+"dst##index[0] = src[index]; \\\n"
+"dst##index##_index += dst##index##_step;\n"
+"__kernel void split(__global uchar* srcptr, int src_step, int src_offset, int rows, int cols DECLARE_DST_PARAMS, int rowsPerWI)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y0 = get_global_id(1) * rowsPerWI;\n"
+"if (x < cols)\n"
+"{\n"
+"DECLARE_INDEX_N\n"
+"int src_index = mad24(y0, src_step, mad24(x, cn * (int)sizeof(T), src_offset));\n"
+"for (int y = y0, y1 = min(rows, y0 + rowsPerWI); y < y1; ++y, src_index += src_step)\n"
+"{\n"
+"__global const T * src = (__global const T *)(srcptr + src_index);\n"
+"PROCESS_ELEMS_N\n"
+"}\n"
+"}\n"
+"}\n"
+"#else\n"
+"#error \"No operation\"\n"
+"#endif\n"
+, "11e06966b3c2f2081fd02cf70337b495"};
+ProgramSource split_merge_oclsrc(split_merge.programStr);
+const struct ProgramEntry transpose={"transpose",
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const T *)(addr)\n"
+"#define storepix(val, addr) *(__global T *)(addr) = val\n"
+"#define TSIZE (int)sizeof(T)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const T1 *)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global T1 *)(addr))\n"
+"#define TSIZE ((int)sizeof(T1)*3)\n"
+"#endif\n"
+"#ifndef INPLACE\n"
+"#define LDS_STEP (TILE_DIM + 1)\n"
+"__kernel void transpose(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset)\n"
+"{\n"
+"int gp_x = get_group_id(0), gp_y = get_group_id(1);\n"
+"int gs_x = get_num_groups(0), gs_y = get_num_groups(1);\n"
+"int groupId_x, groupId_y;\n"
+"if (src_rows == src_cols)\n"
+"{\n"
+"groupId_y = gp_x;\n"
+"groupId_x = (gp_x + gp_y) % gs_x;\n"
+"}\n"
+"else\n"
+"{\n"
+"int bid = mad24(gs_x, gp_y, gp_x);\n"
+"groupId_y = bid % gs_y;\n"
+"groupId_x = ((bid / gs_y) + groupId_y) % gs_x;\n"
+"}\n"
+"int lx = get_local_id(0);\n"
+"int ly = get_local_id(1);\n"
+"int x = mad24(groupId_x, TILE_DIM, lx);\n"
+"int y = mad24(groupId_y, TILE_DIM, ly);\n"
+"int x_index = mad24(groupId_y, TILE_DIM, lx);\n"
+"int y_index = mad24(groupId_x, TILE_DIM, ly);\n"
+"__local T tile[TILE_DIM * LDS_STEP];\n"
+"if (x < src_cols && y < src_rows)\n"
+"{\n"
+"int index_src = mad24(y, src_step, mad24(x, TSIZE, src_offset));\n"
+"#pragma unroll\n"
+"for (int i = 0; i < TILE_DIM; i += BLOCK_ROWS)\n"
+"if (y + i < src_rows)\n"
+"{\n"
+"tile[mad24(ly + i, LDS_STEP, lx)] = loadpix(srcptr + index_src);\n"
+"index_src = mad24(BLOCK_ROWS, src_step, index_src);\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x_index < src_rows && y_index < src_cols)\n"
+"{\n"
+"int index_dst = mad24(y_index, dst_step, mad24(x_index, TSIZE, dst_offset));\n"
+"#pragma unroll\n"
+"for (int i = 0; i < TILE_DIM; i += BLOCK_ROWS)\n"
+"if ((y_index + i) < src_cols)\n"
+"{\n"
+"storepix(tile[mad24(lx, LDS_STEP, ly + i)], dstptr + index_dst);\n"
+"index_dst = mad24(BLOCK_ROWS, dst_step, index_dst);\n"
+"}\n"
+"}\n"
+"}\n"
+"#else\n"
+"__kernel void transpose_inplace(__global uchar * srcptr, int src_step, int src_offset, int src_rows)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * rowsPerWI;\n"
+"if (x < y + rowsPerWI)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, TSIZE, src_offset));\n"
+"int dst_index = mad24(x, src_step, mad24(y, TSIZE, src_offset));\n"
+"T tmp;\n"
+"#pragma unroll\n"
+"for (int i = 0; i < rowsPerWI; ++i, ++y, src_index += src_step, dst_index += TSIZE)\n"
+"if (y < src_rows && x < y)\n"
+"{\n"
+"__global uchar * src = srcptr + src_index;\n"
+"__global uchar * dst = srcptr + dst_index;\n"
+"tmp = loadpix(dst);\n"
+"storepix(loadpix(src), dst);\n"
+"storepix(tmp, src);\n"
+"}\n"
+"}\n"
+"}\n"
+"#endif\n"
+, "f938bc7c686ae7bca004809df19ef032"};
+ProgramSource transpose_oclsrc(transpose.programStr);
+}
+}}
diff --git a/modules/core/src/opencl_kernels_core.hpp b/modules/core/src/opencl_kernels_core.hpp
new file mode 100644
index 0000000..f900a60
--- /dev/null
+++ b/modules/core/src/opencl_kernels_core.hpp
@@ -0,0 +1,55 @@
+// This file is auto-generated. Do not edit!
+
+#include "opencv2/core/ocl.hpp"
+#include "opencv2/core/ocl_genbase.hpp"
+#include "opencv2/core/opencl/ocl_defs.hpp"
+
+namespace cv
+{
+namespace ocl
+{
+namespace core
+{
+
+extern const struct ProgramEntry arithm;
+extern ProgramSource arithm_oclsrc;
+extern const struct ProgramEntry convert;
+extern ProgramSource convert_oclsrc;
+extern const struct ProgramEntry copymakeborder;
+extern ProgramSource copymakeborder_oclsrc;
+extern const struct ProgramEntry copyset;
+extern ProgramSource copyset_oclsrc;
+extern const struct ProgramEntry fft;
+extern ProgramSource fft_oclsrc;
+extern const struct ProgramEntry flip;
+extern ProgramSource flip_oclsrc;
+extern const struct ProgramEntry gemm;
+extern ProgramSource gemm_oclsrc;
+extern const struct ProgramEntry inrange;
+extern ProgramSource inrange_oclsrc;
+extern const struct ProgramEntry lut;
+extern ProgramSource lut_oclsrc;
+extern const struct ProgramEntry meanstddev;
+extern ProgramSource meanstddev_oclsrc;
+extern const struct ProgramEntry minmaxloc;
+extern ProgramSource minmaxloc_oclsrc;
+extern const struct ProgramEntry mixchannels;
+extern ProgramSource mixchannels_oclsrc;
+extern const struct ProgramEntry mulspectrums;
+extern ProgramSource mulspectrums_oclsrc;
+extern const struct ProgramEntry normalize;
+extern ProgramSource normalize_oclsrc;
+extern const struct ProgramEntry reduce;
+extern ProgramSource reduce_oclsrc;
+extern const struct ProgramEntry reduce2;
+extern ProgramSource reduce2_oclsrc;
+extern const struct ProgramEntry repeat;
+extern ProgramSource repeat_oclsrc;
+extern const struct ProgramEntry set_identity;
+extern ProgramSource set_identity_oclsrc;
+extern const struct ProgramEntry split_merge;
+extern ProgramSource split_merge_oclsrc;
+extern const struct ProgramEntry transpose;
+extern ProgramSource transpose_oclsrc;
+}
+}}
diff --git a/modules/core/src/version_string.inc b/modules/core/src/version_string.inc
new file mode 100644
index 0000000..5c4ca9f
--- /dev/null
+++ b/modules/core/src/version_string.inc
@@ -0,0 +1,106 @@
+" videoio: Removing WinRT API headers by default\n"
+"\n"
+"General configuration for OpenCV 3.0.0-dev =====================================\n"
+" Version control: 3.0.0-rc1-319-g850e3c1-dirty\n"
+"\n"
+" Platform:\n"
+" Host: Linux 3.13.0-52-generic x86_64\n"
+" Target: Linux 1 armv7-a\n"
+" CMake: 2.8.12.2\n"
+" CMake generator: Unix Makefiles\n"
+" CMake build tool: /usr/bin/make\n"
+" Configuration: Debug\n"
+"\n"
+" C/C++:\n"
+" Built as dynamic libs?: YES\n"
+" C++ Compiler: /usr/local/google/home/noahp/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86/bin/arm-linux-androideabi-g++ (ver 4.9)\n"
+" C++ flags (Release): -fexceptions -frtti -fpic -Wno-psabi --sysroot=/usr/local/google/home/noahp/android-ndk-r10e/platforms/android-8/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fdata-sections -ffunction-sections -Wa,--noexecstack -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -fomit-frame-pointer -fvisibility=hidden -fvisibility-inlines-hidden -mthumb -fomit-frame-pointer -fno-strict-aliasing -O3 -DNDEBUG -DNDEBUG\n"
+" C++ flags (Debug): -fexceptions -frtti -fpic -Wno-psabi --sysroot=/usr/local/google/home/noahp/android-ndk-r10e/platforms/android-8/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fdata-sections -ffunction-sections -Wa,--noexecstack -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -fomit-frame-pointer -fvisibility=hidden -fvisibility-inlines-hidden -marm -fno-omit-frame-pointer -fno-strict-aliasing -O0 -g -DDEBUG -D_DEBUG -O0 -DDEBUG -D_DEBUG\n"
+" C Compiler: /usr/local/google/home/noahp/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc\n"
+" C flags (Release): -fexceptions -fpic -Wno-psabi --sysroot=/usr/local/google/home/noahp/android-ndk-r10e/platforms/android-8/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fdata-sections -ffunction-sections -Wa,--noexecstack -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -fomit-frame-pointer -fvisibility=hidden -mthumb -fomit-frame-pointer -fno-strict-aliasing -O3 -DNDEBUG -DNDEBUG\n"
+" C flags (Debug): -fexceptions -fpic -Wno-psabi --sysroot=/usr/local/google/home/noahp/android-ndk-r10e/platforms/android-8/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fdata-sections -ffunction-sections -Wa,--noexecstack -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -fomit-frame-pointer -fvisibility=hidden -marm -fno-omit-frame-pointer -fno-strict-aliasing -O0 -g -DDEBUG -D_DEBUG -O0 -DDEBUG -D_DEBUG\n"
+" Linker flags (Release): -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now \n"
+" Linker flags (Debug): -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now \n"
+" Precompiled headers: YES\n"
+" Extra dependencies: z dl m log\n"
+" 3rdparty dependencies: libjpeg libwebp libpng libtiff libjasper IlmImf\n"
+"\n"
+" OpenCV modules:\n"
+" To be built: hal core flann imgproc ml photo video androidcamera imgcodecs shape videoio highgui objdetect superres ts features2d calib3d java stitching videostab\n"
+" Disabled: world\n"
+" Disabled by dependency: -\n"
+" Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python2 viz\n"
+"\n"
+" Android: \n"
+" Android ABI: armeabi-v7a\n"
+" STL type: gnustl_static\n"
+" Native API level: android-8\n"
+" SDK target: android_sdk_target_status-NOTFOUND\n"
+" Android NDK: /usr/local/google/home/noahp/android-ndk-r10e (toolchain: arm-linux-androideabi-4.9)\n"
+" android tool: NO\n"
+" Google Play package: NO\n"
+" Android examples: NO\n"
+"\n"
+" GUI: \n"
+" GTK+: NO\n"
+" GThread : NO\n"
+" GtkGlExt: NO\n"
+" OpenGL support: NO\n"
+" VTK support: NO\n"
+"\n"
+" Media I/O: \n"
+" ZLib: z (ver 1.2.3)\n"
+" JPEG: build (ver 90)\n"
+" WEBP: build (ver 0.3.1)\n"
+" PNG: build (ver 1.5.12)\n"
+" TIFF: build (ver 42 - 4.0.2)\n"
+" JPEG 2000: build (ver 1.900.1)\n"
+" OpenEXR: build (ver 1.7.1)\n"
+" GDAL: NO\n"
+"\n"
+" Video I/O:\n"
+" AndroidNativeCamera: YES, use prebuilt libraries\n"
+"\n"
+" Other third-party libraries:\n"
+" Use IPP: NO\n"
+" Use Eigen: NO\n"
+" Use TBB: NO\n"
+" Use OpenMP: NO\n"
+" Use GCD NO\n"
+" Use Concurrency NO\n"
+" Use C=: NO\n"
+" Use pthreads for parallel for:\n"
+" YES\n"
+" Use Cuda: NO\n"
+" Use OpenCL: NO\n"
+"\n"
+" Python 2:\n"
+" Interpreter: /usr/bin/python2.7 (ver 2.7.6)\n"
+"\n"
+" Python 3:\n"
+" Interpreter: /usr/bin/python3.4 (ver 3.4)\n"
+"\n"
+" Python (for build): /usr/bin/python2.7\n"
+"\n"
+" Java:\n"
+" ant: /usr/bin/ant (ver 1.9.3)\n"
+" Java wrappers: YES\n"
+" Java tests: NO\n"
+"\n"
+" Matlab:\n"
+" mex: NO\n"
+"\n"
+" Documentation:\n"
+" Doxygen: NO\n"
+" PlantUML: NO\n"
+"\n"
+" Tests and samples:\n"
+" Tests: NO\n"
+" Performance tests: NO\n"
+" C/C++ Examples: NO\n"
+"\n"
+" Install path: /usr/local/google/home/noahp/opencv/android_build/install\n"
+"\n"
+" cvconfig.h is in: /usr/local/google/home/noahp/opencv/android_build\n"
+"-----------------------------------------------------------------\n"
+"\n"
diff --git a/modules/features2d/opencl_kernels_features2d.cpp b/modules/features2d/opencl_kernels_features2d.cpp
new file mode 100644
index 0000000..7b6ad99
--- /dev/null
+++ b/modules/features2d/opencl_kernels_features2d.cpp
@@ -0,0 +1,780 @@
+// This file is auto-generated. Do not edit!
+
+#include "precomp.hpp"
+#include "opencl_kernels_features2d.hpp"
+
+namespace cv
+{
+namespace ocl
+{
+namespace features2d
+{
+
+const struct ProgramEntry brute_force_match={"brute_force_match",
+"#pragma OPENCL EXTENSION cl_khr_global_int32_base_atomics:enable\n"
+"#define MAX_FLOAT 3.40282e+038f\n"
+"#ifndef T\n"
+"#define T float\n"
+"#endif\n"
+"#ifndef BLOCK_SIZE\n"
+"#define BLOCK_SIZE 16\n"
+"#endif\n"
+"#ifndef MAX_DESC_LEN\n"
+"#define MAX_DESC_LEN 64\n"
+"#endif\n"
+"#define BLOCK_SIZE_ODD (BLOCK_SIZE + 1)\n"
+"#ifndef SHARED_MEM_SZ\n"
+"# if (BLOCK_SIZE < MAX_DESC_LEN)\n"
+"# define SHARED_MEM_SZ (kercn * (BLOCK_SIZE * MAX_DESC_LEN + BLOCK_SIZE * BLOCK_SIZE))\n"
+"# else\n"
+"# define SHARED_MEM_SZ (kercn * 2 * BLOCK_SIZE_ODD * BLOCK_SIZE)\n"
+"# endif\n"
+"#endif\n"
+"#ifndef DIST_TYPE\n"
+"#define DIST_TYPE 2\n"
+"#endif\n"
+"#if (DIST_TYPE == 2)\n"
+"# ifdef T_FLOAT\n"
+"typedef float result_type;\n"
+"# if (8 == kercn)\n"
+"typedef float8 value_type;\n"
+"# define DIST(x, y) {value_type d = fabs((x) - (y)); result += d.s0 + d.s1 + d.s2 + d.s3 + d.s4 + d.s5 + d.s6 + d.s7;}\n"
+"# elif (4 == kercn)\n"
+"typedef float4 value_type;\n"
+"# define DIST(x, y) {value_type d = fabs((x) - (y)); result += d.s0 + d.s1 + d.s2 + d.s3;}\n"
+"# else\n"
+"typedef float value_type;\n"
+"# define DIST(x, y) result += fabs((x) - (y))\n"
+"# endif\n"
+"# else\n"
+"typedef int result_type;\n"
+"# if (8 == kercn)\n"
+"typedef int8 value_type;\n"
+"# define DIST(x, y) {value_type d = abs((x) - (y)); result += d.s0 + d.s1 + d.s2 + d.s3 + d.s4 + d.s5 + d.s6 + d.s7;}\n"
+"# elif (4 == kercn)\n"
+"typedef int4 value_type;\n"
+"# define DIST(x, y) {value_type d = abs((x) - (y)); result += d.s0 + d.s1 + d.s2 + d.s3;}\n"
+"# else\n"
+"typedef int value_type;\n"
+"# define DIST(x, y) result += abs((x) - (y))\n"
+"# endif\n"
+"# endif\n"
+"# define DIST_RES(x) (x)\n"
+"#elif (DIST_TYPE == 4)\n"
+"typedef float result_type;\n"
+"# if (8 == kercn)\n"
+"typedef float8 value_type;\n"
+"# define DIST(x, y) {value_type d = ((x) - (y)); result += dot(d.s0123, d.s0123) + dot(d.s4567, d.s4567);}\n"
+"# elif (4 == kercn)\n"
+"typedef float4 value_type;\n"
+"# define DIST(x, y) {value_type d = ((x) - (y)); result += dot(d, d);}\n"
+"# else\n"
+"typedef float value_type;\n"
+"# define DIST(x, y) {value_type d = ((x) - (y)); result = mad(d, d, result);}\n"
+"# endif\n"
+"# define DIST_RES(x) sqrt(x)\n"
+"#elif (DIST_TYPE == 6)\n"
+"# if (8 == kercn)\n"
+"typedef int8 value_type;\n"
+"# elif (4 == kercn)\n"
+"typedef int4 value_type;\n"
+"# else\n"
+"typedef int value_type;\n"
+"# endif\n"
+"typedef int result_type;\n"
+"# define DIST(x, y) result += popcount( (x) ^ (y) )\n"
+"# define DIST_RES(x) (x)\n"
+"#endif\n"
+"inline result_type reduce_block(\n"
+"__local value_type *s_query,\n"
+"__local value_type *s_train,\n"
+"int lidx,\n"
+"int lidy\n"
+")\n"
+"{\n"
+"result_type result = 0;\n"
+"#pragma unroll\n"
+"for (int j = 0 ; j < BLOCK_SIZE ; j++)\n"
+"{\n"
+"DIST(s_query[lidy * BLOCK_SIZE_ODD + j], s_train[j * BLOCK_SIZE_ODD + lidx]);\n"
+"}\n"
+"return DIST_RES(result);\n"
+"}\n"
+"inline result_type reduce_block_match(\n"
+"__local value_type *s_query,\n"
+"__local value_type *s_train,\n"
+"int lidx,\n"
+"int lidy\n"
+")\n"
+"{\n"
+"result_type result = 0;\n"
+"#pragma unroll\n"
+"for (int j = 0 ; j < BLOCK_SIZE ; j++)\n"
+"{\n"
+"DIST(s_query[lidy * BLOCK_SIZE_ODD + j], s_train[j * BLOCK_SIZE_ODD + lidx]);\n"
+"}\n"
+"return result;\n"
+"}\n"
+"inline result_type reduce_multi_block(\n"
+"__local value_type *s_query,\n"
+"__local value_type *s_train,\n"
+"int block_index,\n"
+"int lidx,\n"
+"int lidy\n"
+")\n"
+"{\n"
+"result_type result = 0;\n"
+"#pragma unroll\n"
+"for (int j = 0 ; j < BLOCK_SIZE ; j++)\n"
+"{\n"
+"DIST(s_query[lidy * MAX_DESC_LEN + block_index * BLOCK_SIZE + j], s_train[j * BLOCK_SIZE + lidx]);\n"
+"}\n"
+"return result;\n"
+"}\n"
+"__kernel void BruteForceMatch_Match(\n"
+"__global T *query,\n"
+"__global T *train,\n"
+"__global int *bestTrainIdx,\n"
+"__global float *bestDistance,\n"
+"int query_rows,\n"
+"int query_cols,\n"
+"int train_rows,\n"
+"int train_cols,\n"
+"int step\n"
+")\n"
+"{\n"
+"const int lidx = get_local_id(0);\n"
+"const int lidy = get_local_id(1);\n"
+"const int groupidx = get_group_id(0);\n"
+"const int queryIdx = mad24(BLOCK_SIZE, groupidx, lidy);\n"
+"const int queryOffset = min(queryIdx, query_rows - 1) * step;\n"
+"__global TN *query_vec = (__global TN *)(query + queryOffset);\n"
+"query_cols /= kercn;\n"
+"__local float sharebuffer[SHARED_MEM_SZ];\n"
+"__local value_type *s_query = (__local value_type *)sharebuffer;\n"
+"#if 0 < MAX_DESC_LEN\n"
+"__local value_type *s_train = (__local value_type *)sharebuffer + BLOCK_SIZE * MAX_DESC_LEN;\n"
+"#pragma unroll\n"
+"for (int i = 0; i < MAX_DESC_LEN / BLOCK_SIZE; i++)\n"
+"{\n"
+"const int loadx = mad24(BLOCK_SIZE, i, lidx);\n"
+"s_query[mad24(MAX_DESC_LEN, lidy, loadx)] = loadx < query_cols ? query_vec[loadx] : 0;\n"
+"}\n"
+"#else\n"
+"__local value_type *s_train = (__local value_type *)sharebuffer + BLOCK_SIZE_ODD * BLOCK_SIZE;\n"
+"const int s_query_i = mad24(BLOCK_SIZE_ODD, lidy, lidx);\n"
+"const int s_train_i = mad24(BLOCK_SIZE_ODD, lidx, lidy);\n"
+"#endif\n"
+"float myBestDistance = MAX_FLOAT;\n"
+"int myBestTrainIdx = -1;\n"
+"for (int t = 0, endt = (train_rows + BLOCK_SIZE - 1) / BLOCK_SIZE; t < endt; t++)\n"
+"{\n"
+"result_type result = 0;\n"
+"const int trainOffset = min(mad24(BLOCK_SIZE, t, lidy), train_rows - 1) * step;\n"
+"__global TN *train_vec = (__global TN *)(train + trainOffset);\n"
+"#if 0 < MAX_DESC_LEN\n"
+"#pragma unroll\n"
+"for (int i = 0; i < MAX_DESC_LEN / BLOCK_SIZE; i++)\n"
+"{\n"
+"const int loadx = mad24(BLOCK_SIZE, i, lidx);\n"
+"s_train[mad24(BLOCK_SIZE, lidx, lidy)] = loadx < train_cols ? train_vec[loadx] : 0;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"result += reduce_multi_block(s_query, s_train, i, lidx, lidy);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"#else\n"
+"for (int i = 0, endq = (query_cols + BLOCK_SIZE - 1) / BLOCK_SIZE; i < endq; i++)\n"
+"{\n"
+"const int loadx = mad24(i, BLOCK_SIZE, lidx);\n"
+"if (loadx < query_cols)\n"
+"{\n"
+"s_query[s_query_i] = query_vec[loadx];\n"
+"s_train[s_train_i] = train_vec[loadx];\n"
+"}\n"
+"else\n"
+"{\n"
+"s_query[s_query_i] = 0;\n"
+"s_train[s_train_i] = 0;\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"result += reduce_block_match(s_query, s_train, lidx, lidy);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"#endif\n"
+"result = DIST_RES(result);\n"
+"const int trainIdx = mad24(BLOCK_SIZE, t, lidx);\n"
+"if (queryIdx < query_rows && trainIdx < train_rows && result < myBestDistance )\n"
+"{\n"
+"myBestDistance = result;\n"
+"myBestTrainIdx = trainIdx;\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"__local float *s_distance = (__local float *)sharebuffer;\n"
+"__local int *s_trainIdx = (__local int *)(sharebuffer + BLOCK_SIZE_ODD * BLOCK_SIZE);\n"
+"s_distance += lidy * BLOCK_SIZE_ODD;\n"
+"s_trainIdx += lidy * BLOCK_SIZE_ODD;\n"
+"s_distance[lidx] = myBestDistance;\n"
+"s_trainIdx[lidx] = myBestTrainIdx;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"#pragma unroll\n"
+"for (int k = 0 ; k < BLOCK_SIZE; k++)\n"
+"{\n"
+"if (myBestDistance > s_distance[k])\n"
+"{\n"
+"myBestDistance = s_distance[k];\n"
+"myBestTrainIdx = s_trainIdx[k];\n"
+"}\n"
+"}\n"
+"if (queryIdx < query_rows && lidx == 0)\n"
+"{\n"
+"bestTrainIdx[queryIdx] = myBestTrainIdx;\n"
+"bestDistance[queryIdx] = myBestDistance;\n"
+"}\n"
+"}\n"
+"__kernel void BruteForceMatch_RadiusMatch(\n"
+"__global T *query,\n"
+"__global T *train,\n"
+"float maxDistance,\n"
+"__global int *bestTrainIdx,\n"
+"__global float *bestDistance,\n"
+"__global int *nMatches,\n"
+"int query_rows,\n"
+"int query_cols,\n"
+"int train_rows,\n"
+"int train_cols,\n"
+"int bestTrainIdx_cols,\n"
+"int step,\n"
+"int ostep\n"
+")\n"
+"{\n"
+"const int lidx = get_local_id(0);\n"
+"const int lidy = get_local_id(1);\n"
+"const int groupidx = get_group_id(0);\n"
+"const int groupidy = get_group_id(1);\n"
+"const int queryIdx = mad24(BLOCK_SIZE, groupidy, lidy);\n"
+"const int queryOffset = min(queryIdx, query_rows - 1) * step;\n"
+"__global TN *query_vec = (__global TN *)(query + queryOffset);\n"
+"const int trainIdx = mad24(BLOCK_SIZE, groupidx, lidx);\n"
+"const int trainOffset = min(mad24(BLOCK_SIZE, groupidx, lidy), train_rows - 1) * step;\n"
+"__global TN *train_vec = (__global TN *)(train + trainOffset);\n"
+"query_cols /= kercn;\n"
+"__local float sharebuffer[SHARED_MEM_SZ];\n"
+"__local value_type *s_query = (__local value_type *)sharebuffer;\n"
+"__local value_type *s_train = (__local value_type *)sharebuffer + BLOCK_SIZE_ODD * BLOCK_SIZE;\n"
+"result_type result = 0;\n"
+"const int s_query_i = mad24(BLOCK_SIZE_ODD, lidy, lidx);\n"
+"const int s_train_i = mad24(BLOCK_SIZE_ODD, lidx, lidy);\n"
+"for (int i = 0 ; i < (query_cols + BLOCK_SIZE - 1) / BLOCK_SIZE ; ++i)\n"
+"{\n"
+"const int loadx = mad24(BLOCK_SIZE, i, lidx);\n"
+"if (loadx < query_cols)\n"
+"{\n"
+"s_query[s_query_i] = query_vec[loadx];\n"
+"s_train[s_train_i] = train_vec[loadx];\n"
+"}\n"
+"else\n"
+"{\n"
+"s_query[s_query_i] = 0;\n"
+"s_train[s_train_i] = 0;\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"result += reduce_block(s_query, s_train, lidx, lidy);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"if (queryIdx < query_rows && trainIdx < train_rows && convert_float(result) < maxDistance)\n"
+"{\n"
+"int ind = atom_inc(nMatches + queryIdx);\n"
+"if(ind < bestTrainIdx_cols)\n"
+"{\n"
+"bestTrainIdx[mad24(queryIdx, ostep, ind)] = trainIdx;\n"
+"bestDistance[mad24(queryIdx, ostep, ind)] = result;\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void BruteForceMatch_knnMatch(\n"
+"__global T *query,\n"
+"__global T *train,\n"
+"__global int2 *bestTrainIdx,\n"
+"__global float2 *bestDistance,\n"
+"int query_rows,\n"
+"int query_cols,\n"
+"int train_rows,\n"
+"int train_cols,\n"
+"int step\n"
+")\n"
+"{\n"
+"const int lidx = get_local_id(0);\n"
+"const int lidy = get_local_id(1);\n"
+"const int groupidx = get_group_id(0);\n"
+"const int queryIdx = mad24(BLOCK_SIZE, groupidx, lidy);\n"
+"const int queryOffset = min(queryIdx, query_rows - 1) * step;\n"
+"__global TN *query_vec = (__global TN *)(query + queryOffset);\n"
+"query_cols /= kercn;\n"
+"__local float sharebuffer[SHARED_MEM_SZ];\n"
+"__local value_type *s_query = (__local value_type *)sharebuffer;\n"
+"#if 0 < MAX_DESC_LEN\n"
+"__local value_type *s_train = (__local value_type *)sharebuffer + BLOCK_SIZE * MAX_DESC_LEN;\n"
+"#pragma unroll\n"
+"for (int i = 0 ; i < MAX_DESC_LEN / BLOCK_SIZE; i ++)\n"
+"{\n"
+"int loadx = mad24(BLOCK_SIZE, i, lidx);\n"
+"s_query[mad24(MAX_DESC_LEN, lidy, loadx)] = loadx < query_cols ? query_vec[loadx] : 0;\n"
+"}\n"
+"#else\n"
+"__local value_type *s_train = (__local value_type *)sharebuffer + BLOCK_SIZE_ODD * BLOCK_SIZE;\n"
+"const int s_query_i = mad24(BLOCK_SIZE_ODD, lidy, lidx);\n"
+"const int s_train_i = mad24(BLOCK_SIZE_ODD, lidx, lidy);\n"
+"#endif\n"
+"float myBestDistance1 = MAX_FLOAT;\n"
+"float myBestDistance2 = MAX_FLOAT;\n"
+"int myBestTrainIdx1 = -1;\n"
+"int myBestTrainIdx2 = -1;\n"
+"for (int t = 0, endt = (train_rows + BLOCK_SIZE - 1) / BLOCK_SIZE; t < endt ; t++)\n"
+"{\n"
+"result_type result = 0;\n"
+"int trainOffset = min(mad24(BLOCK_SIZE, t, lidy), train_rows - 1) * step;\n"
+"__global TN *train_vec = (__global TN *)(train + trainOffset);\n"
+"#if 0 < MAX_DESC_LEN\n"
+"#pragma unroll\n"
+"for (int i = 0 ; i < MAX_DESC_LEN / BLOCK_SIZE ; i++)\n"
+"{\n"
+"const int loadx = mad24(BLOCK_SIZE, i, lidx);\n"
+"s_train[mad24(BLOCK_SIZE, lidx, lidy)] = loadx < train_cols ? train_vec[loadx] : 0;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"result += reduce_multi_block(s_query, s_train, i, lidx, lidy);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"#else\n"
+"for (int i = 0, endq = (query_cols + BLOCK_SIZE -1) / BLOCK_SIZE; i < endq ; i++)\n"
+"{\n"
+"const int loadx = mad24(BLOCK_SIZE, i, lidx);\n"
+"if (loadx < query_cols)\n"
+"{\n"
+"s_query[s_query_i] = query_vec[loadx];\n"
+"s_train[s_train_i] = train_vec[loadx];\n"
+"}\n"
+"else\n"
+"{\n"
+"s_query[s_query_i] = 0;\n"
+"s_train[s_train_i] = 0;\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"result += reduce_block_match(s_query, s_train, lidx, lidy);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"#endif\n"
+"result = DIST_RES(result);\n"
+"const int trainIdx = mad24(BLOCK_SIZE, t, lidx);\n"
+"if (queryIdx < query_rows && trainIdx < train_rows)\n"
+"{\n"
+"if (result < myBestDistance1)\n"
+"{\n"
+"myBestDistance2 = myBestDistance1;\n"
+"myBestTrainIdx2 = myBestTrainIdx1;\n"
+"myBestDistance1 = result;\n"
+"myBestTrainIdx1 = trainIdx;\n"
+"}\n"
+"else if (result < myBestDistance2)\n"
+"{\n"
+"myBestDistance2 = result;\n"
+"myBestTrainIdx2 = trainIdx;\n"
+"}\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"__local float *s_distance = (__local float *)sharebuffer;\n"
+"__local int *s_trainIdx = (__local int *)(sharebuffer + BLOCK_SIZE_ODD * BLOCK_SIZE);\n"
+"s_distance += lidy * BLOCK_SIZE_ODD;\n"
+"s_trainIdx += lidy * BLOCK_SIZE_ODD;\n"
+"s_distance[lidx] = myBestDistance1;\n"
+"s_trainIdx[lidx] = myBestTrainIdx1;\n"
+"float bestDistance1 = MAX_FLOAT;\n"
+"float bestDistance2 = MAX_FLOAT;\n"
+"int bestTrainIdx1 = -1;\n"
+"int bestTrainIdx2 = -1;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (lidx == 0)\n"
+"{\n"
+"for (int i = 0 ; i < BLOCK_SIZE ; i++)\n"
+"{\n"
+"float val = s_distance[i];\n"
+"if (val < bestDistance1)\n"
+"{\n"
+"bestDistance2 = bestDistance1;\n"
+"bestTrainIdx2 = bestTrainIdx1;\n"
+"bestDistance1 = val;\n"
+"bestTrainIdx1 = s_trainIdx[i];\n"
+"}\n"
+"else if (val < bestDistance2)\n"
+"{\n"
+"bestDistance2 = val;\n"
+"bestTrainIdx2 = s_trainIdx[i];\n"
+"}\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"s_distance[lidx] = myBestDistance2;\n"
+"s_trainIdx[lidx] = myBestTrainIdx2;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (lidx == 0)\n"
+"{\n"
+"for (int i = 0 ; i < BLOCK_SIZE ; i++)\n"
+"{\n"
+"float val = s_distance[i];\n"
+"if (val < bestDistance2)\n"
+"{\n"
+"bestDistance2 = val;\n"
+"bestTrainIdx2 = s_trainIdx[i];\n"
+"}\n"
+"}\n"
+"}\n"
+"myBestDistance1 = bestDistance1;\n"
+"myBestDistance2 = bestDistance2;\n"
+"myBestTrainIdx1 = bestTrainIdx1;\n"
+"myBestTrainIdx2 = bestTrainIdx2;\n"
+"if (queryIdx < query_rows && lidx == 0)\n"
+"{\n"
+"bestTrainIdx[queryIdx] = (int2)(myBestTrainIdx1, myBestTrainIdx2);\n"
+"bestDistance[queryIdx] = (float2)(myBestDistance1, myBestDistance2);\n"
+"}\n"
+"}\n"
+, "35c3a1e231d446e4088561e3604fb94f"};
+ProgramSource brute_force_match_oclsrc(brute_force_match.programStr);
+const struct ProgramEntry fast={"fast",
+"inline int cornerScore(__global const uchar* img, int step)\n"
+"{\n"
+"int k, tofs, v = img[0], a0 = 0, b0;\n"
+"int d[16];\n"
+"#define LOAD2(idx, ofs) \\\n"
+"tofs = ofs; d[idx] = (short)(v - img[tofs]); d[idx+8] = (short)(v - img[-tofs])\n"
+"LOAD2(0, 3);\n"
+"LOAD2(1, -step+3);\n"
+"LOAD2(2, -step*2+2);\n"
+"LOAD2(3, -step*3+1);\n"
+"LOAD2(4, -step*3);\n"
+"LOAD2(5, -step*3-1);\n"
+"LOAD2(6, -step*2-2);\n"
+"LOAD2(7, -step-3);\n"
+"#pragma unroll\n"
+"for( k = 0; k < 16; k += 2 )\n"
+"{\n"
+"int a = min((int)d[(k+1)&15], (int)d[(k+2)&15]);\n"
+"a = min(a, (int)d[(k+3)&15]);\n"
+"a = min(a, (int)d[(k+4)&15]);\n"
+"a = min(a, (int)d[(k+5)&15]);\n"
+"a = min(a, (int)d[(k+6)&15]);\n"
+"a = min(a, (int)d[(k+7)&15]);\n"
+"a = min(a, (int)d[(k+8)&15]);\n"
+"a0 = max(a0, min(a, (int)d[k&15]));\n"
+"a0 = max(a0, min(a, (int)d[(k+9)&15]));\n"
+"}\n"
+"b0 = -a0;\n"
+"#pragma unroll\n"
+"for( k = 0; k < 16; k += 2 )\n"
+"{\n"
+"int b = max((int)d[(k+1)&15], (int)d[(k+2)&15]);\n"
+"b = max(b, (int)d[(k+3)&15]);\n"
+"b = max(b, (int)d[(k+4)&15]);\n"
+"b = max(b, (int)d[(k+5)&15]);\n"
+"b = max(b, (int)d[(k+6)&15]);\n"
+"b = max(b, (int)d[(k+7)&15]);\n"
+"b = max(b, (int)d[(k+8)&15]);\n"
+"b0 = min(b0, max(b, (int)d[k]));\n"
+"b0 = min(b0, max(b, (int)d[(k+9)&15]));\n"
+"}\n"
+"return -b0-1;\n"
+"}\n"
+"__kernel\n"
+"void FAST_findKeypoints(\n"
+"__global const uchar * _img, int step, int img_offset,\n"
+"int img_rows, int img_cols,\n"
+"volatile __global int* kp_loc,\n"
+"int max_keypoints, int threshold )\n"
+"{\n"
+"int j = get_global_id(0) + 3;\n"
+"int i = get_global_id(1) + 3;\n"
+"if (i < img_rows - 3 && j < img_cols - 3)\n"
+"{\n"
+"__global const uchar* img = _img + mad24(i, step, j + img_offset);\n"
+"int v = img[0], t0 = v - threshold, t1 = v + threshold;\n"
+"int k, tofs, v0, v1;\n"
+"int m0 = 0, m1 = 0;\n"
+"#define UPDATE_MASK(idx, ofs) \\\n"
+"tofs = ofs; v0 = img[tofs]; v1 = img[-tofs]; \\\n"
+"m0 |= ((v0 < t0) << idx) | ((v1 < t0) << (8 + idx)); \\\n"
+"m1 |= ((v0 > t1) << idx) | ((v1 > t1) << (8 + idx))\n"
+"UPDATE_MASK(0, 3);\n"
+"if( (m0 | m1) == 0 )\n"
+"return;\n"
+"UPDATE_MASK(2, -step*2+2);\n"
+"UPDATE_MASK(4, -step*3);\n"
+"UPDATE_MASK(6, -step*2-2);\n"
+"#define EVEN_MASK (1+4+16+64)\n"
+"if( ((m0 | (m0 >> 8)) & EVEN_MASK) != EVEN_MASK &&\n"
+"((m1 | (m1 >> 8)) & EVEN_MASK) != EVEN_MASK )\n"
+"return;\n"
+"UPDATE_MASK(1, -step+3);\n"
+"UPDATE_MASK(3, -step*3+1);\n"
+"UPDATE_MASK(5, -step*3-1);\n"
+"UPDATE_MASK(7, -step-3);\n"
+"if( ((m0 | (m0 >> 8)) & 255) != 255 &&\n"
+"((m1 | (m1 >> 8)) & 255) != 255 )\n"
+"return;\n"
+"m0 |= m0 << 16;\n"
+"m1 |= m1 << 16;\n"
+"#define CHECK0(i) ((m0 & (511 << i)) == (511 << i))\n"
+"#define CHECK1(i) ((m1 & (511 << i)) == (511 << i))\n"
+"if( CHECK0(0) + CHECK0(1) + CHECK0(2) + CHECK0(3) +\n"
+"CHECK0(4) + CHECK0(5) + CHECK0(6) + CHECK0(7) +\n"
+"CHECK0(8) + CHECK0(9) + CHECK0(10) + CHECK0(11) +\n"
+"CHECK0(12) + CHECK0(13) + CHECK0(14) + CHECK0(15) +\n"
+"CHECK1(0) + CHECK1(1) + CHECK1(2) + CHECK1(3) +\n"
+"CHECK1(4) + CHECK1(5) + CHECK1(6) + CHECK1(7) +\n"
+"CHECK1(8) + CHECK1(9) + CHECK1(10) + CHECK1(11) +\n"
+"CHECK1(12) + CHECK1(13) + CHECK1(14) + CHECK1(15) == 0 )\n"
+"return;\n"
+"{\n"
+"int idx = atomic_inc(kp_loc);\n"
+"if( idx < max_keypoints )\n"
+"{\n"
+"kp_loc[1 + 2*idx] = j;\n"
+"kp_loc[2 + 2*idx] = i;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel\n"
+"void FAST_nonmaxSupression(\n"
+"__global const int* kp_in, volatile __global int* kp_out,\n"
+"__global const uchar * _img, int step, int img_offset,\n"
+"int rows, int cols, int counter, int max_keypoints)\n"
+"{\n"
+"const int idx = get_global_id(0);\n"
+"if (idx < counter)\n"
+"{\n"
+"int x = kp_in[1 + 2*idx];\n"
+"int y = kp_in[2 + 2*idx];\n"
+"__global const uchar* img = _img + mad24(y, step, x + img_offset);\n"
+"int s = cornerScore(img, step);\n"
+"if( (x < 4 || s > cornerScore(img-1, step)) +\n"
+"(y < 4 || s > cornerScore(img-step, step)) != 2 )\n"
+"return;\n"
+"if( (x >= cols - 4 || s > cornerScore(img+1, step)) +\n"
+"(y >= rows - 4 || s > cornerScore(img+step, step)) +\n"
+"(x < 4 || y < 4 || s > cornerScore(img-step-1, step)) +\n"
+"(x >= cols - 4 || y < 4 || s > cornerScore(img-step+1, step)) +\n"
+"(x < 4 || y >= rows - 4 || s > cornerScore(img+step-1, step)) +\n"
+"(x >= cols - 4 || y >= rows - 4 || s > cornerScore(img+step+1, step)) == 6)\n"
+"{\n"
+"int new_idx = atomic_inc(kp_out);\n"
+"if( new_idx < max_keypoints )\n"
+"{\n"
+"kp_out[1 + 3*new_idx] = x;\n"
+"kp_out[2 + 3*new_idx] = y;\n"
+"kp_out[3 + 3*new_idx] = s;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+, "f5e6f463f21a7ed77bd4d2c753478305"};
+ProgramSource fast_oclsrc(fast.programStr);
+const struct ProgramEntry orb={"orb",
+"#define LAYERINFO_SIZE 1\n"
+"#define LAYERINFO_OFS 0\n"
+"#define KEYPOINT_SIZE 3\n"
+"#define ORIENTED_KEYPOINT_SIZE 4\n"
+"#define KEYPOINT_X 0\n"
+"#define KEYPOINT_Y 1\n"
+"#define KEYPOINT_Z 2\n"
+"#define KEYPOINT_ANGLE 3\n"
+"#ifdef ORB_RESPONSES\n"
+"__kernel void\n"
+"ORB_HarrisResponses(__global const uchar* imgbuf, int imgstep, int imgoffset0,\n"
+"__global const int* layerinfo, __global const int* keypoints,\n"
+"__global float* responses, int nkeypoints )\n"
+"{\n"
+"int idx = get_global_id(0);\n"
+"if( idx < nkeypoints )\n"
+"{\n"
+"__global const int* kpt = keypoints + idx*KEYPOINT_SIZE;\n"
+"__global const int* layer = layerinfo + kpt[KEYPOINT_Z]*LAYERINFO_SIZE;\n"
+"__global const uchar* img = imgbuf + imgoffset0 + layer[LAYERINFO_OFS] +\n"
+"(kpt[KEYPOINT_Y] - blockSize/2)*imgstep + (kpt[KEYPOINT_X] - blockSize/2);\n"
+"int i, j;\n"
+"int a = 0, b = 0, c = 0;\n"
+"for( i = 0; i < blockSize; i++, img += imgstep-blockSize )\n"
+"{\n"
+"for( j = 0; j < blockSize; j++, img++ )\n"
+"{\n"
+"int Ix = (img[1] - img[-1])*2 + img[-imgstep+1] - img[-imgstep-1] + img[imgstep+1] - img[imgstep-1];\n"
+"int Iy = (img[imgstep] - img[-imgstep])*2 + img[imgstep-1] - img[-imgstep-1] + img[imgstep+1] - img[-imgstep+1];\n"
+"a += Ix*Ix;\n"
+"b += Iy*Iy;\n"
+"c += Ix*Iy;\n"
+"}\n"
+"}\n"
+"responses[idx] = ((float)a * b - (float)c * c - HARRIS_K * (float)(a + b) * (a + b))*scale_sq_sq;\n"
+"}\n"
+"}\n"
+"#endif\n"
+"#ifdef ORB_ANGLES\n"
+"#define _DBL_EPSILON 2.2204460492503131e-16f\n"
+"#define atan2_p1 (0.9997878412794807f*57.29577951308232f)\n"
+"#define atan2_p3 (-0.3258083974640975f*57.29577951308232f)\n"
+"#define atan2_p5 (0.1555786518463281f*57.29577951308232f)\n"
+"#define atan2_p7 (-0.04432655554792128f*57.29577951308232f)\n"
+"inline float fastAtan2( float y, float x )\n"
+"{\n"
+"float ax = fabs(x), ay = fabs(y);\n"
+"float a, c, c2;\n"
+"if( ax >= ay )\n"
+"{\n"
+"c = ay/(ax + _DBL_EPSILON);\n"
+"c2 = c*c;\n"
+"a = (((atan2_p7*c2 + atan2_p5)*c2 + atan2_p3)*c2 + atan2_p1)*c;\n"
+"}\n"
+"else\n"
+"{\n"
+"c = ax/(ay + _DBL_EPSILON);\n"
+"c2 = c*c;\n"
+"a = 90.f - (((atan2_p7*c2 + atan2_p5)*c2 + atan2_p3)*c2 + atan2_p1)*c;\n"
+"}\n"
+"if( x < 0 )\n"
+"a = 180.f - a;\n"
+"if( y < 0 )\n"
+"a = 360.f - a;\n"
+"return a;\n"
+"}\n"
+"__kernel void\n"
+"ORB_ICAngle(__global const uchar* imgbuf, int imgstep, int imgoffset0,\n"
+"__global const int* layerinfo, __global const int* keypoints,\n"
+"__global float* responses, const __global int* u_max,\n"
+"int nkeypoints, int half_k )\n"
+"{\n"
+"int idx = get_global_id(0);\n"
+"if( idx < nkeypoints )\n"
+"{\n"
+"__global const int* kpt = keypoints + idx*KEYPOINT_SIZE;\n"
+"__global const int* layer = layerinfo + kpt[KEYPOINT_Z]*LAYERINFO_SIZE;\n"
+"__global const uchar* center = imgbuf + imgoffset0 + layer[LAYERINFO_OFS] +\n"
+"kpt[KEYPOINT_Y]*imgstep + kpt[KEYPOINT_X];\n"
+"int u, v, m_01 = 0, m_10 = 0;\n"
+"for( u = -half_k; u <= half_k; u++ )\n"
+"m_10 += u * center[u];\n"
+"for( v = 1; v <= half_k; v++ )\n"
+"{\n"
+"int v_sum = 0;\n"
+"int d = u_max[v];\n"
+"for( u = -d; u <= d; u++ )\n"
+"{\n"
+"int val_plus = center[u + v*imgstep], val_minus = center[u - v*imgstep];\n"
+"v_sum += (val_plus - val_minus);\n"
+"m_10 += u * (val_plus + val_minus);\n"
+"}\n"
+"m_01 += v * v_sum;\n"
+"}\n"
+"responses[idx] = fastAtan2((float)m_01, (float)m_10);\n"
+"}\n"
+"}\n"
+"#endif\n"
+"#ifdef ORB_DESCRIPTORS\n"
+"__kernel void\n"
+"ORB_computeDescriptor(__global const uchar* imgbuf, int imgstep, int imgoffset0,\n"
+"__global const int* layerinfo, __global const int* keypoints,\n"
+"__global uchar* _desc, const __global int* pattern,\n"
+"int nkeypoints, int dsize )\n"
+"{\n"
+"int idx = get_global_id(0);\n"
+"if( idx < nkeypoints )\n"
+"{\n"
+"int i;\n"
+"__global const int* kpt = keypoints + idx*ORIENTED_KEYPOINT_SIZE;\n"
+"__global const int* layer = layerinfo + kpt[KEYPOINT_Z]*LAYERINFO_SIZE;\n"
+"__global const uchar* center = imgbuf + imgoffset0 + layer[LAYERINFO_OFS] +\n"
+"kpt[KEYPOINT_Y]*imgstep + kpt[KEYPOINT_X];\n"
+"float angle = as_float(kpt[KEYPOINT_ANGLE]);\n"
+"angle *= 0.01745329251994329547f;\n"
+"float cosa;\n"
+"float sina = sincos(angle, &cosa);\n"
+"__global uchar* desc = _desc + idx*dsize;\n"
+"#define GET_VALUE(idx) \\\n"
+"center[mad24(convert_int_rte(pattern[(idx)*2] * sina + pattern[(idx)*2+1] * cosa), imgstep, \\\n"
+"convert_int_rte(pattern[(idx)*2] * cosa - pattern[(idx)*2+1] * sina))]\n"
+"for( i = 0; i < dsize; i++ )\n"
+"{\n"
+"int val;\n"
+"#if WTA_K == 2\n"
+"int t0, t1;\n"
+"t0 = GET_VALUE(0); t1 = GET_VALUE(1);\n"
+"val = t0 < t1;\n"
+"t0 = GET_VALUE(2); t1 = GET_VALUE(3);\n"
+"val |= (t0 < t1) << 1;\n"
+"t0 = GET_VALUE(4); t1 = GET_VALUE(5);\n"
+"val |= (t0 < t1) << 2;\n"
+"t0 = GET_VALUE(6); t1 = GET_VALUE(7);\n"
+"val |= (t0 < t1) << 3;\n"
+"t0 = GET_VALUE(8); t1 = GET_VALUE(9);\n"
+"val |= (t0 < t1) << 4;\n"
+"t0 = GET_VALUE(10); t1 = GET_VALUE(11);\n"
+"val |= (t0 < t1) << 5;\n"
+"t0 = GET_VALUE(12); t1 = GET_VALUE(13);\n"
+"val |= (t0 < t1) << 6;\n"
+"t0 = GET_VALUE(14); t1 = GET_VALUE(15);\n"
+"val |= (t0 < t1) << 7;\n"
+"pattern += 16*2;\n"
+"#elif WTA_K == 3\n"
+"int t0, t1, t2;\n"
+"t0 = GET_VALUE(0); t1 = GET_VALUE(1); t2 = GET_VALUE(2);\n"
+"val = t2 > t1 ? (t2 > t0 ? 2 : 0) : (t1 > t0);\n"
+"t0 = GET_VALUE(3); t1 = GET_VALUE(4); t2 = GET_VALUE(5);\n"
+"val |= (t2 > t1 ? (t2 > t0 ? 2 : 0) : (t1 > t0)) << 2;\n"
+"t0 = GET_VALUE(6); t1 = GET_VALUE(7); t2 = GET_VALUE(8);\n"
+"val |= (t2 > t1 ? (t2 > t0 ? 2 : 0) : (t1 > t0)) << 4;\n"
+"t0 = GET_VALUE(9); t1 = GET_VALUE(10); t2 = GET_VALUE(11);\n"
+"val |= (t2 > t1 ? (t2 > t0 ? 2 : 0) : (t1 > t0)) << 6;\n"
+"pattern += 12*2;\n"
+"#elif WTA_K == 4\n"
+"int t0, t1, t2, t3, k;\n"
+"int a, b;\n"
+"t0 = GET_VALUE(0); t1 = GET_VALUE(1);\n"
+"t2 = GET_VALUE(2); t3 = GET_VALUE(3);\n"
+"a = 0, b = 2;\n"
+"if( t1 > t0 ) t0 = t1, a = 1;\n"
+"if( t3 > t2 ) t2 = t3, b = 3;\n"
+"k = t0 > t2 ? a : b;\n"
+"val = k;\n"
+"t0 = GET_VALUE(4); t1 = GET_VALUE(5);\n"
+"t2 = GET_VALUE(6); t3 = GET_VALUE(7);\n"
+"a = 0, b = 2;\n"
+"if( t1 > t0 ) t0 = t1, a = 1;\n"
+"if( t3 > t2 ) t2 = t3, b = 3;\n"
+"k = t0 > t2 ? a : b;\n"
+"val |= k << 2;\n"
+"t0 = GET_VALUE(8); t1 = GET_VALUE(9);\n"
+"t2 = GET_VALUE(10); t3 = GET_VALUE(11);\n"
+"a = 0, b = 2;\n"
+"if( t1 > t0 ) t0 = t1, a = 1;\n"
+"if( t3 > t2 ) t2 = t3, b = 3;\n"
+"k = t0 > t2 ? a : b;\n"
+"val |= k << 4;\n"
+"t0 = GET_VALUE(12); t1 = GET_VALUE(13);\n"
+"t2 = GET_VALUE(14); t3 = GET_VALUE(15);\n"
+"a = 0, b = 2;\n"
+"if( t1 > t0 ) t0 = t1, a = 1;\n"
+"if( t3 > t2 ) t2 = t3, b = 3;\n"
+"k = t0 > t2 ? a : b;\n"
+"val |= k << 6;\n"
+"pattern += 16*2;\n"
+"#else\n"
+"#error \"unknown/undefined WTA_K value; should be 2, 3 or 4\"\n"
+"#endif\n"
+"desc[i] = (uchar)val;\n"
+"}\n"
+"}\n"
+"}\n"
+"#endif\n"
+, "a7c2cfaeda19907b637211b1cc91d253"};
+ProgramSource orb_oclsrc(orb.programStr);
+}
+}}
diff --git a/modules/features2d/opencl_kernels_features2d.hpp b/modules/features2d/opencl_kernels_features2d.hpp
new file mode 100644
index 0000000..82d52a3
--- /dev/null
+++ b/modules/features2d/opencl_kernels_features2d.hpp
@@ -0,0 +1,21 @@
+// This file is auto-generated. Do not edit!
+
+#include "opencv2/core/ocl.hpp"
+#include "opencv2/core/ocl_genbase.hpp"
+#include "opencv2/core/opencl/ocl_defs.hpp"
+
+namespace cv
+{
+namespace ocl
+{
+namespace features2d
+{
+
+extern const struct ProgramEntry brute_force_match;
+extern ProgramSource brute_force_match_oclsrc;
+extern const struct ProgramEntry fast;
+extern ProgramSource fast_oclsrc;
+extern const struct ProgramEntry orb;
+extern ProgramSource orb_oclsrc;
+}
+}}
diff --git a/modules/features2d/precomp.hpp b/modules/features2d/precomp.hpp
new file mode 100644
index 0000000..1c41542
--- /dev/null
+++ b/modules/features2d/precomp.hpp
@@ -0,0 +1,25 @@
+#ifndef _OPENCV_FLANN_PRECOMP_HPP_
+#define _OPENCV_FLANN_PRECOMP_HPP_
+
+#include <cstdio>
+#include <cstdarg>
+#include <sstream>
+
+#include "opencv2/core.hpp"
+#include "opencv2/core/utility.hpp"
+
+#include "opencv2/flann/miniflann.hpp"
+#include "opencv2/flann/dist.h"
+#include "opencv2/flann/index_testing.h"
+#include "opencv2/flann/params.h"
+#include "opencv2/flann/saving.h"
+#include "opencv2/flann/general.h"
+#include "opencv2/flann/dummy.h"
+
+// index types
+#include "opencv2/flann/all_indices.h"
+#include "opencv2/flann/flann_base.hpp"
+
+#include "opencv2/core/private.hpp"
+
+#endif
diff --git a/modules/hal/precomp.hpp b/modules/hal/precomp.hpp
new file mode 100644
index 0000000..630565b
--- /dev/null
+++ b/modules/hal/precomp.hpp
@@ -0,0 +1,49 @@
+/*M///////////////////////////////////////////////////////////////////////////////////////
+//
+// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+//
+// By downloading, copying, installing or using the software you agree to this license.
+// If you do not agree to this license, do not download, install,
+// copy or use the software.
+//
+//
+// License Agreement
+// For Open Source Computer Vision Library
+//
+// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
+// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// * Redistribution's of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// * Redistribution's in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// * The name of the copyright holders may not be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// This software is provided by the copyright holders and contributors "as is" and
+// any express or implied warranties, including, but not limited to, the implied
+// warranties of merchantability and fitness for a particular purpose are disclaimed.
+// In no event shall the Intel Corporation or contributors be liable for any direct,
+// indirect, incidental, special, exemplary, or consequential damages
+// (including, but not limited to, procurement of substitute goods or services;
+// loss of use, data, or profits; or business interruption) however caused
+// and on any theory of liability, whether in contract, strict liability,
+// or tort (including negligence or otherwise) arising in any way out of
+// the use of this software, even if advised of the possibility of such damage.
+//
+//M*/
+
+#include "opencv2/hal.hpp"
+#include "opencv2/hal/intrin.hpp"
+#include <algorithm>
+#include <cmath>
+#include <cstdlib>
+#include <limits>
+#include <float.h>
diff --git a/modules/highgui/precomp.hpp b/modules/highgui/precomp.hpp
new file mode 100644
index 0000000..c951778
--- /dev/null
+++ b/modules/highgui/precomp.hpp
@@ -0,0 +1,132 @@
+/*M///////////////////////////////////////////////////////////////////////////////////////
+//
+// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+//
+// By downloading, copying, installing or using the software you agree to this license.
+// If you do not agree to this license, do not download, install,
+// copy or use the software.
+//
+//
+// Intel License Agreement
+// For Open Source Computer Vision Library
+//
+// Copyright (C) 2000, Intel Corporation, all rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// * Redistribution's of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// * Redistribution's in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// * The name of Intel Corporation may not be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// This software is provided by the copyright holders and contributors "as is" and
+// any express or implied warranties, including, but not limited to, the implied
+// warranties of merchantability and fitness for a particular purpose are disclaimed.
+// In no event shall the Intel Corporation or contributors be liable for any direct,
+// indirect, incidental, special, exemplary, or consequential damages
+// (including, but not limited to, procurement of substitute goods or services;
+// loss of use, data, or profits; or business interruption) however caused
+// and on any theory of liability, whether in contract, strict liability,
+// or tort (including negligence or otherwise) arising in any way out of
+// the use of this software, even if advised of the possibility of such damage.
+//
+//M*/
+
+#ifndef __HIGHGUI_H_
+#define __HIGHGUI_H_
+
+#include "opencv2/highgui.hpp"
+
+#include "opencv2/core/utility.hpp"
+#include "opencv2/core/private.hpp"
+
+#include "opencv2/imgcodecs.hpp"
+
+#include "opencv2/imgproc/imgproc_c.h"
+#include "opencv2/imgcodecs/imgcodecs_c.h"
+#include "opencv2/highgui/highgui_c.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <limits.h>
+#include <ctype.h>
+#include <assert.h>
+
+#if defined WIN32 || defined WINCE
+ #if !defined _WIN32_WINNT
+ #ifdef HAVE_MSMF
+ #define _WIN32_WINNT 0x0600 // Windows Vista
+ #else
+ #define _WIN32_WINNT 0x0500 // Windows 2000
+ #endif
+ #endif
+
+ #include <windows.h>
+ #undef small
+ #undef min
+ #undef max
+ #undef abs
+#endif
+
+#ifdef HAVE_TEGRA_OPTIMIZATION
+#include "opencv2/highgui/highgui_tegra.hpp"
+#endif
+
+/* Errors */
+#define HG_OK 0 /* Don't bet on it! */
+#define HG_BADNAME -1 /* Bad window or file name */
+#define HG_INITFAILED -2 /* Can't initialize HigHGUI */
+#define HG_WCFAILED -3 /* Can't create a window */
+#define HG_NULLPTR -4 /* The null pointer where it should not appear */
+#define HG_BADPARAM -5
+
+#define __BEGIN__ __CV_BEGIN__
+#define __END__ __CV_END__
+#define EXIT __CV_EXIT__
+
+#define CV_WINDOW_MAGIC_VAL 0x00420042
+#define CV_TRACKBAR_MAGIC_VAL 0x00420043
+
+//Yannick Verdie 2010
+void cvSetModeWindow_W32(const char* name, double prop_value);
+void cvSetModeWindow_GTK(const char* name, double prop_value);
+void cvSetModeWindow_CARBON(const char* name, double prop_value);
+void cvSetModeWindow_COCOA(const char* name, double prop_value);
+
+double cvGetModeWindow_W32(const char* name);
+double cvGetModeWindow_GTK(const char* name);
+double cvGetModeWindow_CARBON(const char* name);
+double cvGetModeWindow_COCOA(const char* name);
+
+double cvGetPropWindowAutoSize_W32(const char* name);
+double cvGetPropWindowAutoSize_GTK(const char* name);
+
+double cvGetRatioWindow_W32(const char* name);
+double cvGetRatioWindow_GTK(const char* name);
+
+double cvGetOpenGlProp_W32(const char* name);
+double cvGetOpenGlProp_GTK(const char* name);
+
+//for QT
+#if defined (HAVE_QT)
+double cvGetModeWindow_QT(const char* name);
+void cvSetModeWindow_QT(const char* name, double prop_value);
+
+double cvGetPropWindow_QT(const char* name);
+void cvSetPropWindow_QT(const char* name,double prop_value);
+
+double cvGetRatioWindow_QT(const char* name);
+void cvSetRatioWindow_QT(const char* name,double prop_value);
+
+double cvGetOpenGlProp_QT(const char* name);
+#endif
+
+#endif /* __HIGHGUI_H_ */
diff --git a/modules/imgcodecs/precomp.hpp b/modules/imgcodecs/precomp.hpp
new file mode 100644
index 0000000..a5bbb41
--- /dev/null
+++ b/modules/imgcodecs/precomp.hpp
@@ -0,0 +1,80 @@
+/*M///////////////////////////////////////////////////////////////////////////////////////
+//
+// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+//
+// By downloading, copying, installing or using the software you agree to this license.
+// If you do not agree to this license, do not download, install,
+// copy or use the software.
+//
+//
+// Intel License Agreement
+// For Open Source Computer Vision Library
+//
+// Copyright (C) 2000, Intel Corporation, all rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// * Redistribution's of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// * Redistribution's in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// * The name of Intel Corporation may not be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// This software is provided by the copyright holders and contributors "as is" and
+// any express or implied warranties, including, but not limited to, the implied
+// warranties of merchantability and fitness for a particular purpose are disclaimed.
+// In no event shall the Intel Corporation or contributors be liable for any direct,
+// indirect, incidental, special, exemplary, or consequential damages
+// (including, but not limited to, procurement of substitute goods or services;
+// loss of use, data, or profits; or business interruption) however caused
+// and on any theory of liability, whether in contract, strict liability,
+// or tort (including negligence or otherwise) arising in any way out of
+// the use of this software, even if advised of the possibility of such damage.
+//
+//M*/
+
+#ifndef __IMGCODECS_H_
+#define __IMGCODECS_H_
+
+#include "opencv2/imgcodecs.hpp"
+
+#include "opencv2/core/utility.hpp"
+#include "opencv2/core/private.hpp"
+
+#include "opencv2/imgproc/imgproc_c.h"
+#include "opencv2/imgcodecs/imgcodecs_c.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <limits.h>
+#include <ctype.h>
+#include <assert.h>
+
+#if defined WIN32 || defined WINCE
+ #if !defined _WIN32_WINNT
+ #ifdef HAVE_MSMF
+ #define _WIN32_WINNT 0x0600 // Windows Vista
+ #else
+ #define _WIN32_WINNT 0x0500 // Windows 2000
+ #endif
+ #endif
+
+ #include <windows.h>
+ #undef small
+ #undef min
+ #undef max
+ #undef abs
+#endif
+
+#define __BEGIN__ __CV_BEGIN__
+#define __END__ __CV_END__
+#define EXIT __CV_EXIT__
+
+#endif /* __IMGCODECS_H_ */
diff --git a/modules/imgproc/opencl_kernels_imgproc.cpp b/modules/imgproc/opencl_kernels_imgproc.cpp
new file mode 100644
index 0000000..0e804ff
--- /dev/null
+++ b/modules/imgproc/opencl_kernels_imgproc.cpp
@@ -0,0 +1,7821 @@
+// This file is auto-generated. Do not edit!
+
+#include "precomp.hpp"
+#include "opencl_kernels_imgproc.hpp"
+
+namespace cv
+{
+namespace ocl
+{
+namespace imgproc
+{
+
+const struct ProgramEntry accumulate={"accumulate",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#define SRC_TSIZE cn * (int)sizeof(srcT1)\n"
+"#define DST_TSIZE cn * (int)sizeof(dstT1)\n"
+"#define noconvert\n"
+"__kernel void accumulate(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"#ifdef ACCUMULATE_PRODUCT\n"
+"__global const uchar * src2ptr, int src2_step, int src2_offset,\n"
+"#endif\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols\n"
+"#ifdef ACCUMULATE_WEIGHTED\n"
+", dstT1 alpha\n"
+"#endif\n"
+"#ifdef HAVE_MASK\n"
+", __global const uchar * mask, int mask_step, int mask_offset\n"
+"#endif\n"
+")\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * rowsPerWI;\n"
+"if (x < dst_cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, SRC_TSIZE, src_offset));\n"
+"#ifdef HAVE_MASK\n"
+"int mask_index = mad24(y, mask_step, mask_offset + x);\n"
+"mask += mask_index;\n"
+"#endif\n"
+"#ifdef ACCUMULATE_PRODUCT\n"
+"int src2_index = mad24(y, src2_step, mad24(x, SRC_TSIZE, src2_offset));\n"
+"#endif\n"
+"int dst_index = mad24(y, dst_step, mad24(x, DST_TSIZE, dst_offset));\n"
+"#pragma unroll\n"
+"for (int i = 0; i < rowsPerWI; ++i)\n"
+"if (y < dst_rows)\n"
+"{\n"
+"__global const srcT1 * src = (__global const srcT1 *)(srcptr + src_index);\n"
+"#ifdef ACCUMULATE_PRODUCT\n"
+"__global const srcT1 * src2 = (__global const srcT1 *)(src2ptr + src2_index);\n"
+"#endif\n"
+"__global dstT1 * dst = (__global dstT1 *)(dstptr + dst_index);\n"
+"#ifdef HAVE_MASK\n"
+"if (mask[0])\n"
+"#endif\n"
+"#pragma unroll\n"
+"for (int c = 0; c < cn; ++c)\n"
+"{\n"
+"#ifdef ACCUMULATE\n"
+"dst[c] += convertToDT(src[c]);\n"
+"#elif defined ACCUMULATE_SQUARE\n"
+"dstT1 val = convertToDT(src[c]);\n"
+"dst[c] = fma(val, val, dst[c]);\n"
+"#elif defined ACCUMULATE_PRODUCT\n"
+"dst[c] = fma(convertToDT(src[c]), convertToDT(src2[c]), dst[c]);\n"
+"#elif defined ACCUMULATE_WEIGHTED\n"
+"dst[c] = fma(1 - alpha, dst[c], src[c] * alpha);\n"
+"#else\n"
+"#error \"Unknown accumulation type\"\n"
+"#endif\n"
+"}\n"
+"src_index += src_step;\n"
+"#ifdef ACCUMULATE_PRODUCT\n"
+"src2_index += src2_step;\n"
+"#endif\n"
+"#ifdef HAVE_MASK\n"
+"mask += mask_step;\n"
+"#endif\n"
+"dst_index += dst_step;\n"
+"++y;\n"
+"}\n"
+"}\n"
+"}\n"
+, "5f2c2d40f721d738ad2b8ef755376c6f"};
+ProgramSource accumulate_oclsrc(accumulate.programStr);
+const struct ProgramEntry bilateral={"bilateral",
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const uchar_t *)(addr)\n"
+"#define storepix(val, addr) *(__global uchar_t *)(addr) = val\n"
+"#define TSIZE cn\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const uchar *)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global uchar *)(addr))\n"
+"#define TSIZE 3\n"
+"#endif\n"
+"#if cn == 1\n"
+"#define SUM(a) a\n"
+"#elif cn == 2\n"
+"#define SUM(a) a.x + a.y\n"
+"#elif cn == 3\n"
+"#define SUM(a) a.x + a.y + a.z\n"
+"#elif cn == 4\n"
+"#define SUM(a) a.x + a.y + a.z + a.w\n"
+"#else\n"
+"#error \"cn should be <= 4\"\n"
+"#endif\n"
+"__kernel void bilateral(__global const uchar * src, int src_step, int src_offset,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__constant float * space_weight, __constant int * space_ofs)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (y < dst_rows && x < dst_cols)\n"
+"{\n"
+"int src_index = mad24(y + radius, src_step, mad24(x + radius, TSIZE, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, TSIZE, dst_offset));\n"
+"float_t sum = (float_t)(0.0f);\n"
+"float wsum = 0.0f;\n"
+"#ifdef INTEL_DEVICE\n"
+"float_t val0 = convert_float_t(loadpix(src + src_index));\n"
+"#else\n"
+"int_t val0 = convert_int_t(loadpix(src + src_index));\n"
+"#endif\n"
+"#pragma unroll\n"
+"for (int k = 0; k < maxk; k++ )\n"
+"{\n"
+"#ifdef INTEL_DEVICE\n"
+"float_t val = convert_float_t(loadpix(src + src_index + space_ofs[k]));\n"
+"float diff = SUM(fabs(val - val0));\n"
+"#else\n"
+"int_t val = convert_int_t(loadpix(src + src_index + space_ofs[k]));\n"
+"int diff = SUM(abs(val - val0));\n"
+"#endif\n"
+"float w = space_weight[k] * native_exp((float)(diff * diff * gauss_color_coeff));\n"
+"sum += convert_float_t(val) * (float_t)(w);\n"
+"wsum += w;\n"
+"}\n"
+"storepix(convert_uchar_t(sum / (float_t)(wsum)), dst + dst_index);\n"
+"}\n"
+"}\n"
+"#ifdef INTEL_DEVICE\n"
+"#if cn == 1\n"
+"__kernel void bilateral_float4(__global const uchar * src, int src_step, int src_offset,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__constant float * space_weight, __constant int * space_ofs)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (y < dst_rows && x < dst_cols / 4 )\n"
+"{\n"
+"int src_index = ((y + radius) * src_step) + x * 4 + (radius + src_offset);\n"
+"int dst_index = (y * dst_step) + x * 4 + dst_offset ;\n"
+"float4 sum = 0.f, wsum = 0.f;\n"
+"float4 val0 = convert_float4(vload4(0, src + src_index));\n"
+"#pragma unroll\n"
+"for (int k = 0; k < maxk; k++ )\n"
+"{\n"
+"float4 val = convert_float4(vload4(0, src + src_index + space_ofs[k]));\n"
+"float4 w = space_weight[k] * native_exp((val - val0) * (val - val0) * gauss_color_coeff);\n"
+"sum += val * w;\n"
+"wsum += w;\n"
+"}\n"
+"sum = sum / wsum + .5f;\n"
+"vstore4(convert_uchar4_rtz(sum), 0, dst + dst_index);\n"
+"}\n"
+"}\n"
+"#endif\n"
+"#endif\n"
+, "1cc12569fdb93cbfa05bb215d3d42e64"};
+ProgramSource bilateral_oclsrc(bilateral.programStr);
+const struct ProgramEntry blend_linear={"blend_linear",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#define noconvert\n"
+"__kernel void blendLinear(__global const uchar * src1ptr, int src1_step, int src1_offset,\n"
+"__global const uchar * src2ptr, int src2_step, int src2_offset,\n"
+"__global const uchar * weight1, int weight1_step, int weight1_offset,\n"
+"__global const uchar * weight2, int weight2_step, int weight2_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (x < dst_cols && y < dst_rows)\n"
+"{\n"
+"int src1_index = mad24(y, src1_step, src1_offset + x * cn * (int)sizeof(T));\n"
+"int src2_index = mad24(y, src2_step, src2_offset + x * cn * (int)sizeof(T));\n"
+"int weight1_index = mad24(y, weight1_step, weight1_offset + x * (int)sizeof(float));\n"
+"int weight2_index = mad24(y, weight2_step, weight2_offset + x * (int)sizeof(float));\n"
+"int dst_index = mad24(y, dst_step, dst_offset + x * cn * (int)sizeof(T));\n"
+"float w1 = *(__global const float *)(weight1 + weight1_index),\n"
+"w2 = *(__global const float *)(weight2 + weight2_index);\n"
+"float den = w1 + w2 + 1e-5f;\n"
+"__global const T * src1 = (__global const T *)(src1ptr + src1_index);\n"
+"__global const T * src2 = (__global const T *)(src2ptr + src2_index);\n"
+"__global T * dst = (__global T *)(dstptr + dst_index);\n"
+"#pragma unroll\n"
+"for (int i = 0; i < cn; ++i)\n"
+"{\n"
+"float num = w1 * convert_float(src1[i]) + w2 * convert_float(src2[i]);\n"
+"dst[i] = convertToT(num / den);\n"
+"}\n"
+"}\n"
+"}\n"
+, "76072b51c3ede4951ee0200aa33297dc"};
+ProgramSource blend_linear_oclsrc(blend_linear.programStr);
+const struct ProgramEntry boxFilter={"boxFilter",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const ST *)(addr)\n"
+"#define storepix(val, addr) *(__global DT *)(addr) = val\n"
+"#define SRCSIZE (int)sizeof(ST)\n"
+"#define DSTSIZE (int)sizeof(DT)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const ST1 *)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global DT1 *)(addr))\n"
+"#define SRCSIZE (int)sizeof(ST1)*cn\n"
+"#define DSTSIZE (int)sizeof(DT1)*cn\n"
+"#endif\n"
+"#ifdef BORDER_CONSTANT\n"
+"#elif defined BORDER_REPLICATE\n"
+"#define EXTRAPOLATE(x, y, minX, minY, maxX, maxY) \\\n"
+"{ \\\n"
+"x = max(min(x, maxX - 1), minX); \\\n"
+"y = max(min(y, maxY - 1), minY); \\\n"
+"}\n"
+"#elif defined BORDER_WRAP\n"
+"#define EXTRAPOLATE(x, y, minX, minY, maxX, maxY) \\\n"
+"{ \\\n"
+"if (x < minX) \\\n"
+"x -= ((x - maxX + 1) / maxX) * maxX; \\\n"
+"if (x >= maxX) \\\n"
+"x %= maxX; \\\n"
+"if (y < minY) \\\n"
+"y -= ((y - maxY + 1) / maxY) * maxY; \\\n"
+"if (y >= maxY) \\\n"
+"y %= maxY; \\\n"
+"}\n"
+"#elif defined(BORDER_REFLECT) || defined(BORDER_REFLECT_101)\n"
+"#define EXTRAPOLATE_(x, y, minX, minY, maxX, maxY, delta) \\\n"
+"{ \\\n"
+"if (maxX - minX == 1) \\\n"
+"x = minX; \\\n"
+"else \\\n"
+"do \\\n"
+"{ \\\n"
+"if (x < minX) \\\n"
+"x = minX - (x - minX) - 1 + delta; \\\n"
+"else \\\n"
+"x = maxX - 1 - (x - maxX) - delta; \\\n"
+"} \\\n"
+"while (x >= maxX || x < minX); \\\n"
+"\\\n"
+"if (maxY - minY == 1) \\\n"
+"y = minY; \\\n"
+"else \\\n"
+"do \\\n"
+"{ \\\n"
+"if (y < minY) \\\n"
+"y = minY - (y - minY) - 1 + delta; \\\n"
+"else \\\n"
+"y = maxY - 1 - (y - maxY) - delta; \\\n"
+"} \\\n"
+"while (y >= maxY || y < minY); \\\n"
+"}\n"
+"#ifdef BORDER_REFLECT\n"
+"#define EXTRAPOLATE(x, y, minX, minY, maxX, maxY) EXTRAPOLATE_(x, y, minX, minY, maxX, maxY, 0)\n"
+"#elif defined(BORDER_REFLECT_101)\n"
+"#define EXTRAPOLATE(x, y, minX, minY, maxX, maxY) EXTRAPOLATE_(x, y, minX, minY, maxX, maxY, 1)\n"
+"#endif\n"
+"#else\n"
+"#error No extrapolation method\n"
+"#endif\n"
+"#define noconvert\n"
+"#ifdef SQR\n"
+"#define PROCESS_ELEM(value) (value * value)\n"
+"#else\n"
+"#define PROCESS_ELEM(value) value\n"
+"#endif\n"
+"struct RectCoords\n"
+"{\n"
+"int x1, y1, x2, y2;\n"
+"};\n"
+"inline WT readSrcPixel(int2 pos, __global const uchar * srcptr, int src_step, const struct RectCoords srcCoords)\n"
+"{\n"
+"#ifdef BORDER_ISOLATED\n"
+"if (pos.x >= srcCoords.x1 && pos.y >= srcCoords.y1 && pos.x < srcCoords.x2 && pos.y < srcCoords.y2)\n"
+"#else\n"
+"if (pos.x >= 0 && pos.y >= 0 && pos.x < srcCoords.x2 && pos.y < srcCoords.y2)\n"
+"#endif\n"
+"{\n"
+"int src_index = mad24(pos.y, src_step, pos.x * SRCSIZE);\n"
+"WT value = convertToWT(loadpix(srcptr + src_index));\n"
+"return PROCESS_ELEM(value);\n"
+"}\n"
+"else\n"
+"{\n"
+"#ifdef BORDER_CONSTANT\n"
+"return (WT)(0);\n"
+"#else\n"
+"int selected_col = pos.x, selected_row = pos.y;\n"
+"EXTRAPOLATE(selected_col, selected_row,\n"
+"#ifdef BORDER_ISOLATED\n"
+"srcCoords.x1, srcCoords.y1,\n"
+"#else\n"
+"0, 0,\n"
+"#endif\n"
+"srcCoords.x2, srcCoords.y2);\n"
+"int src_index = mad24(selected_row, src_step, selected_col * SRCSIZE);\n"
+"WT value = convertToWT(loadpix(srcptr + src_index));\n"
+"return PROCESS_ELEM(value);\n"
+"#endif\n"
+"}\n"
+"}\n"
+"__kernel void boxFilter(__global const uchar * srcptr, int src_step, int srcOffsetX, int srcOffsetY, int srcEndX, int srcEndY,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int rows, int cols\n"
+"#ifdef NORMALIZE\n"
+", float alpha\n"
+"#endif\n"
+")\n"
+"{\n"
+"const struct RectCoords srcCoords = { srcOffsetX, srcOffsetY, srcEndX, srcEndY };\n"
+"int x = get_local_id(0) + (LOCAL_SIZE_X - (KERNEL_SIZE_X - 1)) * get_group_id(0) - ANCHOR_X;\n"
+"int y = get_global_id(1) * BLOCK_SIZE_Y;\n"
+"int local_id = get_local_id(0);\n"
+"WT data[KERNEL_SIZE_Y];\n"
+"__local WT sumOfCols[LOCAL_SIZE_X];\n"
+"int2 srcPos = (int2)(srcCoords.x1 + x, srcCoords.y1 + y - ANCHOR_Y);\n"
+"#pragma unroll\n"
+"for (int sy = 0; sy < KERNEL_SIZE_Y; sy++, srcPos.y++)\n"
+"data[sy] = readSrcPixel(srcPos, srcptr, src_step, srcCoords);\n"
+"WT tmp_sum = (WT)(0);\n"
+"#pragma unroll\n"
+"for (int sy = 0; sy < KERNEL_SIZE_Y; sy++)\n"
+"tmp_sum += data[sy];\n"
+"sumOfCols[local_id] = tmp_sum;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"int dst_index = mad24(y, dst_step, mad24(x, DSTSIZE, dst_offset));\n"
+"__global DT * dst = (__global DT *)(dstptr + dst_index);\n"
+"int sy_index = 0;\n"
+"for (int i = 0, stepY = min(rows - y, BLOCK_SIZE_Y); i < stepY; ++i)\n"
+"{\n"
+"if (local_id >= ANCHOR_X && local_id < LOCAL_SIZE_X - (KERNEL_SIZE_X - 1 - ANCHOR_X) &&\n"
+"x >= 0 && x < cols)\n"
+"{\n"
+"WT total_sum = (WT)(0);\n"
+"#pragma unroll\n"
+"for (int sx = 0; sx < KERNEL_SIZE_X; sx++)\n"
+"total_sum += sumOfCols[local_id + sx - ANCHOR_X];\n"
+"#ifdef NORMALIZE\n"
+"DT dstval = convertToDT((WT)(alpha) * total_sum);\n"
+"#else\n"
+"DT dstval = convertToDT(total_sum);\n"
+"#endif\n"
+"storepix(dstval, dst);\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"tmp_sum = sumOfCols[local_id];\n"
+"tmp_sum -= data[sy_index];\n"
+"data[sy_index] = readSrcPixel(srcPos, srcptr, src_step, srcCoords);\n"
+"srcPos.y++;\n"
+"tmp_sum += data[sy_index];\n"
+"sumOfCols[local_id] = tmp_sum;\n"
+"sy_index = sy_index + 1 < KERNEL_SIZE_Y ? sy_index + 1 : 0;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"dst = (__global DT *)((__global uchar *)dst + dst_step);\n"
+"}\n"
+"}\n"
+, "d3e542270fa2ea1fc3744043dad50cb4"};
+ProgramSource boxFilter_oclsrc(boxFilter.programStr);
+const struct ProgramEntry calc_back_project={"calc_back_project",
+"#define OUT_OF_RANGE -1\n"
+"#define ROUNDING_EPS 0.000001f\n"
+"#if histdims == 1\n"
+"__kernel void calcLUT(__global const uchar * histptr, int hist_step, int hist_offset, int hist_bins,\n"
+"__global int * lut, float scale, __constant float * ranges)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"float value = convert_float(x);\n"
+"if (value > ranges[1] || value < ranges[0])\n"
+"lut[x] = OUT_OF_RANGE;\n"
+"else\n"
+"{\n"
+"float lb = ranges[0], ub = ranges[1], gap = (ub - lb) / hist_bins;\n"
+"value -= lb;\n"
+"int bin = convert_int_sat_rtn(value / gap + ROUNDING_EPS);\n"
+"if (bin >= hist_bins)\n"
+"lut[x] = OUT_OF_RANGE;\n"
+"else\n"
+"{\n"
+"int hist_index = mad24(hist_step, bin, hist_offset);\n"
+"__global const float * hist = (__global const float *)(histptr + hist_index);\n"
+"lut[x] = (int)convert_uchar_sat_rte(hist[0] * scale);\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void LUT(__global const uchar * src, int src_step, int src_offset,\n"
+"__constant int * lut,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (x < dst_cols && y < dst_rows)\n"
+"{\n"
+"int src_index = mad24(y, src_step, src_offset + x * scn);\n"
+"int dst_index = mad24(y, dst_step, dst_offset + x);\n"
+"int value = lut[src[src_index]];\n"
+"dst[dst_index] = value == OUT_OF_RANGE ? 0 : convert_uchar(value);\n"
+"}\n"
+"}\n"
+"#elif histdims == 2\n"
+"__kernel void calcLUT(int hist_bins, __global int * lut, int lut_offset,\n"
+"__constant float * ranges, int roffset)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"float value = convert_float(x);\n"
+"ranges += roffset;\n"
+"lut += lut_offset;\n"
+"if (value > ranges[1] || value < ranges[0])\n"
+"lut[x] = OUT_OF_RANGE;\n"
+"else\n"
+"{\n"
+"float lb = ranges[0], ub = ranges[1], gap = (ub - lb) / hist_bins;\n"
+"value -= lb;\n"
+"int bin = convert_int_sat_rtn(value / gap + ROUNDING_EPS);\n"
+"lut[x] = bin >= hist_bins ? OUT_OF_RANGE : bin;\n"
+"}\n"
+"}\n"
+"__kernel void LUT(__global const uchar * src1, int src1_step, int src1_offset,\n"
+"__global const uchar * src2, int src2_step, int src2_offset,\n"
+"__global const uchar * histptr, int hist_step, int hist_offset,\n"
+"__constant int * lut, float scale,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (x < dst_cols && y < dst_rows)\n"
+"{\n"
+"int src1_index = mad24(y, src1_step, src1_offset + x * scn1);\n"
+"int src2_index = mad24(y, src2_step, src2_offset + x * scn2);\n"
+"int dst_index = mad24(y, dst_step, dst_offset + x);\n"
+"int bin1 = lut[src1[src1_index]];\n"
+"int bin2 = lut[src2[src2_index] + 256];\n"
+"dst[dst_index] = bin1 == OUT_OF_RANGE || bin2 == OUT_OF_RANGE ? 0 :\n"
+"convert_uchar_sat_rte(*(__global const float *)(histptr +\n"
+"mad24(hist_step, bin1, hist_offset + bin2 * (int)sizeof(float))) * scale);\n"
+"}\n"
+"}\n"
+"#else\n"
+"#error \"(nimages <= 2) should be true\"\n"
+"#endif\n"
+, "6bab391f796ff5b2ba3d38f23929307e"};
+ProgramSource calc_back_project_oclsrc(calc_back_project.programStr);
+const struct ProgramEntry canny={"canny",
+"#define TG22 0.4142135623730950488016887242097f\n"
+"#define TG67 2.4142135623730950488016887242097f\n"
+"#ifdef WITH_SOBEL\n"
+"#if cn == 1\n"
+"#define loadpix(addr) convert_floatN(*(__global const TYPE *)(addr))\n"
+"#else\n"
+"#define loadpix(addr) convert_floatN(vload3(0, (__global const TYPE *)(addr)))\n"
+"#endif\n"
+"#define storepix(value, addr) *(__global int *)(addr) = (int)(value)\n"
+"__constant int prev[4][2] = {\n"
+"{ 0, -1 },\n"
+"{ -1, 1 },\n"
+"{ -1, 0 },\n"
+"{ -1, -1 }\n"
+"};\n"
+"__constant int next[4][2] = {\n"
+"{ 0, 1 },\n"
+"{ 1, -1 },\n"
+"{ 1, 0 },\n"
+"{ 1, 1 }\n"
+"};\n"
+"inline float3 sobel(int idx, __local const floatN *smem)\n"
+"{\n"
+"float3 res;\n"
+"floatN dx = fma(2, smem[idx + GRP_SIZEX + 6] - smem[idx + GRP_SIZEX + 4],\n"
+"smem[idx + 2] - smem[idx] + smem[idx + 2 * GRP_SIZEX + 10] - smem[idx + 2 * GRP_SIZEX + 8]);\n"
+"floatN dy = fma(2, smem[idx + 1] - smem[idx + 2 * GRP_SIZEX + 9],\n"
+"smem[idx + 2] - smem[idx + 2 * GRP_SIZEX + 10] + smem[idx] - smem[idx + 2 * GRP_SIZEX + 8]);\n"
+"#ifdef L2GRAD\n"
+"floatN magN = fma(dx, dx, dy * dy);\n"
+"#else\n"
+"floatN magN = fabs(dx) + fabs(dy);\n"
+"#endif\n"
+"#if cn == 1\n"
+"res.z = magN;\n"
+"res.x = dx;\n"
+"res.y = dy;\n"
+"#else\n"
+"res.z = max(magN.x, max(magN.y, magN.z));\n"
+"if (res.z == magN.y)\n"
+"{\n"
+"dx.x = dx.y;\n"
+"dy.x = dy.y;\n"
+"}\n"
+"else if (res.z == magN.z)\n"
+"{\n"
+"dx.x = dx.z;\n"
+"dy.x = dy.z;\n"
+"}\n"
+"res.x = dx.x;\n"
+"res.y = dy.x;\n"
+"#endif\n"
+"return res;\n"
+"}\n"
+"__kernel void stage1_with_sobel(__global const uchar *src, int src_step, int src_offset, int rows, int cols,\n"
+"__global uchar *map, int map_step, int map_offset,\n"
+"float low_thr, float high_thr)\n"
+"{\n"
+"__local floatN smem[(GRP_SIZEX + 4) * (GRP_SIZEY + 4)];\n"
+"int lidx = get_local_id(0);\n"
+"int lidy = get_local_id(1);\n"
+"int start_x = GRP_SIZEX * get_group_id(0);\n"
+"int start_y = GRP_SIZEY * get_group_id(1);\n"
+"int i = lidx + lidy * GRP_SIZEX;\n"
+"for (int j = i; j < (GRP_SIZEX + 4) * (GRP_SIZEY + 4); j += GRP_SIZEX * GRP_SIZEY)\n"
+"{\n"
+"int x = clamp(start_x - 2 + (j % (GRP_SIZEX + 4)), 0, cols - 1);\n"
+"int y = clamp(start_y - 2 + (j / (GRP_SIZEX + 4)), 0, rows - 1);\n"
+"smem[j] = loadpix(src + mad24(y, src_step, mad24(x, cn * (int)sizeof(TYPE), src_offset)));\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"__local float mag[(GRP_SIZEX + 2) * (GRP_SIZEY + 2)];\n"
+"lidx++;\n"
+"lidy++;\n"
+"if (i < GRP_SIZEX + 2)\n"
+"{\n"
+"int grp_sizey = min(GRP_SIZEY + 1, rows - start_y);\n"
+"mag[i] = (sobel(i, smem)).z;\n"
+"mag[i + grp_sizey * (GRP_SIZEX + 2)] = (sobel(i + grp_sizey * (GRP_SIZEX + 4), smem)).z;\n"
+"}\n"
+"if (i < GRP_SIZEY + 2)\n"
+"{\n"
+"int grp_sizex = min(GRP_SIZEX + 1, cols - start_x);\n"
+"mag[i * (GRP_SIZEX + 2)] = (sobel(i * (GRP_SIZEX + 4), smem)).z;\n"
+"mag[i * (GRP_SIZEX + 2) + grp_sizex] = (sobel(i * (GRP_SIZEX + 4) + grp_sizex, smem)).z;\n"
+"}\n"
+"int idx = lidx + lidy * (GRP_SIZEX + 4);\n"
+"i = lidx + lidy * (GRP_SIZEX + 2);\n"
+"float3 res = sobel(idx, smem);\n"
+"mag[i] = res.z;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"int x = (int) res.x;\n"
+"int y = (int) res.y;\n"
+"int gidx = get_global_id(0);\n"
+"int gidy = get_global_id(1);\n"
+"if (gidx >= cols || gidy >= rows)\n"
+"return;\n"
+"float mag0 = mag[i];\n"
+"int value = 1;\n"
+"if (mag0 > low_thr)\n"
+"{\n"
+"int a = (y / (float)x) * TG22;\n"
+"int b = (y / (float)x) * TG67;\n"
+"a = min((int)abs(a), 1) + 1;\n"
+"b = min((int)abs(b), 1);\n"
+"int dir3 = (a * b) & (((x ^ y) & 0x80000000) >> 31);\n"
+"int dir = a * b + 2 * dir3;\n"
+"float prev_mag = mag[(lidy + prev[dir][0]) * (GRP_SIZEX + 2) + lidx + prev[dir][1]];\n"
+"float next_mag = mag[(lidy + next[dir][0]) * (GRP_SIZEX + 2) + lidx + next[dir][1]] + (dir & 1);\n"
+"if (mag0 > prev_mag && mag0 >= next_mag)\n"
+"{\n"
+"value = (mag0 > high_thr) ? 2 : 0;\n"
+"}\n"
+"}\n"
+"storepix(value, map + mad24(gidy, map_step, mad24(gidx, (int)sizeof(int), map_offset)));\n"
+"}\n"
+"#elif defined WITHOUT_SOBEL\n"
+"#define loadpix(addr) (__global short *)(addr)\n"
+"#define storepix(val, addr) *(__global int *)(addr) = (int)(val)\n"
+"#ifdef L2GRAD\n"
+"#define dist(x, y) ((int)(x) * (x) + (int)(y) * (y))\n"
+"#else\n"
+"#define dist(x, y) (abs(x) + abs(y))\n"
+"#endif\n"
+"__constant int prev[4][2] = {\n"
+"{ 0, -1 },\n"
+"{ -1, -1 },\n"
+"{ -1, 0 },\n"
+"{ -1, 1 }\n"
+"};\n"
+"__constant int next[4][2] = {\n"
+"{ 0, 1 },\n"
+"{ 1, 1 },\n"
+"{ 1, 0 },\n"
+"{ 1, -1 }\n"
+"};\n"
+"__kernel void stage1_without_sobel(__global const uchar *dxptr, int dx_step, int dx_offset,\n"
+"__global const uchar *dyptr, int dy_step, int dy_offset,\n"
+"__global uchar *map, int map_step, int map_offset, int rows, int cols,\n"
+"int low_thr, int high_thr)\n"
+"{\n"
+"int start_x = get_group_id(0) * GRP_SIZEX;\n"
+"int start_y = get_group_id(1) * GRP_SIZEY;\n"
+"int lidx = get_local_id(0);\n"
+"int lidy = get_local_id(1);\n"
+"__local int mag[(GRP_SIZEX + 2) * (GRP_SIZEY + 2)];\n"
+"__local short2 sigma[(GRP_SIZEX + 2) * (GRP_SIZEY + 2)];\n"
+"#pragma unroll\n"
+"for (int i = lidx + lidy * GRP_SIZEX; i < (GRP_SIZEX + 2) * (GRP_SIZEY + 2); i += GRP_SIZEX * GRP_SIZEY)\n"
+"{\n"
+"int x = clamp(start_x - 1 + i % (GRP_SIZEX + 2), 0, cols - 1);\n"
+"int y = clamp(start_y - 1 + i / (GRP_SIZEX + 2), 0, rows - 1);\n"
+"int dx_index = mad24(y, dx_step, mad24(x, cn * (int)sizeof(short), dx_offset));\n"
+"int dy_index = mad24(y, dy_step, mad24(x, cn * (int)sizeof(short), dy_offset));\n"
+"__global short *dx = loadpix(dxptr + dx_index);\n"
+"__global short *dy = loadpix(dyptr + dy_index);\n"
+"int mag0 = dist(dx[0], dy[0]);\n"
+"#if cn > 1\n"
+"short cdx = dx[0], cdy = dy[0];\n"
+"#pragma unroll\n"
+"for (int j = 1; j < cn; ++j)\n"
+"{\n"
+"int mag1 = dist(dx[j], dy[j]);\n"
+"if (mag1 > mag0)\n"
+"{\n"
+"mag0 = mag1;\n"
+"cdx = dx[j];\n"
+"cdy = dy[j];\n"
+"}\n"
+"}\n"
+"dx[0] = cdx;\n"
+"dy[0] = cdy;\n"
+"#endif\n"
+"mag[i] = mag0;\n"
+"sigma[i] = (short2)(dx[0], dy[0]);\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"int gidx = get_global_id(0);\n"
+"int gidy = get_global_id(1);\n"
+"if (gidx >= cols || gidy >= rows)\n"
+"return;\n"
+"lidx++;\n"
+"lidy++;\n"
+"int mag0 = mag[lidx + lidy * (GRP_SIZEX + 2)];\n"
+"short x = (sigma[lidx + lidy * (GRP_SIZEX + 2)]).x;\n"
+"short y = (sigma[lidx + lidy * (GRP_SIZEX + 2)]).y;\n"
+"int value = 1;\n"
+"if (mag0 > low_thr)\n"
+"{\n"
+"int a = (y / (float)x) * TG22;\n"
+"int b = (y / (float)x) * TG67;\n"
+"a = min((int)abs(a), 1) + 1;\n"
+"b = min((int)abs(b), 1);\n"
+"int dir3 = (a * b) & (((x ^ y) & 0x80000000) >> 31);\n"
+"int dir = a * b + 2 * dir3;\n"
+"int prev_mag = mag[(lidy + prev[dir][0]) * (GRP_SIZEX + 2) + lidx + prev[dir][1]];\n"
+"int next_mag = mag[(lidy + next[dir][0]) * (GRP_SIZEX + 2) + lidx + next[dir][1]] + (dir & 1);\n"
+"if (mag0 > prev_mag && mag0 >= next_mag)\n"
+"{\n"
+"value = (mag0 > high_thr) ? 2 : 0;\n"
+"}\n"
+"}\n"
+"storepix(value, map + mad24(gidy, map_step, mad24(gidx, (int)sizeof(int), map_offset)));\n"
+"}\n"
+"#undef TG22\n"
+"#undef CANNY_SHIFT\n"
+"#elif defined STAGE2\n"
+"#define loadpix(addr) *(__global int *)(addr)\n"
+"#define storepix(val, addr) *(__global int *)(addr) = (int)(val)\n"
+"#define LOCAL_TOTAL (LOCAL_X*LOCAL_Y)\n"
+"#define l_stack_size (4*LOCAL_TOTAL)\n"
+"#define p_stack_size 8\n"
+"__constant short move_dir[2][8] = {\n"
+"{ -1, -1, -1, 0, 0, 1, 1, 1 },\n"
+"{ -1, 0, 1, -1, 1, -1, 0, 1 }\n"
+"};\n"
+"__kernel void stage2_hysteresis(__global uchar *map_ptr, int map_step, int map_offset, int rows, int cols)\n"
+"{\n"
+"map_ptr += map_offset;\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI;\n"
+"int lid = get_local_id(0) + get_local_id(1) * LOCAL_X;\n"
+"__local ushort2 l_stack[l_stack_size];\n"
+"__local int l_counter;\n"
+"if (lid == 0)\n"
+"l_counter = 0;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x < cols)\n"
+"{\n"
+"__global uchar* map = map_ptr + mad24(y, map_step, x * (int)sizeof(int));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"int type = loadpix(map);\n"
+"if (type == 2)\n"
+"{\n"
+"l_stack[atomic_inc(&l_counter)] = (ushort2)(x, y);\n"
+"}\n"
+"y++;\n"
+"map += map_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"ushort2 p_stack[p_stack_size];\n"
+"int p_counter = 0;\n"
+"while(l_counter != 0)\n"
+"{\n"
+"int mod = l_counter % LOCAL_TOTAL;\n"
+"int pix_per_thr = l_counter / LOCAL_TOTAL + ((lid < mod) ? 1 : 0);\n"
+"for (int i = 0; i < pix_per_thr; ++i)\n"
+"{\n"
+"int index = atomic_dec(&l_counter) - 1;\n"
+"if (index < 0)\n"
+"continue;\n"
+"ushort2 pos = l_stack[ index ];\n"
+"#pragma unroll\n"
+"for (int j = 0; j < 8; ++j)\n"
+"{\n"
+"ushort posx = pos.x + move_dir[0][j];\n"
+"ushort posy = pos.y + move_dir[1][j];\n"
+"if (posx < 0 || posy < 0 || posx >= cols || posy >= rows)\n"
+"continue;\n"
+"__global uchar *addr = map_ptr + mad24(posy, map_step, posx * (int)sizeof(int));\n"
+"int type = loadpix(addr);\n"
+"if (type == 0)\n"
+"{\n"
+"p_stack[p_counter++] = (ushort2)(posx, posy);\n"
+"storepix(2, addr);\n"
+"}\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (l_counter < 0)\n"
+"l_counter = 0;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"while (p_counter > 0)\n"
+"{\n"
+"l_stack[ atomic_inc(&l_counter) ] = p_stack[--p_counter];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"}\n"
+"#elif defined GET_EDGES\n"
+"__kernel void getEdges(__global const uchar *mapptr, int map_step, int map_offset, int rows, int cols,\n"
+"__global uchar *dst, int dst_step, int dst_offset)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI;\n"
+"if (x < cols)\n"
+"{\n"
+"int map_index = mad24(map_step, y, mad24(x, (int)sizeof(int), map_offset));\n"
+"int dst_index = mad24(dst_step, y, x + dst_offset);\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"__global const int * map = (__global const int *)(mapptr + map_index);\n"
+"dst[dst_index] = (uchar)(-(map[0] >> 1));\n"
+"y++;\n"
+"map_index += map_step;\n"
+"dst_index += dst_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"#endif\n"
+, "00cd5c7db7816a3deac5680f13536a02"};
+ProgramSource canny_oclsrc(canny.programStr);
+const struct ProgramEntry clahe={"clahe",
+"#ifndef WAVE_SIZE\n"
+"#define WAVE_SIZE 1\n"
+"#endif\n"
+"inline int calc_lut(__local int* smem, int val, int tid)\n"
+"{\n"
+"smem[tid] = val;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid == 0)\n"
+"for (int i = 1; i < 256; ++i)\n"
+"smem[i] += smem[i - 1];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"return smem[tid];\n"
+"}\n"
+"#ifdef CPU\n"
+"inline void reduce(volatile __local int* smem, int val, int tid)\n"
+"{\n"
+"smem[tid] = val;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 128)\n"
+"smem[tid] = val += smem[tid + 128];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 64)\n"
+"smem[tid] = val += smem[tid + 64];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 32)\n"
+"smem[tid] += smem[tid + 32];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 16)\n"
+"smem[tid] += smem[tid + 16];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 8)\n"
+"smem[tid] += smem[tid + 8];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 4)\n"
+"smem[tid] += smem[tid + 4];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 2)\n"
+"smem[tid] += smem[tid + 2];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 1)\n"
+"smem[256] = smem[tid] + smem[tid + 1];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"#else\n"
+"inline void reduce(__local volatile int* smem, int val, int tid)\n"
+"{\n"
+"smem[tid] = val;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 128)\n"
+"smem[tid] = val += smem[tid + 128];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 64)\n"
+"smem[tid] = val += smem[tid + 64];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 32)\n"
+"{\n"
+"smem[tid] += smem[tid + 32];\n"
+"#if WAVE_SIZE < 32\n"
+"} barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 16)\n"
+"{\n"
+"#endif\n"
+"smem[tid] += smem[tid + 16];\n"
+"#if WAVE_SIZE < 16\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 8)\n"
+"{\n"
+"#endif\n"
+"smem[tid] += smem[tid + 8];\n"
+"smem[tid] += smem[tid + 4];\n"
+"smem[tid] += smem[tid + 2];\n"
+"smem[tid] += smem[tid + 1];\n"
+"}\n"
+"}\n"
+"#endif\n"
+"__kernel void calcLut(__global __const uchar * src, const int srcStep,\n"
+"const int src_offset, __global uchar * lut,\n"
+"const int dstStep, const int dst_offset,\n"
+"const int2 tileSize, const int tilesX,\n"
+"const int clipLimit, const float lutScale)\n"
+"{\n"
+"__local int smem[512];\n"
+"int tx = get_group_id(0);\n"
+"int ty = get_group_id(1);\n"
+"int tid = get_local_id(1) * get_local_size(0)\n"
+"+ get_local_id(0);\n"
+"smem[tid] = 0;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"for (int i = get_local_id(1); i < tileSize.y; i += get_local_size(1))\n"
+"{\n"
+"__global const uchar* srcPtr = src + mad24(ty * tileSize.y + i, srcStep, tx * tileSize.x + src_offset);\n"
+"for (int j = get_local_id(0); j < tileSize.x; j += get_local_size(0))\n"
+"{\n"
+"const int data = srcPtr[j];\n"
+"atomic_inc(&smem[data]);\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"int tHistVal = smem[tid];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (clipLimit > 0)\n"
+"{\n"
+"int clipped = 0;\n"
+"if (tHistVal > clipLimit)\n"
+"{\n"
+"clipped = tHistVal - clipLimit;\n"
+"tHistVal = clipLimit;\n"
+"}\n"
+"reduce(smem, clipped, tid);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"#ifdef CPU\n"
+"clipped = smem[256];\n"
+"#else\n"
+"clipped = smem[0];\n"
+"#endif\n"
+"__local int totalClipped;\n"
+"if (tid == 0)\n"
+"totalClipped = clipped;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"int redistBatch = totalClipped / 256;\n"
+"tHistVal += redistBatch;\n"
+"int residual = totalClipped - redistBatch * 256;\n"
+"if (tid < residual)\n"
+"++tHistVal;\n"
+"}\n"
+"const int lutVal = calc_lut(smem, tHistVal, tid);\n"
+"uint ires = (uint)convert_int_rte(lutScale * lutVal);\n"
+"lut[(ty * tilesX + tx) * dstStep + tid + dst_offset] =\n"
+"convert_uchar(clamp(ires, (uint)0, (uint)255));\n"
+"}\n"
+"__kernel void transform(__global __const uchar * src, const int srcStep, const int src_offset,\n"
+"__global uchar * dst, const int dstStep, const int dst_offset,\n"
+"__global uchar * lut, const int lutStep, int lut_offset,\n"
+"const int cols, const int rows,\n"
+"const int2 tileSize,\n"
+"const int tilesX, const int tilesY)\n"
+"{\n"
+"const int x = get_global_id(0);\n"
+"const int y = get_global_id(1);\n"
+"if (x >= cols || y >= rows)\n"
+"return;\n"
+"const float tyf = (convert_float(y) / tileSize.y) - 0.5f;\n"
+"int ty1 = convert_int_rtn(tyf);\n"
+"int ty2 = ty1 + 1;\n"
+"const float ya = tyf - ty1;\n"
+"ty1 = max(ty1, 0);\n"
+"ty2 = min(ty2, tilesY - 1);\n"
+"const float txf = (convert_float(x) / tileSize.x) - 0.5f;\n"
+"int tx1 = convert_int_rtn(txf);\n"
+"int tx2 = tx1 + 1;\n"
+"const float xa = txf - tx1;\n"
+"tx1 = max(tx1, 0);\n"
+"tx2 = min(tx2, tilesX - 1);\n"
+"const int srcVal = src[mad24(y, srcStep, x + src_offset)];\n"
+"float res = 0;\n"
+"res += lut[mad24(ty1 * tilesX + tx1, lutStep, srcVal + lut_offset)] * ((1.0f - xa) * (1.0f - ya));\n"
+"res += lut[mad24(ty1 * tilesX + tx2, lutStep, srcVal + lut_offset)] * ((xa) * (1.0f - ya));\n"
+"res += lut[mad24(ty2 * tilesX + tx1, lutStep, srcVal + lut_offset)] * ((1.0f - xa) * (ya));\n"
+"res += lut[mad24(ty2 * tilesX + tx2, lutStep, srcVal + lut_offset)] * ((xa) * (ya));\n"
+"uint ires = (uint)convert_int_rte(res);\n"
+"dst[mad24(y, dstStep, x + dst_offset)] = convert_uchar(clamp(ires, (uint)0, (uint)255));\n"
+"}\n"
+, "1240500336efb8988a25b1da384c217d"};
+ProgramSource clahe_oclsrc(clahe.programStr);
+const struct ProgramEntry corner={"corner",
+"#ifdef BORDER_CONSTANT\n"
+"#elif defined BORDER_REPLICATE\n"
+"#define EXTRAPOLATE(x, maxV) \\\n"
+"{ \\\n"
+"x = max(min(x, maxV - 1), 0); \\\n"
+"}\n"
+"#elif defined BORDER_WRAP\n"
+"#define EXTRAPOLATE(x, maxV) \\\n"
+"{ \\\n"
+"if (x < 0) \\\n"
+"x -= ((x - maxV + 1) / maxV) * maxV; \\\n"
+"if (x >= maxV) \\\n"
+"x %= maxV; \\\n"
+"}\n"
+"#elif defined(BORDER_REFLECT) || defined(BORDER_REFLECT101)\n"
+"#define EXTRAPOLATE_(x, maxV, delta) \\\n"
+"{ \\\n"
+"if (maxV == 1) \\\n"
+"x = 0; \\\n"
+"else \\\n"
+"do \\\n"
+"{ \\\n"
+"if ( x < 0 ) \\\n"
+"x = -x - 1 + delta; \\\n"
+"else \\\n"
+"x = maxV - 1 - (x - maxV) - delta; \\\n"
+"} \\\n"
+"while (x >= maxV || x < 0); \\\n"
+"}\n"
+"#ifdef BORDER_REFLECT\n"
+"#define EXTRAPOLATE(x, maxV) EXTRAPOLATE_(x, maxV, 0)\n"
+"#else\n"
+"#define EXTRAPOLATE(x, maxV) EXTRAPOLATE_(x, maxV, 1)\n"
+"#endif\n"
+"#else\n"
+"#error No extrapolation method\n"
+"#endif\n"
+"#define THREADS 256\n"
+"__kernel void corner(__global const float * Dx, int dx_step, int dx_offset, int dx_whole_rows, int dx_whole_cols,\n"
+"__global const float * Dy, int dy_step, int dy_offset, int dy_whole_rows, int dy_whole_cols,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols, float k)\n"
+"{\n"
+"int col = get_local_id(0);\n"
+"int gX = get_group_id(0);\n"
+"int gY = get_group_id(1);\n"
+"int gly = get_global_id(1);\n"
+"int dx_x_off = (dx_offset % dx_step) >> 2;\n"
+"int dx_y_off = dx_offset / dx_step;\n"
+"int dy_x_off = (dy_offset % dy_step) >> 2;\n"
+"int dy_y_off = dy_offset / dy_step;\n"
+"int dst_x_off = (dst_offset % dst_step) >> 2;\n"
+"int dst_y_off = dst_offset / dst_step;\n"
+"int dx_startX = gX * (THREADS-ksX+1) - anX + dx_x_off;\n"
+"int dx_startY = (gY << 1) - anY + dx_y_off;\n"
+"int dy_startX = gX * (THREADS-ksX+1) - anX + dy_x_off;\n"
+"int dy_startY = (gY << 1) - anY + dy_y_off;\n"
+"int dst_startX = gX * (THREADS-ksX+1) + dst_x_off;\n"
+"int dst_startY = (gY << 1) + dst_y_off;\n"
+"float data[3][ksY+1];\n"
+"__local float temp[6][THREADS];\n"
+"#ifdef BORDER_CONSTANT\n"
+"for (int i=0; i < ksY+1; i++)\n"
+"{\n"
+"bool dx_con = dx_startX+col >= 0 && dx_startX+col < dx_whole_cols && dx_startY+i >= 0 && dx_startY+i < dx_whole_rows;\n"
+"int indexDx = mad24(dx_startY+i, dx_step>>2, dx_startX+col);\n"
+"float dx_s = dx_con ? Dx[indexDx] : 0.0f;\n"
+"bool dy_con = dy_startX+col >= 0 && dy_startX+col < dy_whole_cols && dy_startY+i >= 0 && dy_startY+i < dy_whole_rows;\n"
+"int indexDy = mad24(dy_startY+i, dy_step>>2, dy_startX+col);\n"
+"float dy_s = dy_con ? Dy[indexDy] : 0.0f;\n"
+"data[0][i] = dx_s * dx_s;\n"
+"data[1][i] = dx_s * dy_s;\n"
+"data[2][i] = dy_s * dy_s;\n"
+"}\n"
+"#else\n"
+"int clamped_col = min(2*dst_cols, col);\n"
+"for (int i=0; i < ksY+1; i++)\n"
+"{\n"
+"int dx_selected_row = dx_startY+i, dx_selected_col = dx_startX+clamped_col;\n"
+"EXTRAPOLATE(dx_selected_row, dx_whole_rows)\n"
+"EXTRAPOLATE(dx_selected_col, dx_whole_cols)\n"
+"float dx_s = Dx[mad24(dx_selected_row, dx_step>>2, dx_selected_col)];\n"
+"int dy_selected_row = dy_startY+i, dy_selected_col = dy_startX+clamped_col;\n"
+"EXTRAPOLATE(dy_selected_row, dy_whole_rows)\n"
+"EXTRAPOLATE(dy_selected_col, dy_whole_cols)\n"
+"float dy_s = Dy[mad24(dy_selected_row, dy_step>>2, dy_selected_col)];\n"
+"data[0][i] = dx_s * dx_s;\n"
+"data[1][i] = dx_s * dy_s;\n"
+"data[2][i] = dy_s * dy_s;\n"
+"}\n"
+"#endif\n"
+"float sum0 = 0.0f, sum1 = 0.0f, sum2 = 0.0f;\n"
+"for (int i=1; i < ksY; i++)\n"
+"{\n"
+"sum0 += data[0][i];\n"
+"sum1 += data[1][i];\n"
+"sum2 += data[2][i];\n"
+"}\n"
+"float sum01 = sum0 + data[0][0];\n"
+"float sum02 = sum0 + data[0][ksY];\n"
+"temp[0][col] = sum01;\n"
+"temp[1][col] = sum02;\n"
+"float sum11 = sum1 + data[1][0];\n"
+"float sum12 = sum1 + data[1][ksY];\n"
+"temp[2][col] = sum11;\n"
+"temp[3][col] = sum12;\n"
+"float sum21 = sum2 + data[2][0];\n"
+"float sum22 = sum2 + data[2][ksY];\n"
+"temp[4][col] = sum21;\n"
+"temp[5][col] = sum22;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (col < (THREADS - (ksX - 1)))\n"
+"{\n"
+"col += anX;\n"
+"int posX = dst_startX - dst_x_off + col - anX;\n"
+"int posY = (gly << 1);\n"
+"int till = (ksX + 1) & 1;\n"
+"float tmp_sum[6] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f };\n"
+"for (int k=0; k<6; k++)\n"
+"{\n"
+"float temp_sum = 0;\n"
+"for (int i=-anX; i<=anX - till; i++)\n"
+"temp_sum += temp[k][col+i];\n"
+"tmp_sum[k] = temp_sum;\n"
+"}\n"
+"#ifdef CORNER_HARRIS\n"
+"if (posX < dst_cols && (posY) < dst_rows)\n"
+"{\n"
+"int dst_index = mad24(dst_step, dst_startY, (int)sizeof(float) * (dst_startX + col - anX));\n"
+"*(__global float *)(dst + dst_index) =\n"
+"tmp_sum[0] * tmp_sum[4] - tmp_sum[2] * tmp_sum[2] - k * (tmp_sum[0] + tmp_sum[4]) * (tmp_sum[0] + tmp_sum[4]);\n"
+"}\n"
+"if (posX < dst_cols && (posY + 1) < dst_rows)\n"
+"{\n"
+"int dst_index = mad24(dst_step, dst_startY + 1, (int)sizeof(float) * (dst_startX + col - anX));\n"
+"*(__global float *)(dst + dst_index) =\n"
+"tmp_sum[1] * tmp_sum[5] - tmp_sum[3] * tmp_sum[3] - k * (tmp_sum[1] + tmp_sum[5]) * (tmp_sum[1] + tmp_sum[5]);\n"
+"}\n"
+"#elif defined CORNER_MINEIGENVAL\n"
+"if (posX < dst_cols && (posY) < dst_rows)\n"
+"{\n"
+"int dst_index = mad24(dst_step, dst_startY, (int)sizeof(float) * (dst_startX + col - anX));\n"
+"float a = tmp_sum[0] * 0.5f;\n"
+"float b = tmp_sum[2];\n"
+"float c = tmp_sum[4] * 0.5f;\n"
+"*(__global float *)(dst + dst_index) = (float)((a+c) - native_sqrt((a-c)*(a-c) + b*b));\n"
+"}\n"
+"if (posX < dst_cols && (posY + 1) < dst_rows)\n"
+"{\n"
+"int dst_index = mad24(dst_step, dst_startY + 1, (int)sizeof(float) * (dst_startX + col - anX));\n"
+"float a = tmp_sum[1] * 0.5f;\n"
+"float b = tmp_sum[3];\n"
+"float c = tmp_sum[5] * 0.5f;\n"
+"*(__global float *)(dst + dst_index) = (float)((a+c) - native_sqrt((a-c)*(a-c) + b*b));\n"
+"}\n"
+"#else\n"
+"#error \"No such corners type\"\n"
+"#endif\n"
+"}\n"
+"}\n"
+, "0b0ba9ee4305009cb2433737f7ed5bcd"};
+ProgramSource corner_oclsrc(corner.programStr);
+const struct ProgramEntry covardata={"covardata",
+"#ifdef BORDER_CONSTANT\n"
+"#define EXTRAPOLATE(x, maxV)\n"
+"#elif defined BORDER_REPLICATE\n"
+"#define EXTRAPOLATE(x, maxV) \\\n"
+"{ \\\n"
+"(x) = clamp((x), 0, (maxV)-1); \\\n"
+"}\n"
+"#elif defined BORDER_WRAP\n"
+"#define EXTRAPOLATE(x, maxV) \\\n"
+"{ \\\n"
+"(x) = ( (x) + (maxV) ) % (maxV); \\\n"
+"}\n"
+"#elif defined BORDER_REFLECT\n"
+"#define EXTRAPOLATE(x, maxV) \\\n"
+"{ \\\n"
+"(x) = min( mad24((maxV)-1,2,-(x))+1 , max((x),-(x)-1) ); \\\n"
+"}\n"
+"#elif defined BORDER_REFLECT_101 || defined BORDER_REFLECT101\n"
+"#define EXTRAPOLATE(x, maxV) \\\n"
+"{ \\\n"
+"(x) = min( mad24((maxV)-1,2,-(x)), max((x),-(x)) ); \\\n"
+"}\n"
+"#else\n"
+"#error No extrapolation method\n"
+"#endif\n"
+"#define SRC(_x,_y) convert_float(((global SRCTYPE*)(Src+(_y)*src_step))[_x])\n"
+"#ifdef BORDER_CONSTANT\n"
+"#define ELEM(_x,_y,r_edge,t_edge,const_v) (_x)<0 | (_x) >= (r_edge) | (_y)<0 | (_y) >= (t_edge) ? (const_v) : SRC((_x),(_y))\n"
+"#else\n"
+"#define ELEM(_x,_y,r_edge,t_edge,const_v) SRC((_x),(_y))\n"
+"#endif\n"
+"#define DSTX(_x,_y) (((global float*)(DstX+DstXOffset+(_y)*DstXPitch))[_x])\n"
+"#define DSTY(_x,_y) (((global float*)(DstY+DstYOffset+(_y)*DstYPitch))[_x])\n"
+"#define INIT_AND_READ_LOCAL_SOURCE(width, height, fill_const, kernel_border) \\\n"
+"int srcX = x + srcOffsetX - (kernel_border); \\\n"
+"int srcY = y + srcOffsetY - (kernel_border); \\\n"
+"int xb = srcX; \\\n"
+"int yb = srcY; \\\n"
+"\\\n"
+"EXTRAPOLATE(xb, (width)); \\\n"
+"EXTRAPOLATE(yb, (height)); \\\n"
+"lsmem[liy][lix] = ELEM(xb, yb, (width), (height), (fill_const) ); \\\n"
+"\\\n"
+"if(lix < ((kernel_border)*2)) \\\n"
+"{ \\\n"
+"int xb = srcX+BLK_X; \\\n"
+"EXTRAPOLATE(xb,(width)); \\\n"
+"lsmem[liy][lix+BLK_X] = ELEM(xb, yb, (width), (height), (fill_const) ); \\\n"
+"} \\\n"
+"if(liy< ((kernel_border)*2)) \\\n"
+"{ \\\n"
+"int yb = srcY+BLK_Y; \\\n"
+"EXTRAPOLATE(yb, (height)); \\\n"
+"lsmem[liy+BLK_Y][lix] = ELEM(xb, yb, (width), (height), (fill_const) ); \\\n"
+"} \\\n"
+"if(lix<((kernel_border)*2) && liy<((kernel_border)*2)) \\\n"
+"{ \\\n"
+"int xb = srcX+BLK_X; \\\n"
+"int yb = srcY+BLK_Y; \\\n"
+"EXTRAPOLATE(xb,(width)); \\\n"
+"EXTRAPOLATE(yb,(height)); \\\n"
+"lsmem[liy+BLK_Y][lix+BLK_X] = ELEM(xb, yb, (width), (height), (fill_const) ); \\\n"
+"}\n"
+"__kernel void sobel3(__global const uchar * Src, int src_step, int srcOffsetX, int srcOffsetY,\n"
+"__global uchar * DstX, int DstXPitch, int DstXOffset,\n"
+"__global uchar * DstY, int DstYPitch, int DstYOffset, int dstHeight, int dstWidth,\n"
+"int height, int width, float scale)\n"
+"{\n"
+"__local float lsmem[BLK_Y+2][BLK_X+2];\n"
+"int lix = get_local_id(0);\n"
+"int liy = get_local_id(1);\n"
+"int x = (int)get_global_id(0);\n"
+"int y = (int)get_global_id(1);\n"
+"INIT_AND_READ_LOCAL_SOURCE(width, height, 0, 1)\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if( x >= dstWidth || y >=dstHeight ) return;\n"
+"float u1 = lsmem[liy][lix];\n"
+"float u2 = lsmem[liy][lix+1];\n"
+"float u3 = lsmem[liy][lix+2];\n"
+"float m1 = lsmem[liy+1][lix];\n"
+"float m3 = lsmem[liy+1][lix+2];\n"
+"float b1 = lsmem[liy+2][lix];\n"
+"float b2 = lsmem[liy+2][lix+1];\n"
+"float b3 = lsmem[liy+2][lix+2];\n"
+"#ifdef SCHARR\n"
+"DSTX(x,y) = mad(10.0f, m3 - m1, 3.0f * (u3 - u1 + b3 - b1)) * scale;\n"
+"DSTY(x,y) = mad(10.0f, b2 - u2, 3.0f * (b1 - u1 + b3 - u3)) * scale;\n"
+"#else\n"
+"DSTX(x,y) = mad(2.0f, m3 - m1, u3 - u1 + b3 - b1) * scale;\n"
+"DSTY(x,y) = mad(2.0f, b2 - u2, b1 - u1 + b3 - u3) * scale;\n"
+"#endif\n"
+"}\n"
+"__kernel void sobel5(__global const uchar * Src, int src_step, int srcOffsetX, int srcOffsetY,\n"
+"__global uchar * DstX, int DstXPitch, int DstXOffset,\n"
+"__global uchar * DstY, int DstYPitch, int DstYOffset, int dstHeight, int dstWidth,\n"
+"int height, int width, float scale)\n"
+"{\n"
+"__local float lsmem[BLK_Y+4][BLK_X+4];\n"
+"int lix = get_local_id(0);\n"
+"int liy = get_local_id(1);\n"
+"int x = (int)get_global_id(0);\n"
+"int y = (int)get_global_id(1);\n"
+"INIT_AND_READ_LOCAL_SOURCE(width, height, 0, 2)\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if( x >= dstWidth || y >=dstHeight ) return;\n"
+"float t1 = lsmem[liy][lix];\n"
+"float t2 = lsmem[liy][lix+1];\n"
+"float t3 = lsmem[liy][lix+2];\n"
+"float t4 = lsmem[liy][lix+3];\n"
+"float t5 = lsmem[liy][lix+4];\n"
+"float u1 = lsmem[liy+1][lix];\n"
+"float u2 = lsmem[liy+1][lix+1];\n"
+"float u3 = lsmem[liy+1][lix+2];\n"
+"float u4 = lsmem[liy+1][lix+3];\n"
+"float u5 = lsmem[liy+1][lix+4];\n"
+"float m1 = lsmem[liy+2][lix];\n"
+"float m2 = lsmem[liy+2][lix+1];\n"
+"float m4 = lsmem[liy+2][lix+3];\n"
+"float m5 = lsmem[liy+2][lix+4];\n"
+"float l1 = lsmem[liy+3][lix];\n"
+"float l2 = lsmem[liy+3][lix+1];\n"
+"float l3 = lsmem[liy+3][lix+2];\n"
+"float l4 = lsmem[liy+3][lix+3];\n"
+"float l5 = lsmem[liy+3][lix+4];\n"
+"float b1 = lsmem[liy+4][lix];\n"
+"float b2 = lsmem[liy+4][lix+1];\n"
+"float b3 = lsmem[liy+4][lix+2];\n"
+"float b4 = lsmem[liy+4][lix+3];\n"
+"float b5 = lsmem[liy+4][lix+4];\n"
+"DSTX(x,y) = scale *\n"
+"mad(12.0f, m4 - m2,\n"
+"mad(6.0f, m5 - m1,\n"
+"mad(8.0f, u4 - u2 + l4 - l2,\n"
+"mad(4.0f, u5 - u1 + l5 - l1,\n"
+"mad(2.0f, t4 - t2 + b4 - b2, t5 - t1 + b5 - b1 )\n"
+")\n"
+")\n"
+")\n"
+");\n"
+"DSTY(x,y) = scale *\n"
+"mad(12.0f, l3 - u3,\n"
+"mad(6.0f, b3 - t3,\n"
+"mad(8.0f, l2 - u2 + l4 - u4,\n"
+"mad(4.0f, b2 - t2 + b4 - t4,\n"
+"mad(2.0f, l1 - u1 + l5 - u5, b1 - t1 + b5 - t5 )\n"
+")\n"
+")\n"
+")\n"
+");\n"
+"}\n"
+"__kernel void sobel7(__global const uchar * Src, int src_step, int srcOffsetX, int srcOffsetY,\n"
+"__global uchar * DstX, int DstXPitch, int DstXOffset,\n"
+"__global uchar * DstY, int DstYPitch, int DstYOffset, int dstHeight, int dstWidth,\n"
+"int height, int width, float scale)\n"
+"{\n"
+"__local float lsmem[BLK_Y+6][BLK_X+6];\n"
+"int lix = get_local_id(0);\n"
+"int liy = get_local_id(1);\n"
+"int x = (int)get_global_id(0);\n"
+"int y = (int)get_global_id(1);\n"
+"INIT_AND_READ_LOCAL_SOURCE(width, height, 0, 3)\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if( x >= dstWidth || y >=dstHeight ) return;\n"
+"float tt1 = lsmem[liy][lix];\n"
+"float tt2 = lsmem[liy][lix+1];\n"
+"float tt3 = lsmem[liy][lix+2];\n"
+"float tt4 = lsmem[liy][lix+3];\n"
+"float tt5 = lsmem[liy][lix+4];\n"
+"float tt6 = lsmem[liy][lix+5];\n"
+"float tt7 = lsmem[liy][lix+6];\n"
+"float t1 = lsmem[liy+1][lix];\n"
+"float t2 = lsmem[liy+1][lix+1];\n"
+"float t3 = lsmem[liy+1][lix+2];\n"
+"float t4 = lsmem[liy+1][lix+3];\n"
+"float t5 = lsmem[liy+1][lix+4];\n"
+"float t6 = lsmem[liy+1][lix+5];\n"
+"float t7 = lsmem[liy+1][lix+6];\n"
+"float u1 = lsmem[liy+2][lix];\n"
+"float u2 = lsmem[liy+2][lix+1];\n"
+"float u3 = lsmem[liy+2][lix+2];\n"
+"float u4 = lsmem[liy+2][lix+3];\n"
+"float u5 = lsmem[liy+2][lix+4];\n"
+"float u6 = lsmem[liy+2][lix+5];\n"
+"float u7 = lsmem[liy+2][lix+6];\n"
+"float m1 = lsmem[liy+3][lix];\n"
+"float m2 = lsmem[liy+3][lix+1];\n"
+"float m3 = lsmem[liy+3][lix+2];\n"
+"float m5 = lsmem[liy+3][lix+4];\n"
+"float m6 = lsmem[liy+3][lix+5];\n"
+"float m7 = lsmem[liy+3][lix+6];\n"
+"float l1 = lsmem[liy+4][lix];\n"
+"float l2 = lsmem[liy+4][lix+1];\n"
+"float l3 = lsmem[liy+4][lix+2];\n"
+"float l4 = lsmem[liy+4][lix+3];\n"
+"float l5 = lsmem[liy+4][lix+4];\n"
+"float l6 = lsmem[liy+4][lix+5];\n"
+"float l7 = lsmem[liy+4][lix+6];\n"
+"float b1 = lsmem[liy+5][lix];\n"
+"float b2 = lsmem[liy+5][lix+1];\n"
+"float b3 = lsmem[liy+5][lix+2];\n"
+"float b4 = lsmem[liy+5][lix+3];\n"
+"float b5 = lsmem[liy+5][lix+4];\n"
+"float b6 = lsmem[liy+5][lix+5];\n"
+"float b7 = lsmem[liy+5][lix+6];\n"
+"float bb1 = lsmem[liy+6][lix];\n"
+"float bb2 = lsmem[liy+6][lix+1];\n"
+"float bb3 = lsmem[liy+6][lix+2];\n"
+"float bb4 = lsmem[liy+6][lix+3];\n"
+"float bb5 = lsmem[liy+6][lix+4];\n"
+"float bb6 = lsmem[liy+6][lix+5];\n"
+"float bb7 = lsmem[liy+6][lix+6];\n"
+"DSTX(x,y) = scale *\n"
+"mad(100.0f, m5 - m3,\n"
+"mad(80.0f, m6 - m2,\n"
+"mad(20.0f, m7 - m1,\n"
+"mad(75.0f, u5 - u3 + l5 - l3,\n"
+"mad(60.0f, u6 - u2 + l6 - l2,\n"
+"mad(15.0f, u7 - u1 + l7 - l1,\n"
+"mad(30.0f, t5 - t3 + b5 - b3,\n"
+"mad(24.0f, t6 - t2 + b6 - b2,\n"
+"mad(6.0f, t7 - t1 + b7 - b1,\n"
+"mad(5.0f, tt5 - tt3 + bb5 - bb3,\n"
+"mad(4.0f, tt6 - tt2 + bb6 - bb2, tt7 - tt1 + bb7 - bb1 )\n"
+")\n"
+")\n"
+")\n"
+")\n"
+")\n"
+")\n"
+")\n"
+")\n"
+")\n"
+");\n"
+"DSTY(x,y) = scale *\n"
+"mad(100.0f, l4 - u4,\n"
+"mad(80.0f, b4 - t4,\n"
+"mad(20.0f, bb4 - tt4,\n"
+"mad(75.0f, l5 - u5 + l3 - u3,\n"
+"mad(60.0f, b5 - t5 + b3 - t3,\n"
+"mad(15.0f, bb5 - tt5 + bb3 - tt3,\n"
+"mad(30.0f, l6 - u6 + l2 - u2,\n"
+"mad(24.0f, b6 - t6 + b2 - t2,\n"
+"mad(6.0f, bb6 - tt6 + bb2 - tt2,\n"
+"mad(5.0f, l7 - u7 + l1 - u1,\n"
+"mad(4.0f, b7 - t7 + b1 - t1, bb7 - tt7 + bb1 - tt1 )\n"
+")\n"
+")\n"
+")\n"
+")\n"
+")\n"
+")\n"
+")\n"
+")\n"
+")\n"
+");\n"
+"}\n"
+, "97cb1ffd4e7c1bc93caba596bf9c6e55"};
+ProgramSource covardata_oclsrc(covardata.programStr);
+const struct ProgramEntry cvtcolor={"cvtcolor",
+"#if depth == 0\n"
+"#define DATA_TYPE uchar\n"
+"#define MAX_NUM 255\n"
+"#define HALF_MAX 128\n"
+"#define COEFF_TYPE int\n"
+"#define SAT_CAST(num) convert_uchar_sat(num)\n"
+"#define DEPTH_0\n"
+"#elif depth == 2\n"
+"#define DATA_TYPE ushort\n"
+"#define MAX_NUM 65535\n"
+"#define HALF_MAX 32768\n"
+"#define COEFF_TYPE int\n"
+"#define SAT_CAST(num) convert_ushort_sat(num)\n"
+"#define DEPTH_2\n"
+"#elif depth == 5\n"
+"#define DATA_TYPE float\n"
+"#define MAX_NUM 1.0f\n"
+"#define HALF_MAX 0.5f\n"
+"#define COEFF_TYPE float\n"
+"#define SAT_CAST(num) (num)\n"
+"#define DEPTH_5\n"
+"#else\n"
+"#error \"invalid depth: should be 0 (CV_8U), 2 (CV_16U) or 5 (CV_32F)\"\n"
+"#endif\n"
+"#define CV_DESCALE(x,n) (((x) + (1 << ((n)-1))) >> (n))\n"
+"enum\n"
+"{\n"
+"yuv_shift = 14,\n"
+"xyz_shift = 12,\n"
+"hsv_shift = 12,\n"
+"R2Y = 4899,\n"
+"G2Y = 9617,\n"
+"B2Y = 1868,\n"
+"BLOCK_SIZE = 256\n"
+"};\n"
+"#define scnbytes ((int)sizeof(DATA_TYPE)*scn)\n"
+"#define dcnbytes ((int)sizeof(DATA_TYPE)*dcn)\n"
+"#ifndef hscale\n"
+"#define hscale 0\n"
+"#endif\n"
+"#ifndef hrange\n"
+"#define hrange 0\n"
+"#endif\n"
+"#if bidx == 0\n"
+"#define R_COMP z\n"
+"#define G_COMP y\n"
+"#define B_COMP x\n"
+"#elif bidx == 2\n"
+"#define R_COMP x\n"
+"#define G_COMP y\n"
+"#define B_COMP z\n"
+"#elif bidx == 3\n"
+"#define R_COMP w\n"
+"#define G_COMP w\n"
+"#define B_COMP w\n"
+"#endif\n"
+"#ifndef uidx\n"
+"#define uidx 0\n"
+"#endif\n"
+"#ifndef yidx\n"
+"#define yidx 0\n"
+"#endif\n"
+"#ifndef PIX_PER_WI_X\n"
+"#define PIX_PER_WI_X 1\n"
+"#endif\n"
+"#define __CAT(x, y) x##y\n"
+"#define CAT(x, y) __CAT(x, y)\n"
+"#define DATA_TYPE_4 CAT(DATA_TYPE, 4)\n"
+"__kernel void RGB2Gray(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"__global const DATA_TYPE* src = (__global const DATA_TYPE*)(srcptr + src_index);\n"
+"__global DATA_TYPE* dst = (__global DATA_TYPE*)(dstptr + dst_index);\n"
+"DATA_TYPE_4 src_pix = vload4(0, src);\n"
+"#ifdef DEPTH_5\n"
+"dst[0] = fma(src_pix.B_COMP, 0.114f, fma(src_pix.G_COMP, 0.587f, src_pix.R_COMP * 0.299f));\n"
+"#else\n"
+"dst[0] = (DATA_TYPE)CV_DESCALE(mad24(src_pix.B_COMP, B2Y, mad24(src_pix.G_COMP, G2Y, mul24(src_pix.R_COMP, R2Y))), yuv_shift);\n"
+"#endif\n"
+"++y;\n"
+"src_index += src_step;\n"
+"dst_index += dst_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void Gray2RGB(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"__global const DATA_TYPE* src = (__global const DATA_TYPE*)(srcptr + src_index);\n"
+"__global DATA_TYPE* dst = (__global DATA_TYPE*)(dstptr + dst_index);\n"
+"DATA_TYPE val = src[0];\n"
+"#if dcn == 3 || defined DEPTH_5\n"
+"dst[0] = dst[1] = dst[2] = val;\n"
+"#if dcn == 4\n"
+"dst[3] = MAX_NUM;\n"
+"#endif\n"
+"#else\n"
+"*(__global DATA_TYPE_4 *)dst = (DATA_TYPE_4)(val, val, val, MAX_NUM);\n"
+"#endif\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__constant float c_RGB2YUVCoeffs_f[5] = { 0.114f, 0.587f, 0.299f, 0.492f, 0.877f };\n"
+"__constant int c_RGB2YUVCoeffs_i[5] = { B2Y, G2Y, R2Y, 8061, 14369 };\n"
+"__kernel void RGB2YUV(__global const uchar* srcptr, int src_step, int src_offset,\n"
+"__global uchar* dstptr, int dst_step, int dt_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dt_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"__global const DATA_TYPE* src = (__global const DATA_TYPE*)(srcptr + src_index);\n"
+"__global DATA_TYPE* dst = (__global DATA_TYPE*)(dstptr + dst_index);\n"
+"DATA_TYPE_4 src_pix = vload4(0, src);\n"
+"DATA_TYPE b = src_pix.B_COMP, g = src_pix.G_COMP, r = src_pix.R_COMP;\n"
+"#ifdef DEPTH_5\n"
+"__constant float * coeffs = c_RGB2YUVCoeffs_f;\n"
+"const DATA_TYPE Y = fma(b, coeffs[0], fma(g, coeffs[1], r * coeffs[2]));\n"
+"const DATA_TYPE U = fma(b - Y, coeffs[3], HALF_MAX);\n"
+"const DATA_TYPE V = fma(r - Y, coeffs[4], HALF_MAX);\n"
+"#else\n"
+"__constant int * coeffs = c_RGB2YUVCoeffs_i;\n"
+"const int delta = HALF_MAX * (1 << yuv_shift);\n"
+"const int Y = CV_DESCALE(mad24(b, coeffs[0], mad24(g, coeffs[1], mul24(r, coeffs[2]))), yuv_shift);\n"
+"const int U = CV_DESCALE(mad24(b - Y, coeffs[3], delta), yuv_shift);\n"
+"const int V = CV_DESCALE(mad24(r - Y, coeffs[4], delta), yuv_shift);\n"
+"#endif\n"
+"dst[0] = SAT_CAST( Y );\n"
+"dst[1] = SAT_CAST( U );\n"
+"dst[2] = SAT_CAST( V );\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__constant float c_YUV2RGBCoeffs_f[4] = { 2.032f, -0.395f, -0.581f, 1.140f };\n"
+"__constant int c_YUV2RGBCoeffs_i[4] = { 33292, -6472, -9519, 18678 };\n"
+"__kernel void YUV2RGB(__global const uchar* srcptr, int src_step, int src_offset,\n"
+"__global uchar* dstptr, int dst_step, int dt_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dt_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"__global const DATA_TYPE* src = (__global const DATA_TYPE*)(srcptr + src_index);\n"
+"__global DATA_TYPE* dst = (__global DATA_TYPE*)(dstptr + dst_index);\n"
+"DATA_TYPE_4 src_pix = vload4(0, src);\n"
+"DATA_TYPE Y = src_pix.x, U = src_pix.y, V = src_pix.z;\n"
+"#ifdef DEPTH_5\n"
+"__constant float * coeffs = c_YUV2RGBCoeffs_f;\n"
+"float r = fma(V - HALF_MAX, coeffs[3], Y);\n"
+"float g = fma(V - HALF_MAX, coeffs[2], fma(U - HALF_MAX, coeffs[1], Y));\n"
+"float b = fma(U - HALF_MAX, coeffs[0], Y);\n"
+"#else\n"
+"__constant int * coeffs = c_YUV2RGBCoeffs_i;\n"
+"const int r = Y + CV_DESCALE(mul24(V - HALF_MAX, coeffs[3]), yuv_shift);\n"
+"const int g = Y + CV_DESCALE(mad24(V - HALF_MAX, coeffs[2], mul24(U - HALF_MAX, coeffs[1])), yuv_shift);\n"
+"const int b = Y + CV_DESCALE(mul24(U - HALF_MAX, coeffs[0]), yuv_shift);\n"
+"#endif\n"
+"dst[bidx] = SAT_CAST( b );\n"
+"dst[1] = SAT_CAST( g );\n"
+"dst[bidx^2] = SAT_CAST( r );\n"
+"#if dcn == 4\n"
+"dst[3] = MAX_NUM;\n"
+"#endif\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__constant float c_YUV2RGBCoeffs_420[5] = { 1.163999557f, 2.017999649f, -0.390999794f,\n"
+"-0.812999725f, 1.5959997177f };\n"
+"__kernel void YUV2RGB_NVx(__global const uchar* srcptr, int src_step, int src_offset,\n"
+"__global uchar* dstptr, int dst_step, int dt_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols / 2)\n"
+"{\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows / 2 )\n"
+"{\n"
+"__global const uchar* ysrc = srcptr + mad24(y << 1, src_step, (x << 1) + src_offset);\n"
+"__global const uchar* usrc = srcptr + mad24(rows + y, src_step, (x << 1) + src_offset);\n"
+"__global uchar* dst1 = dstptr + mad24(y << 1, dst_step, mad24(x, dcn<<1, dt_offset));\n"
+"__global uchar* dst2 = dst1 + dst_step;\n"
+"float Y1 = ysrc[0];\n"
+"float Y2 = ysrc[1];\n"
+"float Y3 = ysrc[src_step];\n"
+"float Y4 = ysrc[src_step + 1];\n"
+"float U = ((float)usrc[uidx]) - HALF_MAX;\n"
+"float V = ((float)usrc[1-uidx]) - HALF_MAX;\n"
+"__constant float* coeffs = c_YUV2RGBCoeffs_420;\n"
+"float ruv = fma(coeffs[4], V, 0.5f);\n"
+"float guv = fma(coeffs[3], V, fma(coeffs[2], U, 0.5f));\n"
+"float buv = fma(coeffs[1], U, 0.5f);\n"
+"Y1 = max(0.f, Y1 - 16.f) * coeffs[0];\n"
+"dst1[2 - bidx] = convert_uchar_sat(Y1 + ruv);\n"
+"dst1[1] = convert_uchar_sat(Y1 + guv);\n"
+"dst1[bidx] = convert_uchar_sat(Y1 + buv);\n"
+"#if dcn == 4\n"
+"dst1[3] = 255;\n"
+"#endif\n"
+"Y2 = max(0.f, Y2 - 16.f) * coeffs[0];\n"
+"dst1[dcn + 2 - bidx] = convert_uchar_sat(Y2 + ruv);\n"
+"dst1[dcn + 1] = convert_uchar_sat(Y2 + guv);\n"
+"dst1[dcn + bidx] = convert_uchar_sat(Y2 + buv);\n"
+"#if dcn == 4\n"
+"dst1[7] = 255;\n"
+"#endif\n"
+"Y3 = max(0.f, Y3 - 16.f) * coeffs[0];\n"
+"dst2[2 - bidx] = convert_uchar_sat(Y3 + ruv);\n"
+"dst2[1] = convert_uchar_sat(Y3 + guv);\n"
+"dst2[bidx] = convert_uchar_sat(Y3 + buv);\n"
+"#if dcn == 4\n"
+"dst2[3] = 255;\n"
+"#endif\n"
+"Y4 = max(0.f, Y4 - 16.f) * coeffs[0];\n"
+"dst2[dcn + 2 - bidx] = convert_uchar_sat(Y4 + ruv);\n"
+"dst2[dcn + 1] = convert_uchar_sat(Y4 + guv);\n"
+"dst2[dcn + bidx] = convert_uchar_sat(Y4 + buv);\n"
+"#if dcn == 4\n"
+"dst2[7] = 255;\n"
+"#endif\n"
+"}\n"
+"++y;\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void YUV2RGB_YV12_IYUV(__global const uchar* srcptr, int src_step, int src_offset,\n"
+"__global uchar* dstptr, int dst_step, int dt_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols / 2)\n"
+"{\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows / 2 )\n"
+"{\n"
+"__global const uchar* ysrc = srcptr + mad24(y << 1, src_step, (x << 1) + src_offset);\n"
+"__global uchar* dst1 = dstptr + mad24(y << 1, dst_step, x * (dcn<<1) + dt_offset);\n"
+"__global uchar* dst2 = dst1 + dst_step;\n"
+"float Y1 = ysrc[0];\n"
+"float Y2 = ysrc[1];\n"
+"float Y3 = ysrc[src_step];\n"
+"float Y4 = ysrc[src_step + 1];\n"
+"#ifdef SRC_CONT\n"
+"__global const uchar* uvsrc = srcptr + mad24(rows, src_step, src_offset);\n"
+"int u_ind = mad24(y, cols >> 1, x);\n"
+"float uv[2] = { ((float)uvsrc[u_ind]) - HALF_MAX, ((float)uvsrc[u_ind + ((rows * cols) >> 2)]) - HALF_MAX };\n"
+"#else\n"
+"int vsteps[2] = { cols >> 1, src_step - (cols >> 1)};\n"
+"__global const uchar* usrc = srcptr + mad24(rows + (y>>1), src_step, src_offset + (y%2)*(cols >> 1) + x);\n"
+"__global const uchar* vsrc = usrc + mad24(rows >> 2, src_step, rows % 4 ? vsteps[y%2] : 0);\n"
+"float uv[2] = { ((float)usrc[0]) - HALF_MAX, ((float)vsrc[0]) - HALF_MAX };\n"
+"#endif\n"
+"float U = uv[uidx];\n"
+"float V = uv[1-uidx];\n"
+"__constant float* coeffs = c_YUV2RGBCoeffs_420;\n"
+"float ruv = fma(coeffs[4], V, 0.5f);\n"
+"float guv = fma(coeffs[3], V, fma(coeffs[2], U, 0.5f));\n"
+"float buv = fma(coeffs[1], U, 0.5f);\n"
+"Y1 = max(0.f, Y1 - 16.f) * coeffs[0];\n"
+"dst1[2 - bidx] = convert_uchar_sat(Y1 + ruv);\n"
+"dst1[1] = convert_uchar_sat(Y1 + guv);\n"
+"dst1[bidx] = convert_uchar_sat(Y1 + buv);\n"
+"#if dcn == 4\n"
+"dst1[3] = 255;\n"
+"#endif\n"
+"Y2 = max(0.f, Y2 - 16.f) * coeffs[0];\n"
+"dst1[dcn + 2 - bidx] = convert_uchar_sat(Y2 + ruv);\n"
+"dst1[dcn + 1] = convert_uchar_sat(Y2 + guv);\n"
+"dst1[dcn + bidx] = convert_uchar_sat(Y2 + buv);\n"
+"#if dcn == 4\n"
+"dst1[7] = 255;\n"
+"#endif\n"
+"Y3 = max(0.f, Y3 - 16.f) * coeffs[0];\n"
+"dst2[2 - bidx] = convert_uchar_sat(Y3 + ruv);\n"
+"dst2[1] = convert_uchar_sat(Y3 + guv);\n"
+"dst2[bidx] = convert_uchar_sat(Y3 + buv);\n"
+"#if dcn == 4\n"
+"dst2[3] = 255;\n"
+"#endif\n"
+"Y4 = max(0.f, Y4 - 16.f) * coeffs[0];\n"
+"dst2[dcn + 2 - bidx] = convert_uchar_sat(Y4 + ruv);\n"
+"dst2[dcn + 1] = convert_uchar_sat(Y4 + guv);\n"
+"dst2[dcn + bidx] = convert_uchar_sat(Y4 + buv);\n"
+"#if dcn == 4\n"
+"dst2[7] = 255;\n"
+"#endif\n"
+"}\n"
+"++y;\n"
+"}\n"
+"}\n"
+"}\n"
+"__constant float c_RGB2YUVCoeffs_420[8] = { 0.256999969f, 0.50399971f, 0.09799957f, -0.1479988098f, -0.2909994125f,\n"
+"0.438999176f, -0.3679990768f, -0.0709991455f };\n"
+"__kernel void RGB2YUV_YV12_IYUV(__global const uchar* srcptr, int src_step, int src_offset,\n"
+"__global uchar* dstptr, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0) * PIX_PER_WI_X;\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols/2)\n"
+"{\n"
+"int src_index = mad24(y << 1, src_step, mad24(x << 1, scn, src_offset));\n"
+"int ydst_index = mad24(y << 1, dst_step, (x << 1) + dst_offset);\n"
+"int y_rows = rows / 3 * 2;\n"
+"int vsteps[2] = { cols >> 1, dst_step - (cols >> 1)};\n"
+"__constant float* coeffs = c_RGB2YUVCoeffs_420;\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows / 3)\n"
+"{\n"
+"__global const uchar* src1 = srcptr + src_index;\n"
+"__global const uchar* src2 = src1 + src_step;\n"
+"__global uchar* ydst1 = dstptr + ydst_index;\n"
+"__global uchar* ydst2 = ydst1 + dst_step;\n"
+"__global uchar* udst = dstptr + mad24(y_rows + (y>>1), dst_step, dst_offset + (y%2)*(cols >> 1) + x);\n"
+"__global uchar* vdst = udst + mad24(y_rows >> 2, dst_step, y_rows % 4 ? vsteps[y%2] : 0);\n"
+"#if PIX_PER_WI_X == 2\n"
+"int s11 = *((__global const int*) src1);\n"
+"int s12 = *((__global const int*) src1 + 1);\n"
+"int s13 = *((__global const int*) src1 + 2);\n"
+"#if scn == 4\n"
+"int s14 = *((__global const int*) src1 + 3);\n"
+"#endif\n"
+"int s21 = *((__global const int*) src2);\n"
+"int s22 = *((__global const int*) src2 + 1);\n"
+"int s23 = *((__global const int*) src2 + 2);\n"
+"#if scn == 4\n"
+"int s24 = *((__global const int*) src2 + 3);\n"
+"#endif\n"
+"float src_pix1[scn * 4], src_pix2[scn * 4];\n"
+"*((float4*) src_pix1) = convert_float4(as_uchar4(s11));\n"
+"*((float4*) src_pix1 + 1) = convert_float4(as_uchar4(s12));\n"
+"*((float4*) src_pix1 + 2) = convert_float4(as_uchar4(s13));\n"
+"#if scn == 4\n"
+"*((float4*) src_pix1 + 3) = convert_float4(as_uchar4(s14));\n"
+"#endif\n"
+"*((float4*) src_pix2) = convert_float4(as_uchar4(s21));\n"
+"*((float4*) src_pix2 + 1) = convert_float4(as_uchar4(s22));\n"
+"*((float4*) src_pix2 + 2) = convert_float4(as_uchar4(s23));\n"
+"#if scn == 4\n"
+"*((float4*) src_pix2 + 3) = convert_float4(as_uchar4(s24));\n"
+"#endif\n"
+"uchar4 y1, y2;\n"
+"y1.x = convert_uchar_sat(fma(coeffs[0], src_pix1[ 2-bidx], fma(coeffs[1], src_pix1[ 1], fma(coeffs[2], src_pix1[ bidx], 16.5f))));\n"
+"y1.y = convert_uchar_sat(fma(coeffs[0], src_pix1[ scn+2-bidx], fma(coeffs[1], src_pix1[ scn+1], fma(coeffs[2], src_pix1[ scn+bidx], 16.5f))));\n"
+"y1.z = convert_uchar_sat(fma(coeffs[0], src_pix1[2*scn+2-bidx], fma(coeffs[1], src_pix1[2*scn+1], fma(coeffs[2], src_pix1[2*scn+bidx], 16.5f))));\n"
+"y1.w = convert_uchar_sat(fma(coeffs[0], src_pix1[3*scn+2-bidx], fma(coeffs[1], src_pix1[3*scn+1], fma(coeffs[2], src_pix1[3*scn+bidx], 16.5f))));\n"
+"y2.x = convert_uchar_sat(fma(coeffs[0], src_pix2[ 2-bidx], fma(coeffs[1], src_pix2[ 1], fma(coeffs[2], src_pix2[ bidx], 16.5f))));\n"
+"y2.y = convert_uchar_sat(fma(coeffs[0], src_pix2[ scn+2-bidx], fma(coeffs[1], src_pix2[ scn+1], fma(coeffs[2], src_pix2[ scn+bidx], 16.5f))));\n"
+"y2.z = convert_uchar_sat(fma(coeffs[0], src_pix2[2*scn+2-bidx], fma(coeffs[1], src_pix2[2*scn+1], fma(coeffs[2], src_pix2[2*scn+bidx], 16.5f))));\n"
+"y2.w = convert_uchar_sat(fma(coeffs[0], src_pix2[3*scn+2-bidx], fma(coeffs[1], src_pix2[3*scn+1], fma(coeffs[2], src_pix2[3*scn+bidx], 16.5f))));\n"
+"*((__global int*) ydst1) = as_int(y1);\n"
+"*((__global int*) ydst2) = as_int(y2);\n"
+"float uv[4] = { fma(coeffs[3], src_pix1[ 2-bidx], fma(coeffs[4], src_pix1[ 1], fma(coeffs[5], src_pix1[ bidx], 128.5f))),\n"
+"fma(coeffs[5], src_pix1[ 2-bidx], fma(coeffs[6], src_pix1[ 1], fma(coeffs[7], src_pix1[ bidx], 128.5f))),\n"
+"fma(coeffs[3], src_pix1[2*scn+2-bidx], fma(coeffs[4], src_pix1[2*scn+1], fma(coeffs[5], src_pix1[2*scn+bidx], 128.5f))),\n"
+"fma(coeffs[5], src_pix1[2*scn+2-bidx], fma(coeffs[6], src_pix1[2*scn+1], fma(coeffs[7], src_pix1[2*scn+bidx], 128.5f))) };\n"
+"udst[0] = convert_uchar_sat(uv[uidx] );\n"
+"vdst[0] = convert_uchar_sat(uv[1 - uidx]);\n"
+"udst[1] = convert_uchar_sat(uv[2 + uidx]);\n"
+"vdst[1] = convert_uchar_sat(uv[3 - uidx]);\n"
+"#else\n"
+"float4 src_pix1 = convert_float4(vload4(0, src1));\n"
+"float4 src_pix2 = convert_float4(vload4(0, src1+scn));\n"
+"float4 src_pix3 = convert_float4(vload4(0, src2));\n"
+"float4 src_pix4 = convert_float4(vload4(0, src2+scn));\n"
+"ydst1[0] = convert_uchar_sat(fma(coeffs[0], src_pix1.R_COMP, fma(coeffs[1], src_pix1.G_COMP, fma(coeffs[2], src_pix1.B_COMP, 16.5f))));\n"
+"ydst1[1] = convert_uchar_sat(fma(coeffs[0], src_pix2.R_COMP, fma(coeffs[1], src_pix2.G_COMP, fma(coeffs[2], src_pix2.B_COMP, 16.5f))));\n"
+"ydst2[0] = convert_uchar_sat(fma(coeffs[0], src_pix3.R_COMP, fma(coeffs[1], src_pix3.G_COMP, fma(coeffs[2], src_pix3.B_COMP, 16.5f))));\n"
+"ydst2[1] = convert_uchar_sat(fma(coeffs[0], src_pix4.R_COMP, fma(coeffs[1], src_pix4.G_COMP, fma(coeffs[2], src_pix4.B_COMP, 16.5f))));\n"
+"float uv[2] = { fma(coeffs[3], src_pix1.R_COMP, fma(coeffs[4], src_pix1.G_COMP, fma(coeffs[5], src_pix1.B_COMP, 128.5f))),\n"
+"fma(coeffs[5], src_pix1.R_COMP, fma(coeffs[6], src_pix1.G_COMP, fma(coeffs[7], src_pix1.B_COMP, 128.5f))) };\n"
+"udst[0] = convert_uchar_sat(uv[uidx] );\n"
+"vdst[0] = convert_uchar_sat(uv[1-uidx]);\n"
+"#endif\n"
+"++y;\n"
+"src_index += 2*src_step;\n"
+"ydst_index += 2*dst_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void YUV2RGB_422(__global const uchar* srcptr, int src_step, int src_offset,\n"
+"__global uchar* dstptr, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols / 2)\n"
+"{\n"
+"__global const uchar* src = srcptr + mad24(y, src_step, (x << 2) + src_offset);\n"
+"__global uchar* dst = dstptr + mad24(y, dst_step, mad24(x << 1, dcn, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows )\n"
+"{\n"
+"__constant float* coeffs = c_YUV2RGBCoeffs_420;\n"
+"#ifndef USE_OPTIMIZED_LOAD\n"
+"float U = ((float) src[uidx]) - HALF_MAX;\n"
+"float V = ((float) src[(2 + uidx) % 4]) - HALF_MAX;\n"
+"float y00 = max(0.f, ((float) src[yidx]) - 16.f) * coeffs[0];\n"
+"float y01 = max(0.f, ((float) src[yidx + 2]) - 16.f) * coeffs[0];\n"
+"#else\n"
+"int load_src = *((__global int*) src);\n"
+"float vec_src[4] = { load_src & 0xff, (load_src >> 8) & 0xff, (load_src >> 16) & 0xff, (load_src >> 24) & 0xff};\n"
+"float U = vec_src[uidx] - HALF_MAX;\n"
+"float V = vec_src[(2 + uidx) % 4] - HALF_MAX;\n"
+"float y00 = max(0.f, vec_src[yidx] - 16.f) * coeffs[0];\n"
+"float y01 = max(0.f, vec_src[yidx + 2] - 16.f) * coeffs[0];\n"
+"#endif\n"
+"float ruv = fma(coeffs[4], V, 0.5f);\n"
+"float guv = fma(coeffs[3], V, fma(coeffs[2], U, 0.5f));\n"
+"float buv = fma(coeffs[1], U, 0.5f);\n"
+"dst[2 - bidx] = convert_uchar_sat(y00 + ruv);\n"
+"dst[1] = convert_uchar_sat(y00 + guv);\n"
+"dst[bidx] = convert_uchar_sat(y00 + buv);\n"
+"#if dcn == 4\n"
+"dst[3] = 255;\n"
+"#endif\n"
+"dst[dcn + 2 - bidx] = convert_uchar_sat(y01 + ruv);\n"
+"dst[dcn + 1] = convert_uchar_sat(y01 + guv);\n"
+"dst[dcn + bidx] = convert_uchar_sat(y01 + buv);\n"
+"#if dcn == 4\n"
+"dst[7] = 255;\n"
+"#endif\n"
+"}\n"
+"++y;\n"
+"src += src_step;\n"
+"dst += dst_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"__constant float c_RGB2YCrCbCoeffs_f[5] = {0.299f, 0.587f, 0.114f, 0.713f, 0.564f};\n"
+"__constant int c_RGB2YCrCbCoeffs_i[5] = {R2Y, G2Y, B2Y, 11682, 9241};\n"
+"__kernel void RGB2YCrCb(__global const uchar* srcptr, int src_step, int src_offset,\n"
+"__global uchar* dstptr, int dst_step, int dt_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dt_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"__global const DATA_TYPE* src = (__global const DATA_TYPE*)(srcptr + src_index);\n"
+"__global DATA_TYPE* dst = (__global DATA_TYPE*)(dstptr + dst_index);\n"
+"DATA_TYPE_4 src_pix = vload4(0, src);\n"
+"DATA_TYPE b = src_pix.B_COMP, g = src_pix.G_COMP, r = src_pix.R_COMP;\n"
+"#ifdef DEPTH_5\n"
+"__constant float * coeffs = c_RGB2YCrCbCoeffs_f;\n"
+"DATA_TYPE Y = fma(b, coeffs[2], fma(g, coeffs[1], r * coeffs[0]));\n"
+"DATA_TYPE Cr = fma(r - Y, coeffs[3], HALF_MAX);\n"
+"DATA_TYPE Cb = fma(b - Y, coeffs[4], HALF_MAX);\n"
+"#else\n"
+"__constant int * coeffs = c_RGB2YCrCbCoeffs_i;\n"
+"int delta = HALF_MAX * (1 << yuv_shift);\n"
+"int Y = CV_DESCALE(mad24(b, coeffs[2], mad24(g, coeffs[1], mul24(r, coeffs[0]))), yuv_shift);\n"
+"int Cr = CV_DESCALE(mad24(r - Y, coeffs[3], delta), yuv_shift);\n"
+"int Cb = CV_DESCALE(mad24(b - Y, coeffs[4], delta), yuv_shift);\n"
+"#endif\n"
+"dst[0] = SAT_CAST( Y );\n"
+"dst[1] = SAT_CAST( Cr );\n"
+"dst[2] = SAT_CAST( Cb );\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__constant float c_YCrCb2RGBCoeffs_f[4] = { 1.403f, -0.714f, -0.344f, 1.773f };\n"
+"__constant int c_YCrCb2RGBCoeffs_i[4] = { 22987, -11698, -5636, 29049 };\n"
+"__kernel void YCrCb2RGB(__global const uchar* src, int src_step, int src_offset,\n"
+"__global uchar* dst, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"__global const DATA_TYPE * srcptr = (__global const DATA_TYPE*)(src + src_index);\n"
+"__global DATA_TYPE * dstptr = (__global DATA_TYPE*)(dst + dst_index);\n"
+"DATA_TYPE_4 src_pix = vload4(0, srcptr);\n"
+"DATA_TYPE yp = src_pix.x, cr = src_pix.y, cb = src_pix.z;\n"
+"#ifdef DEPTH_5\n"
+"__constant float * coeff = c_YCrCb2RGBCoeffs_f;\n"
+"float r = fma(coeff[0], cr - HALF_MAX, yp);\n"
+"float g = fma(coeff[1], cr - HALF_MAX, fma(coeff[2], cb - HALF_MAX, yp));\n"
+"float b = fma(coeff[3], cb - HALF_MAX, yp);\n"
+"#else\n"
+"__constant int * coeff = c_YCrCb2RGBCoeffs_i;\n"
+"int r = yp + CV_DESCALE(coeff[0] * (cr - HALF_MAX), yuv_shift);\n"
+"int g = yp + CV_DESCALE(mad24(coeff[1], cr - HALF_MAX, coeff[2] * (cb - HALF_MAX)), yuv_shift);\n"
+"int b = yp + CV_DESCALE(coeff[3] * (cb - HALF_MAX), yuv_shift);\n"
+"#endif\n"
+"dstptr[(bidx^2)] = SAT_CAST(r);\n"
+"dstptr[1] = SAT_CAST(g);\n"
+"dstptr[bidx] = SAT_CAST(b);\n"
+"#if dcn == 4\n"
+"dstptr[3] = MAX_NUM;\n"
+"#endif\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void RGB2XYZ(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset,\n"
+"int rows, int cols, __constant COEFF_TYPE * coeffs)\n"
+"{\n"
+"int dx = get_global_id(0);\n"
+"int dy = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (dx < cols)\n"
+"{\n"
+"int src_index = mad24(dy, src_step, mad24(dx, scnbytes, src_offset));\n"
+"int dst_index = mad24(dy, dst_step, mad24(dx, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (dy < rows)\n"
+"{\n"
+"__global const DATA_TYPE * src = (__global const DATA_TYPE *)(srcptr + src_index);\n"
+"__global DATA_TYPE * dst = (__global DATA_TYPE *)(dstptr + dst_index);\n"
+"DATA_TYPE_4 src_pix = vload4(0, src);\n"
+"DATA_TYPE r = src_pix.x, g = src_pix.y, b = src_pix.z;\n"
+"#ifdef DEPTH_5\n"
+"float x = fma(r, coeffs[0], fma(g, coeffs[1], b * coeffs[2]));\n"
+"float y = fma(r, coeffs[3], fma(g, coeffs[4], b * coeffs[5]));\n"
+"float z = fma(r, coeffs[6], fma(g, coeffs[7], b * coeffs[8]));\n"
+"#else\n"
+"int x = CV_DESCALE(mad24(r, coeffs[0], mad24(g, coeffs[1], b * coeffs[2])), xyz_shift);\n"
+"int y = CV_DESCALE(mad24(r, coeffs[3], mad24(g, coeffs[4], b * coeffs[5])), xyz_shift);\n"
+"int z = CV_DESCALE(mad24(r, coeffs[6], mad24(g, coeffs[7], b * coeffs[8])), xyz_shift);\n"
+"#endif\n"
+"dst[0] = SAT_CAST(x);\n"
+"dst[1] = SAT_CAST(y);\n"
+"dst[2] = SAT_CAST(z);\n"
+"++dy;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void XYZ2RGB(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset,\n"
+"int rows, int cols, __constant COEFF_TYPE * coeffs)\n"
+"{\n"
+"int dx = get_global_id(0);\n"
+"int dy = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (dx < cols)\n"
+"{\n"
+"int src_index = mad24(dy, src_step, mad24(dx, scnbytes, src_offset));\n"
+"int dst_index = mad24(dy, dst_step, mad24(dx, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (dy < rows)\n"
+"{\n"
+"__global const DATA_TYPE * src = (__global const DATA_TYPE *)(srcptr + src_index);\n"
+"__global DATA_TYPE * dst = (__global DATA_TYPE *)(dstptr + dst_index);\n"
+"DATA_TYPE_4 src_pix = vload4(0, src);\n"
+"DATA_TYPE x = src_pix.x, y = src_pix.y, z = src_pix.z;\n"
+"#ifdef DEPTH_5\n"
+"float b = fma(x, coeffs[0], fma(y, coeffs[1], z * coeffs[2]));\n"
+"float g = fma(x, coeffs[3], fma(y, coeffs[4], z * coeffs[5]));\n"
+"float r = fma(x, coeffs[6], fma(y, coeffs[7], z * coeffs[8]));\n"
+"#else\n"
+"int b = CV_DESCALE(mad24(x, coeffs[0], mad24(y, coeffs[1], z * coeffs[2])), xyz_shift);\n"
+"int g = CV_DESCALE(mad24(x, coeffs[3], mad24(y, coeffs[4], z * coeffs[5])), xyz_shift);\n"
+"int r = CV_DESCALE(mad24(x, coeffs[6], mad24(y, coeffs[7], z * coeffs[8])), xyz_shift);\n"
+"#endif\n"
+"DATA_TYPE dst0 = SAT_CAST(b);\n"
+"DATA_TYPE dst1 = SAT_CAST(g);\n"
+"DATA_TYPE dst2 = SAT_CAST(r);\n"
+"#if dcn == 3 || defined DEPTH_5\n"
+"dst[0] = dst0;\n"
+"dst[1] = dst1;\n"
+"dst[2] = dst2;\n"
+"#if dcn == 4\n"
+"dst[3] = MAX_NUM;\n"
+"#endif\n"
+"#else\n"
+"*(__global DATA_TYPE_4 *)dst = (DATA_TYPE_4)(dst0, dst1, dst2, MAX_NUM);\n"
+"#endif\n"
+"++dy;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void RGB(__global const uchar* srcptr, int src_step, int src_offset,\n"
+"__global uchar* dstptr, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"__global const DATA_TYPE * src = (__global const DATA_TYPE *)(srcptr + src_index);\n"
+"__global DATA_TYPE * dst = (__global DATA_TYPE *)(dstptr + dst_index);\n"
+"DATA_TYPE_4 src_pix = vload4(0, src);\n"
+"#ifdef REVERSE\n"
+"dst[0] = src_pix.z;\n"
+"dst[1] = src_pix.y;\n"
+"dst[2] = src_pix.x;\n"
+"#else\n"
+"dst[0] = src_pix.x;\n"
+"dst[1] = src_pix.y;\n"
+"dst[2] = src_pix.z;\n"
+"#endif\n"
+"#if dcn == 4\n"
+"#if scn == 3\n"
+"dst[3] = MAX_NUM;\n"
+"#else\n"
+"dst[3] = src[3];\n"
+"#endif\n"
+"#endif\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void RGB5x52RGB(__global const uchar* src, int src_step, int src_offset,\n"
+"__global uchar* dst, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"ushort t = *((__global const ushort*)(src + src_index));\n"
+"#if greenbits == 6\n"
+"dst[dst_index + bidx] = (uchar)(t << 3);\n"
+"dst[dst_index + 1] = (uchar)((t >> 3) & ~3);\n"
+"dst[dst_index + (bidx^2)] = (uchar)((t >> 8) & ~7);\n"
+"#else\n"
+"dst[dst_index + bidx] = (uchar)(t << 3);\n"
+"dst[dst_index + 1] = (uchar)((t >> 2) & ~7);\n"
+"dst[dst_index + (bidx^2)] = (uchar)((t >> 7) & ~7);\n"
+"#endif\n"
+"#if dcn == 4\n"
+"#if greenbits == 6\n"
+"dst[dst_index + 3] = 255;\n"
+"#else\n"
+"dst[dst_index + 3] = t & 0x8000 ? 255 : 0;\n"
+"#endif\n"
+"#endif\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void RGB2RGB5x5(__global const uchar* src, int src_step, int src_offset,\n"
+"__global uchar* dst, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"uchar4 src_pix = vload4(0, src + src_index);\n"
+"#if greenbits == 6\n"
+"*((__global ushort*)(dst + dst_index)) = (ushort)((src_pix.B_COMP >> 3)|((src_pix.G_COMP&~3) << 3)|((src_pix.R_COMP&~7) << 8));\n"
+"#elif scn == 3\n"
+"*((__global ushort*)(dst + dst_index)) = (ushort)((src_pix.B_COMP >> 3)|((src_pix.G_COMP&~7) << 2)|((src_pix.R_COMP&~7) << 7));\n"
+"#else\n"
+"*((__global ushort*)(dst + dst_index)) = (ushort)((src_pix.B_COMP >> 3)|((src_pix.G_COMP&~7) << 2)|\n"
+"((src_pix.R_COMP&~7) << 7)|(src_pix.w ? 0x8000 : 0));\n"
+"#endif\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void BGR5x52Gray(__global const uchar* src, int src_step, int src_offset,\n"
+"__global uchar* dst, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, dst_offset + x);\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"int t = *((__global const ushort*)(src + src_index));\n"
+"#if greenbits == 6\n"
+"dst[dst_index] = (uchar)CV_DESCALE(mad24((t << 3) & 0xf8, B2Y, mad24((t >> 3) & 0xfc, G2Y, ((t >> 8) & 0xf8) * R2Y)), yuv_shift);\n"
+"#else\n"
+"dst[dst_index] = (uchar)CV_DESCALE(mad24((t << 3) & 0xf8, B2Y, mad24((t >> 2) & 0xf8, G2Y, ((t >> 7) & 0xf8) * R2Y)), yuv_shift);\n"
+"#endif\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void Gray2BGR5x5(__global const uchar* src, int src_step, int src_offset,\n"
+"__global uchar* dst, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, src_offset + x);\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"int t = src[src_index];\n"
+"#if greenbits == 6\n"
+"*((__global ushort*)(dst + dst_index)) = (ushort)((t >> 3) | ((t & ~3) << 3) | ((t & ~7) << 8));\n"
+"#else\n"
+"t >>= 3;\n"
+"*((__global ushort*)(dst + dst_index)) = (ushort)(t|(t << 5)|(t << 10));\n"
+"#endif\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__constant int sector_data[][3] = { { 1, 3, 0 },\n"
+"{ 1, 0, 2 },\n"
+"{ 3, 0, 1 },\n"
+"{ 0, 2, 1 },\n"
+"{ 0, 1, 3 },\n"
+"{ 2, 1, 0 } };\n"
+"#ifdef DEPTH_0\n"
+"__kernel void RGB2HSV(__global const uchar* src, int src_step, int src_offset,\n"
+"__global uchar* dst, int dst_step, int dst_offset,\n"
+"int rows, int cols,\n"
+"__constant int * sdiv_table, __constant int * hdiv_table)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"uchar4 src_pix = vload4(0, src + src_index);\n"
+"int b = src_pix.B_COMP, g = src_pix.G_COMP, r = src_pix.R_COMP;\n"
+"int h, s, v = b;\n"
+"int vmin = b, diff;\n"
+"int vr, vg;\n"
+"v = max(v, g);\n"
+"v = max(v, r);\n"
+"vmin = min(vmin, g);\n"
+"vmin = min(vmin, r);\n"
+"diff = v - vmin;\n"
+"vr = v == r ? -1 : 0;\n"
+"vg = v == g ? -1 : 0;\n"
+"s = mad24(diff, sdiv_table[v], (1 << (hsv_shift-1))) >> hsv_shift;\n"
+"h = (vr & (g - b)) +\n"
+"(~vr & ((vg & mad24(diff, 2, b - r)) + ((~vg) & mad24(4, diff, r - g))));\n"
+"h = mad24(h, hdiv_table[diff], (1 << (hsv_shift-1))) >> hsv_shift;\n"
+"h += h < 0 ? hrange : 0;\n"
+"dst[dst_index] = convert_uchar_sat_rte(h);\n"
+"dst[dst_index + 1] = (uchar)s;\n"
+"dst[dst_index + 2] = (uchar)v;\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void HSV2RGB(__global const uchar* src, int src_step, int src_offset,\n"
+"__global uchar* dst, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"uchar4 src_pix = vload4(0, src + src_index);\n"
+"float h = src_pix.x, s = src_pix.y*(1/255.f), v = src_pix.z*(1/255.f);\n"
+"float b, g, r;\n"
+"if (s != 0)\n"
+"{\n"
+"float tab[4];\n"
+"int sector;\n"
+"h *= hscale;\n"
+"if( h < 0 )\n"
+"do h += 6; while( h < 0 );\n"
+"else if( h >= 6 )\n"
+"do h -= 6; while( h >= 6 );\n"
+"sector = convert_int_sat_rtn(h);\n"
+"h -= sector;\n"
+"if( (unsigned)sector >= 6u )\n"
+"{\n"
+"sector = 0;\n"
+"h = 0.f;\n"
+"}\n"
+"tab[0] = v;\n"
+"tab[1] = v*(1.f - s);\n"
+"tab[2] = v*(1.f - s*h);\n"
+"tab[3] = v*(1.f - s*(1.f - h));\n"
+"b = tab[sector_data[sector][0]];\n"
+"g = tab[sector_data[sector][1]];\n"
+"r = tab[sector_data[sector][2]];\n"
+"}\n"
+"else\n"
+"b = g = r = v;\n"
+"dst[dst_index + bidx] = convert_uchar_sat_rte(b*255.f);\n"
+"dst[dst_index + 1] = convert_uchar_sat_rte(g*255.f);\n"
+"dst[dst_index + (bidx^2)] = convert_uchar_sat_rte(r*255.f);\n"
+"#if dcn == 4\n"
+"dst[dst_index + 3] = MAX_NUM;\n"
+"#endif\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"#elif defined DEPTH_5\n"
+"__kernel void RGB2HSV(__global const uchar* srcptr, int src_step, int src_offset,\n"
+"__global uchar* dstptr, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"__global const float * src = (__global const float *)(srcptr + src_index);\n"
+"__global float * dst = (__global float *)(dstptr + dst_index);\n"
+"float4 src_pix = vload4(0, src);\n"
+"float b = src_pix.B_COMP, g = src_pix.G_COMP, r = src_pix.R_COMP;\n"
+"float h, s, v;\n"
+"float vmin, diff;\n"
+"v = vmin = r;\n"
+"if( v < g ) v = g;\n"
+"if( v < b ) v = b;\n"
+"if( vmin > g ) vmin = g;\n"
+"if( vmin > b ) vmin = b;\n"
+"diff = v - vmin;\n"
+"s = diff/(float)(fabs(v) + FLT_EPSILON);\n"
+"diff = (float)(60.f/(diff + FLT_EPSILON));\n"
+"if( v == r )\n"
+"h = (g - b)*diff;\n"
+"else if( v == g )\n"
+"h = fma(b - r, diff, 120.f);\n"
+"else\n"
+"h = fma(r - g, diff, 240.f);\n"
+"if( h < 0 )\n"
+"h += 360.f;\n"
+"dst[0] = h*hscale;\n"
+"dst[1] = s;\n"
+"dst[2] = v;\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void HSV2RGB(__global const uchar* srcptr, int src_step, int src_offset,\n"
+"__global uchar* dstptr, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"__global const float * src = (__global const float *)(srcptr + src_index);\n"
+"__global float * dst = (__global float *)(dstptr + dst_index);\n"
+"float4 src_pix = vload4(0, src);\n"
+"float h = src_pix.x, s = src_pix.y, v = src_pix.z;\n"
+"float b, g, r;\n"
+"if (s != 0)\n"
+"{\n"
+"float tab[4];\n"
+"int sector;\n"
+"h *= hscale;\n"
+"if(h < 0)\n"
+"do h += 6; while (h < 0);\n"
+"else if (h >= 6)\n"
+"do h -= 6; while (h >= 6);\n"
+"sector = convert_int_sat_rtn(h);\n"
+"h -= sector;\n"
+"if ((unsigned)sector >= 6u)\n"
+"{\n"
+"sector = 0;\n"
+"h = 0.f;\n"
+"}\n"
+"tab[0] = v;\n"
+"tab[1] = v*(1.f - s);\n"
+"tab[2] = v*(1.f - s*h);\n"
+"tab[3] = v*(1.f - s*(1.f - h));\n"
+"b = tab[sector_data[sector][0]];\n"
+"g = tab[sector_data[sector][1]];\n"
+"r = tab[sector_data[sector][2]];\n"
+"}\n"
+"else\n"
+"b = g = r = v;\n"
+"dst[bidx] = b;\n"
+"dst[1] = g;\n"
+"dst[bidx^2] = r;\n"
+"#if dcn == 4\n"
+"dst[3] = MAX_NUM;\n"
+"#endif\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"#endif\n"
+"#ifdef DEPTH_0\n"
+"__kernel void RGB2HLS(__global const uchar* src, int src_step, int src_offset,\n"
+"__global uchar* dst, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"uchar4 src_pix = vload4(0, src + src_index);\n"
+"float b = src_pix.B_COMP*(1/255.f), g = src_pix.G_COMP*(1/255.f), r = src_pix.R_COMP*(1/255.f);\n"
+"float h = 0.f, s = 0.f, l;\n"
+"float vmin, vmax, diff;\n"
+"vmax = vmin = r;\n"
+"if (vmax < g) vmax = g;\n"
+"if (vmax < b) vmax = b;\n"
+"if (vmin > g) vmin = g;\n"
+"if (vmin > b) vmin = b;\n"
+"diff = vmax - vmin;\n"
+"l = (vmax + vmin)*0.5f;\n"
+"if (diff > FLT_EPSILON)\n"
+"{\n"
+"s = l < 0.5f ? diff/(vmax + vmin) : diff/(2 - vmax - vmin);\n"
+"diff = 60.f/diff;\n"
+"if( vmax == r )\n"
+"h = (g - b)*diff;\n"
+"else if( vmax == g )\n"
+"h = fma(b - r, diff, 120.f);\n"
+"else\n"
+"h = fma(r - g, diff, 240.f);\n"
+"if( h < 0.f )\n"
+"h += 360.f;\n"
+"}\n"
+"dst[dst_index] = convert_uchar_sat_rte(h*hscale);\n"
+"dst[dst_index + 1] = convert_uchar_sat_rte(l*255.f);\n"
+"dst[dst_index + 2] = convert_uchar_sat_rte(s*255.f);\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void HLS2RGB(__global const uchar* src, int src_step, int src_offset,\n"
+"__global uchar* dst, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"uchar4 src_pix = vload4(0, src + src_index);\n"
+"float h = src_pix.x, l = src_pix.y*(1.f/255.f), s = src_pix.z*(1.f/255.f);\n"
+"float b, g, r;\n"
+"if (s != 0)\n"
+"{\n"
+"float tab[4];\n"
+"float p2 = l <= 0.5f ? l*(1 + s) : l + s - l*s;\n"
+"float p1 = 2*l - p2;\n"
+"h *= hscale;\n"
+"if( h < 0 )\n"
+"do h += 6; while( h < 0 );\n"
+"else if( h >= 6 )\n"
+"do h -= 6; while( h >= 6 );\n"
+"int sector = convert_int_sat_rtn(h);\n"
+"h -= sector;\n"
+"tab[0] = p2;\n"
+"tab[1] = p1;\n"
+"tab[2] = fma(p2 - p1, 1-h, p1);\n"
+"tab[3] = fma(p2 - p1, h, p1);\n"
+"b = tab[sector_data[sector][0]];\n"
+"g = tab[sector_data[sector][1]];\n"
+"r = tab[sector_data[sector][2]];\n"
+"}\n"
+"else\n"
+"b = g = r = l;\n"
+"dst[dst_index + bidx] = convert_uchar_sat_rte(b*255.f);\n"
+"dst[dst_index + 1] = convert_uchar_sat_rte(g*255.f);\n"
+"dst[dst_index + (bidx^2)] = convert_uchar_sat_rte(r*255.f);\n"
+"#if dcn == 4\n"
+"dst[dst_index + 3] = MAX_NUM;\n"
+"#endif\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"#elif defined DEPTH_5\n"
+"__kernel void RGB2HLS(__global const uchar* srcptr, int src_step, int src_offset,\n"
+"__global uchar* dstptr, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"__global const float * src = (__global const float *)(srcptr + src_index);\n"
+"__global float * dst = (__global float *)(dstptr + dst_index);\n"
+"float4 src_pix = vload4(0, src);\n"
+"float b = src_pix.B_COMP, g = src_pix.G_COMP, r = src_pix.R_COMP;\n"
+"float h = 0.f, s = 0.f, l;\n"
+"float vmin, vmax, diff;\n"
+"vmax = vmin = r;\n"
+"if (vmax < g) vmax = g;\n"
+"if (vmax < b) vmax = b;\n"
+"if (vmin > g) vmin = g;\n"
+"if (vmin > b) vmin = b;\n"
+"diff = vmax - vmin;\n"
+"l = (vmax + vmin)*0.5f;\n"
+"if (diff > FLT_EPSILON)\n"
+"{\n"
+"s = l < 0.5f ? diff/(vmax + vmin) : diff/(2 - vmax - vmin);\n"
+"diff = 60.f/diff;\n"
+"if( vmax == r )\n"
+"h = (g - b)*diff;\n"
+"else if( vmax == g )\n"
+"h = fma(b - r, diff, 120.f);\n"
+"else\n"
+"h = fma(r - g, diff, 240.f);\n"
+"if( h < 0.f ) h += 360.f;\n"
+"}\n"
+"dst[0] = h*hscale;\n"
+"dst[1] = l;\n"
+"dst[2] = s;\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void HLS2RGB(__global const uchar* srcptr, int src_step, int src_offset,\n"
+"__global uchar* dstptr, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"__global const float * src = (__global const float *)(srcptr + src_index);\n"
+"__global float * dst = (__global float *)(dstptr + dst_index);\n"
+"float4 src_pix = vload4(0, src);\n"
+"float h = src_pix.x, l = src_pix.y, s = src_pix.z;\n"
+"float b, g, r;\n"
+"if (s != 0)\n"
+"{\n"
+"float tab[4];\n"
+"int sector;\n"
+"float p2 = l <= 0.5f ? l*(1 + s) : l + s - l*s;\n"
+"float p1 = 2*l - p2;\n"
+"h *= hscale;\n"
+"if( h < 0 )\n"
+"do h += 6; while( h < 0 );\n"
+"else if( h >= 6 )\n"
+"do h -= 6; while( h >= 6 );\n"
+"sector = convert_int_sat_rtn(h);\n"
+"h -= sector;\n"
+"tab[0] = p2;\n"
+"tab[1] = p1;\n"
+"tab[2] = fma(p2 - p1, 1-h, p1);\n"
+"tab[3] = fma(p2 - p1, h, p1);\n"
+"b = tab[sector_data[sector][0]];\n"
+"g = tab[sector_data[sector][1]];\n"
+"r = tab[sector_data[sector][2]];\n"
+"}\n"
+"else\n"
+"b = g = r = l;\n"
+"dst[bidx] = b;\n"
+"dst[1] = g;\n"
+"dst[bidx^2] = r;\n"
+"#if dcn == 4\n"
+"dst[3] = MAX_NUM;\n"
+"#endif\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"#endif\n"
+"#ifdef DEPTH_0\n"
+"__kernel void RGBA2mRGBA(__global const uchar* src, int src_step, int src_offset,\n"
+"__global uchar* dst, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, src_offset + (x << 2));\n"
+"int dst_index = mad24(y, dst_step, dst_offset + (x << 2));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"uchar4 src_pix = *(__global const uchar4 *)(src + src_index);\n"
+"*(__global uchar4 *)(dst + dst_index) =\n"
+"(uchar4)(mad24(src_pix.x, src_pix.w, HALF_MAX) / MAX_NUM,\n"
+"mad24(src_pix.y, src_pix.w, HALF_MAX) / MAX_NUM,\n"
+"mad24(src_pix.z, src_pix.w, HALF_MAX) / MAX_NUM, src_pix.w);\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void mRGBA2RGBA(__global const uchar* src, int src_step, int src_offset,\n"
+"__global uchar* dst, int dst_step, int dst_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, 4, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, 4, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"uchar4 src_pix = *(__global const uchar4 *)(src + src_index);\n"
+"uchar v3 = src_pix.w, v3_half = v3 / 2;\n"
+"if (v3 == 0)\n"
+"*(__global uchar4 *)(dst + dst_index) = (uchar4)(0, 0, 0, 0);\n"
+"else\n"
+"*(__global uchar4 *)(dst + dst_index) =\n"
+"(uchar4)(mad24(src_pix.x, MAX_NUM, v3_half) / v3,\n"
+"mad24(src_pix.y, MAX_NUM, v3_half) / v3,\n"
+"mad24(src_pix.z, MAX_NUM, v3_half) / v3, v3);\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"#endif\n"
+"#define lab_shift xyz_shift\n"
+"#define gamma_shift 3\n"
+"#define lab_shift2 (lab_shift + gamma_shift)\n"
+"#define GAMMA_TAB_SIZE 1024\n"
+"#define GammaTabScale (float)GAMMA_TAB_SIZE\n"
+"inline float splineInterpolate(float x, __global const float * tab, int n)\n"
+"{\n"
+"int ix = clamp(convert_int_sat_rtn(x), 0, n-1);\n"
+"x -= ix;\n"
+"tab += ix << 2;\n"
+"return fma(fma(fma(tab[3], x, tab[2]), x, tab[1]), x, tab[0]);\n"
+"}\n"
+"#ifdef DEPTH_0\n"
+"__kernel void BGR2Lab(__global const uchar * src, int src_step, int src_offset,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int rows, int cols,\n"
+"__global const ushort * gammaTab, __global ushort * LabCbrtTab_b,\n"
+"__constant int * coeffs, int Lscale, int Lshift)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"__global const uchar* src_ptr = src + src_index;\n"
+"__global uchar* dst_ptr = dst + dst_index;\n"
+"uchar4 src_pix = vload4(0, src_ptr);\n"
+"int C0 = coeffs[0], C1 = coeffs[1], C2 = coeffs[2],\n"
+"C3 = coeffs[3], C4 = coeffs[4], C5 = coeffs[5],\n"
+"C6 = coeffs[6], C7 = coeffs[7], C8 = coeffs[8];\n"
+"int R = gammaTab[src_pix.x], G = gammaTab[src_pix.y], B = gammaTab[src_pix.z];\n"
+"int fX = LabCbrtTab_b[CV_DESCALE(mad24(R, C0, mad24(G, C1, B*C2)), lab_shift)];\n"
+"int fY = LabCbrtTab_b[CV_DESCALE(mad24(R, C3, mad24(G, C4, B*C5)), lab_shift)];\n"
+"int fZ = LabCbrtTab_b[CV_DESCALE(mad24(R, C6, mad24(G, C7, B*C8)), lab_shift)];\n"
+"int L = CV_DESCALE( Lscale*fY + Lshift, lab_shift2 );\n"
+"int a = CV_DESCALE( mad24(500, fX - fY, 128*(1 << lab_shift2)), lab_shift2 );\n"
+"int b = CV_DESCALE( mad24(200, fY - fZ, 128*(1 << lab_shift2)), lab_shift2 );\n"
+"dst_ptr[0] = SAT_CAST(L);\n"
+"dst_ptr[1] = SAT_CAST(a);\n"
+"dst_ptr[2] = SAT_CAST(b);\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"#elif defined DEPTH_5\n"
+"__kernel void BGR2Lab(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int rows, int cols,\n"
+"#ifdef SRGB\n"
+"__global const float * gammaTab,\n"
+"#endif\n"
+"__constant float * coeffs, float _1_3, float _a)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"__global const float * src = (__global const float *)(srcptr + src_index);\n"
+"__global float * dst = (__global float *)(dstptr + dst_index);\n"
+"float4 src_pix = vload4(0, src);\n"
+"float C0 = coeffs[0], C1 = coeffs[1], C2 = coeffs[2],\n"
+"C3 = coeffs[3], C4 = coeffs[4], C5 = coeffs[5],\n"
+"C6 = coeffs[6], C7 = coeffs[7], C8 = coeffs[8];\n"
+"float R = clamp(src_pix.x, 0.0f, 1.0f);\n"
+"float G = clamp(src_pix.y, 0.0f, 1.0f);\n"
+"float B = clamp(src_pix.z, 0.0f, 1.0f);\n"
+"#ifdef SRGB\n"
+"R = splineInterpolate(R * GammaTabScale, gammaTab, GAMMA_TAB_SIZE);\n"
+"G = splineInterpolate(G * GammaTabScale, gammaTab, GAMMA_TAB_SIZE);\n"
+"B = splineInterpolate(B * GammaTabScale, gammaTab, GAMMA_TAB_SIZE);\n"
+"#endif\n"
+"float X = fma(R, C0, fma(G, C1, B*C2));\n"
+"float Y = fma(R, C3, fma(G, C4, B*C5));\n"
+"float Z = fma(R, C6, fma(G, C7, B*C8));\n"
+"float FX = X > 0.008856f ? rootn(X, 3) : fma(7.787f, X, _a);\n"
+"float FY = Y > 0.008856f ? rootn(Y, 3) : fma(7.787f, Y, _a);\n"
+"float FZ = Z > 0.008856f ? rootn(Z, 3) : fma(7.787f, Z, _a);\n"
+"float L = Y > 0.008856f ? fma(116.f, FY, -16.f) : (903.3f * Y);\n"
+"float a = 500.f * (FX - FY);\n"
+"float b = 200.f * (FY - FZ);\n"
+"dst[0] = L;\n"
+"dst[1] = a;\n"
+"dst[2] = b;\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"#endif\n"
+"inline void Lab2BGR_f(const float * srcbuf, float * dstbuf,\n"
+"#ifdef SRGB\n"
+"__global const float * gammaTab,\n"
+"#endif\n"
+"__constant float * coeffs, float lThresh, float fThresh)\n"
+"{\n"
+"float li = srcbuf[0], ai = srcbuf[1], bi = srcbuf[2];\n"
+"float C0 = coeffs[0], C1 = coeffs[1], C2 = coeffs[2],\n"
+"C3 = coeffs[3], C4 = coeffs[4], C5 = coeffs[5],\n"
+"C6 = coeffs[6], C7 = coeffs[7], C8 = coeffs[8];\n"
+"float y, fy;\n"
+"if (li <= lThresh)\n"
+"{\n"
+"y = li / 903.3f;\n"
+"fy = fma(7.787f, y, 16.0f / 116.0f);\n"
+"}\n"
+"else\n"
+"{\n"
+"fy = (li + 16.0f) / 116.0f;\n"
+"y = fy * fy * fy;\n"
+"}\n"
+"float fxz[] = { ai / 500.0f + fy, fy - bi / 200.0f };\n"
+"#pragma unroll\n"
+"for (int j = 0; j < 2; j++)\n"
+"if (fxz[j] <= fThresh)\n"
+"fxz[j] = (fxz[j] - 16.0f / 116.0f) / 7.787f;\n"
+"else\n"
+"fxz[j] = fxz[j] * fxz[j] * fxz[j];\n"
+"float x = fxz[0], z = fxz[1];\n"
+"float ro = clamp(fma(C0, x, fma(C1, y, C2 * z)), 0.0f, 1.0f);\n"
+"float go = clamp(fma(C3, x, fma(C4, y, C5 * z)), 0.0f, 1.0f);\n"
+"float bo = clamp(fma(C6, x, fma(C7, y, C8 * z)), 0.0f, 1.0f);\n"
+"#ifdef SRGB\n"
+"ro = splineInterpolate(ro * GammaTabScale, gammaTab, GAMMA_TAB_SIZE);\n"
+"go = splineInterpolate(go * GammaTabScale, gammaTab, GAMMA_TAB_SIZE);\n"
+"bo = splineInterpolate(bo * GammaTabScale, gammaTab, GAMMA_TAB_SIZE);\n"
+"#endif\n"
+"dstbuf[0] = ro, dstbuf[1] = go, dstbuf[2] = bo;\n"
+"}\n"
+"#ifdef DEPTH_0\n"
+"__kernel void Lab2BGR(__global const uchar * src, int src_step, int src_offset,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int rows, int cols,\n"
+"#ifdef SRGB\n"
+"__global const float * gammaTab,\n"
+"#endif\n"
+"__constant float * coeffs, float lThresh, float fThresh)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"__global const uchar* src_ptr = src + src_index;\n"
+"__global uchar * dst_ptr = dst + dst_index;\n"
+"uchar4 src_pix = vload4(0, src_ptr);\n"
+"float srcbuf[3], dstbuf[3];\n"
+"srcbuf[0] = src_pix.x*(100.f/255.f);\n"
+"srcbuf[1] = convert_float(src_pix.y - 128);\n"
+"srcbuf[2] = convert_float(src_pix.z - 128);\n"
+"Lab2BGR_f(&srcbuf[0], &dstbuf[0],\n"
+"#ifdef SRGB\n"
+"gammaTab,\n"
+"#endif\n"
+"coeffs, lThresh, fThresh);\n"
+"#if dcn == 3\n"
+"dst_ptr[0] = SAT_CAST(dstbuf[0] * 255.0f);\n"
+"dst_ptr[1] = SAT_CAST(dstbuf[1] * 255.0f);\n"
+"dst_ptr[2] = SAT_CAST(dstbuf[2] * 255.0f);\n"
+"#else\n"
+"*(__global uchar4 *)dst_ptr = (uchar4)(SAT_CAST(dstbuf[0] * 255.0f),\n"
+"SAT_CAST(dstbuf[1] * 255.0f), SAT_CAST(dstbuf[2] * 255.0f), MAX_NUM);\n"
+"#endif\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"#elif defined DEPTH_5\n"
+"__kernel void Lab2BGR(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int rows, int cols,\n"
+"#ifdef SRGB\n"
+"__global const float * gammaTab,\n"
+"#endif\n"
+"__constant float * coeffs, float lThresh, float fThresh)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"{\n"
+"if (y < rows)\n"
+"{\n"
+"__global const float * src = (__global const float *)(srcptr + src_index);\n"
+"__global float * dst = (__global float *)(dstptr + dst_index);\n"
+"float4 src_pix = vload4(0, src);\n"
+"float srcbuf[3], dstbuf[3];\n"
+"srcbuf[0] = src_pix.x, srcbuf[1] = src_pix.y, srcbuf[2] = src_pix.z;\n"
+"Lab2BGR_f(&srcbuf[0], &dstbuf[0],\n"
+"#ifdef SRGB\n"
+"gammaTab,\n"
+"#endif\n"
+"coeffs, lThresh, fThresh);\n"
+"dst[0] = dstbuf[0], dst[1] = dstbuf[1], dst[2] = dstbuf[2];\n"
+"#if dcn == 4\n"
+"dst[3] = MAX_NUM;\n"
+"#endif\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"#endif\n"
+"#define LAB_CBRT_TAB_SIZE 1024\n"
+"#define LAB_CBRT_TAB_SIZE_B (256*3/2*(1<<gamma_shift))\n"
+"__constant float LabCbrtTabScale = LAB_CBRT_TAB_SIZE/1.5f;\n"
+"#ifdef DEPTH_5\n"
+"__kernel void BGR2Luv(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int rows, int cols,\n"
+"#ifdef SRGB\n"
+"__global const float * gammaTab,\n"
+"#endif\n"
+"__global const float * LabCbrtTab, __constant float * coeffs, float _un, float _vn)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"if (y < rows)\n"
+"{\n"
+"__global const float * src = (__global const float *)(srcptr + src_index);\n"
+"__global float * dst = (__global float *)(dstptr + dst_index);\n"
+"float R = src[0], G = src[1], B = src[2];\n"
+"#ifdef SRGB\n"
+"R = splineInterpolate(R*GammaTabScale, gammaTab, GAMMA_TAB_SIZE);\n"
+"G = splineInterpolate(G*GammaTabScale, gammaTab, GAMMA_TAB_SIZE);\n"
+"B = splineInterpolate(B*GammaTabScale, gammaTab, GAMMA_TAB_SIZE);\n"
+"#endif\n"
+"float X = fma(R, coeffs[0], fma(G, coeffs[1], B*coeffs[2]));\n"
+"float Y = fma(R, coeffs[3], fma(G, coeffs[4], B*coeffs[5]));\n"
+"float Z = fma(R, coeffs[6], fma(G, coeffs[7], B*coeffs[8]));\n"
+"float L = splineInterpolate(Y*LabCbrtTabScale, LabCbrtTab, LAB_CBRT_TAB_SIZE);\n"
+"L = fma(116.f, L, -16.f);\n"
+"float d = 52.0f / fmax(fma(15.0f, Y, fma(3.0f, Z, X)), FLT_EPSILON);\n"
+"float u = L*fma(X, d, -_un);\n"
+"float v = L*fma(2.25f, Y*d, -_vn);\n"
+"dst[0] = L;\n"
+"dst[1] = u;\n"
+"dst[2] = v;\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"#elif defined DEPTH_0\n"
+"__kernel void BGR2Luv(__global const uchar * src, int src_step, int src_offset,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int rows, int cols,\n"
+"#ifdef SRGB\n"
+"__global const float * gammaTab,\n"
+"#endif\n"
+"__global const float * LabCbrtTab, __constant float * coeffs, float _un, float _vn)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"src += mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"dst += mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"if (y < rows)\n"
+"{\n"
+"float scale = 1.0f / 255.0f;\n"
+"float R = src[0]*scale, G = src[1]*scale, B = src[2]*scale;\n"
+"#ifdef SRGB\n"
+"R = splineInterpolate(R*GammaTabScale, gammaTab, GAMMA_TAB_SIZE);\n"
+"G = splineInterpolate(G*GammaTabScale, gammaTab, GAMMA_TAB_SIZE);\n"
+"B = splineInterpolate(B*GammaTabScale, gammaTab, GAMMA_TAB_SIZE);\n"
+"#endif\n"
+"float X = fma(R, coeffs[0], fma(G, coeffs[1], B*coeffs[2]));\n"
+"float Y = fma(R, coeffs[3], fma(G, coeffs[4], B*coeffs[5]));\n"
+"float Z = fma(R, coeffs[6], fma(G, coeffs[7], B*coeffs[8]));\n"
+"float L = splineInterpolate(Y*LabCbrtTabScale, LabCbrtTab, LAB_CBRT_TAB_SIZE);\n"
+"L = 116.f*L - 16.f;\n"
+"float d = (4*13) / fmax(fma(15.0f, Y, fma(3.0f, Z, X)), FLT_EPSILON);\n"
+"float u = L*(X*d - _un);\n"
+"float v = L*fma(2.25f, Y*d, -_vn);\n"
+"dst[0] = SAT_CAST(L * 2.55f);\n"
+"dst[1] = SAT_CAST(fma(u, 0.72033898305084743f, 96.525423728813564f));\n"
+"dst[2] = SAT_CAST(fma(v, 0.9732824427480916f, 136.259541984732824f));\n"
+"++y;\n"
+"dst += dst_step;\n"
+"src += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"#endif\n"
+"#ifdef DEPTH_5\n"
+"__kernel void Luv2BGR(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int rows, int cols,\n"
+"#ifdef SRGB\n"
+"__global const float * gammaTab,\n"
+"#endif\n"
+"__constant float * coeffs, float _un, float _vn)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"int src_index = mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"if (y < rows)\n"
+"{\n"
+"__global const float * src = (__global const float *)(srcptr + src_index);\n"
+"__global float * dst = (__global float *)(dstptr + dst_index);\n"
+"float L = src[0], u = src[1], v = src[2], d, X, Y, Z;\n"
+"Y = (L + 16.f) * (1.f/116.f);\n"
+"Y = Y*Y*Y;\n"
+"d = (1.f/13.f)/L;\n"
+"u = fma(u, d, _un);\n"
+"v = fma(v, d, _vn);\n"
+"float iv = 1.f/v;\n"
+"X = 2.25f * u * Y * iv;\n"
+"Z = (12 - fma(3.0f, u, 20.0f * v)) * Y * 0.25f * iv;\n"
+"float R = fma(X, coeffs[0], fma(Y, coeffs[1], Z * coeffs[2]));\n"
+"float G = fma(X, coeffs[3], fma(Y, coeffs[4], Z * coeffs[5]));\n"
+"float B = fma(X, coeffs[6], fma(Y, coeffs[7], Z * coeffs[8]));\n"
+"R = clamp(R, 0.f, 1.f);\n"
+"G = clamp(G, 0.f, 1.f);\n"
+"B = clamp(B, 0.f, 1.f);\n"
+"#ifdef SRGB\n"
+"R = splineInterpolate(R*GammaTabScale, gammaTab, GAMMA_TAB_SIZE);\n"
+"G = splineInterpolate(G*GammaTabScale, gammaTab, GAMMA_TAB_SIZE);\n"
+"B = splineInterpolate(B*GammaTabScale, gammaTab, GAMMA_TAB_SIZE);\n"
+"#endif\n"
+"dst[0] = R;\n"
+"dst[1] = G;\n"
+"dst[2] = B;\n"
+"#if dcn == 4\n"
+"dst[3] = MAX_NUM;\n"
+"#endif\n"
+"++y;\n"
+"dst_index += dst_step;\n"
+"src_index += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"#elif defined DEPTH_0\n"
+"__kernel void Luv2BGR(__global const uchar * src, int src_step, int src_offset,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int rows, int cols,\n"
+"#ifdef SRGB\n"
+"__global const float * gammaTab,\n"
+"#endif\n"
+"__constant float * coeffs, float _un, float _vn)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * PIX_PER_WI_Y;\n"
+"if (x < cols)\n"
+"{\n"
+"src += mad24(y, src_step, mad24(x, scnbytes, src_offset));\n"
+"dst += mad24(y, dst_step, mad24(x, dcnbytes, dst_offset));\n"
+"#pragma unroll\n"
+"for (int cy = 0; cy < PIX_PER_WI_Y; ++cy)\n"
+"if (y < rows)\n"
+"{\n"
+"float d, X, Y, Z;\n"
+"float L = src[0]*(100.f/255.f);\n"
+"float u = fma(convert_float(src[1]), 1.388235294117647f, -134.f);\n"
+"float v = fma(convert_float(src[2]), 1.027450980392157f, - 140.f);\n"
+"Y = (L + 16.f) * (1.f/116.f);\n"
+"Y = Y*Y*Y;\n"
+"d = (1.f/13.f)/L;\n"
+"u = fma(u, d, _un);\n"
+"v = fma(v, d, _vn);\n"
+"float iv = 1.f/v;\n"
+"X = 2.25f * u * Y * iv ;\n"
+"Z = (12 - fma(3.0f, u, 20.0f * v)) * Y * 0.25f * iv;\n"
+"float R = fma(X, coeffs[0], fma(Y, coeffs[1], Z * coeffs[2]));\n"
+"float G = fma(X, coeffs[3], fma(Y, coeffs[4], Z * coeffs[5]));\n"
+"float B = fma(X, coeffs[6], fma(Y, coeffs[7], Z * coeffs[8]));\n"
+"R = clamp(R, 0.f, 1.f);\n"
+"G = clamp(G, 0.f, 1.f);\n"
+"B = clamp(B, 0.f, 1.f);\n"
+"#ifdef SRGB\n"
+"R = splineInterpolate(R*GammaTabScale, gammaTab, GAMMA_TAB_SIZE);\n"
+"G = splineInterpolate(G*GammaTabScale, gammaTab, GAMMA_TAB_SIZE);\n"
+"B = splineInterpolate(B*GammaTabScale, gammaTab, GAMMA_TAB_SIZE);\n"
+"#endif\n"
+"uchar dst0 = SAT_CAST(R * 255.0f);\n"
+"uchar dst1 = SAT_CAST(G * 255.0f);\n"
+"uchar dst2 = SAT_CAST(B * 255.0f);\n"
+"#if dcn == 4\n"
+"*(__global uchar4 *)dst = (uchar4)(dst0, dst1, dst2, MAX_NUM);\n"
+"#else\n"
+"dst[0] = dst0;\n"
+"dst[1] = dst1;\n"
+"dst[2] = dst2;\n"
+"#endif\n"
+"++y;\n"
+"dst += dst_step;\n"
+"src += src_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"#endif\n"
+, "4cef6d86e62644944b49b945ea0fc356"};
+ProgramSource cvtcolor_oclsrc(cvtcolor.programStr);
+const struct ProgramEntry filter2D={"filter2D",
+"#ifdef EXTRA_EXTRAPOLATION\n"
+"#ifdef BORDER_CONSTANT\n"
+"#define EXTRAPOLATE(x, minV, maxV)\n"
+"#elif defined BORDER_REPLICATE\n"
+"#define EXTRAPOLATE(x, minV, maxV) \\\n"
+"{ \\\n"
+"(x) = clamp((x), (minV), (maxV)-1); \\\n"
+"}\n"
+"#elif defined BORDER_WRAP\n"
+"#define EXTRAPOLATE(x, minV, maxV) \\\n"
+"{ \\\n"
+"if ((x) < (minV)) \\\n"
+"(x) += ((maxV) - (minV)); \\\n"
+"if ((x) >= (maxV)) \\\n"
+"(x) -= ((maxV) - (minV)); \\\n"
+"}\n"
+"#elif defined BORDER_REFLECT\n"
+"#define EXTRAPOLATE(x, minV, maxV) \\\n"
+"{ \\\n"
+"if ((maxV) - (minV) == 1) \\\n"
+"(x) = (minV); \\\n"
+"else \\\n"
+"while ((x) >= (maxV) || (x) < (minV)) \\\n"
+"{ \\\n"
+"if ((x) < (minV)) \\\n"
+"(x) = (minV) - ((x) - (minV)) - 1; \\\n"
+"else \\\n"
+"(x) = (maxV) - 1 - ((x) - (maxV)); \\\n"
+"} \\\n"
+"}\n"
+"#elif defined BORDER_REFLECT_101 || defined BORDER_REFLECT101\n"
+"#define EXTRAPOLATE(x, minV, maxV) \\\n"
+"{ \\\n"
+"if ((maxV) - (minV) == 1) \\\n"
+"(x) = (minV); \\\n"
+"else \\\n"
+"while ((x) >= (maxV) || (x) < (minV)) \\\n"
+"{ \\\n"
+"if ((x) < (minV)) \\\n"
+"(x) = (minV) - ((x) - (minV)); \\\n"
+"else \\\n"
+"(x) = (maxV) - 1 - ((x) - (maxV)) - 1; \\\n"
+"} \\\n"
+"}\n"
+"#else\n"
+"#error No extrapolation method\n"
+"#endif\n"
+"#else\n"
+"#ifdef BORDER_CONSTANT\n"
+"#define EXTRAPOLATE(x, minV, maxV)\n"
+"#elif defined BORDER_REPLICATE\n"
+"#define EXTRAPOLATE(x, minV, maxV) \\\n"
+"{ \\\n"
+"(x) = clamp((x), (minV), (maxV)-1); \\\n"
+"}\n"
+"#elif defined BORDER_WRAP\n"
+"#define EXTRAPOLATE(x, minV, maxV) \\\n"
+"{ \\\n"
+"if ((x) < (minV)) \\\n"
+"(x) += (((minV) - (x)) / ((maxV) - (minV)) + 1) * ((maxV) - (minV)); \\\n"
+"if ((x) >= (maxV)) \\\n"
+"(x) = ((x) - (minV)) % ((maxV) - (minV)) + (minV); \\\n"
+"}\n"
+"#elif defined BORDER_REFLECT\n"
+"#define EXTRAPOLATE(x, minV, maxV) \\\n"
+"{ \\\n"
+"(x) = clamp((x), 2 * (minV) - (x) - 1, 2 * (maxV) - (x) - 1); \\\n"
+"}\n"
+"#elif defined BORDER_REFLECT_101 || defined BORDER_REFLECT101\n"
+"#define EXTRAPOLATE(x, minV, maxV) \\\n"
+"{ \\\n"
+"(x) = clamp((x), 2 * (minV) - (x), 2 * (maxV) - (x) - 2); \\\n"
+"}\n"
+"#else\n"
+"#error No extrapolation method\n"
+"#endif\n"
+"#endif\n"
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const srcT *)(addr)\n"
+"#define storepix(val, addr) *(__global dstT *)(addr) = val\n"
+"#define SRCSIZE (int)sizeof(srcT)\n"
+"#define DSTSIZE (int)sizeof(dstT)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const srcT1 *)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global dstT1 *)(addr))\n"
+"#define SRCSIZE (int)sizeof(srcT1) * cn\n"
+"#define DSTSIZE (int)sizeof(dstT1) * cn\n"
+"#endif\n"
+"#define UPDATE_COLUMN_SUM(col) \\\n"
+"__constant WT1 * k = &kernelData[KERNEL_SIZE_Y2_ALIGNED * col]; \\\n"
+"WT tmp_sum = 0; \\\n"
+"for (int sy = 0; sy < KERNEL_SIZE_Y; sy++) \\\n"
+"tmp_sum += data[sy] * k[sy]; \\\n"
+"sumOfCols[local_id] = tmp_sum; \\\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"#define UPDATE_TOTAL_SUM(col) \\\n"
+"int id = local_id + col - ANCHOR_X; \\\n"
+"if (id >= 0 && id < LOCAL_SIZE) \\\n"
+"total_sum += sumOfCols[id]; \\\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"#define noconvert\n"
+"#define DIG(a) a,\n"
+"__constant WT1 kernelData[] = { COEFF };\n"
+"__kernel void filter2D(__global const uchar * srcptr, int src_step, int srcOffsetX, int srcOffsetY, int srcEndX, int srcEndY,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int rows, int cols, float delta)\n"
+"{\n"
+"int local_id = get_local_id(0);\n"
+"int x = local_id + (LOCAL_SIZE - (KERNEL_SIZE_X - 1)) * get_group_id(0) - ANCHOR_X;\n"
+"int y = get_global_id(1);\n"
+"WT data[KERNEL_SIZE_Y];\n"
+"__local WT sumOfCols[LOCAL_SIZE];\n"
+"#ifdef BORDER_ISOLATED\n"
+"int srcBeginX = srcOffsetX;\n"
+"int srcBeginY = srcOffsetY;\n"
+"#else\n"
+"int srcBeginX = 0;\n"
+"int srcBeginY = 0;\n"
+"#endif\n"
+"int srcX = srcOffsetX + x;\n"
+"int srcY = srcOffsetY + y - ANCHOR_Y;\n"
+"__global dstT *dst = (__global dstT *)(dstptr + mad24(y, dst_step, mad24(x, DSTSIZE, dst_offset)));\n"
+"#ifdef BORDER_CONSTANT\n"
+"if (srcX >= srcBeginX && srcX < srcEndX)\n"
+"{\n"
+"for (int sy = 0, sy_index = 0; sy < KERNEL_SIZE_Y; sy++, srcY++)\n"
+"{\n"
+"if (srcY >= srcBeginY && srcY < srcEndY)\n"
+"data[sy + sy_index] = convertToWT(loadpix(srcptr + mad24(srcY, src_step, srcX * SRCSIZE)));\n"
+"else\n"
+"data[sy + sy_index] = (WT)(0);\n"
+"}\n"
+"}\n"
+"else\n"
+"{\n"
+"for (int sy = 0, sy_index = 0; sy < KERNEL_SIZE_Y; sy++, srcY++)\n"
+"{\n"
+"data[sy + sy_index] = (WT)(0);\n"
+"}\n"
+"}\n"
+"#else\n"
+"EXTRAPOLATE(srcX, srcBeginX, srcEndX);\n"
+"for (int sy = 0, sy_index = 0; sy < KERNEL_SIZE_Y; sy++, srcY++)\n"
+"{\n"
+"int tempY = srcY;\n"
+"EXTRAPOLATE(tempY, srcBeginY, srcEndY);\n"
+"data[sy + sy_index] = convertToWT(loadpix(srcptr + mad24(tempY, src_step, srcX * SRCSIZE)));\n"
+"}\n"
+"#endif\n"
+"WT total_sum = 0;\n"
+"for (int sx = 0; sx < ANCHOR_X; sx++)\n"
+"{\n"
+"UPDATE_COLUMN_SUM(sx);\n"
+"UPDATE_TOTAL_SUM(sx);\n"
+"}\n"
+"__constant WT1 * k = &kernelData[KERNEL_SIZE_Y2_ALIGNED * ANCHOR_X];\n"
+"for (int sy = 0; sy < KERNEL_SIZE_Y; sy++)\n"
+"total_sum += data[sy] * k[sy];\n"
+"for (int sx = ANCHOR_X + 1; sx < KERNEL_SIZE_X; sx++)\n"
+"{\n"
+"UPDATE_COLUMN_SUM(sx);\n"
+"UPDATE_TOTAL_SUM(sx);\n"
+"}\n"
+"if (local_id >= ANCHOR_X && local_id < LOCAL_SIZE - (KERNEL_SIZE_X - 1 - ANCHOR_X) && x >= 0 && x < cols)\n"
+"storepix(convertToDstT(total_sum + (WT)(delta)), dst);\n"
+"}\n"
+, "77e935928055f243ff9082b1879a0b2c"};
+ProgramSource filter2D_oclsrc(filter2D.programStr);
+const struct ProgramEntry filter2DSmall={"filter2DSmall",
+"#ifdef BORDER_REPLICATE\n"
+"#define ADDR_L(i, l_edge, r_edge) ((i) < (l_edge) ? (l_edge) : (i))\n"
+"#define ADDR_R(i, r_edge, addr) ((i) >= (r_edge) ? (r_edge)-1 : (addr))\n"
+"#define ADDR_H(i, t_edge, b_edge) ((i) < (t_edge) ? (t_edge) :(i))\n"
+"#define ADDR_B(i, b_edge, addr) ((i) >= (b_edge) ? (b_edge)-1 :(addr))\n"
+"#endif\n"
+"#ifdef BORDER_REFLECT\n"
+"#define ADDR_L(i, l_edge, r_edge) ((i) < (l_edge) ? -(i)-1 : (i))\n"
+"#define ADDR_R(i, r_edge, addr) ((i) >= (r_edge) ? -(i)-1+((r_edge)<<1) : (addr))\n"
+"#define ADDR_H(i, t_edge, b_edge) ((i) < (t_edge) ? -(i)-1 : (i))\n"
+"#define ADDR_B(i, b_edge, addr) ((i) >= (b_edge) ? -(i)-1+((b_edge)<<1) : (addr))\n"
+"#endif\n"
+"#ifdef BORDER_REFLECT_101\n"
+"#define ADDR_L(i, l_edge, r_edge) ((i) < (l_edge) ? -(i) : (i))\n"
+"#define ADDR_R(i, r_edge, addr) ((i) >= (r_edge) ? -(i)-2+((r_edge)<<1) : (addr))\n"
+"#define ADDR_H(i, t_edge, b_edge) ((i) < (t_edge) ? -(i) : (i))\n"
+"#define ADDR_B(i, b_edge, addr) ((i) >= (b_edge) ? -(i)-2+((b_edge)<<1) : (addr))\n"
+"#endif\n"
+"#ifdef BORDER_WRAP\n"
+"#define ADDR_L(i, l_edge, r_edge) ((i) < (l_edge) ? (i)+(r_edge) : (i))\n"
+"#define ADDR_R(i, r_edge, addr) ((i) >= (r_edge) ? (i)-(r_edge) : (addr))\n"
+"#define ADDR_H(i, t_edge, b_edge) ((i) < (t_edge) ? (i)+(b_edge) : (i))\n"
+"#define ADDR_B(i, b_edge, addr) ((i) >= (b_edge) ? (i)-(b_edge) : (addr))\n"
+"#endif\n"
+"#ifdef BORDER_ISOLATED\n"
+"#define ISOLATED_MIN(VAL) (VAL)\n"
+"#else\n"
+"#define ISOLATED_MIN(VAL) 0\n"
+"#endif\n"
+"#ifdef EXTRA_EXTRAPOLATION\n"
+"#ifdef BORDER_CONSTANT\n"
+"#elif defined BORDER_REPLICATE\n"
+"#define EXTRAPOLATE(x, y, minX, minY, maxX, maxY) \\\n"
+"{ \\\n"
+"x = max(min(x, maxX - 1), minX); \\\n"
+"y = max(min(y, maxY - 1), minY); \\\n"
+"}\n"
+"#elif defined BORDER_WRAP\n"
+"#define EXTRAPOLATE(x, y, minX, minY, maxX, maxY) \\\n"
+"{ \\\n"
+"if (x < minX) \\\n"
+"x -= ((x - maxX + 1) / maxX) * maxX; \\\n"
+"if (x >= maxX) \\\n"
+"x %= maxX; \\\n"
+"if (y < minY) \\\n"
+"y -= ((y - maxY + 1) / maxY) * maxY; \\\n"
+"if (y >= maxY) \\\n"
+"y %= maxY; \\\n"
+"}\n"
+"#elif defined(BORDER_REFLECT) || defined(BORDER_REFLECT_101)\n"
+"#define EXTRAPOLATE_(x, y, minX, minY, maxX, maxY, delta) \\\n"
+"{ \\\n"
+"if (maxX - minX == 1) \\\n"
+"x = minX; \\\n"
+"else \\\n"
+"do \\\n"
+"{ \\\n"
+"if (x < minX) \\\n"
+"x = minX - (x - minX) - 1 + delta; \\\n"
+"else \\\n"
+"x = maxX - 1 - (x - maxX) - delta; \\\n"
+"} \\\n"
+"while (x >= maxX || x < minX); \\\n"
+"\\\n"
+"if (maxY - minY == 1) \\\n"
+"y = minY; \\\n"
+"else \\\n"
+"do \\\n"
+"{ \\\n"
+"if (y < minY) \\\n"
+"y = minY - (y - minY) - 1 + delta; \\\n"
+"else \\\n"
+"y = maxY - 1 - (y - maxY) - delta; \\\n"
+"} \\\n"
+"while (y >= maxY || y < minY); \\\n"
+"}\n"
+"#ifdef BORDER_REFLECT\n"
+"#define EXTRAPOLATE(x, y, minX, minY, maxX, maxY) EXTRAPOLATE_(x, y, minX, minY, maxX, maxY, 0)\n"
+"#elif defined(BORDER_REFLECT_101) || defined(BORDER_REFLECT101)\n"
+"#define EXTRAPOLATE(x, y, minX, minY, maxX, maxY) EXTRAPOLATE_(x, y, minX, minY, maxX, maxY, 1)\n"
+"#endif\n"
+"#else\n"
+"#error No extrapolation method\n"
+"#endif\n"
+"#else\n"
+"#define EXTRAPOLATE(x, y, minX, minY, maxX, maxY) \\\n"
+"{ \\\n"
+"int _row = y - ISOLATED_MIN(minY), _col = x - ISOLATED_MIN(minX); \\\n"
+"_row = ADDR_H(_row, 0, maxY - ISOLATED_MIN(minY)); \\\n"
+"_row = ADDR_B(_row, maxY - ISOLATED_MIN(minY), _row); \\\n"
+"y = _row + ISOLATED_MIN(minY); \\\n"
+"\\\n"
+"_col = ADDR_L(_col, 0, maxX - ISOLATED_MIN(minX)); \\\n"
+"_col = ADDR_R(_col, maxX - ISOLATED_MIN(minX), _col); \\\n"
+"x = _col + ISOLATED_MIN(minX); \\\n"
+"}\n"
+"#endif\n"
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const srcT *)(addr)\n"
+"#define storepix(val, addr) *(__global dstT *)(addr) = val\n"
+"#define SRCSIZE (int)sizeof(srcT)\n"
+"#define DSTSIZE (int)sizeof(dstT)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const srcT1 *)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global dstT1 *)(addr))\n"
+"#define SRCSIZE (int)sizeof(srcT1) * cn\n"
+"#define DSTSIZE (int)sizeof(dstT1) * cn\n"
+"#endif\n"
+"#define noconvert\n"
+"struct RectCoords\n"
+"{\n"
+"int x1, y1, x2, y2;\n"
+"};\n"
+"#ifdef BORDER_ISOLATED\n"
+"inline bool isBorder(const struct RectCoords bounds, int2 coord, int numPixels)\n"
+"{\n"
+"return (coord.x < bounds.x1 || coord.y < bounds.y1 || coord.x + numPixels > bounds.x2 || coord.y >= bounds.y2);\n"
+"}\n"
+"#else\n"
+"inline bool isBorder(const struct RectCoords bounds, int2 coord, int numPixels)\n"
+"{\n"
+"return (coord.x < 0 || coord.y < 0 || coord.x + numPixels > bounds.x2 || coord.y >= bounds.y2);\n"
+"}\n"
+"#endif\n"
+"inline WT getBorderPixel(const struct RectCoords bounds, int2 coord,\n"
+"__global const uchar* srcptr, int srcstep)\n"
+"{\n"
+"#ifdef BORDER_CONSTANT\n"
+"return (WT)(0);\n"
+"#else\n"
+"int selected_col = coord.x;\n"
+"int selected_row = coord.y;\n"
+"EXTRAPOLATE(selected_col, selected_row,\n"
+"bounds.x1, bounds.y1,\n"
+"bounds.x2, bounds.y2\n"
+");\n"
+"coord = (int2)(selected_col, selected_row);\n"
+"__global const uchar* ptr = srcptr + mul24(coord.y, srcstep) +\n"
+"coord.x * SRCSIZE;\n"
+"return convertToWT(loadpix(ptr));\n"
+"#endif\n"
+"}\n"
+"inline WT readSrcPixelSingle(int2 pos, __global const uchar* srcptr,\n"
+"int srcstep, const struct RectCoords srcCoords)\n"
+"{\n"
+"if (!isBorder(srcCoords, pos, 1))\n"
+"{\n"
+"__global const uchar* ptr = srcptr + mul24(pos.y, srcstep) +\n"
+"pos.x * SRCSIZE;\n"
+"return convertToWT(loadpix(ptr));\n"
+"}\n"
+"else\n"
+"{\n"
+"return getBorderPixel(srcCoords, pos, srcptr, srcstep);\n"
+"}\n"
+"}\n"
+"#define __CAT(x, y) x##y\n"
+"#define CAT(x, y) __CAT(x, y)\n"
+"#define vload1(OFFSET, PTR) (*(PTR + OFFSET))\n"
+"#define PX_LOAD_VEC_TYPE CAT(srcT1, PX_LOAD_VEC_SIZE)\n"
+"#define PX_LOAD_FLOAT_VEC_TYPE CAT(WT1, PX_LOAD_VEC_SIZE)\n"
+"#if PX_LOAD_VEC_SIZE == 1\n"
+"#define PX_LOAD_FLOAT_VEC_CONV (float)\n"
+"#elif PX_LOAD_VEC_SIZE == 2\n"
+"#define PX_LOAD_FLOAT_VEC_CONV convert_float2\n"
+"#elif PX_LOAD_VEC_SIZE == 3\n"
+"#define PX_LOAD_FLOAT_VEC_CONV convert_float3\n"
+"#elif PX_LOAD_VEC_SIZE == 4\n"
+"#define PX_LOAD_FLOAT_VEC_CONV convert_float4\n"
+"#endif\n"
+"#define PX_LOAD CAT(vload, PX_LOAD_VEC_SIZE)\n"
+"#define float1 float\n"
+"inline PX_LOAD_FLOAT_VEC_TYPE readSrcPixelGroup(int2 pos, __global const uchar* srcptr,\n"
+"int srcstep, const struct RectCoords srcCoords)\n"
+"{\n"
+"__global const srcT1* ptr = (__global const srcT1*)\n"
+"(srcptr + mul24(pos.y, srcstep) +\n"
+"pos.x * SRCSIZE);\n"
+"return PX_LOAD_FLOAT_VEC_CONV(PX_LOAD(0, ptr));\n"
+"}\n"
+"#define LOOP1(VAR, STMT) (STMT); (VAR)++;\n"
+"#define LOOP2(VAR, STMT) LOOP1(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP3(VAR, STMT) LOOP2(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP4(VAR, STMT) LOOP3(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP5(VAR, STMT) LOOP4(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP6(VAR, STMT) LOOP5(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP7(VAR, STMT) LOOP6(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP8(VAR, STMT) LOOP7(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP9(VAR, STMT) LOOP8(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP10(VAR, STMT) LOOP9(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP11(VAR, STMT) LOOP10(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP12(VAR, STMT) LOOP11(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP13(VAR, STMT) LOOP12(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP(N, VAR, STMT) CAT(LOOP, N)((VAR), (STMT))\n"
+"#define DIG(a) a,\n"
+"__constant WT1 kernelData[] = { COEFF };\n"
+"__kernel void filter2DSmall(__global const uchar * srcptr, int src_step, int srcOffsetX, int srcOffsetY, int srcEndX, int srcEndY,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int rows, int cols, float delta)\n"
+"{\n"
+"const struct RectCoords srcCoords = { srcOffsetX, srcOffsetY, srcEndX, srcEndY };\n"
+"const int startX = get_global_id(0) * PX_PER_WI_X;\n"
+"const int startY = get_global_id(1) * PX_PER_WI_Y;\n"
+"if ((startX >= cols) || (startY >= rows))\n"
+"{\n"
+"return;\n"
+"}\n"
+"WT privateData[PX_PER_WI_Y + KERNEL_SIZE_Y - 1][PRIV_DATA_WIDTH];\n"
+"int py = 0;\n"
+"LOOP(PX_LOAD_Y_ITERATIONS, py,\n"
+"{\n"
+"int y = startY + py;\n"
+"int px = 0;\n"
+"LOOP(PX_LOAD_X_ITERATIONS, px,\n"
+"{\n"
+"int x = startX + (px * PX_LOAD_NUM_PX);\n"
+"int2 srcPos = (int2)(srcCoords.x1 + x - ANCHOR_X, srcCoords.y1 + y - ANCHOR_Y);\n"
+"if (!isBorder(srcCoords, srcPos, PX_LOAD_NUM_PX))\n"
+"{\n"
+"PX_LOAD_FLOAT_VEC_TYPE p = readSrcPixelGroup(srcPos, srcptr, src_step, srcCoords);\n"
+"*((PX_LOAD_FLOAT_VEC_TYPE*)&privateData[py][px * PX_LOAD_NUM_PX]) = p;\n"
+"}\n"
+"else\n"
+"{\n"
+"int lx = 0;\n"
+"LOOP(PX_LOAD_NUM_PX, lx,\n"
+"{\n"
+"WT p = readSrcPixelSingle(srcPos, srcptr, src_step, srcCoords);\n"
+"*((WT*)&privateData[py][px * PX_LOAD_NUM_PX + lx]) = p;\n"
+"srcPos.x++;\n"
+"});\n"
+"}\n"
+"});\n"
+"});\n"
+"py = 0;\n"
+"LOOP(PX_PER_WI_Y, py,\n"
+"{\n"
+"int y = startY + py;\n"
+"int px = 0;\n"
+"LOOP(PX_PER_WI_X, px,\n"
+"{\n"
+"int x = startX + px;\n"
+"WT total_sum = 0;\n"
+"int sy = 0;\n"
+"int kernelIndex = 0;\n"
+"LOOP(KERNEL_SIZE_Y, sy,\n"
+"{\n"
+"int sx = 0;\n"
+"LOOP(KERNEL_SIZE_X, sx,\n"
+"{\n"
+"total_sum = mad(kernelData[kernelIndex++], privateData[py + sy][px + sx], total_sum);\n"
+"});\n"
+"});\n"
+"__global dstT* dstPtr = (__global dstT*)(dstptr + y * dst_step + dst_offset + x * DSTSIZE);\n"
+"storepix(convertToDstT(total_sum + (WT)(delta)), dstPtr);\n"
+"});\n"
+"});\n"
+"}\n"
+, "030d23b1d64d51e6485f8941af1e3fc3"};
+ProgramSource filter2DSmall_oclsrc(filter2DSmall.programStr);
+const struct ProgramEntry filterSepCol={"filterSepCol",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#define READ_TIMES_COL ((2*(RADIUSY+LSIZE1)-1)/LSIZE1)\n"
+"#define RADIUS 1\n"
+"#define noconvert\n"
+"#if CN != 3\n"
+"#define loadpix(addr) *(__global const srcT *)(addr)\n"
+"#define storepix(val, addr) *(__global dstT *)(addr) = val\n"
+"#define SRCSIZE (int)sizeof(srcT)\n"
+"#define DSTSIZE (int)sizeof(dstT)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const srcT1 *)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global dstT1 *)(addr))\n"
+"#define SRCSIZE (int)sizeof(srcT1)*3\n"
+"#define DSTSIZE (int)sizeof(dstT1)*3\n"
+"#endif\n"
+"#define DIG(a) a,\n"
+"__constant srcT1 mat_kernel[] = { COEFF };\n"
+"__kernel void col_filter(__global const uchar * src, int src_step, int src_offset, int src_whole_rows, int src_whole_cols,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols, float delta)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"int l_x = get_local_id(0);\n"
+"int l_y = get_local_id(1);\n"
+"int start_addr = mad24(y, src_step, x * SRCSIZE);\n"
+"int end_addr = mad24(src_whole_rows - 1, src_step, src_whole_cols * SRCSIZE);\n"
+"srcT sum, temp[READ_TIMES_COL];\n"
+"__local srcT LDS_DAT[LSIZE1 * READ_TIMES_COL][LSIZE0 + 1];\n"
+"for (int i = 0; i < READ_TIMES_COL; ++i)\n"
+"{\n"
+"int current_addr = mad24(i, LSIZE1 * src_step, start_addr);\n"
+"current_addr = current_addr < end_addr ? current_addr : 0;\n"
+"temp[i] = loadpix(src + current_addr);\n"
+"}\n"
+"for (int i = 0; i < READ_TIMES_COL; ++i)\n"
+"LDS_DAT[mad24(i, LSIZE1, l_y)][l_x] = temp[i];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"sum = LDS_DAT[l_y + RADIUSY][l_x] * mat_kernel[RADIUSY];\n"
+"for (int i = 1; i <= RADIUSY; ++i)\n"
+"{\n"
+"temp[0] = LDS_DAT[l_y + RADIUSY - i][l_x];\n"
+"temp[1] = LDS_DAT[l_y + RADIUSY + i][l_x];\n"
+"#if (defined(INTEGER_ARITHMETIC) && !INTEL_DEVICE)\n"
+"sum += mad24(temp[0],mat_kernel[RADIUSY - i], temp[1] * mat_kernel[RADIUSY + i]);\n"
+"#else\n"
+"sum += mad(temp[0], mat_kernel[RADIUSY - i], temp[1] * mat_kernel[RADIUSY + i]);\n"
+"#endif\n"
+"}\n"
+"#ifdef INTEGER_ARITHMETIC\n"
+"#ifdef INTEL_DEVICE\n"
+"sum = (sum + (1 << (SHIFT_BITS-1))) / (1 << SHIFT_BITS);\n"
+"#else\n"
+"sum = (sum + (1 << (SHIFT_BITS-1))) >> SHIFT_BITS;\n"
+"#endif\n"
+"#endif\n"
+"if (x < dst_cols && y < dst_rows)\n"
+"{\n"
+"start_addr = mad24(y, dst_step, mad24(DSTSIZE, x, dst_offset));\n"
+"storepix(convertToDstT(sum + (srcT)(delta)), dst + start_addr);\n"
+"}\n"
+"}\n"
+, "83a29b40287a01ffdb496951c71bc7cd"};
+ProgramSource filterSepCol_oclsrc(filterSepCol.programStr);
+const struct ProgramEntry filterSepRow={"filterSepRow",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#define READ_TIMES_ROW ((2*(RADIUSX+LSIZE0)-1)/LSIZE0)\n"
+"#define RADIUS 1\n"
+"#ifdef BORDER_REPLICATE\n"
+"#define ADDR_L(i, l_edge, r_edge) ((i) < (l_edge) ? (l_edge) : (i))\n"
+"#define ADDR_R(i, r_edge, addr) ((i) >= (r_edge) ? (r_edge)-1 : (addr))\n"
+"#endif\n"
+"#ifdef BORDER_REFLECT\n"
+"#define ADDR_L(i, l_edge, r_edge) ((i) < (l_edge) ? -(i)-1 : (i))\n"
+"#define ADDR_R(i, r_edge, addr) ((i) >= (r_edge) ? -(i)-1+((r_edge)<<1) : (addr))\n"
+"#endif\n"
+"#ifdef BORDER_REFLECT_101\n"
+"#define ADDR_L(i, l_edge, r_edge) ((i) < (l_edge) ? -(i) : (i))\n"
+"#define ADDR_R(i, r_edge, addr) ((i) >= (r_edge) ? -(i)-2+((r_edge)<<1) : (addr))\n"
+"#endif\n"
+"#ifdef BORDER_WRAP\n"
+"#define ADDR_L(i, l_edge, r_edge) ((i) < (l_edge) ? (i)+(r_edge) : (i))\n"
+"#define ADDR_R(i, r_edge, addr) ((i) >= (r_edge) ? (i)-(r_edge) : (addr))\n"
+"#endif\n"
+"#ifdef EXTRA_EXTRAPOLATION\n"
+"#ifdef BORDER_CONSTANT\n"
+"#define ELEM(i,l_edge,r_edge,elem1,elem2) (i)<(l_edge) | (i) >= (r_edge) ? (elem1) : (elem2)\n"
+"#elif defined BORDER_REPLICATE\n"
+"#define EXTRAPOLATE(t, minT, maxT) \\\n"
+"{ \\\n"
+"t = max(min(t, (maxT) - 1), (minT)); \\\n"
+"}\n"
+"#elif defined BORDER_WRAP\n"
+"#define EXTRAPOLATE(x, minT, maxT) \\\n"
+"{ \\\n"
+"if (t < (minT)) \\\n"
+"t -= ((t - (maxT) + 1) / (maxT)) * (maxT); \\\n"
+"if (t >= (maxT)) \\\n"
+"t %= (maxT); \\\n"
+"}\n"
+"#elif defined(BORDER_REFLECT) || defined(BORDER_REFLECT_101)\n"
+"#define EXTRAPOLATE_(t, minT, maxT, delta) \\\n"
+"{ \\\n"
+"if ((maxT) - (minT) == 1) \\\n"
+"t = (minT); \\\n"
+"else \\\n"
+"do \\\n"
+"{ \\\n"
+"if (t < (minT)) \\\n"
+"t = (minT) - (t - (minT)) - 1 + delta; \\\n"
+"else \\\n"
+"t = (maxT) - 1 - (t - (maxT)) - delta; \\\n"
+"} \\\n"
+"while (t >= (maxT) || t < (minT)); \\\n"
+"\\\n"
+"}\n"
+"#ifdef BORDER_REFLECT\n"
+"#define EXTRAPOLATE(t, minT, maxT) EXTRAPOLATE_(t, minT, maxT, 0)\n"
+"#elif defined(BORDER_REFLECT_101)\n"
+"#define EXTRAPOLATE(t, minT, maxT) EXTRAPOLATE_(t, minT, maxT, 1)\n"
+"#endif\n"
+"#else\n"
+"#error No extrapolation method\n"
+"#endif\n"
+"#else\n"
+"#ifdef BORDER_CONSTANT\n"
+"#define ELEM(i,l_edge,r_edge,elem1,elem2) (i)<(l_edge) | (i) >= (r_edge) ? (elem1) : (elem2)\n"
+"#else\n"
+"#define EXTRAPOLATE(t, minT, maxT) \\\n"
+"{ \\\n"
+"int _delta = t - (minT); \\\n"
+"_delta = ADDR_L(_delta, 0, (maxT) - (minT)); \\\n"
+"_delta = ADDR_R(_delta, (maxT) - (minT), _delta); \\\n"
+"t = _delta + (minT); \\\n"
+"}\n"
+"#endif\n"
+"#endif\n"
+"#define noconvert\n"
+"#if CN != 3\n"
+"#define loadpix(addr) *(__global const srcT *)(addr)\n"
+"#define storepix(val, addr) *(__global dstT *)(addr) = val\n"
+"#define SRCSIZE (int)sizeof(srcT)\n"
+"#define DSTSIZE (int)sizeof(dstT)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const srcT1 *)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global dstT1 *)(addr))\n"
+"#define SRCSIZE (int)sizeof(srcT1)*3\n"
+"#define DSTSIZE (int)sizeof(dstT1)*3\n"
+"#endif\n"
+"#define DIG(a) a,\n"
+"__constant dstT1 mat_kernel[] = { COEFF };\n"
+"#if (defined(INTEGER_ARITHMETIC) && !INTEL_DEVICE)\n"
+"#define dstT4 int4\n"
+"#define convertDstVec convert_int4\n"
+"#else\n"
+"#define dstT4 float4\n"
+"#define convertDstVec convert_float4\n"
+"#endif\n"
+"__kernel void row_filter_C1_D0(__global const uchar * src, int src_step_in_pixel, int src_offset_x, int src_offset_y,\n"
+"int src_cols, int src_rows, int src_whole_cols, int src_whole_rows,\n"
+"__global float * dst, int dst_step_in_pixel, int dst_cols, int dst_rows,\n"
+"int radiusy)\n"
+"{\n"
+"int x = get_global_id(0)<<2;\n"
+"int y = get_global_id(1);\n"
+"int l_x = get_local_id(0);\n"
+"int l_y = get_local_id(1);\n"
+"int start_x = x + src_offset_x - RADIUSX & 0xfffffffc;\n"
+"int offset = src_offset_x - RADIUSX & 3;\n"
+"int start_y = y + src_offset_y - radiusy;\n"
+"int start_addr = mad24(start_y, src_step_in_pixel, start_x);\n"
+"dstT4 sum;\n"
+"uchar4 temp[READ_TIMES_ROW];\n"
+"__local uchar4 LDS_DAT[LSIZE1][READ_TIMES_ROW * LSIZE0 + 1];\n"
+"#ifdef BORDER_CONSTANT\n"
+"int end_addr = mad24(src_whole_rows - 1, src_step_in_pixel, src_whole_cols);\n"
+"for (int i = 0; i < READ_TIMES_ROW; ++i)\n"
+"{\n"
+"int current_addr = mad24(i, LSIZE0 << 2, start_addr);\n"
+"current_addr = current_addr < end_addr && current_addr > 0 ? current_addr : 0;\n"
+"temp[i] = *(__global const uchar4 *)&src[current_addr];\n"
+"}\n"
+"#ifdef BORDER_ISOLATED\n"
+"for (int i = 0; i < READ_TIMES_ROW; ++i)\n"
+"{\n"
+"temp[i].x = ELEM(start_x+i*LSIZE0*4, src_offset_x, src_offset_x + src_cols, 0, temp[i].x);\n"
+"temp[i].y = ELEM(start_x+i*LSIZE0*4+1, src_offset_x, src_offset_x + src_cols, 0, temp[i].y);\n"
+"temp[i].z = ELEM(start_x+i*LSIZE0*4+2, src_offset_x, src_offset_x + src_cols, 0, temp[i].z);\n"
+"temp[i].w = ELEM(start_x+i*LSIZE0*4+3, src_offset_x, src_offset_x + src_cols, 0, temp[i].w);\n"
+"temp[i] = ELEM(start_y, src_offset_y, src_offset_y + src_rows, (uchar4)0, temp[i]);\n"
+"}\n"
+"#else\n"
+"for (int i = 0; i < READ_TIMES_ROW; ++i)\n"
+"{\n"
+"temp[i].x = ELEM(start_x+i*LSIZE0*4, 0, src_whole_cols, 0, temp[i].x);\n"
+"temp[i].y = ELEM(start_x+i*LSIZE0*4+1, 0, src_whole_cols, 0, temp[i].y);\n"
+"temp[i].z = ELEM(start_x+i*LSIZE0*4+2, 0, src_whole_cols, 0, temp[i].z);\n"
+"temp[i].w = ELEM(start_x+i*LSIZE0*4+3, 0, src_whole_cols, 0, temp[i].w);\n"
+"temp[i] = ELEM(start_y, 0, src_whole_rows, (uchar4)0, temp[i]);\n"
+"}\n"
+"#endif\n"
+"#else\n"
+"#ifdef BORDER_ISOLATED\n"
+"int not_all_in_range = (start_x<src_offset_x) | (start_x + READ_TIMES_ROW*LSIZE0*4+4>src_offset_x + src_cols)| (start_y<src_offset_y) | (start_y >= src_offset_y + src_rows);\n"
+"#else\n"
+"int not_all_in_range = (start_x<0) | (start_x + READ_TIMES_ROW*LSIZE0*4+4>src_whole_cols)| (start_y<0) | (start_y >= src_whole_rows);\n"
+"#endif\n"
+"int4 index[READ_TIMES_ROW], addr;\n"
+"int s_y;\n"
+"if (not_all_in_range)\n"
+"{\n"
+"for (int i = 0; i < READ_TIMES_ROW; ++i)\n"
+"{\n"
+"index[i] = (int4)(mad24(i, LSIZE0 << 2, start_x)) + (int4)(0, 1, 2, 3);\n"
+"#ifdef BORDER_ISOLATED\n"
+"EXTRAPOLATE(index[i].x, src_offset_x, src_offset_x + src_cols);\n"
+"EXTRAPOLATE(index[i].y, src_offset_x, src_offset_x + src_cols);\n"
+"EXTRAPOLATE(index[i].z, src_offset_x, src_offset_x + src_cols);\n"
+"EXTRAPOLATE(index[i].w, src_offset_x, src_offset_x + src_cols);\n"
+"#else\n"
+"EXTRAPOLATE(index[i].x, 0, src_whole_cols);\n"
+"EXTRAPOLATE(index[i].y, 0, src_whole_cols);\n"
+"EXTRAPOLATE(index[i].z, 0, src_whole_cols);\n"
+"EXTRAPOLATE(index[i].w, 0, src_whole_cols);\n"
+"#endif\n"
+"}\n"
+"s_y = start_y;\n"
+"#ifdef BORDER_ISOLATED\n"
+"EXTRAPOLATE(s_y, src_offset_y, src_offset_y + src_rows);\n"
+"#else\n"
+"EXTRAPOLATE(s_y, 0, src_whole_rows);\n"
+"#endif\n"
+"for (int i = 0; i < READ_TIMES_ROW; ++i)\n"
+"{\n"
+"addr = mad24((int4)s_y, (int4)src_step_in_pixel, index[i]);\n"
+"temp[i].x = src[addr.x];\n"
+"temp[i].y = src[addr.y];\n"
+"temp[i].z = src[addr.z];\n"
+"temp[i].w = src[addr.w];\n"
+"}\n"
+"}\n"
+"else\n"
+"{\n"
+"for (int i = 0; i < READ_TIMES_ROW; ++i)\n"
+"temp[i] = *(__global uchar4*)&src[mad24(i, LSIZE0 << 2, start_addr)];\n"
+"}\n"
+"#endif\n"
+"for (int i = 0; i < READ_TIMES_ROW; ++i)\n"
+"LDS_DAT[l_y][mad24(i, LSIZE0, l_x)] = temp[i];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"sum = convertDstVec(vload4(0,(__local uchar *)&LDS_DAT[l_y][l_x]+RADIUSX+offset)) * mat_kernel[RADIUSX];\n"
+"for (int i = 1; i <= RADIUSX; ++i)\n"
+"{\n"
+"temp[0] = vload4(0, (__local uchar*)&LDS_DAT[l_y][l_x] + RADIUSX + offset - i);\n"
+"temp[1] = vload4(0, (__local uchar*)&LDS_DAT[l_y][l_x] + RADIUSX + offset + i);\n"
+"#if (defined(INTEGER_ARITHMETIC) && !INTEL_DEVICE)\n"
+"sum += mad24(convertDstVec(temp[0]), mat_kernel[RADIUSX-i], convertDstVec(temp[1]) * mat_kernel[RADIUSX + i]);\n"
+"#else\n"
+"sum += mad(convertDstVec(temp[0]), mat_kernel[RADIUSX-i], convertDstVec(temp[1]) * mat_kernel[RADIUSX + i]);\n"
+"#endif\n"
+"}\n"
+"start_addr = mad24(y, dst_step_in_pixel, x);\n"
+"if ((x+3<dst_cols) & (y<dst_rows))\n"
+"*(__global dstT4*)&dst[start_addr] = sum;\n"
+"else if ((x+2<dst_cols) && (y<dst_rows))\n"
+"{\n"
+"dst[start_addr] = sum.x;\n"
+"dst[start_addr+1] = sum.y;\n"
+"dst[start_addr+2] = sum.z;\n"
+"}\n"
+"else if ((x+1<dst_cols) && (y<dst_rows))\n"
+"{\n"
+"dst[start_addr] = sum.x;\n"
+"dst[start_addr+1] = sum.y;\n"
+"}\n"
+"else if (x<dst_cols && y<dst_rows)\n"
+"dst[start_addr] = sum.x;\n"
+"}\n"
+"__kernel void row_filter(__global const uchar * src, int src_step, int src_offset_x, int src_offset_y,\n"
+"int src_cols, int src_rows, int src_whole_cols, int src_whole_rows,\n"
+"__global uchar * dst, int dst_step, int dst_cols, int dst_rows,\n"
+"int radiusy)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"int l_x = get_local_id(0);\n"
+"int l_y = get_local_id(1);\n"
+"int start_x = x + src_offset_x - RADIUSX;\n"
+"int start_y = y + src_offset_y - radiusy;\n"
+"int start_addr = mad24(start_y, src_step, start_x * SRCSIZE);\n"
+"dstT sum;\n"
+"srcT temp[READ_TIMES_ROW];\n"
+"__local srcT LDS_DAT[LSIZE1][READ_TIMES_ROW * LSIZE0 + 1];\n"
+"#ifdef BORDER_CONSTANT\n"
+"int end_addr = mad24(src_whole_rows - 1, src_step, src_whole_cols * SRCSIZE);\n"
+"for (int i = 0; i < READ_TIMES_ROW; i++)\n"
+"{\n"
+"int current_addr = mad24(i, LSIZE0 * SRCSIZE, start_addr);\n"
+"current_addr = current_addr < end_addr && current_addr >= 0 ? current_addr : 0;\n"
+"temp[i] = loadpix(src + current_addr);\n"
+"}\n"
+"#ifdef BORDER_ISOLATED\n"
+"for (int i = 0; i < READ_TIMES_ROW; ++i)\n"
+"{\n"
+"temp[i] = ELEM(mad24(i, LSIZE0, start_x), src_offset_x, src_offset_x + src_cols, (srcT)(0), temp[i]);\n"
+"temp[i] = ELEM(start_y, src_offset_y, src_offset_y + src_rows, (srcT)(0), temp[i]);\n"
+"}\n"
+"#else\n"
+"for (int i = 0; i < READ_TIMES_ROW; ++i)\n"
+"{\n"
+"temp[i] = ELEM(mad24(i, LSIZE0, start_x), 0, src_whole_cols, (srcT)(0), temp[i]);\n"
+"temp[i] = ELEM(start_y, 0, src_whole_rows, (srcT)(0), temp[i]);\n"
+"}\n"
+"#endif\n"
+"#else\n"
+"int index[READ_TIMES_ROW], s_x, s_y;\n"
+"for (int i = 0; i < READ_TIMES_ROW; ++i)\n"
+"{\n"
+"s_x = mad24(i, LSIZE0, start_x);\n"
+"s_y = start_y;\n"
+"#ifdef BORDER_ISOLATED\n"
+"EXTRAPOLATE(s_x, src_offset_x, src_offset_x + src_cols);\n"
+"EXTRAPOLATE(s_y, src_offset_y, src_offset_y + src_rows);\n"
+"#else\n"
+"EXTRAPOLATE(s_x, 0, src_whole_cols);\n"
+"EXTRAPOLATE(s_y, 0, src_whole_rows);\n"
+"#endif\n"
+"index[i] = mad24(s_y, src_step, s_x * SRCSIZE);\n"
+"}\n"
+"for (int i = 0; i < READ_TIMES_ROW; ++i)\n"
+"temp[i] = loadpix(src + index[i]);\n"
+"#endif\n"
+"for (int i = 0; i < READ_TIMES_ROW; ++i)\n"
+"LDS_DAT[l_y][mad24(i, LSIZE0, l_x)] = temp[i];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"sum = convertToDstT(LDS_DAT[l_y][l_x + RADIUSX]) * mat_kernel[RADIUSX];\n"
+"for (int i = 1; i <= RADIUSX; ++i)\n"
+"{\n"
+"temp[0] = LDS_DAT[l_y][l_x + RADIUSX - i];\n"
+"temp[1] = LDS_DAT[l_y][l_x + RADIUSX + i];\n"
+"#if (defined(INTEGER_ARITHMETIC) && !INTEL_DEVICE)\n"
+"sum += mad24(convertToDstT(temp[0]), mat_kernel[RADIUSX - i], convertToDstT(temp[1]) * mat_kernel[RADIUSX + i]);\n"
+"#else\n"
+"sum += mad(convertToDstT(temp[0]), mat_kernel[RADIUSX - i], convertToDstT(temp[1]) * mat_kernel[RADIUSX + i]);\n"
+"#endif\n"
+"}\n"
+"if (x < dst_cols && y < dst_rows)\n"
+"{\n"
+"start_addr = mad24(y, dst_step, x * DSTSIZE);\n"
+"storepix(sum, dst + start_addr);\n"
+"}\n"
+"}\n"
+, "e99b92fca8604fe253f3c641802ce117"};
+ProgramSource filterSepRow_oclsrc(filterSepRow.programStr);
+const struct ProgramEntry filterSep_singlePass={"filterSep_singlePass",
+"#ifdef BORDER_CONSTANT\n"
+"#define EXTRAPOLATE(x, maxV)\n"
+"#elif defined BORDER_REPLICATE\n"
+"#define EXTRAPOLATE(x, maxV) \\\n"
+"{ \\\n"
+"(x) = clamp((x), 0, (maxV)-1); \\\n"
+"}\n"
+"#elif defined BORDER_WRAP\n"
+"#define EXTRAPOLATE(x, maxV) \\\n"
+"{ \\\n"
+"(x) = ( (x) + (maxV) ) % (maxV); \\\n"
+"}\n"
+"#elif defined BORDER_REFLECT\n"
+"#define EXTRAPOLATE(x, maxV) \\\n"
+"{ \\\n"
+"(x) = min(((maxV)-1)*2-(x)+1, max((x),-(x)-1) ); \\\n"
+"}\n"
+"#elif defined BORDER_REFLECT_101 || defined BORDER_REFLECT101\n"
+"#define EXTRAPOLATE(x, maxV) \\\n"
+"{ \\\n"
+"(x) = min(((maxV)-1)*2-(x), max((x),-(x)) ); \\\n"
+"}\n"
+"#else\n"
+"#error No extrapolation method\n"
+"#endif\n"
+"#if CN != 3\n"
+"#define loadpix(addr) *(__global const srcT *)(addr)\n"
+"#define storepix(val, addr) *(__global dstT *)(addr) = val\n"
+"#define SRCSIZE (int)sizeof(srcT)\n"
+"#define DSTSIZE (int)sizeof(dstT)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const srcT1 *)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global dstT1 *)(addr))\n"
+"#define SRCSIZE (int)sizeof(srcT1)*3\n"
+"#define DSTSIZE (int)sizeof(dstT1)*3\n"
+"#endif\n"
+"#define SRC(_x,_y) convertToWT(loadpix(Src + mad24(_y, src_step, SRCSIZE * _x)))\n"
+"#ifdef BORDER_CONSTANT\n"
+"#define ELEM(_x,_y,r_edge,t_edge,const_v) (_x)<0 | (_x) >= (r_edge) | (_y)<0 | (_y) >= (t_edge) ? (const_v) : SRC((_x),(_y))\n"
+"#else\n"
+"#define ELEM(_x,_y,r_edge,t_edge,const_v) SRC((_x),(_y))\n"
+"#endif\n"
+"#define noconvert\n"
+"#define DIG(a) a,\n"
+"__constant WT1 mat_kernelX[] = { KERNEL_MATRIX_X };\n"
+"__constant WT1 mat_kernelY[] = { KERNEL_MATRIX_Y };\n"
+"__kernel void sep_filter(__global uchar* Src, int src_step, int srcOffsetX, int srcOffsetY, int height, int width,\n"
+"__global uchar* Dst, int dst_step, int dst_offset, int dst_rows, int dst_cols, float delta)\n"
+"{\n"
+"__local WT lsmem[BLK_Y + 2 * RADIUSY][BLK_X + 2 * RADIUSX];\n"
+"__local WT lsmemDy[BLK_Y][BLK_X + 2 * RADIUSX];\n"
+"int lix = get_local_id(0);\n"
+"int liy = get_local_id(1);\n"
+"int x = get_global_id(0);\n"
+"int srcX = x + srcOffsetX - RADIUSX;\n"
+"int clocY = liy;\n"
+"do\n"
+"{\n"
+"int yb = clocY + srcOffsetY - RADIUSY;\n"
+"EXTRAPOLATE(yb, (height));\n"
+"int clocX = lix;\n"
+"int cSrcX = srcX;\n"
+"do\n"
+"{\n"
+"int xb = cSrcX;\n"
+"EXTRAPOLATE(xb,(width));\n"
+"lsmem[clocY][clocX] = ELEM(xb, yb, (width), (height), 0 );\n"
+"clocX += BLK_X;\n"
+"cSrcX += BLK_X;\n"
+"}\n"
+"while(clocX < BLK_X+(RADIUSX*2));\n"
+"clocY += BLK_Y;\n"
+"}\n"
+"while (clocY < BLK_Y+(RADIUSY*2));\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"for (int y = 0; y < dst_rows; y+=BLK_Y)\n"
+"{\n"
+"int i, clocX = lix;\n"
+"WT sum = (WT) 0;\n"
+"do\n"
+"{\n"
+"sum = (WT) 0;\n"
+"for (i=0; i<=2*RADIUSY; i++)\n"
+"#if (defined(INTEGER_ARITHMETIC) && !INTEL_DEVICE)\n"
+"sum = mad24(lsmem[liy + i][clocX], mat_kernelY[i], sum);\n"
+"#else\n"
+"sum = mad(lsmem[liy + i][clocX], mat_kernelY[i], sum);\n"
+"#endif\n"
+"lsmemDy[liy][clocX] = sum;\n"
+"clocX += BLK_X;\n"
+"}\n"
+"while(clocX < BLK_X+(RADIUSX*2));\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if ((x < dst_cols) && (y + liy < dst_rows))\n"
+"{\n"
+"sum = 0.0f;\n"
+"for (i=0; i<=2*RADIUSX; i++)\n"
+"#if (defined(INTEGER_ARITHMETIC) && !INTEL_DEVICE)\n"
+"sum = mad24(lsmemDy[liy][lix+i], mat_kernelX[i], sum);\n"
+"#else\n"
+"sum = mad(lsmemDy[liy][lix+i], mat_kernelX[i], sum);\n"
+"#endif\n"
+"#ifdef INTEGER_ARITHMETIC\n"
+"#ifdef INTEL_DEVICE\n"
+"sum = (sum + (1 << (SHIFT_BITS-1))) / (1 << SHIFT_BITS);\n"
+"#else\n"
+"sum = (sum + (1 << (SHIFT_BITS-1))) >> SHIFT_BITS;\n"
+"#endif\n"
+"#endif\n"
+"storepix(convertToDstT(sum + (WT)(delta)), Dst + mad24(y + liy, dst_step, mad24(x, DSTSIZE, dst_offset)));\n"
+"}\n"
+"for (int i = liy * BLK_X + lix; i < (RADIUSY*2) * (BLK_X+(RADIUSX*2)); i += BLK_X * BLK_Y)\n"
+"{\n"
+"int clocX = i % (BLK_X+(RADIUSX*2));\n"
+"int clocY = i / (BLK_X+(RADIUSX*2));\n"
+"lsmem[clocY][clocX] = lsmem[clocY + BLK_Y][clocX];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"int yb = y + liy + BLK_Y + srcOffsetY + RADIUSY;\n"
+"EXTRAPOLATE(yb, (height));\n"
+"clocX = lix;\n"
+"int cSrcX = x + srcOffsetX - RADIUSX;\n"
+"do\n"
+"{\n"
+"int xb = cSrcX;\n"
+"EXTRAPOLATE(xb,(width));\n"
+"lsmem[liy + 2*RADIUSY][clocX] = ELEM(xb, yb, (width), (height), 0 );\n"
+"clocX += BLK_X;\n"
+"cSrcX += BLK_X;\n"
+"}\n"
+"while(clocX < BLK_X+(RADIUSX*2));\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"}\n"
+, "1335aadebf2523a98cb069063bdd2ba1"};
+ProgramSource filterSep_singlePass_oclsrc(filterSep_singlePass.programStr);
+const struct ProgramEntry filterSmall={"filterSmall",
+"#ifdef BORDER_REPLICATE\n"
+"#define ADDR_L(i, l_edge, r_edge) ((i) < (l_edge) ? (l_edge) : (i))\n"
+"#define ADDR_R(i, r_edge, addr) ((i) >= (r_edge) ? (r_edge)-1 : (addr))\n"
+"#define ADDR_H(i, t_edge, b_edge) ((i) < (t_edge) ? (t_edge) :(i))\n"
+"#define ADDR_B(i, b_edge, addr) ((i) >= (b_edge) ? (b_edge)-1 :(addr))\n"
+"#endif\n"
+"#ifdef BORDER_REFLECT\n"
+"#define ADDR_L(i, l_edge, r_edge) ((i) < (l_edge) ? -(i)-1 : (i))\n"
+"#define ADDR_R(i, r_edge, addr) ((i) >= (r_edge) ? -(i)-1+((r_edge)<<1) : (addr))\n"
+"#define ADDR_H(i, t_edge, b_edge) ((i) < (t_edge) ? -(i)-1 : (i))\n"
+"#define ADDR_B(i, b_edge, addr) ((i) >= (b_edge) ? -(i)-1+((b_edge)<<1) : (addr))\n"
+"#endif\n"
+"#ifdef BORDER_REFLECT_101\n"
+"#define ADDR_L(i, l_edge, r_edge) ((i) < (l_edge) ? -(i) : (i))\n"
+"#define ADDR_R(i, r_edge, addr) ((i) >= (r_edge) ? -(i)-2+((r_edge)<<1) : (addr))\n"
+"#define ADDR_H(i, t_edge, b_edge) ((i) < (t_edge) ? -(i) : (i))\n"
+"#define ADDR_B(i, b_edge, addr) ((i) >= (b_edge) ? -(i)-2+((b_edge)<<1) : (addr))\n"
+"#endif\n"
+"#ifdef BORDER_WRAP\n"
+"#define ADDR_L(i, l_edge, r_edge) ((i) < (l_edge) ? (i)+(r_edge) : (i))\n"
+"#define ADDR_R(i, r_edge, addr) ((i) >= (r_edge) ? (i)-(r_edge) : (addr))\n"
+"#define ADDR_H(i, t_edge, b_edge) ((i) < (t_edge) ? (i)+(b_edge) : (i))\n"
+"#define ADDR_B(i, b_edge, addr) ((i) >= (b_edge) ? (i)-(b_edge) : (addr))\n"
+"#endif\n"
+"#ifdef BORDER_ISOLATED\n"
+"#define ISOLATED_MIN(VAL) (VAL)\n"
+"#else\n"
+"#define ISOLATED_MIN(VAL) 0\n"
+"#endif\n"
+"#ifdef EXTRA_EXTRAPOLATION\n"
+"#ifdef BORDER_CONSTANT\n"
+"#elif defined BORDER_REPLICATE\n"
+"#define EXTRAPOLATE(x, y, minX, minY, maxX, maxY) \\\n"
+"{ \\\n"
+"x = max(min(x, maxX - 1), minX); \\\n"
+"y = max(min(y, maxY - 1), minY); \\\n"
+"}\n"
+"#elif defined BORDER_WRAP\n"
+"#define EXTRAPOLATE(x, y, minX, minY, maxX, maxY) \\\n"
+"{ \\\n"
+"if (x < minX) \\\n"
+"x -= ((x - maxX + 1) / maxX) * maxX; \\\n"
+"if (x >= maxX) \\\n"
+"x %= maxX; \\\n"
+"if (y < minY) \\\n"
+"y -= ((y - maxY + 1) / maxY) * maxY; \\\n"
+"if (y >= maxY) \\\n"
+"y %= maxY; \\\n"
+"}\n"
+"#elif defined(BORDER_REFLECT) || defined(BORDER_REFLECT_101)\n"
+"#define EXTRAPOLATE_(x, y, minX, minY, maxX, maxY, delta) \\\n"
+"{ \\\n"
+"if (maxX - minX == 1) \\\n"
+"x = minX; \\\n"
+"else \\\n"
+"do \\\n"
+"{ \\\n"
+"if (x < minX) \\\n"
+"x = minX - (x - minX) - 1 + delta; \\\n"
+"else \\\n"
+"x = maxX - 1 - (x - maxX) - delta; \\\n"
+"} \\\n"
+"while (x >= maxX || x < minX); \\\n"
+"\\\n"
+"if (maxY - minY == 1) \\\n"
+"y = minY; \\\n"
+"else \\\n"
+"do \\\n"
+"{ \\\n"
+"if (y < minY) \\\n"
+"y = minY - (y - minY) - 1 + delta; \\\n"
+"else \\\n"
+"y = maxY - 1 - (y - maxY) - delta; \\\n"
+"} \\\n"
+"while (y >= maxY || y < minY); \\\n"
+"}\n"
+"#ifdef BORDER_REFLECT\n"
+"#define EXTRAPOLATE(x, y, minX, minY, maxX, maxY) EXTRAPOLATE_(x, y, minX, minY, maxX, maxY, 0)\n"
+"#elif defined(BORDER_REFLECT_101) || defined(BORDER_REFLECT101)\n"
+"#define EXTRAPOLATE(x, y, minX, minY, maxX, maxY) EXTRAPOLATE_(x, y, minX, minY, maxX, maxY, 1)\n"
+"#endif\n"
+"#else\n"
+"#error No extrapolation method\n"
+"#endif\n"
+"#else\n"
+"#define EXTRAPOLATE(x, y, minX, minY, maxX, maxY) \\\n"
+"{ \\\n"
+"int _row = y - ISOLATED_MIN(minY), _col = x - ISOLATED_MIN(minX); \\\n"
+"_row = ADDR_H(_row, 0, maxY - ISOLATED_MIN(minY)); \\\n"
+"_row = ADDR_B(_row, maxY - ISOLATED_MIN(minY), _row); \\\n"
+"y = _row + ISOLATED_MIN(minY); \\\n"
+"\\\n"
+"_col = ADDR_L(_col, 0, maxX - ISOLATED_MIN(minX)); \\\n"
+"_col = ADDR_R(_col, maxX - ISOLATED_MIN(minX), _col); \\\n"
+"x = _col + ISOLATED_MIN(minX); \\\n"
+"}\n"
+"#endif\n"
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const srcT *)(addr)\n"
+"#define storepix(val, addr) *(__global dstT *)(addr) = val\n"
+"#define SRCSIZE (int)sizeof(srcT)\n"
+"#define DSTSIZE (int)sizeof(dstT)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const srcT1 *)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global dstT1 *)(addr))\n"
+"#define SRCSIZE (int)sizeof(srcT1) * cn\n"
+"#define DSTSIZE (int)sizeof(dstT1) * cn\n"
+"#endif\n"
+"#define noconvert\n"
+"struct RectCoords\n"
+"{\n"
+"int x1, y1, x2, y2;\n"
+"};\n"
+"#ifdef BORDER_ISOLATED\n"
+"inline bool isBorder(const struct RectCoords bounds, int2 coord, int numPixels)\n"
+"{\n"
+"return coord.x < bounds.x1 || coord.y < bounds.y1 || coord.x + numPixels > bounds.x2 || coord.y >= bounds.y2;\n"
+"}\n"
+"#else\n"
+"inline bool isBorder(const struct RectCoords bounds, int2 coord, int numPixels)\n"
+"{\n"
+"return coord.x < 0 || coord.y < 0 || coord.x + numPixels > bounds.x2 || coord.y >= bounds.y2;\n"
+"}\n"
+"#endif\n"
+"#define float1 float\n"
+"#define uchar1 uchar\n"
+"#define int1 int\n"
+"#define uint1 unit\n"
+"#define __CAT(x, y) x##y\n"
+"#define CAT(x, y) __CAT(x, y)\n"
+"#define vload1(OFFSET, PTR) (*(PTR + OFFSET))\n"
+"#define PX_LOAD_VEC_TYPE CAT(srcT1, PX_LOAD_VEC_SIZE)\n"
+"#define PX_LOAD_FLOAT_VEC_TYPE CAT(WT1, PX_LOAD_VEC_SIZE)\n"
+"#define PX_LOAD CAT(vload, PX_LOAD_VEC_SIZE)\n"
+"inline PX_LOAD_FLOAT_VEC_TYPE readSrcPixelGroup(int2 pos, __global const uchar * srcptr,\n"
+"int srcstep, const struct RectCoords srcCoords)\n"
+"{\n"
+"__global const srcT1 * ptr = (__global const srcT1 *)\n"
+"(srcptr + mad24(pos.y, srcstep, pos.x * SRCSIZE));\n"
+"return PX_LOAD_FLOAT_VEC_CONV(PX_LOAD(0, ptr));\n"
+"}\n"
+"#define LOOP1(VAR, STMT) (STMT); (VAR)++;\n"
+"#define LOOP2(VAR, STMT) LOOP1(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP3(VAR, STMT) LOOP2(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP4(VAR, STMT) LOOP3(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP5(VAR, STMT) LOOP4(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP6(VAR, STMT) LOOP5(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP7(VAR, STMT) LOOP6(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP8(VAR, STMT) LOOP7(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP9(VAR, STMT) LOOP8(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP10(VAR, STMT) LOOP9(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP11(VAR, STMT) LOOP10(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP12(VAR, STMT) LOOP11(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP13(VAR, STMT) LOOP12(VAR, STMT); (STMT); (VAR)++;\n"
+"#define LOOP(N, VAR, STMT) CAT(LOOP, N)((VAR), (STMT))\n"
+"#ifdef OP_BOX_FILTER\n"
+"#define PROCESS_ELEM \\\n"
+"WT total_sum = (WT)(0); \\\n"
+"int sy = 0; \\\n"
+"LOOP(KERNEL_SIZE_Y, sy, \\\n"
+"{ \\\n"
+"int sx = 0; \\\n"
+"LOOP(KERNEL_SIZE_X, sx, \\\n"
+"{ \\\n"
+"total_sum += privateData[py + sy][px + sx]; \\\n"
+"}); \\\n"
+"})\n"
+"#elif defined OP_FILTER2D\n"
+"#define DIG(a) a,\n"
+"__constant WT1 kernelData[] = { COEFF };\n"
+"#define PROCESS_ELEM \\\n"
+"WT total_sum = 0; \\\n"
+"int sy = 0; \\\n"
+"int kernelIndex = 0; \\\n"
+"LOOP(KERNEL_SIZE_Y, sy, \\\n"
+"{ \\\n"
+"int sx = 0; \\\n"
+"LOOP(KERNEL_SIZE_X, sx, \\\n"
+"{ \\\n"
+"total_sum = fma(kernelData[kernelIndex++], privateData[py + sy][px + sx], total_sum); \\\n"
+"}); \\\n"
+"})\n"
+"#elif defined OP_ERODE || defined OP_DILATE\n"
+"#ifdef DEPTH_0\n"
+"#define MIN_VAL 0\n"
+"#define MAX_VAL UCHAR_MAX\n"
+"#elif defined DEPTH_1\n"
+"#define MIN_VAL SCHAR_MIN\n"
+"#define MAX_VAL SCHAR_MAX\n"
+"#elif defined DEPTH_2\n"
+"#define MIN_VAL 0\n"
+"#define MAX_VAL USHRT_MAX\n"
+"#elif defined DEPTH_3\n"
+"#define MIN_VAL SHRT_MIN\n"
+"#define MAX_VAL SHRT_MAX\n"
+"#elif defined DEPTH_4\n"
+"#define MIN_VAL INT_MIN\n"
+"#define MAX_VAL INT_MAX\n"
+"#elif defined DEPTH_5\n"
+"#define MIN_VAL (-FLT_MAX)\n"
+"#define MAX_VAL FLT_MAX\n"
+"#elif defined DEPTH_6\n"
+"#define MIN_VAL (-DBL_MAX)\n"
+"#define MAX_VAL DBL_MAX\n"
+"#endif\n"
+"#ifdef OP_ERODE\n"
+"#define VAL (WT)MAX_VAL\n"
+"#elif defined OP_DILATE\n"
+"#define VAL (WT)MIN_VAL\n"
+"#else\n"
+"#error \"Unknown operation\"\n"
+"#endif\n"
+"#define convert_float1 convert_float\n"
+"#define convert_uchar1 convert_uchar\n"
+"#define convert_int1 convert_int\n"
+"#define convert_uint1 convert_uint\n"
+"#ifdef OP_ERODE\n"
+"#if defined INTEL_DEVICE && defined DEPTH_0\n"
+"#define WA_CONVERT_1 CAT(convert_uint, cn)\n"
+"#define WA_CONVERT_2 CAT(convert_, srcT)\n"
+"#define MORPH_OP(A, B) ((A) < (B) ? (A) : (B))\n"
+"#else\n"
+"#define MORPH_OP(A, B) min((A), (B))\n"
+"#endif\n"
+"#endif\n"
+"#ifdef OP_DILATE\n"
+"#define MORPH_OP(A, B) max((A), (B))\n"
+"#endif\n"
+"#define PROCESS(_y, _x) \\\n"
+"total_sum = convertToWT(MORPH_OP(convertToWT(total_sum), convertToWT(privateData[py + _y][px + _x])));\n"
+"#define PROCESS_ELEM \\\n"
+"WT total_sum = convertToWT(VAL); \\\n"
+"PROCESS_ELEM_\n"
+"#else\n"
+"#error \"No processing is specified\"\n"
+"#endif\n"
+"#if defined OP_GRADIENT || defined OP_TOPHAT || defined OP_BLACKHAT\n"
+"#define EXTRA_PARAMS , __global const uchar * matptr, int mat_step, int mat_offset\n"
+"#else\n"
+"#define EXTRA_PARAMS\n"
+"#endif\n"
+"inline WT getBorderPixel(const struct RectCoords bounds, int2 coord,\n"
+"__global const uchar * srcptr, int srcstep)\n"
+"{\n"
+"#ifdef BORDER_CONSTANT\n"
+"#ifdef OP_ERODE\n"
+"return (WT)(MAX_VAL);\n"
+"#elif defined OP_DILATE\n"
+"return (WT)(MIN_VAL);\n"
+"#else\n"
+"return (WT)(0);\n"
+"#endif\n"
+"#else\n"
+"int selected_col = coord.x;\n"
+"int selected_row = coord.y;\n"
+"EXTRAPOLATE(selected_col, selected_row,\n"
+"bounds.x1, bounds.y1,\n"
+"bounds.x2, bounds.y2);\n"
+"__global const uchar* ptr = srcptr + mad24(selected_row, srcstep, selected_col * SRCSIZE);\n"
+"return convertToWT(loadpix(ptr));\n"
+"#endif\n"
+"}\n"
+"inline WT readSrcPixelSingle(int2 pos, __global const uchar * srcptr,\n"
+"int srcstep, const struct RectCoords srcCoords)\n"
+"{\n"
+"if (!isBorder(srcCoords, pos, 1))\n"
+"{\n"
+"__global const uchar * ptr = srcptr + mad24(pos.y, srcstep, pos.x * SRCSIZE);\n"
+"return convertToWT(loadpix(ptr));\n"
+"}\n"
+"else\n"
+"return getBorderPixel(srcCoords, pos, srcptr, srcstep);\n"
+"}\n"
+"__kernel void filterSmall(__global const uchar * srcptr, int src_step, int srcOffsetX, int srcOffsetY, int srcEndX, int srcEndY,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int rows, int cols\n"
+"#ifdef NORMALIZE\n"
+", float alpha\n"
+"#endif\n"
+"EXTRA_PARAMS )\n"
+"{\n"
+"const struct RectCoords srcCoords = { srcOffsetX, srcOffsetY, srcEndX, srcEndY };\n"
+"const int startX = get_global_id(0) * PX_PER_WI_X;\n"
+"const int startY = get_global_id(1) * PX_PER_WI_Y;\n"
+"if (startX >= cols || startY >= rows)\n"
+"return;\n"
+"WT privateData[PX_PER_WI_Y + KERNEL_SIZE_Y - 1][PRIV_DATA_WIDTH];\n"
+"int py = 0;\n"
+"LOOP(PX_LOAD_Y_ITERATIONS, py,\n"
+"{\n"
+"int y = startY + py;\n"
+"int px = 0;\n"
+"LOOP(PX_LOAD_X_ITERATIONS, px,\n"
+"{\n"
+"int x = startX + (px * PX_LOAD_NUM_PX);\n"
+"int2 srcPos = (int2)(srcCoords.x1 + x - ANCHOR_X, srcCoords.y1 + y - ANCHOR_Y);\n"
+"if (!isBorder(srcCoords, srcPos, PX_LOAD_NUM_PX))\n"
+"{\n"
+"PX_LOAD_FLOAT_VEC_TYPE p = readSrcPixelGroup(srcPos, srcptr, src_step, srcCoords);\n"
+"#ifdef SQR\n"
+"*((PX_LOAD_FLOAT_VEC_TYPE *)&privateData[py][px * PX_LOAD_NUM_PX]) = p * p;\n"
+"#else\n"
+"*((PX_LOAD_FLOAT_VEC_TYPE *)&privateData[py][px * PX_LOAD_NUM_PX]) = p;\n"
+"#endif\n"
+"}\n"
+"else\n"
+"{\n"
+"int lx = 0;\n"
+"LOOP(PX_LOAD_NUM_PX, lx,\n"
+"{\n"
+"WT p = readSrcPixelSingle(srcPos, srcptr, src_step, srcCoords);\n"
+"#ifdef SQR\n"
+"*((WT*)&privateData[py][px * PX_LOAD_NUM_PX + lx]) = p * p;\n"
+"#else\n"
+"*((WT*)&privateData[py][px * PX_LOAD_NUM_PX + lx]) = p;\n"
+"#endif\n"
+"srcPos.x++;\n"
+"});\n"
+"}\n"
+"});\n"
+"});\n"
+"py = 0;\n"
+"LOOP(PX_PER_WI_Y, py,\n"
+"{\n"
+"int y = startY + py;\n"
+"int px = 0;\n"
+"LOOP(PX_PER_WI_X, px,\n"
+"{\n"
+"int x = startX + px;\n"
+"PROCESS_ELEM;\n"
+"int dst_index = mad24(y, dst_step, mad24(x, DSTSIZE, dst_offset));\n"
+"__global dstT * dstPtr = (__global dstT *)(dstptr + dst_index);\n"
+"#ifdef NORMALIZE\n"
+"total_sum *= (WT)(alpha);\n"
+"#endif\n"
+"#if defined OP_GRADIENT || defined OP_TOPHAT || defined OP_BLACKHAT\n"
+"int mat_index = mad24(y, mat_step, mad24(x, SRCSIZE, mat_offset));\n"
+"WT value = convertToWT(loadpix(matptr + mat_index));\n"
+"#ifdef OP_GRADIENT\n"
+"storepix(convertToDstT(convertToWT(total_sum) - convertToWT(value)), dstPtr );\n"
+"#elif defined OP_TOPHAT\n"
+"storepix(convertToDstT(convertToWT(value) - convertToWT(total_sum)), dstPtr );\n"
+"#elif defined OP_BLACKHAT\n"
+"storepix(convertToDstT(convertToWT(total_sum) - convertToWT(value)), dstPtr );\n"
+"#endif\n"
+"#else\n"
+"storepix(convertToDstT(total_sum), dstPtr);\n"
+"#endif\n"
+"});\n"
+"});\n"
+"}\n"
+, "2aafc30dda5e658542c92a9ab2a63d4a"};
+ProgramSource filterSmall_oclsrc(filterSmall.programStr);
+const struct ProgramEntry gftt={"gftt",
+"#ifdef OP_MAX_EIGEN_VAL\n"
+"__kernel void maxEigenVal(__global const uchar * srcptr, int src_step, int src_offset, int cols,\n"
+"int total, __global uchar * dstptr\n"
+"#ifdef HAVE_MASK\n"
+", __global const uchar * maskptr, int mask_step, int mask_offset\n"
+"#endif\n"
+")\n"
+"{\n"
+"int lid = get_local_id(0);\n"
+"int gid = get_group_id(0);\n"
+"int id = get_global_id(0);\n"
+"__local float localmem_max[WGS2_ALIGNED];\n"
+"float maxval = -FLT_MAX;\n"
+"for (int grain = groupnum * WGS; id < total; id += grain)\n"
+"{\n"
+"int src_index = mad24(id / cols, src_step, mad24((id % cols), (int)sizeof(float), src_offset));\n"
+"#ifdef HAVE_MASK\n"
+"int mask_index = mad24(id / cols, mask_step, id % cols + mask_offset);\n"
+"if (maskptr[mask_index])\n"
+"#endif\n"
+"maxval = max(maxval, *(__global const float *)(srcptr + src_index));\n"
+"}\n"
+"if (lid < WGS2_ALIGNED)\n"
+"localmem_max[lid] = maxval;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (lid >= WGS2_ALIGNED && total >= WGS2_ALIGNED)\n"
+"localmem_max[lid - WGS2_ALIGNED] = max(maxval, localmem_max[lid - WGS2_ALIGNED]);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"for (int lsize = WGS2_ALIGNED >> 1; lsize > 0; lsize >>= 1)\n"
+"{\n"
+"if (lid < lsize)\n"
+"{\n"
+"int lid2 = lsize + lid;\n"
+"localmem_max[lid] = max(localmem_max[lid], localmem_max[lid2]);\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"if (lid == 0)\n"
+"*(__global float *)(dstptr + (int)sizeof(float) * gid) = localmem_max[0];\n"
+"}\n"
+"__kernel void maxEigenValTask(__global float * dst, float qualityLevel,\n"
+"__global int * cornersptr)\n"
+"{\n"
+"float maxval = -FLT_MAX;\n"
+"#pragma unroll\n"
+"for (int x = 0; x < groupnum; ++x)\n"
+"maxval = max(maxval, dst[x]);\n"
+"dst[0] = maxval * qualityLevel;\n"
+"cornersptr[0] = 0;\n"
+"}\n"
+"#elif OP_FIND_CORNERS\n"
+"#define GET_SRC_32F(_y, _x) *(__global const float *)(eigptr + (_y) * eig_step + (_x) * (int)sizeof(float) )\n"
+"__kernel void findCorners(__global const uchar * eigptr, int eig_step, int eig_offset,\n"
+"#ifdef HAVE_MASK\n"
+"__global const uchar * mask, int mask_step, int mask_offset,\n"
+"#endif\n"
+"__global uchar * cornersptr, int rows, int cols,\n"
+"__constant float * threshold, int max_corners)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"__global int* counter = (__global int*) cornersptr;\n"
+"__global float2 * corners = (__global float2 *)(cornersptr + (int)sizeof(float2));\n"
+"if (y < rows && x < cols\n"
+"#ifdef HAVE_MASK\n"
+"&& mask[mad24(y, mask_step, x + mask_offset)]\n"
+"#endif\n"
+")\n"
+"{\n"
+"++x, ++y;\n"
+"float val = GET_SRC_32F(y, x);\n"
+"if (val > threshold[0])\n"
+"{\n"
+"float maxVal = val;\n"
+"maxVal = max(GET_SRC_32F(y - 1, x - 1), maxVal);\n"
+"maxVal = max(GET_SRC_32F(y - 1, x ), maxVal);\n"
+"maxVal = max(GET_SRC_32F(y - 1, x + 1), maxVal);\n"
+"maxVal = max(GET_SRC_32F(y , x - 1), maxVal);\n"
+"maxVal = max(GET_SRC_32F(y , x + 1), maxVal);\n"
+"maxVal = max(GET_SRC_32F(y + 1, x - 1), maxVal);\n"
+"maxVal = max(GET_SRC_32F(y + 1, x ), maxVal);\n"
+"maxVal = max(GET_SRC_32F(y + 1, x + 1), maxVal);\n"
+"if (val == maxVal)\n"
+"{\n"
+"int ind = atomic_inc(counter);\n"
+"if (ind < max_corners)\n"
+"{\n"
+"corners[ind].x = val;\n"
+"corners[ind].y = as_float(y | (x << 16));\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"#endif\n"
+, "cb2cfd26f04e14ae047e2f5eb28c8e11"};
+ProgramSource gftt_oclsrc(gftt.programStr);
+const struct ProgramEntry histogram={"histogram",
+"#ifndef kercn\n"
+"#define kercn 1\n"
+"#endif\n"
+"#ifndef T\n"
+"#define T uchar\n"
+"#endif\n"
+"#define noconvert\n"
+"__kernel void calculate_histogram(__global const uchar * src_ptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * histptr, int total)\n"
+"{\n"
+"int lid = get_local_id(0);\n"
+"int id = get_global_id(0) * kercn;\n"
+"int gid = get_group_id(0);\n"
+"__local int localhist[BINS];\n"
+"#pragma unroll\n"
+"for (int i = lid; i < BINS; i += WGS)\n"
+"localhist[i] = 0;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"__global const uchar * src = src_ptr + src_offset;\n"
+"int src_index;\n"
+"for (int grain = HISTS_COUNT * WGS * kercn; id < total; id += grain)\n"
+"{\n"
+"#ifdef HAVE_SRC_CONT\n"
+"src_index = id;\n"
+"#else\n"
+"src_index = mad24(id / src_cols, src_step, id % src_cols);\n"
+"#endif\n"
+"#if kercn == 1\n"
+"atomic_inc(localhist + convert_int(src[src_index]));\n"
+"#elif kercn == 4\n"
+"int value = *(__global const int *)(src + src_index);\n"
+"atomic_inc(localhist + (value & 0xff));\n"
+"atomic_inc(localhist + ((value >> 8) & 0xff));\n"
+"atomic_inc(localhist + ((value >> 16) & 0xff));\n"
+"atomic_inc(localhist + ((value >> 24) & 0xff));\n"
+"#elif kercn >= 2\n"
+"T value = *(__global const T *)(src + src_index);\n"
+"atomic_inc(localhist + value.s0);\n"
+"atomic_inc(localhist + value.s1);\n"
+"#if kercn >= 4\n"
+"atomic_inc(localhist + value.s2);\n"
+"atomic_inc(localhist + value.s3);\n"
+"#if kercn >= 8\n"
+"atomic_inc(localhist + value.s4);\n"
+"atomic_inc(localhist + value.s5);\n"
+"atomic_inc(localhist + value.s6);\n"
+"atomic_inc(localhist + value.s7);\n"
+"#if kercn == 16\n"
+"atomic_inc(localhist + value.s8);\n"
+"atomic_inc(localhist + value.s9);\n"
+"atomic_inc(localhist + value.sA);\n"
+"atomic_inc(localhist + value.sB);\n"
+"atomic_inc(localhist + value.sC);\n"
+"atomic_inc(localhist + value.sD);\n"
+"atomic_inc(localhist + value.sE);\n"
+"atomic_inc(localhist + value.sF);\n"
+"#endif\n"
+"#endif\n"
+"#endif\n"
+"#endif\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"__global int * hist = (__global int *)(histptr + gid * BINS * (int)sizeof(int));\n"
+"#pragma unroll\n"
+"for (int i = lid; i < BINS; i += WGS)\n"
+"hist[i] = localhist[i];\n"
+"}\n"
+"#ifndef HT\n"
+"#define HT int\n"
+"#endif\n"
+"#ifndef convertToHT\n"
+"#define convertToHT noconvert\n"
+"#endif\n"
+"__kernel void merge_histogram(__global const int * ghist, __global uchar * histptr, int hist_step, int hist_offset)\n"
+"{\n"
+"int lid = get_local_id(0);\n"
+"__global HT * hist = (__global HT *)(histptr + hist_offset);\n"
+"#if WGS >= BINS\n"
+"HT res = (HT)(0);\n"
+"#else\n"
+"#pragma unroll\n"
+"for (int i = lid; i < BINS; i += WGS)\n"
+"hist[i] = (HT)(0);\n"
+"#endif\n"
+"#pragma unroll\n"
+"for (int i = 0; i < HISTS_COUNT; ++i)\n"
+"{\n"
+"#pragma unroll\n"
+"for (int j = lid; j < BINS; j += WGS)\n"
+"#if WGS >= BINS\n"
+"res += convertToHT(ghist[j]);\n"
+"#else\n"
+"hist[j] += convertToHT(ghist[j]);\n"
+"#endif\n"
+"ghist += BINS;\n"
+"}\n"
+"#if WGS >= BINS\n"
+"if (lid < BINS)\n"
+"*(__global HT *)(histptr + mad24(lid, hist_step, hist_offset)) = res;\n"
+"#endif\n"
+"}\n"
+"__kernel void calcLUT(__global uchar * dst, __global const int * ghist, int total)\n"
+"{\n"
+"int lid = get_local_id(0);\n"
+"__local int sumhist[BINS];\n"
+"__local float scale;\n"
+"#if WGS >= BINS\n"
+"int res = 0;\n"
+"#else\n"
+"#pragma unroll\n"
+"for (int i = lid; i < BINS; i += WGS)\n"
+"sumhist[i] = 0;\n"
+"#endif\n"
+"#pragma unroll\n"
+"for (int i = 0; i < HISTS_COUNT; ++i)\n"
+"{\n"
+"#pragma unroll\n"
+"for (int j = lid; j < BINS; j += WGS)\n"
+"#if WGS >= BINS\n"
+"res += ghist[j];\n"
+"#else\n"
+"sumhist[j] += ghist[j];\n"
+"#endif\n"
+"ghist += BINS;\n"
+"}\n"
+"#if WGS >= BINS\n"
+"if (lid < BINS)\n"
+"sumhist[lid] = res;\n"
+"#endif\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (lid == 0)\n"
+"{\n"
+"int sum = 0, i = 0;\n"
+"while (!sumhist[i])\n"
+"++i;\n"
+"if (total == sumhist[i])\n"
+"{\n"
+"scale = 1;\n"
+"for (int j = 0; j < BINS; ++j)\n"
+"sumhist[i] = i;\n"
+"}\n"
+"else\n"
+"{\n"
+"scale = 255.f / (total - sumhist[i]);\n"
+"for (sumhist[i++] = 0; i < BINS; i++)\n"
+"{\n"
+"sum += sumhist[i];\n"
+"sumhist[i] = sum;\n"
+"}\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"#pragma unroll\n"
+"for (int i = lid; i < BINS; i += WGS)\n"
+"dst[i]= convert_uchar_sat_rte(convert_float(sumhist[i]) * scale);\n"
+"}\n"
+, "3bfd6703e639c8a36eb7cdd5f3eefda6"};
+ProgramSource histogram_oclsrc(histogram.programStr);
+const struct ProgramEntry hough_lines={"hough_lines",
+"#define ACCUM(ptr) *((__global int*)(ptr))\n"
+"#ifdef MAKE_POINTS_LIST\n"
+"__kernel void make_point_list(__global const uchar * src_ptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * list_ptr, int list_step, int list_offset, __global int* global_offset)\n"
+"{\n"
+"int x = get_local_id(0);\n"
+"int y = get_group_id(1);\n"
+"__local int l_index, l_offset;\n"
+"__local int l_points[LOCAL_SIZE];\n"
+"__global const uchar * src = src_ptr + mad24(y, src_step, src_offset);\n"
+"__global int * list = (__global int*)(list_ptr + list_offset);\n"
+"if (x == 0)\n"
+"l_index = 0;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (y < src_rows)\n"
+"{\n"
+"y <<= 16;\n"
+"for (int i=x; i < src_cols; i+=GROUP_SIZE)\n"
+"{\n"
+"if (src[i])\n"
+"{\n"
+"int val = y | i;\n"
+"int index = atomic_inc(&l_index);\n"
+"l_points[index] = val;\n"
+"}\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x == 0)\n"
+"l_offset = atomic_add(global_offset, l_index);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"list += l_offset;\n"
+"for (int i=x; i < l_index; i+=GROUP_SIZE)\n"
+"{\n"
+"list[i] = l_points[i];\n"
+"}\n"
+"}\n"
+"#elif defined FILL_ACCUM_GLOBAL\n"
+"__kernel void fill_accum_global(__global const uchar * list_ptr, int list_step, int list_offset,\n"
+"__global uchar * accum_ptr, int accum_step, int accum_offset,\n"
+"int total_points, float irho, float theta, int numrho, int numangle)\n"
+"{\n"
+"int theta_idx = get_global_id(1);\n"
+"int count_idx = get_global_id(0);\n"
+"int glob_size = get_global_size(0);\n"
+"float cosVal;\n"
+"float sinVal = sincos(theta * ((float)theta_idx), &cosVal);\n"
+"sinVal *= irho;\n"
+"cosVal *= irho;\n"
+"__global const int * list = (__global const int*)(list_ptr + list_offset);\n"
+"__global int* accum = (__global int*)(accum_ptr + mad24(theta_idx + 1, accum_step, accum_offset));\n"
+"const int shift = (numrho - 1) / 2;\n"
+"if (theta_idx < numangle)\n"
+"{\n"
+"for (int i = count_idx; i < total_points; i += glob_size)\n"
+"{\n"
+"const int val = list[i];\n"
+"const int x = (val & 0xFFFF);\n"
+"const int y = (val >> 16) & 0xFFFF;\n"
+"int r = convert_int_rte(mad(x, cosVal, y * sinVal)) + shift;\n"
+"atomic_inc(accum + r + 1);\n"
+"}\n"
+"}\n"
+"}\n"
+"#elif defined FILL_ACCUM_LOCAL\n"
+"__kernel void fill_accum_local(__global const uchar * list_ptr, int list_step, int list_offset,\n"
+"__global uchar * accum_ptr, int accum_step, int accum_offset,\n"
+"int total_points, float irho, float theta, int numrho, int numangle)\n"
+"{\n"
+"int theta_idx = get_group_id(1);\n"
+"int count_idx = get_local_id(0);\n"
+"if (theta_idx > 0 && theta_idx < numangle + 1)\n"
+"{\n"
+"float cosVal;\n"
+"float sinVal = sincos(theta * (float) (theta_idx-1), &cosVal);\n"
+"sinVal *= irho;\n"
+"cosVal *= irho;\n"
+"__local int l_accum[BUFFER_SIZE];\n"
+"for (int i=count_idx; i<BUFFER_SIZE; i+=LOCAL_SIZE)\n"
+"l_accum[i] = 0;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"__global const int * list = (__global const int*)(list_ptr + list_offset);\n"
+"const int shift = (numrho - 1) / 2;\n"
+"for (int i = count_idx; i < total_points; i += LOCAL_SIZE)\n"
+"{\n"
+"const int point = list[i];\n"
+"const int x = (point & 0xFFFF);\n"
+"const int y = point >> 16;\n"
+"int r = convert_int_rte(mad(x, cosVal, y * sinVal)) + shift;\n"
+"atomic_inc(l_accum + r + 1);\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"__global int* accum = (__global int*)(accum_ptr + mad24(theta_idx, accum_step, accum_offset));\n"
+"for (int i=count_idx; i<BUFFER_SIZE; i+=LOCAL_SIZE)\n"
+"accum[i] = l_accum[i];\n"
+"}\n"
+"else if (theta_idx < numangle + 2)\n"
+"{\n"
+"__global int* accum = (__global int*)(accum_ptr + mad24(theta_idx, accum_step, accum_offset));\n"
+"for (int i=count_idx; i<BUFFER_SIZE; i+=LOCAL_SIZE)\n"
+"accum[i] = 0;\n"
+"}\n"
+"}\n"
+"#elif defined GET_LINES\n"
+"__kernel void get_lines(__global uchar * accum_ptr, int accum_step, int accum_offset, int accum_rows, int accum_cols,\n"
+"__global uchar * lines_ptr, int lines_step, int lines_offset, __global int* lines_index_ptr,\n"
+"int linesMax, int threshold, float rho, float theta)\n"
+"{\n"
+"int x0 = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"int glob_size = get_global_size(0);\n"
+"if (y < accum_rows-2)\n"
+"{\n"
+"__global uchar* accum = accum_ptr + mad24(y+1, accum_step, mad24(x0+1, (int) sizeof(int), accum_offset));\n"
+"__global float2* lines = (__global float2*)(lines_ptr + lines_offset);\n"
+"__global int* lines_index = lines_index_ptr + 1;\n"
+"for (int x=x0; x<accum_cols-2; x+=glob_size)\n"
+"{\n"
+"int curVote = ACCUM(accum);\n"
+"if (curVote > threshold && curVote > ACCUM(accum - sizeof(int)) && curVote >= ACCUM(accum + sizeof(int)) &&\n"
+"curVote > ACCUM(accum - accum_step) && curVote >= ACCUM(accum + accum_step))\n"
+"{\n"
+"int index = atomic_inc(lines_index);\n"
+"if (index < linesMax)\n"
+"{\n"
+"float radius = (x - (accum_cols - 3) * 0.5f) * rho;\n"
+"float angle = y * theta;\n"
+"lines[index] = (float2)(radius, angle);\n"
+"}\n"
+"}\n"
+"accum += glob_size * (int) sizeof(int);\n"
+"}\n"
+"}\n"
+"}\n"
+"#elif GET_LINES_PROBABOLISTIC\n"
+"__kernel void get_lines(__global const uchar * accum_ptr, int accum_step, int accum_offset, int accum_rows, int accum_cols,\n"
+"__global const uchar * src_ptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * lines_ptr, int lines_step, int lines_offset, __global int* lines_index_ptr,\n"
+"int linesMax, int threshold, int lineLength, int lineGap, float rho, float theta)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (y < accum_rows-2)\n"
+"{\n"
+"__global uchar* accum = accum_ptr + mad24(y+1, accum_step, mad24(x+1, (int) sizeof(int), accum_offset));\n"
+"__global int4* lines = (__global int4*)(lines_ptr + lines_offset);\n"
+"__global int* lines_index = lines_index_ptr + 1;\n"
+"int curVote = ACCUM(accum);\n"
+"if (curVote >= threshold &&\n"
+"curVote > ACCUM(accum - accum_step - sizeof(int)) &&\n"
+"curVote > ACCUM(accum - accum_step) &&\n"
+"curVote > ACCUM(accum - accum_step + sizeof(int)) &&\n"
+"curVote > ACCUM(accum - sizeof(int)) &&\n"
+"curVote > ACCUM(accum + sizeof(int)) &&\n"
+"curVote > ACCUM(accum + accum_step - sizeof(int)) &&\n"
+"curVote > ACCUM(accum + accum_step) &&\n"
+"curVote > ACCUM(accum + accum_step + sizeof(int)))\n"
+"{\n"
+"const float radius = (x - (accum_cols - 2 - 1) * 0.5f) * rho;\n"
+"const float angle = y * theta;\n"
+"float cosa;\n"
+"float sina = sincos(angle, &cosa);\n"
+"float2 p0 = (float2)(cosa * radius, sina * radius);\n"
+"float2 dir = (float2)(-sina, cosa);\n"
+"float2 pb[4] = { (float2)(-1, -1), (float2)(-1, -1), (float2)(-1, -1), (float2)(-1, -1) };\n"
+"float a;\n"
+"if (dir.x != 0)\n"
+"{\n"
+"a = -p0.x / dir.x;\n"
+"pb[0].x = 0;\n"
+"pb[0].y = p0.y + a * dir.y;\n"
+"a = (src_cols - 1 - p0.x) / dir.x;\n"
+"pb[1].x = src_cols - 1;\n"
+"pb[1].y = p0.y + a * dir.y;\n"
+"}\n"
+"if (dir.y != 0)\n"
+"{\n"
+"a = -p0.y / dir.y;\n"
+"pb[2].x = p0.x + a * dir.x;\n"
+"pb[2].y = 0;\n"
+"a = (src_rows - 1 - p0.y) / dir.y;\n"
+"pb[3].x = p0.x + a * dir.x;\n"
+"pb[3].y = src_rows - 1;\n"
+"}\n"
+"if (pb[0].x == 0 && (pb[0].y >= 0 && pb[0].y < src_rows))\n"
+"{\n"
+"p0 = pb[0];\n"
+"if (dir.x < 0)\n"
+"dir = -dir;\n"
+"}\n"
+"else if (pb[1].x == src_cols - 1 && (pb[1].y >= 0 && pb[1].y < src_rows))\n"
+"{\n"
+"p0 = pb[1];\n"
+"if (dir.x > 0)\n"
+"dir = -dir;\n"
+"}\n"
+"else if (pb[2].y == 0 && (pb[2].x >= 0 && pb[2].x < src_cols))\n"
+"{\n"
+"p0 = pb[2];\n"
+"if (dir.y < 0)\n"
+"dir = -dir;\n"
+"}\n"
+"else if (pb[3].y == src_rows - 1 && (pb[3].x >= 0 && pb[3].x < src_cols))\n"
+"{\n"
+"p0 = pb[3];\n"
+"if (dir.y > 0)\n"
+"dir = -dir;\n"
+"}\n"
+"dir /= max(fabs(dir.x), fabs(dir.y));\n"
+"float2 line_end[2];\n"
+"int gap;\n"
+"bool inLine = false;\n"
+"if (p0.x < 0 || p0.x >= src_cols || p0.y < 0 || p0.y >= src_rows)\n"
+"return;\n"
+"for (;;)\n"
+"{\n"
+"if (*(src_ptr + mad24(p0.y, src_step, p0.x + src_offset)))\n"
+"{\n"
+"gap = 0;\n"
+"if (!inLine)\n"
+"{\n"
+"line_end[0] = p0;\n"
+"line_end[1] = p0;\n"
+"inLine = true;\n"
+"}\n"
+"else\n"
+"{\n"
+"line_end[1] = p0;\n"
+"}\n"
+"}\n"
+"else if (inLine)\n"
+"{\n"
+"if (++gap > lineGap)\n"
+"{\n"
+"bool good_line = fabs(line_end[1].x - line_end[0].x) >= lineLength ||\n"
+"fabs(line_end[1].y - line_end[0].y) >= lineLength;\n"
+"if (good_line)\n"
+"{\n"
+"int index = atomic_inc(lines_index);\n"
+"if (index < linesMax)\n"
+"lines[index] = (int4)(line_end[0].x, line_end[0].y, line_end[1].x, line_end[1].y);\n"
+"}\n"
+"gap = 0;\n"
+"inLine = false;\n"
+"}\n"
+"}\n"
+"p0 = p0 + dir;\n"
+"if (p0.x < 0 || p0.x >= src_cols || p0.y < 0 || p0.y >= src_rows)\n"
+"{\n"
+"if (inLine)\n"
+"{\n"
+"bool good_line = fabs(line_end[1].x - line_end[0].x) >= lineLength ||\n"
+"fabs(line_end[1].y - line_end[0].y) >= lineLength;\n"
+"if (good_line)\n"
+"{\n"
+"int index = atomic_inc(lines_index);\n"
+"if (index < linesMax)\n"
+"lines[index] = (int4)(line_end[0].x, line_end[0].y, line_end[1].x, line_end[1].y);\n"
+"}\n"
+"}\n"
+"break;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"#endif\n"
+, "1a16d01d003274c100d23519d745047f"};
+ProgramSource hough_lines_oclsrc(hough_lines.programStr);
+const struct ProgramEntry integral_sum={"integral_sum",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#ifndef LOCAL_SUM_SIZE\n"
+"#define LOCAL_SUM_SIZE 16\n"
+"#endif\n"
+"#define LOCAL_SUM_STRIDE (LOCAL_SUM_SIZE + 1)\n"
+"kernel void integral_sum_cols(__global const uchar *src_ptr, int src_step, int src_offset, int rows, int cols,\n"
+"__global uchar *buf_ptr, int buf_step, int buf_offset\n"
+"#ifdef SUM_SQUARE\n"
+",__global uchar *buf_sq_ptr, int buf_sq_step, int buf_sq_offset\n"
+"#endif\n"
+")\n"
+"{\n"
+"__local sumT lm_sum[LOCAL_SUM_STRIDE * LOCAL_SUM_SIZE];\n"
+"#ifdef SUM_SQUARE\n"
+"__local sumSQT lm_sum_sq[LOCAL_SUM_STRIDE * LOCAL_SUM_SIZE];\n"
+"#endif\n"
+"int lid = get_local_id(0);\n"
+"int gid = get_group_id(0);\n"
+"int x = get_global_id(0);\n"
+"int src_index = x + src_offset;\n"
+"sumT accum = 0;\n"
+"#ifdef SUM_SQUARE\n"
+"sumSQT accum_sq = 0;\n"
+"#endif\n"
+"for (int y = 0; y < rows; y += LOCAL_SUM_SIZE)\n"
+"{\n"
+"int lsum_index = lid;\n"
+"#pragma unroll\n"
+"for (int yin = 0; yin < LOCAL_SUM_SIZE; yin++, src_index+=src_step, lsum_index += LOCAL_SUM_STRIDE)\n"
+"{\n"
+"if ((x < cols) && (y + yin < rows))\n"
+"{\n"
+"__global const uchar *src = src_ptr + src_index;\n"
+"accum += src[0];\n"
+"#ifdef SUM_SQUARE\n"
+"sumSQT temp = src[0] * src[0];\n"
+"accum_sq += temp;\n"
+"#endif\n"
+"}\n"
+"lm_sum[lsum_index] = accum;\n"
+"#ifdef SUM_SQUARE\n"
+"lm_sum_sq[lsum_index] = accum_sq;\n"
+"#endif\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"int buf_index = mad24(buf_step, LOCAL_SUM_SIZE * gid, mad24((int)sizeof(sumT), y + lid, buf_offset));\n"
+"#ifdef SUM_SQUARE\n"
+"int buf_sq_index = mad24(buf_sq_step, LOCAL_SUM_SIZE * gid, mad24((int)sizeof(sumSQT), y + lid, buf_sq_offset));\n"
+"#endif\n"
+"lsum_index = LOCAL_SUM_STRIDE * lid;\n"
+"#pragma unroll\n"
+"for (int yin = 0; yin < LOCAL_SUM_SIZE; yin++, lsum_index ++)\n"
+"{\n"
+"__global sumT *buf = (__global sumT *)(buf_ptr + buf_index);\n"
+"buf[0] = lm_sum[lsum_index];\n"
+"buf_index += buf_step;\n"
+"#ifdef SUM_SQUARE\n"
+"__global sumSQT *bufsq = (__global sumSQT *)(buf_sq_ptr + buf_sq_index);\n"
+"bufsq[0] = lm_sum_sq[lsum_index];\n"
+"buf_sq_index += buf_sq_step;\n"
+"#endif\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"}\n"
+"kernel void integral_sum_rows(__global const uchar *buf_ptr, int buf_step, int buf_offset,\n"
+"#ifdef SUM_SQUARE\n"
+"__global uchar *buf_sq_ptr, int buf_sq_step, int buf_sq_offset,\n"
+"#endif\n"
+"__global uchar *dst_ptr, int dst_step, int dst_offset, int rows, int cols\n"
+"#ifdef SUM_SQUARE\n"
+",__global uchar *dst_sq_ptr, int dst_sq_step, int dst_sq_offset\n"
+"#endif\n"
+")\n"
+"{\n"
+"__local sumT lm_sum[LOCAL_SUM_STRIDE * LOCAL_SUM_SIZE];\n"
+"#ifdef SUM_SQUARE\n"
+"__local sumSQT lm_sum_sq[LOCAL_SUM_STRIDE * LOCAL_SUM_SIZE];\n"
+"#endif\n"
+"int lid = get_local_id(0);\n"
+"int gid = get_group_id(0);\n"
+"int gs = get_global_size(0);\n"
+"int x = get_global_id(0);\n"
+"__global sumT *dst = (__global sumT *)(dst_ptr + dst_offset);\n"
+"for (int xin = x; xin < cols; xin += gs)\n"
+"{\n"
+"dst[xin] = 0;\n"
+"}\n"
+"dst_offset += dst_step;\n"
+"if (x < rows - 1)\n"
+"{\n"
+"dst = (__global sumT *)(dst_ptr + mad24(x, dst_step, dst_offset));\n"
+"dst[0] = 0;\n"
+"}\n"
+"int buf_index = mad24((int)sizeof(sumT), x, buf_offset);\n"
+"sumT accum = 0;\n"
+"#ifdef SUM_SQUARE\n"
+"__global sumSQT *dst_sq = (__global sumT *)(dst_sq_ptr + dst_sq_offset);\n"
+"for (int xin = x; xin < cols; xin += gs)\n"
+"{\n"
+"dst_sq[xin] = 0;\n"
+"}\n"
+"dst_sq_offset += dst_sq_step;\n"
+"if (x < rows - 1)\n"
+"{\n"
+"dst_sq = (__global sumSQT *)(dst_sq_ptr + mad24(x, dst_sq_step, dst_sq_offset));\n"
+"dst_sq[0] = 0;\n"
+"}\n"
+"int buf_sq_index = mad24((int)sizeof(sumSQT), x, buf_sq_offset);\n"
+"sumSQT accum_sq = 0;\n"
+"#endif\n"
+"for (int y = 1; y < cols; y += LOCAL_SUM_SIZE)\n"
+"{\n"
+"int lsum_index = lid;\n"
+"#pragma unroll\n"
+"for (int yin = 0; yin < LOCAL_SUM_SIZE; yin++, lsum_index += LOCAL_SUM_STRIDE)\n"
+"{\n"
+"__global const sumT *buf = (__global const sumT *)(buf_ptr + buf_index);\n"
+"accum += buf[0];\n"
+"lm_sum[lsum_index] = accum;\n"
+"buf_index += buf_step;\n"
+"#ifdef SUM_SQUARE\n"
+"__global const sumSQT *buf_sq = (__global const sumSQT *)(buf_sq_ptr + buf_sq_index);\n"
+"accum_sq += buf_sq[0];\n"
+"lm_sum_sq[lsum_index] = accum_sq;\n"
+"buf_sq_index += buf_sq_step;\n"
+"#endif\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (y + lid < cols)\n"
+"{\n"
+"int dst_index = mad24(dst_step, LOCAL_SUM_SIZE * gid, mad24((int)sizeof(sumT), y + lid, dst_offset));\n"
+"#ifdef SUM_SQUARE\n"
+"int dst_sq_index = mad24(dst_sq_step, LOCAL_SUM_SIZE * gid, mad24((int)sizeof(sumSQT), y + lid, dst_sq_offset));\n"
+"#endif\n"
+"lsum_index = LOCAL_SUM_STRIDE * lid;\n"
+"int yin_max = min(rows - 1 - LOCAL_SUM_SIZE * gid, LOCAL_SUM_SIZE);\n"
+"#pragma unroll\n"
+"for (int yin = 0; yin < yin_max; yin++, lsum_index++)\n"
+"{\n"
+"dst = (__global sumT *)(dst_ptr + dst_index);\n"
+"dst[0] = lm_sum[lsum_index];\n"
+"dst_index += dst_step;\n"
+"#ifdef SUM_SQUARE\n"
+"dst_sq = (__global sumSQT *)(dst_sq_ptr + dst_sq_index);\n"
+"dst_sq[0] = lm_sum_sq[lsum_index];\n"
+"dst_sq_index += dst_sq_step;\n"
+"#endif\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"}\n"
+, "ce49fba6c7a369504177acc108203a38"};
+ProgramSource integral_sum_oclsrc(integral_sum.programStr);
+const struct ProgramEntry laplacian5={"laplacian5",
+"#define noconvert\n"
+"#ifdef ONLY_SUM_CONVERT\n"
+"__kernel void sumConvert(__global const uchar * src1ptr, int src1_step, int src1_offset,\n"
+"__global const uchar * src2ptr, int src2_step, int src2_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"coeffT scale, coeffT delta)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (y < dst_rows && x < dst_cols)\n"
+"{\n"
+"int src1_index = mad24(y, src1_step, mad24(x, (int)sizeof(srcT), src1_offset));\n"
+"int src2_index = mad24(y, src2_step, mad24(x, (int)sizeof(srcT), src2_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, (int)sizeof(dstT), dst_offset));\n"
+"__global const srcT * src1 = (__global const srcT *)(src1ptr + src1_index);\n"
+"__global const srcT * src2 = (__global const srcT *)(src2ptr + src2_index);\n"
+"__global dstT * dst = (__global dstT *)(dstptr + dst_index);\n"
+"#if wdepth <= 4\n"
+"dst[0] = convertToDT( mad24((WT)(scale), convertToWT(src1[0]) + convertToWT(src2[0]), (WT)(delta)) );\n"
+"#else\n"
+"dst[0] = convertToDT( mad((WT)(scale), convertToWT(src1[0]) + convertToWT(src2[0]), (WT)(delta)) );\n"
+"#endif\n"
+"}\n"
+"}\n"
+"#else\n"
+"#ifdef BORDER_CONSTANT\n"
+"#define EXTRAPOLATE(x, maxV)\n"
+"#elif defined BORDER_REPLICATE\n"
+"#define EXTRAPOLATE(x, maxV) \\\n"
+"{ \\\n"
+"(x) = clamp((x), 0, (maxV)-1); \\\n"
+"}\n"
+"#elif defined BORDER_WRAP\n"
+"#define EXTRAPOLATE(x, maxV) \\\n"
+"{ \\\n"
+"(x) = ( (x) + (maxV) ) % (maxV); \\\n"
+"}\n"
+"#elif defined BORDER_REFLECT\n"
+"#define EXTRAPOLATE(x, maxV) \\\n"
+"{ \\\n"
+"(x) = min(((maxV)-1)*2-(x)+1, max((x),-(x)-1) ); \\\n"
+"}\n"
+"#elif defined BORDER_REFLECT_101\n"
+"#define EXTRAPOLATE(x, maxV) \\\n"
+"{ \\\n"
+"(x) = min(((maxV)-1)*2-(x), max((x),-(x)) ); \\\n"
+"}\n"
+"#else\n"
+"#error No extrapolation method\n"
+"#endif\n"
+"#if CN != 3\n"
+"#define loadpix(addr) *(__global const srcT *)(addr)\n"
+"#define storepix(val, addr) *(__global dstT *)(addr) = val\n"
+"#define SRCSIZE (int)sizeof(srcT)\n"
+"#define DSTSIZE (int)sizeof(dstT)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const srcT1 *)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global dstT1 *)(addr))\n"
+"#define SRCSIZE (int)sizeof(srcT1)*3\n"
+"#define DSTSIZE (int)sizeof(dstT1)*3\n"
+"#endif\n"
+"#define SRC(_x,_y) convertToWT(loadpix(Src + mad24(_y, src_step, SRCSIZE * _x)))\n"
+"#ifdef BORDER_CONSTANT\n"
+"#define ELEM(_x,_y,r_edge,t_edge,const_v) (_x)<0 | (_x) >= (r_edge) | (_y)<0 | (_y) >= (t_edge) ? (const_v) : SRC((_x),(_y))\n"
+"#else\n"
+"#define ELEM(_x,_y,r_edge,t_edge,const_v) SRC((_x),(_y))\n"
+"#endif\n"
+"#define DIG(a) a,\n"
+"__constant WT1 mat_kernelX[] = { KERNEL_MATRIX_X };\n"
+"__constant WT1 mat_kernelY[] = { KERNEL_MATRIX_Y };\n"
+"__kernel void laplacian(__global uchar* Src, int src_step, int srcOffsetX, int srcOffsetY, int height, int width,\n"
+"__global uchar* Dst, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"WT1 scale, WT1 delta)\n"
+"{\n"
+"__local WT lsmem[BLK_Y + 2 * RADIUS][BLK_X + 2 * RADIUS];\n"
+"__local WT lsmemDy1[BLK_Y][BLK_X + 2 * RADIUS];\n"
+"__local WT lsmemDy2[BLK_Y][BLK_X + 2 * RADIUS];\n"
+"int lix = get_local_id(0);\n"
+"int liy = get_local_id(1);\n"
+"int x = get_global_id(0);\n"
+"int srcX = x + srcOffsetX - RADIUS;\n"
+"int clocY = liy;\n"
+"do\n"
+"{\n"
+"int yb = clocY + srcOffsetY - RADIUS;\n"
+"EXTRAPOLATE(yb, (height));\n"
+"int clocX = lix;\n"
+"int cSrcX = srcX;\n"
+"do\n"
+"{\n"
+"int xb = cSrcX;\n"
+"EXTRAPOLATE(xb,(width));\n"
+"lsmem[clocY][clocX] = ELEM(xb, yb, (width), (height), 0 );\n"
+"clocX += BLK_X;\n"
+"cSrcX += BLK_X;\n"
+"}\n"
+"while(clocX < BLK_X+(RADIUS*2));\n"
+"clocY += BLK_Y;\n"
+"}\n"
+"while (clocY < BLK_Y+(RADIUS*2));\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"WT scale_v = (WT)scale;\n"
+"WT delta_v = (WT)delta;\n"
+"for (int y = 0; y < dst_rows; y+=BLK_Y)\n"
+"{\n"
+"int i, clocX = lix;\n"
+"WT sum1 = (WT) 0;\n"
+"WT sum2 = (WT) 0;\n"
+"do\n"
+"{\n"
+"sum1 = (WT) 0;\n"
+"sum2 = (WT) 0;\n"
+"for (i=0; i<=2*RADIUS; i++)\n"
+"{\n"
+"sum1 = mad(lsmem[liy + i][clocX], mat_kernelY[i], sum1);\n"
+"sum2 = mad(lsmem[liy + i][clocX], mat_kernelX[i], sum2);\n"
+"}\n"
+"lsmemDy1[liy][clocX] = sum1;\n"
+"lsmemDy2[liy][clocX] = sum2;\n"
+"clocX += BLK_X;\n"
+"}\n"
+"while(clocX < BLK_X+(RADIUS*2));\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if ((x < dst_cols) && (y + liy < dst_rows))\n"
+"{\n"
+"sum1 = (WT) 0;\n"
+"sum2 = (WT) 0;\n"
+"for (i=0; i<=2*RADIUS; i++)\n"
+"{\n"
+"sum1 = mad(lsmemDy1[liy][lix+i], mat_kernelX[i], sum1);\n"
+"sum2 = mad(lsmemDy2[liy][lix+i], mat_kernelY[i], sum2);\n"
+"}\n"
+"WT sum = mad(scale_v, (sum1 + sum2), delta_v);\n"
+"storepix(convertToDT(sum), Dst + mad24(y + liy, dst_step, mad24(x, DSTSIZE, dst_offset)));\n"
+"}\n"
+"for (int i = liy * BLK_X + lix; i < (RADIUS*2) * (BLK_X+(RADIUS*2)); i += BLK_X * BLK_Y)\n"
+"{\n"
+"int clocX = i % (BLK_X+(RADIUS*2));\n"
+"int clocY = i / (BLK_X+(RADIUS*2));\n"
+"lsmem[clocY][clocX] = lsmem[clocY + BLK_Y][clocX];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"int yb = y + liy + BLK_Y + srcOffsetY + RADIUS;\n"
+"EXTRAPOLATE(yb, (height));\n"
+"clocX = lix;\n"
+"int cSrcX = x + srcOffsetX - RADIUS;\n"
+"do\n"
+"{\n"
+"int xb = cSrcX;\n"
+"EXTRAPOLATE(xb,(width));\n"
+"lsmem[liy + 2*RADIUS][clocX] = ELEM(xb, yb, (width), (height), 0 );\n"
+"clocX += BLK_X;\n"
+"cSrcX += BLK_X;\n"
+"}\n"
+"while(clocX < BLK_X+(RADIUS*2));\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"}\n"
+"#endif\n"
+, "3ce3fc1a1c2e6be3a8fd0d2f51afeaf1"};
+ProgramSource laplacian5_oclsrc(laplacian5.programStr);
+const struct ProgramEntry match_template={"match_template",
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const T *)(addr)\n"
+"#define TSIZE (int)sizeof(T)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const T1 *)(addr))\n"
+"#define TSIZE ((int)sizeof(T1)*3)\n"
+"#endif\n"
+"#define SQSUMS_PTR(ox, oy) mad24(y + oy, src_sqsums_step, mad24(x + ox, cn, src_sqsums_offset))\n"
+"#define SUMS_PTR(ox, oy) mad24(y + oy, src_sums_step, mad24(x + ox, cn, src_sums_offset))\n"
+"#define SUMS(ox, oy) mad24(y+oy, src_sums_step, mad24(x+ox, (int)sizeof(T1)*cn, src_sums_offset))\n"
+"#define SQ_SUMS(ox, oy) mad24(y+oy, src_sqsums_step, mad24(x+ox, (int)sizeof(T1)*cn, src_sqsums_offset))\n"
+"inline float normAcc(float num, float denum)\n"
+"{\n"
+"if (fabs(num) < denum)\n"
+"return num / denum;\n"
+"if (fabs(num) < denum * 1.125f)\n"
+"return num > 0 ? 1 : -1;\n"
+"return 0;\n"
+"}\n"
+"inline float normAcc_SQDIFF(float num, float denum)\n"
+"{\n"
+"if (fabs(num) < denum)\n"
+"return num / denum;\n"
+"if (fabs(num) < denum * 1.125f)\n"
+"return num > 0 ? 1 : -1;\n"
+"return 1;\n"
+"}\n"
+"#define noconvert\n"
+"#if cn == 1\n"
+"#define convertToDT(value) (float)(value)\n"
+"#elif cn == 2\n"
+"#define convertToDT(value) (float)(value.x + value.y)\n"
+"#elif cn == 3\n"
+"#define convertToDT(value) (float)(value.x + value.y + value.z)\n"
+"#elif cn == 4\n"
+"#define convertToDT(value) (float)(value.x + value.y + value.z + value.w)\n"
+"#else\n"
+"#error \"cn should be 1-4\"\n"
+"#endif\n"
+"#ifdef CALC_SUM\n"
+"__kernel void calcSum(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"int cols, int total, __global float * dst)\n"
+"{\n"
+"int lid = get_local_id(0), id = get_global_id(0);\n"
+"__local WT localmem[WGS2_ALIGNED];\n"
+"WT accumulator = (WT)(0), tmp;\n"
+"for ( ; id < total; id += WGS)\n"
+"{\n"
+"int src_index = mad24(id / cols, src_step, mad24(id % cols, TSIZE, src_offset));\n"
+"T src = loadpix(srcptr + src_index);\n"
+"tmp = convertToWT(src);\n"
+"accumulator = mad(tmp, tmp, accumulator);\n"
+"}\n"
+"if (lid < WGS2_ALIGNED)\n"
+"localmem[lid] = accumulator;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (lid >= WGS2_ALIGNED && total >= WGS2_ALIGNED)\n"
+"localmem[lid - WGS2_ALIGNED] += accumulator;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"for (int lsize = WGS2_ALIGNED >> 1; lsize > 0; lsize >>= 1)\n"
+"{\n"
+"if (lid < lsize)\n"
+"{\n"
+"int lid2 = lsize + lid;\n"
+"localmem[lid] += localmem[lid2];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"if (lid == 0)\n"
+"dst[0] = convertToDT(localmem[0]);\n"
+"}\n"
+"#elif defined FIRST_CHANNEL\n"
+"__kernel void extractFirstChannel( const __global uchar* img, int img_step, int img_offset,\n"
+"__global uchar* res, int res_step, int res_offset, int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1)*PIX_PER_WI_Y;\n"
+"if(x < cols )\n"
+"{\n"
+"#pragma unroll\n"
+"for (int cy=0; cy < PIX_PER_WI_Y && y < rows; ++cy, ++y)\n"
+"{\n"
+"T1 image = *(__global const T1*)(img + mad24(y, img_step, mad24(x, (int)sizeof(T1)*cn, img_offset)));;\n"
+"int res_idx = mad24(y, res_step, mad24(x, (int)sizeof(float), res_offset));\n"
+"*(__global float *)(res + res_idx) = image;\n"
+"}\n"
+"}\n"
+"}\n"
+"#elif defined CCORR\n"
+"#if cn==1 && PIX_PER_WI_X==4\n"
+"__kernel void matchTemplate_Naive_CCORR(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global const uchar * templateptr, int template_step, int template_offset, int template_rows, int template_cols,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols)\n"
+"{\n"
+"int x0 = get_global_id(0)*PIX_PER_WI_X;\n"
+"int y = get_global_id(1);\n"
+"if (y < dst_rows)\n"
+"{\n"
+"if (x0 + PIX_PER_WI_X <= dst_cols)\n"
+"{\n"
+"WT sum = (WT)(0);\n"
+"int ind = mad24(y, src_step, mad24(x0, (int)sizeof(T1), src_offset));\n"
+"__global const T1 * template = (__global const T1*)(templateptr + template_offset);\n"
+"for (int i = 0; i < template_rows; ++i)\n"
+"{\n"
+"for (int j = 0; j < template_cols; ++j)\n"
+"{\n"
+"T temp = (T)(template[j]);\n"
+"T src = vload4(0, (__global const T1*)(srcptr + ind + j*(int)sizeof(T1)));\n"
+"sum = mad(convertToWT(src), convertToWT(temp), sum);\n"
+"}\n"
+"ind += src_step;\n"
+"template = (__global const T1 *)((__global const uchar *)template + template_step);\n"
+"}\n"
+"T temp = (T)(template[0]);\n"
+"int dst_idx = mad24(y, dst_step, mad24(x0, (int)sizeof(float), dst_offset));\n"
+"*(__global float4 *)(dst + dst_idx) = convert_float4(sum);\n"
+"}\n"
+"else\n"
+"{\n"
+"WT1 sum [PIX_PER_WI_X];\n"
+"#pragma unroll\n"
+"for (int i=0; i < PIX_PER_WI_X; i++) sum[i] = 0;\n"
+"__global const T1 * src = (__global const T1 *)(srcptr + mad24(y, src_step, mad24(x0, (int)sizeof(T1), src_offset)));\n"
+"__global const T1 * template = (__global const T1 *)(templateptr + template_offset);\n"
+"for (int i = 0; i < template_rows; ++i)\n"
+"{\n"
+"for (int j = 0; j < template_cols; ++j)\n"
+"{\n"
+"#pragma unroll\n"
+"for (int cx=0, x = x0; cx < PIX_PER_WI_X && x < dst_cols; ++cx, ++x)\n"
+"{\n"
+"sum[cx] = mad(convertToWT1(src[j+cx]), convertToWT1(template[j]), sum[cx]);\n"
+"}\n"
+"}\n"
+"src = (__global const T1 *)((__global const uchar *)src + src_step);\n"
+"template = (__global const T1 *)((__global const uchar *)template + template_step);\n"
+"}\n"
+"#pragma unroll\n"
+"for (int cx=0; cx < PIX_PER_WI_X && x0 < dst_cols; ++cx, ++x0)\n"
+"{\n"
+"int dst_idx = mad24(y, dst_step, mad24(x0, (int)sizeof(float), dst_offset));\n"
+"*(__global float *)(dst + dst_idx) = convertToDT(sum[cx]);\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"#else\n"
+"__kernel void matchTemplate_Naive_CCORR(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global const uchar * templateptr, int template_step, int template_offset, int template_rows, int template_cols,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (x < dst_cols && y < dst_rows)\n"
+"{\n"
+"WT sum = (WT)(0);\n"
+"for (int i = 0; i < template_rows; ++i)\n"
+"{\n"
+"for (int j = 0; j < template_cols; ++j)\n"
+"{\n"
+"T src = loadpix(srcptr + mad24(y+i, src_step, mad24(x+j, TSIZE, src_offset)));\n"
+"T template = loadpix(templateptr + mad24(i, template_step, mad24(j, TSIZE, template_offset)));\n"
+"sum = mad(convertToWT(src), convertToWT(template), sum);\n"
+"}\n"
+"}\n"
+"int dst_idx = mad24(y, dst_step, mad24(x, (int)sizeof(float), dst_offset));\n"
+"*(__global float *)(dst + dst_idx) = convertToDT(sum);\n"
+"}\n"
+"}\n"
+"#endif\n"
+"#elif defined CCORR_NORMED\n"
+"__kernel void matchTemplate_CCORR_NORMED(__global const uchar * src_sqsums, int src_sqsums_step, int src_sqsums_offset,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"int template_rows, int template_cols, __global const float * template_sqsum)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (x < dst_cols && y < dst_rows)\n"
+"{\n"
+"__global const float * sqsum = (__global const float *)(src_sqsums);\n"
+"src_sqsums_step /= sizeof(float);\n"
+"src_sqsums_offset /= sizeof(float);\n"
+"float image_sqsum_ = (float)(sqsum[SQSUMS_PTR(template_cols, template_rows)] - sqsum[SQSUMS_PTR(template_cols, 0)] -\n"
+"sqsum[SQSUMS_PTR(0, template_rows)] + sqsum[SQSUMS_PTR(0, 0)]);\n"
+"int dst_idx = mad24(y, dst_step, mad24(x, (int)sizeof(float), dst_offset));\n"
+"__global float * dstult = (__global float *)(dst + dst_idx);\n"
+"*dstult = normAcc(*dstult, sqrt(image_sqsum_ * template_sqsum[0]));\n"
+"}\n"
+"}\n"
+"#elif defined SQDIFF\n"
+"__kernel void matchTemplate_Naive_SQDIFF(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global const uchar * templateptr, int template_step, int template_offset, int template_rows, int template_cols,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (x < dst_cols && y < dst_rows)\n"
+"{\n"
+"WT sum = (WT)(0), value;\n"
+"for (int i = 0; i < template_rows; ++i)\n"
+"{\n"
+"for (int j = 0; j < template_cols; ++j)\n"
+"{\n"
+"T src = loadpix(srcptr + mad24(y+i, src_step, mad24(x+j, TSIZE, src_offset)));\n"
+"T template = loadpix(templateptr + mad24(i, template_step, mad24(j, TSIZE, template_offset)));\n"
+"value = convertToWT(src) - convertToWT(template);\n"
+"sum = mad(value, value, sum);\n"
+"}\n"
+"}\n"
+"int dst_idx = mad24(y, dst_step, mad24(x, (int)sizeof(float), dst_offset));\n"
+"*(__global float *)(dst + dst_idx) = convertToDT(sum);\n"
+"}\n"
+"}\n"
+"#elif defined SQDIFF_PREPARED\n"
+"__kernel void matchTemplate_Prepared_SQDIFF(__global const uchar * src_sqsums, int src_sqsums_step, int src_sqsums_offset,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"int template_rows, int template_cols, __global const float * template_sqsum)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (x < dst_cols && y < dst_rows)\n"
+"{\n"
+"src_sqsums_step /= sizeof(float);\n"
+"src_sqsums_offset /= sizeof(float);\n"
+"__global const float * sqsum = (__global const float *)(src_sqsums);\n"
+"float image_sqsum_ = (float)(\n"
+"(sqsum[SQSUMS_PTR(template_cols, template_rows)] - sqsum[SQSUMS_PTR(template_cols, 0)]) -\n"
+"(sqsum[SQSUMS_PTR(0, template_rows)] - sqsum[SQSUMS_PTR(0, 0)]));\n"
+"float template_sqsum_value = template_sqsum[0];\n"
+"int dst_idx = mad24(y, dst_step, mad24(x, (int)sizeof(float), dst_offset));\n"
+"__global float * dstult = (__global float *)(dst + dst_idx);\n"
+"*dstult = image_sqsum_ - 2.0f * dstult[0] + template_sqsum_value;\n"
+"}\n"
+"}\n"
+"#elif defined SQDIFF_NORMED\n"
+"__kernel void matchTemplate_SQDIFF_NORMED(__global const uchar * src_sqsums, int src_sqsums_step, int src_sqsums_offset,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"int template_rows, int template_cols, __global const float * template_sqsum)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (x < dst_cols && y < dst_rows)\n"
+"{\n"
+"src_sqsums_step /= sizeof(float);\n"
+"src_sqsums_offset /= sizeof(float);\n"
+"__global const float * sqsum = (__global const float *)(src_sqsums);\n"
+"float image_sqsum_ = (float)(\n"
+"(sqsum[SQSUMS_PTR(template_cols, template_rows)] - sqsum[SQSUMS_PTR(template_cols, 0)]) -\n"
+"(sqsum[SQSUMS_PTR(0, template_rows)] - sqsum[SQSUMS_PTR(0, 0)]));\n"
+"float template_sqsum_value = template_sqsum[0];\n"
+"int dst_idx = mad24(y, dst_step, mad24(x, (int)sizeof(float), dst_offset));\n"
+"__global float * dstult = (__global float *)(dst + dst_idx);\n"
+"*dstult = normAcc_SQDIFF(image_sqsum_ - 2.0f * dstult[0] + template_sqsum_value, sqrt(image_sqsum_ * template_sqsum_value));\n"
+"}\n"
+"}\n"
+"#elif defined CCOEFF\n"
+"#if cn == 1\n"
+"__kernel void matchTemplate_Prepared_CCOEFF(__global const uchar * src_sums, int src_sums_step, int src_sums_offset,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"int template_rows, int template_cols, float template_sum)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (x < dst_cols && y < dst_rows)\n"
+"{\n"
+"__global const T* sum = (__global const T*)(src_sums + mad24(y, src_sums_step, mad24(x, (int)sizeof(T), src_sums_offset)));\n"
+"int step = src_sums_step/(int)sizeof(T);\n"
+"T image_sum = (T)(0), value;\n"
+"value = (T)(sum[mad24(template_rows, step, template_cols)] - sum[mad24(template_rows, step, 0)] - sum[template_cols] + sum[0]);\n"
+"image_sum = mad(value, template_sum , image_sum);\n"
+"int dst_idx = mad24(y, dst_step, mad24(x, (int)sizeof(float), dst_offset));\n"
+"*(__global float *)(dst + dst_idx) -= convertToDT(image_sum);\n"
+"}\n"
+"}\n"
+"#elif cn==3\n"
+"__kernel void matchTemplate_Prepared_CCOEFF(__global const uchar * src_sums, int src_sums_step, int src_sums_offset,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"int template_rows, int template_cols, float4 template_sum)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (x < dst_cols && y < dst_rows)\n"
+"{\n"
+"T image_sum = (T)(0), value, temp_sum;\n"
+"temp_sum.x = template_sum.x;\n"
+"temp_sum.y = template_sum.y;\n"
+"temp_sum.z = template_sum.z;\n"
+"value = vload3(0, (__global const T1 *)(src_sums + SUMS(template_cols, template_rows)));\n"
+"value -= vload3(0, (__global const T1 *)(src_sums + SUMS(0, template_rows)));\n"
+"value -= vload3(0, (__global const T1 *)(src_sums + SUMS(template_cols, 0)));\n"
+"value += vload3(0, (__global const T1 *)(src_sums + SUMS(0, 0)));\n"
+"image_sum = mad(value, temp_sum , 0);\n"
+"int dst_idx = mad24(y, dst_step, mad24(x, (int)sizeof(float), dst_offset));\n"
+"*(__global float *)(dst + dst_idx) -= convertToDT(image_sum);\n"
+"}\n"
+"}\n"
+"#elif (cn==2 || cn==4)\n"
+"__kernel void matchTemplate_Prepared_CCOEFF(__global const uchar * src_sums, int src_sums_step, int src_sums_offset,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"int template_rows, int template_cols, float4 template_sum)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (x < dst_cols && y < dst_rows)\n"
+"{\n"
+"__global const T* sum = (__global const T*)(src_sums + mad24(y, src_sums_step, mad24(x, (int)sizeof(T), src_sums_offset)));\n"
+"int step = src_sums_step/(int)sizeof(T);\n"
+"T image_sum = (T)(0), value, temp_sum;\n"
+"#if cn==2\n"
+"temp_sum.x = template_sum.x;\n"
+"temp_sum.y = template_sum.y;\n"
+"#else\n"
+"temp_sum = template_sum;\n"
+"#endif\n"
+"value = (sum[mad24(template_rows, step, template_cols)] - sum[mad24(template_rows, step, 0)] - sum[template_cols] + sum[0]);\n"
+"image_sum = mad(value, temp_sum , image_sum);\n"
+"int dst_idx = mad24(y, dst_step, mad24(x, (int)sizeof(float), dst_offset));\n"
+"*(__global float *)(dst + dst_idx) -= convertToDT(image_sum);\n"
+"}\n"
+"}\n"
+"#else\n"
+"#error \"cn should be 1-4\"\n"
+"#endif\n"
+"#elif defined CCOEFF_NORMED\n"
+"#if cn == 1\n"
+"__kernel void matchTemplate_CCOEFF_NORMED(__global const uchar * src_sums, int src_sums_step, int src_sums_offset,\n"
+"__global const uchar * src_sqsums, int src_sqsums_step, int src_sqsums_offset,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"int t_rows, int t_cols, float weight, float template_sum, float template_sqsum)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"float sum_[2];\n"
+"float sqsum_[2];\n"
+"if (x < dst_cols && y < dst_rows)\n"
+"{\n"
+"int step = src_sums_step/(int)sizeof(T);\n"
+"__global const T* sum = (__global const T*)(src_sums + mad24(y, src_sums_step, mad24(x, (int)sizeof(T), src_sums_offset)));\n"
+"__global const T* sqsum = (__global const T*)(src_sqsums + mad24(y, src_sqsums_step, mad24(x, (int)sizeof(T), src_sqsums_offset)));\n"
+"T value_sum = sum[mad24(t_rows, step, t_cols)] - sum[mad24(t_rows, step, 0)] - sum[t_cols] + sum[0];\n"
+"T value_sqsum = sqsum[mad24(t_rows, step, t_cols)] - sqsum[mad24(t_rows, step, 0)] - sqsum[t_cols] + sqsum[0];\n"
+"float num = convertToDT(mad(value_sum, template_sum, 0));\n"
+"value_sqsum -= weight * value_sum * value_sum;\n"
+"float denum = sqrt(mad(template_sqsum, convertToDT(value_sqsum), 0));\n"
+"int dst_idx = mad24(y, dst_step, mad24(x, (int)sizeof(float), dst_offset));\n"
+"__global float * dstult = (__global float *)(dst+dst_idx);\n"
+"*dstult = normAcc((*dstult) - num, denum);\n"
+"}\n"
+"}\n"
+"#elif cn==3\n"
+"__kernel void matchTemplate_CCOEFF_NORMED(__global const uchar * src_sums, int src_sums_step, int src_sums_offset,\n"
+"__global const uchar * src_sqsums, int src_sqsums_step, int src_sqsums_offset,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"int t_rows, int t_cols, float weight, float4 template_sum, float template_sqsum)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (x < dst_cols && y < dst_rows)\n"
+"{\n"
+"int step = src_sums_step/(int)sizeof(T);\n"
+"T temp_sum, value_sum, value_sqsum;\n"
+"temp_sum.x = template_sum.x;\n"
+"temp_sum.y = template_sum.y;\n"
+"temp_sum.z = template_sum.z;\n"
+"value_sum = vload3(0, (__global const T1 *)(src_sums + SUMS(t_cols, t_rows)));\n"
+"value_sum -= vload3(0, (__global const T1 *)(src_sums + SUMS(0, t_rows)));\n"
+"value_sum -= vload3(0, (__global const T1 *)(src_sums + SUMS(t_cols, 0)));\n"
+"value_sum += vload3(0, (__global const T1 *)(src_sums + SUMS(0, 0)));\n"
+"value_sqsum = vload3(0, (__global const T1 *)(src_sqsums + SQ_SUMS(t_cols, t_rows)));\n"
+"value_sqsum -= vload3(0, (__global const T1 *)(src_sqsums + SQ_SUMS(0, t_rows)));\n"
+"value_sqsum -= vload3(0, (__global const T1 *)(src_sqsums + SQ_SUMS(t_cols, 0)));\n"
+"value_sqsum += vload3(0, (__global const T1 *)(src_sqsums + SQ_SUMS(0, 0)));\n"
+"float num = convertToDT(mad(value_sum, temp_sum, 0));\n"
+"value_sqsum -= weight * value_sum * value_sum;\n"
+"float denum = sqrt(mad(template_sqsum, convertToDT(value_sqsum), 0));\n"
+"int dst_idx = mad24(y, dst_step, mad24(x, (int)sizeof(float), dst_offset));\n"
+"__global float * dstult = (__global float *)(dst+dst_idx);\n"
+"*dstult = normAcc((*dstult) - num, denum);\n"
+"}\n"
+"}\n"
+"#elif (cn==2 || cn==4)\n"
+"__kernel void matchTemplate_CCOEFF_NORMED(__global const uchar * src_sums, int src_sums_step, int src_sums_offset,\n"
+"__global const uchar * src_sqsums, int src_sqsums_step, int src_sqsums_offset,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"int t_rows, int t_cols, float weight, float4 template_sum, float template_sqsum)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (x < dst_cols && y < dst_rows)\n"
+"{\n"
+"int step = src_sums_step/(int)sizeof(T);\n"
+"T temp_sum;\n"
+"__global const T* sum = (__global const T*)(src_sums + mad24(y, src_sums_step, mad24(x, (int)sizeof(T), src_sums_offset)));\n"
+"__global const T* sqsum = (__global const T*)(src_sqsums + mad24(y, src_sqsums_step, mad24(x, (int)sizeof(T), src_sqsums_offset)));\n"
+"T value_sum = sum[mad24(t_rows, step, t_cols)] - sum[mad24(t_rows, step, 0)] - sum[t_cols] + sum[0];\n"
+"T value_sqsum = sqsum[mad24(t_rows, step, t_cols)] - sqsum[mad24(t_rows, step, 0)] - sqsum[t_cols] + sqsum[0];\n"
+"#if cn==2\n"
+"temp_sum.x = template_sum.x;\n"
+"temp_sum.y = template_sum.y;\n"
+"#else\n"
+"temp_sum = template_sum;\n"
+"#endif\n"
+"float num = convertToDT(mad(value_sum, temp_sum, 0));\n"
+"value_sqsum -= weight * value_sum * value_sum;\n"
+"float denum = sqrt(mad(template_sqsum, convertToDT(value_sqsum), 0));\n"
+"int dst_idx = mad24(y, dst_step, mad24(x, (int)sizeof(float), dst_offset));\n"
+"__global float * dstult = (__global float *)(dst+dst_idx);\n"
+"*dstult = normAcc((*dstult) - num, denum);\n"
+"}\n"
+"}\n"
+"#else\n"
+"#error \"cn should be 1-4\"\n"
+"#endif\n"
+"#endif\n"
+, "b3c29b8efeb2ed66a052794cb7d162cb"};
+ProgramSource match_template_oclsrc(match_template.programStr);
+const struct ProgramEntry medianFilter={"medianFilter",
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const T *)(addr)\n"
+"#define storepix(val, addr) *(__global T *)(addr) = val\n"
+"#define TSIZE (int)sizeof(T)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const T1 *)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global T1 *)(addr))\n"
+"#define TSIZE (int)sizeof(T1) * cn\n"
+"#endif\n"
+"#define OP(a,b) { mid=a; a=min(a,b); b=max(mid,b);}\n"
+"#ifdef USE_4OPT\n"
+"#if cn == 1\n"
+"#define LOAD4(val, offs) (val) = vload4(0, (__global T1 *)(srcptr + src_index + (offs)))\n"
+"#define STORE4(val, offs) vstore4((val), 0, (__global T1 *)(dstptr + (offs)))\n"
+"#define SHUFFLE4_3(src0, src1, src2, dst0, dst1, dst2) { dst1 = src1; \\\n"
+"dst0 = (T4)(src0, dst1.xyz); \\\n"
+"dst2 = (T4)(dst1.yzw, src2); }\n"
+"#define SHUFFLE4_5(src0, src1, src2, src3, src4, dst0, dst1, dst2, dst3, dst4) { dst2 = src2; \\\n"
+"dst0 = (T4)(src0, src1, dst2.xy); \\\n"
+"dst1 = (T4)(src1, dst2.xyz); \\\n"
+"dst3 = (T4)(dst2.yzw, src3); \\\n"
+"dst4 = (T4)(dst2.zw, src3, src4); }\n"
+"#elif cn == 2\n"
+"#define LOAD4(val, offs) (val) = vload8(0, (__global T1 *)(srcptr + src_index + (offs)))\n"
+"#define STORE4(val, offs) vstore8((val), 0, (__global T1 *)(dstptr + (offs)))\n"
+"#define SHUFFLE4_3(src0, src1, src2, dst0, dst1, dst2) { dst1 = src1; \\\n"
+"dst0 = (T4)(src0, dst1.s012345); \\\n"
+"dst2 = (T4)(dst1.s234567, src2); }\n"
+"#define SHUFFLE4_5(src0, src1, src2, src3, src4, dst0, dst1, dst2, dst3, dst4) { dst2 = src2; \\\n"
+"dst0 = (T4)(src0, src1, dst2.s0123); \\\n"
+"dst1 = (T4)(src1, dst2.s012345); \\\n"
+"dst3 = (T4)(dst2.s234567, src3); \\\n"
+"dst4 = (T4)(dst2.s4567, src3, src4); }\n"
+"#elif cn == 4\n"
+"#define LOAD4(val, offs) (val) = vload16(0, (__global T1 *)(srcptr + src_index + (offs)))\n"
+"#define STORE4(val, offs) vstore16((val), 0, (__global T1 *)(dstptr + (offs)))\n"
+"#define SHUFFLE4_3(src0, src1, src2, dst0, dst1, dst2) { dst1 = src1; \\\n"
+"dst0 = (T4)(src0, dst1.s0123456789ab ); \\\n"
+"dst2 = (T4)(dst1.s456789abcdef, src2); }\n"
+"#define SHUFFLE4_5(src0, src1, src2, src3, src4, dst0, dst1, dst2, dst3, dst4) { dst2 = src2; \\\n"
+"dst0 = (T4)(src0, src1, dst2.s01234567); \\\n"
+"dst1 = (T4)(src1, dst2.s0123456789ab); \\\n"
+"dst3 = (T4)(dst2.s456789abcdef, src3); \\\n"
+"dst4 = (T4)(dst2.s89abcdef, src3, src4); }\n"
+"#endif\n"
+"__kernel void medianFilter3_u(__global const uchar* srcptr, int srcStep, int srcOffset,\n"
+"__global uchar* dstptr, int dstStep, int dstOffset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int gx= get_global_id(0) << 2;\n"
+"int gy= get_global_id(1) << 2;\n"
+"if( gy >= rows || gx >= cols)\n"
+"return;\n"
+"T c0; T4 c1; T c2;\n"
+"T c3; T4 c4; T c5;\n"
+"T c6; T4 c7; T c8;\n"
+"int x_left = mad24(max(gx-1, 0), TSIZE, srcOffset);\n"
+"int x_central = mad24(gx, TSIZE, srcOffset);\n"
+"int x_right = mad24(min(gx+4, cols-1), TSIZE, srcOffset);\n"
+"int xdst = mad24(gx, TSIZE, dstOffset);\n"
+"int src_index = max(gy-1, 0)*srcStep;\n"
+"c0 = *(__global T *)(srcptr + src_index + x_left);\n"
+"LOAD4(c1, x_central);\n"
+"c2 = *(__global T *)(srcptr + src_index + x_right);\n"
+"src_index = gy*srcStep;\n"
+"c3 = *(__global T *)(srcptr + src_index + x_left);\n"
+"LOAD4(c4, x_central);\n"
+"c5 = *(__global T *)(srcptr + src_index + x_right);\n"
+"#define ITER3(k) { \\\n"
+"src_index = min(gy+k+1, rows-1)*srcStep; \\\n"
+"c6 = *(__global T *)(srcptr + src_index + x_left); \\\n"
+"LOAD4(c7, x_central); \\\n"
+"c8 = *(__global T *)(srcptr + src_index + x_right); \\\n"
+"T4 p0, p1, p2, p3, p4, p5, p6, p7, p8; \\\n"
+"SHUFFLE4_3(c0, c1, c2, p0, p1, p2); \\\n"
+"SHUFFLE4_3(c3, c4, c5, p3, p4, p5); \\\n"
+"SHUFFLE4_3(c6, c7, c8, p6, p7, p8); \\\n"
+"T4 mid; \\\n"
+"OP(p1, p2); OP(p4, p5); OP(p7, p8); OP(p0, p1); \\\n"
+"OP(p3, p4); OP(p6, p7); OP(p1, p2); OP(p4, p5); \\\n"
+"OP(p7, p8); OP(p0, p3); OP(p5, p8); OP(p4, p7); \\\n"
+"OP(p3, p6); OP(p1, p4); OP(p2, p5); OP(p4, p7); \\\n"
+"OP(p4, p2); OP(p6, p4); OP(p4, p2); \\\n"
+"int dst_index = mad24( gy+k, dstStep, xdst); \\\n"
+"STORE4(p4, dst_index); \\\n"
+"c0 = c3; c1 = c4; c2 = c5; \\\n"
+"c3 = c6; c4 = c7; c5 = c8; \\\n"
+"}\n"
+"ITER3(0);\n"
+"ITER3(1);\n"
+"ITER3(2);\n"
+"ITER3(3);\n"
+"}\n"
+"__kernel void medianFilter5_u(__global const uchar* srcptr, int srcStep, int srcOffset,\n"
+"__global uchar* dstptr, int dstStep, int dstOffset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int gx= get_global_id(0) << 2;\n"
+"int gy= get_global_id(1) << 2;\n"
+"if( gy >= rows || gx >= cols)\n"
+"return;\n"
+"T c0; T c1; T4 c2; T c3; T c4;\n"
+"T c5; T c6; T4 c7; T c8; T c9;\n"
+"T c10; T c11; T4 c12; T c13; T c14;\n"
+"T c15; T c16; T4 c17; T c18; T c19;\n"
+"T c20; T c21; T4 c22; T c23; T c24;\n"
+"int x_leftmost = mad24(max(gx-2, 0), TSIZE, srcOffset);\n"
+"int x_left = mad24(max(gx-1, 0), TSIZE, srcOffset);\n"
+"int x_central = mad24(gx, TSIZE, srcOffset);\n"
+"int x_right = mad24(min(gx+4, cols-1), TSIZE, srcOffset);\n"
+"int x_rightmost= mad24(min(gx+5, cols-1), TSIZE, srcOffset);\n"
+"int xdst = mad24(gx, TSIZE, dstOffset);\n"
+"int src_index = max(gy-2, 0)*srcStep;\n"
+"c0 = *(__global T *)(srcptr + src_index + x_leftmost);\n"
+"c1 = *(__global T *)(srcptr + src_index + x_left);\n"
+"LOAD4(c2, x_central);\n"
+"c3 = *(__global T *)(srcptr + src_index + x_right);\n"
+"c4 = *(__global T *)(srcptr + src_index + x_rightmost);\n"
+"src_index = max(gy-1, 0)*srcStep;\n"
+"c5 = *(__global T *)(srcptr + src_index + x_leftmost);\n"
+"c6 = *(__global T *)(srcptr + src_index + x_left);\n"
+"LOAD4(c7, x_central);\n"
+"c8 = *(__global T *)(srcptr + src_index + x_right);\n"
+"c9 = *(__global T *)(srcptr + src_index + x_rightmost);\n"
+"src_index = gy*srcStep;\n"
+"c10 = *(__global T *)(srcptr + src_index + x_leftmost);\n"
+"c11 = *(__global T *)(srcptr + src_index + x_left);\n"
+"LOAD4(c12, x_central);\n"
+"c13 = *(__global T *)(srcptr + src_index + x_right);\n"
+"c14 = *(__global T *)(srcptr + src_index + x_rightmost);\n"
+"src_index = (gy+1)*srcStep;\n"
+"c15 = *(__global T *)(srcptr + src_index + x_leftmost);\n"
+"c16 = *(__global T *)(srcptr + src_index + x_left);\n"
+"LOAD4(c17, x_central);\n"
+"c18 = *(__global T *)(srcptr + src_index + x_right);\n"
+"c19 = *(__global T *)(srcptr + src_index + x_rightmost);\n"
+"for(int k = 0; k < 4; k++)\n"
+"{\n"
+"src_index = min(gy+k+2, rows-1) * srcStep;\n"
+"c20 = *(__global T *)(srcptr + src_index + x_leftmost);\n"
+"c21 = *(__global T *)(srcptr + src_index + x_left);\n"
+"LOAD4(c22, x_central);\n"
+"c23 = *(__global T *)(srcptr + src_index + x_right);\n"
+"c24 = *(__global T *)(srcptr + src_index + x_rightmost);\n"
+"T4 p0, p1, p2, p3, p4,\n"
+"p5, p6, p7, p8, p9,\n"
+"p10, p11, p12, p13, p14,\n"
+"p15, p16, p17, p18, p19,\n"
+"p20, p21, p22, p23, p24;\n"
+"SHUFFLE4_5(c0, c1, c2, c3, c4, p0, p1, p2, p3, p4);\n"
+"SHUFFLE4_5(c5, c6, c7, c8, c9, p5, p6, p7, p8, p9);\n"
+"SHUFFLE4_5(c10, c11, c12, c13, c14, p10, p11, p12, p13, p14);\n"
+"SHUFFLE4_5(c15, c16, c17, c18, c19, p15, p16, p17, p18, p19);\n"
+"SHUFFLE4_5(c20, c21, c22, c23, c24, p20, p21, p22, p23, p24);\n"
+"T4 mid;\n"
+"OP(p1, p2); OP(p0, p1); OP(p1, p2); OP(p4, p5); OP(p3, p4);\n"
+"OP(p4, p5); OP(p0, p3); OP(p2, p5); OP(p2, p3); OP(p1, p4);\n"
+"OP(p1, p2); OP(p3, p4); OP(p7, p8); OP(p6, p7); OP(p7, p8);\n"
+"OP(p10, p11); OP(p9, p10); OP(p10, p11); OP(p6, p9); OP(p8, p11);\n"
+"OP(p8, p9); OP(p7, p10); OP(p7, p8); OP(p9, p10); OP(p0, p6);\n"
+"OP(p4, p10); OP(p4, p6); OP(p2, p8); OP(p2, p4); OP(p6, p8);\n"
+"OP(p1, p7); OP(p5, p11); OP(p5, p7); OP(p3, p9); OP(p3, p5);\n"
+"OP(p7, p9); OP(p1, p2); OP(p3, p4); OP(p5, p6); OP(p7, p8);\n"
+"OP(p9, p10); OP(p13, p14); OP(p12, p13); OP(p13, p14); OP(p16, p17);\n"
+"OP(p15, p16); OP(p16, p17); OP(p12, p15); OP(p14, p17); OP(p14, p15);\n"
+"OP(p13, p16); OP(p13, p14); OP(p15, p16); OP(p19, p20); OP(p18, p19);\n"
+"OP(p19, p20); OP(p21, p22); OP(p23, p24); OP(p21, p23); OP(p22, p24);\n"
+"OP(p22, p23); OP(p18, p21); OP(p20, p23); OP(p20, p21); OP(p19, p22);\n"
+"OP(p22, p24); OP(p19, p20); OP(p21, p22); OP(p23, p24); OP(p12, p18);\n"
+"OP(p16, p22); OP(p16, p18); OP(p14, p20); OP(p20, p24); OP(p14, p16);\n"
+"OP(p18, p20); OP(p22, p24); OP(p13, p19); OP(p17, p23); OP(p17, p19);\n"
+"OP(p15, p21); OP(p15, p17); OP(p19, p21); OP(p13, p14); OP(p15, p16);\n"
+"OP(p17, p18); OP(p19, p20); OP(p21, p22); OP(p23, p24); OP(p0, p12);\n"
+"OP(p8, p20); OP(p8, p12); OP(p4, p16); OP(p16, p24); OP(p12, p16);\n"
+"OP(p2, p14); OP(p10, p22); OP(p10, p14); OP(p6, p18); OP(p6, p10);\n"
+"OP(p10, p12); OP(p1, p13); OP(p9, p21); OP(p9, p13); OP(p5, p17);\n"
+"OP(p13, p17); OP(p3, p15); OP(p11, p23); OP(p11, p15); OP(p7, p19);\n"
+"OP(p7, p11); OP(p11, p13); OP(p11, p12);\n"
+"int dst_index = mad24( gy+k, dstStep, xdst);\n"
+"STORE4(p12, dst_index);\n"
+"c0=c5; c1=c6; c2=c7; c3=c8; c4=c9;\n"
+"c5=c10; c6=c11; c7=c12; c8=c13; c9=c14;\n"
+"c10=c15; c11=c16; c12=c17; c13=c18; c14=c19;\n"
+"c15=c20; c16=c21; c17=c22; c18=c23; c19=c24;\n"
+"}\n"
+"}\n"
+"#endif\n"
+"__kernel void medianFilter3(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols)\n"
+"{\n"
+"__local T data[18][18];\n"
+"int x = get_local_id(0);\n"
+"int y = get_local_id(1);\n"
+"int gx = get_global_id(0);\n"
+"int gy = get_global_id(1);\n"
+"int dx = gx - x - 1;\n"
+"int dy = gy - y - 1;\n"
+"int id = min(mad24(x, 16, y), 9*18-1);\n"
+"int dr = id / 18;\n"
+"int dc = id % 18;\n"
+"int c = clamp(dx + dc, 0, dst_cols - 1);\n"
+"int r = clamp(dy + dr, 0, dst_rows - 1);\n"
+"int index1 = mad24(r, src_step, mad24(c, TSIZE, src_offset));\n"
+"r = clamp(dy + dr + 9, 0, dst_rows - 1);\n"
+"int index9 = mad24(r, src_step, mad24(c, TSIZE, src_offset));\n"
+"data[dr][dc] = loadpix(srcptr + index1);\n"
+"data[dr+9][dc] = loadpix(srcptr + index9);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"T p0 = data[y][x], p1 = data[y][(x+1)], p2 = data[y][(x+2)];\n"
+"T p3 = data[y+1][x], p4 = data[y+1][(x+1)], p5 = data[y+1][(x+2)];\n"
+"T p6 = data[y+2][x], p7 = data[y+2][(x+1)], p8 = data[y+2][(x+2)];\n"
+"T mid;\n"
+"OP(p1, p2); OP(p4, p5); OP(p7, p8); OP(p0, p1);\n"
+"OP(p3, p4); OP(p6, p7); OP(p1, p2); OP(p4, p5);\n"
+"OP(p7, p8); OP(p0, p3); OP(p5, p8); OP(p4, p7);\n"
+"OP(p3, p6); OP(p1, p4); OP(p2, p5); OP(p4, p7);\n"
+"OP(p4, p2); OP(p6, p4); OP(p4, p2);\n"
+"int dst_index = mad24( gy, dst_step, mad24(gx, TSIZE, dst_offset));\n"
+"if (gy < dst_rows && gx < dst_cols)\n"
+"storepix(p4, dstptr + dst_index);\n"
+"}\n"
+"__kernel void medianFilter5(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols)\n"
+"{\n"
+"__local T data[20][20];\n"
+"int x = get_local_id(0);\n"
+"int y = get_local_id(1);\n"
+"int gx = get_global_id(0);\n"
+"int gy = get_global_id(1);\n"
+"int dx = gx - x - 2;\n"
+"int dy = gy - y - 2;\n"
+"int id = min(mad24(x, 16, y), 10*20-1);\n"
+"int dr = id / 20;\n"
+"int dc = id % 20;\n"
+"int c = clamp(dx + dc, 0, dst_cols - 1);\n"
+"int r = clamp(dy + dr, 0, dst_rows - 1);\n"
+"int index1 = mad24(r, src_step, mad24(c, TSIZE, src_offset));\n"
+"r = clamp(dy + dr + 10, 0, dst_rows - 1);\n"
+"int index10 = mad24(r, src_step, mad24(c, TSIZE, src_offset));\n"
+"data[dr][dc] = loadpix(srcptr + index1);\n"
+"data[dr+10][dc] = loadpix(srcptr + index10);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"T p0 = data[y][x], p1 = data[y][x+1], p2 = data[y][x+2], p3 = data[y][x+3], p4 = data[y][x+4];\n"
+"T p5 = data[y+1][x], p6 = data[y+1][x+1], p7 = data[y+1][x+2], p8 = data[y+1][x+3], p9 = data[y+1][x+4];\n"
+"T p10 = data[y+2][x], p11 = data[y+2][x+1], p12 = data[y+2][x+2], p13 = data[y+2][x+3], p14 = data[y+2][x+4];\n"
+"T p15 = data[y+3][x], p16 = data[y+3][x+1], p17 = data[y+3][x+2], p18 = data[y+3][x+3], p19 = data[y+3][x+4];\n"
+"T p20 = data[y+4][x], p21 = data[y+4][x+1], p22 = data[y+4][x+2], p23 = data[y+4][x+3], p24 = data[y+4][x+4];\n"
+"T mid;\n"
+"OP(p1, p2); OP(p0, p1); OP(p1, p2); OP(p4, p5); OP(p3, p4);\n"
+"OP(p4, p5); OP(p0, p3); OP(p2, p5); OP(p2, p3); OP(p1, p4);\n"
+"OP(p1, p2); OP(p3, p4); OP(p7, p8); OP(p6, p7); OP(p7, p8);\n"
+"OP(p10, p11); OP(p9, p10); OP(p10, p11); OP(p6, p9); OP(p8, p11);\n"
+"OP(p8, p9); OP(p7, p10); OP(p7, p8); OP(p9, p10); OP(p0, p6);\n"
+"OP(p4, p10); OP(p4, p6); OP(p2, p8); OP(p2, p4); OP(p6, p8);\n"
+"OP(p1, p7); OP(p5, p11); OP(p5, p7); OP(p3, p9); OP(p3, p5);\n"
+"OP(p7, p9); OP(p1, p2); OP(p3, p4); OP(p5, p6); OP(p7, p8);\n"
+"OP(p9, p10); OP(p13, p14); OP(p12, p13); OP(p13, p14); OP(p16, p17);\n"
+"OP(p15, p16); OP(p16, p17); OP(p12, p15); OP(p14, p17); OP(p14, p15);\n"
+"OP(p13, p16); OP(p13, p14); OP(p15, p16); OP(p19, p20); OP(p18, p19);\n"
+"OP(p19, p20); OP(p21, p22); OP(p23, p24); OP(p21, p23); OP(p22, p24);\n"
+"OP(p22, p23); OP(p18, p21); OP(p20, p23); OP(p20, p21); OP(p19, p22);\n"
+"OP(p22, p24); OP(p19, p20); OP(p21, p22); OP(p23, p24); OP(p12, p18);\n"
+"OP(p16, p22); OP(p16, p18); OP(p14, p20); OP(p20, p24); OP(p14, p16);\n"
+"OP(p18, p20); OP(p22, p24); OP(p13, p19); OP(p17, p23); OP(p17, p19);\n"
+"OP(p15, p21); OP(p15, p17); OP(p19, p21); OP(p13, p14); OP(p15, p16);\n"
+"OP(p17, p18); OP(p19, p20); OP(p21, p22); OP(p23, p24); OP(p0, p12);\n"
+"OP(p8, p20); OP(p8, p12); OP(p4, p16); OP(p16, p24); OP(p12, p16);\n"
+"OP(p2, p14); OP(p10, p22); OP(p10, p14); OP(p6, p18); OP(p6, p10);\n"
+"OP(p10, p12); OP(p1, p13); OP(p9, p21); OP(p9, p13); OP(p5, p17);\n"
+"OP(p13, p17); OP(p3, p15); OP(p11, p23); OP(p11, p15); OP(p7, p19);\n"
+"OP(p7, p11); OP(p11, p13); OP(p11, p12);\n"
+"int dst_index = mad24(gy, dst_step, mad24(gx, TSIZE, dst_offset));\n"
+"if (gy < dst_rows && gx < dst_cols)\n"
+"storepix(p12, dstptr + dst_index);\n"
+"}\n"
+, "f082457348bfbcb2e2de3014f46093a8"};
+ProgramSource medianFilter_oclsrc(medianFilter.programStr);
+const struct ProgramEntry moments={"moments",
+"#if TILE_SIZE != 32\n"
+"#error \"TILE SIZE should be 32\"\n"
+"#endif\n"
+"__kernel void moments(__global const uchar* src, int src_step, int src_offset,\n"
+"int src_rows, int src_cols, __global int* mom0, int xtiles)\n"
+"{\n"
+"int x0 = get_global_id(0);\n"
+"int y0 = get_group_id(1);\n"
+"int x, y = get_local_id(1);\n"
+"int x_min = x0*TILE_SIZE;\n"
+"int ypix = y0*TILE_SIZE + y;\n"
+"__local int mom[TILE_SIZE][10];\n"
+"if (x_min < src_cols && y0*TILE_SIZE < src_rows)\n"
+"{\n"
+"if (ypix < src_rows)\n"
+"{\n"
+"int x_max = min(src_cols - x_min, TILE_SIZE);\n"
+"__global const uchar* ptr = src + src_offset + ypix*src_step + x_min;\n"
+"int4 S = (int4)(0, 0, 0, 0), p;\n"
+"#define SUM_ELEM(elem, ofs) \\\n"
+"(int4)(1, (ofs), (ofs)*(ofs), (ofs)*(ofs)*(ofs))*elem\n"
+"x = x_max & -4;\n"
+"if (x_max >= 4)\n"
+"{\n"
+"p = convert_int4(vload4(0, ptr));\n"
+"#ifdef OP_MOMENTS_BINARY\n"
+"p = min(p, 1);\n"
+"#endif\n"
+"S += (int4)(p.s0, 0, 0, 0) + (int4)(p.s1, p.s1, p.s1, p.s1) +\n"
+"(int4)(p.s2, p.s2 * 2, p.s2 * 4, p.s2 * 8) + (int4)(p.s3, p.s3 * 3, p.s3 * 9, p.s3 * 27);\n"
+"if (x_max >= 8)\n"
+"{\n"
+"p = convert_int4(vload4(0, ptr + 4));\n"
+"#ifdef OP_MOMENTS_BINARY\n"
+"p = min(p, 1);\n"
+"#endif\n"
+"S += (int4)(p.s0, p.s0 * 4, p.s0 * 16, p.s0 * 64) + (int4)(p.s1, p.s1 * 5, p.s1 * 25, p.s1 * 125) +\n"
+"(int4)(p.s2, p.s2 * 6, p.s2 * 36, p.s2 * 216) + (int4)(p.s3, p.s3 * 7, p.s3 * 49, p.s3 * 343);\n"
+"if (x_max >= 12)\n"
+"{\n"
+"p = convert_int4(vload4(0, ptr + 8));\n"
+"#ifdef OP_MOMENTS_BINARY\n"
+"p = min(p, 1);\n"
+"#endif\n"
+"S += (int4)(p.s0, p.s0 * 8, p.s0 * 64, p.s0 * 512) + (int4)(p.s1, p.s1 * 9, p.s1 * 81, p.s1 * 729) +\n"
+"(int4)(p.s2, p.s2 * 10, p.s2 * 100, p.s2 * 1000) + (int4)(p.s3, p.s3 * 11, p.s3 * 121, p.s3 * 1331);\n"
+"if (x_max >= 16)\n"
+"{\n"
+"p = convert_int4(vload4(0, ptr + 12));\n"
+"#ifdef OP_MOMENTS_BINARY\n"
+"p = min(p, 1);\n"
+"#endif\n"
+"S += (int4)(p.s0, p.s0 * 12, p.s0 * 144, p.s0 * 1728) + (int4)(p.s1, p.s1 * 13, p.s1 * 169, p.s1 * 2197) +\n"
+"(int4)(p.s2, p.s2 * 14, p.s2 * 196, p.s2 * 2744) + (int4)(p.s3, p.s3 * 15, p.s3 * 225, p.s3 * 3375);\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"if (x_max >= 20)\n"
+"{\n"
+"p = convert_int4(vload4(0, ptr + 16));\n"
+"#ifdef OP_MOMENTS_BINARY\n"
+"p = min(p, 1);\n"
+"#endif\n"
+"S += (int4)(p.s0, p.s0 * 16, p.s0 * 256, p.s0 * 4096) + (int4)(p.s1, p.s1 * 17, p.s1 * 289, p.s1 * 4913) +\n"
+"(int4)(p.s2, p.s2 * 18, p.s2 * 324, p.s2 * 5832) + (int4)(p.s3, p.s3 * 19, p.s3 * 361, p.s3 * 6859);\n"
+"if (x_max >= 24)\n"
+"{\n"
+"p = convert_int4(vload4(0, ptr + 20));\n"
+"#ifdef OP_MOMENTS_BINARY\n"
+"p = min(p, 1);\n"
+"#endif\n"
+"S += (int4)(p.s0, p.s0 * 20, p.s0 * 400, p.s0 * 8000) + (int4)(p.s1, p.s1 * 21, p.s1 * 441, p.s1 * 9261) +\n"
+"(int4)(p.s2, p.s2 * 22, p.s2 * 484, p.s2 * 10648) + (int4)(p.s3, p.s3 * 23, p.s3 * 529, p.s3 * 12167);\n"
+"if (x_max >= 28)\n"
+"{\n"
+"p = convert_int4(vload4(0, ptr + 24));\n"
+"#ifdef OP_MOMENTS_BINARY\n"
+"p = min(p, 1);\n"
+"#endif\n"
+"S += (int4)(p.s0, p.s0 * 24, p.s0 * 576, p.s0 * 13824) + (int4)(p.s1, p.s1 * 25, p.s1 * 625, p.s1 * 15625) +\n"
+"(int4)(p.s2, p.s2 * 26, p.s2 * 676, p.s2 * 17576) + (int4)(p.s3, p.s3 * 27, p.s3 * 729, p.s3 * 19683);\n"
+"if (x_max >= 32)\n"
+"{\n"
+"p = convert_int4(vload4(0, ptr + 28));\n"
+"#ifdef OP_MOMENTS_BINARY\n"
+"p = min(p, 1);\n"
+"#endif\n"
+"S += (int4)(p.s0, p.s0 * 28, p.s0 * 784, p.s0 * 21952) + (int4)(p.s1, p.s1 * 29, p.s1 * 841, p.s1 * 24389) +\n"
+"(int4)(p.s2, p.s2 * 30, p.s2 * 900, p.s2 * 27000) + (int4)(p.s3, p.s3 * 31, p.s3 * 961, p.s3 * 29791);\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"if (x < x_max)\n"
+"{\n"
+"int ps = ptr[x];\n"
+"#ifdef OP_MOMENTS_BINARY\n"
+"ps = min(ps, 1);\n"
+"#endif\n"
+"S += SUM_ELEM(ps, x);\n"
+"if (x + 1 < x_max)\n"
+"{\n"
+"ps = ptr[x + 1];\n"
+"#ifdef OP_MOMENTS_BINARY\n"
+"ps = min(ps, 1);\n"
+"#endif\n"
+"S += SUM_ELEM(ps, x + 1);\n"
+"if (x + 2 < x_max)\n"
+"{\n"
+"ps = ptr[x + 2];\n"
+"#ifdef OP_MOMENTS_BINARY\n"
+"ps = min(ps, 1);\n"
+"#endif\n"
+"S += SUM_ELEM(ps, x + 2);\n"
+"}\n"
+"}\n"
+"}\n"
+"int sy = y*y;\n"
+"mom[y][0] = S.s0;\n"
+"mom[y][1] = S.s1;\n"
+"mom[y][2] = y*S.s0;\n"
+"mom[y][3] = S.s2;\n"
+"mom[y][4] = y*S.s1;\n"
+"mom[y][5] = sy*S.s0;\n"
+"mom[y][6] = S.s3;\n"
+"mom[y][7] = y*S.s2;\n"
+"mom[y][8] = sy*S.s1;\n"
+"mom[y][9] = y*sy*S.s0;\n"
+"}\n"
+"else\n"
+"mom[y][0] = mom[y][1] = mom[y][2] = mom[y][3] = mom[y][4] =\n"
+"mom[y][5] = mom[y][6] = mom[y][7] = mom[y][8] = mom[y][9] = 0;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"#define REDUCE(d) \\\n"
+"if (y < d) \\\n"
+"{ \\\n"
+"mom[y][0] += mom[y + d][0]; \\\n"
+"mom[y][1] += mom[y + d][1]; \\\n"
+"mom[y][2] += mom[y + d][2]; \\\n"
+"mom[y][3] += mom[y + d][3]; \\\n"
+"mom[y][4] += mom[y + d][4]; \\\n"
+"mom[y][5] += mom[y + d][5]; \\\n"
+"mom[y][6] += mom[y + d][6]; \\\n"
+"mom[y][7] += mom[y + d][7]; \\\n"
+"mom[y][8] += mom[y + d][8]; \\\n"
+"mom[y][9] += mom[y + d][9]; \\\n"
+"} \\\n"
+"barrier(CLK_LOCAL_MEM_FENCE)\n"
+"REDUCE(16);\n"
+"REDUCE(8);\n"
+"REDUCE(4);\n"
+"REDUCE(2);\n"
+"if (y < 10)\n"
+"{\n"
+"__global int* momout = mom0 + (y0*xtiles + x0) * 10;\n"
+"momout[y] = mom[0][y] + mom[1][y];\n"
+"}\n"
+"}\n"
+"}\n"
+, "1d0545282b5860ed7eeeb6860fa9edc3"};
+ProgramSource moments_oclsrc(moments.programStr);
+const struct ProgramEntry morph={"morph",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#define noconvert\n"
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const T *)(addr)\n"
+"#define storepix(val, addr) *(__global T *)(addr) = val\n"
+"#define TSIZE (int)sizeof(T)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const T1 *)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global T1 *)(addr))\n"
+"#define TSIZE ((int)sizeof(T1)*3)\n"
+"#endif\n"
+"#ifdef DEPTH_0\n"
+"#define MIN_VAL 0\n"
+"#define MAX_VAL UCHAR_MAX\n"
+"#elif defined DEPTH_1\n"
+"#define MIN_VAL SCHAR_MIN\n"
+"#define MAX_VAL SCHAR_MAX\n"
+"#elif defined DEPTH_2\n"
+"#define MIN_VAL 0\n"
+"#define MAX_VAL USHRT_MAX\n"
+"#elif defined DEPTH_3\n"
+"#define MIN_VAL SHRT_MIN\n"
+"#define MAX_VAL SHRT_MAX\n"
+"#elif defined DEPTH_4\n"
+"#define MIN_VAL INT_MIN\n"
+"#define MAX_VAL INT_MAX\n"
+"#elif defined DEPTH_5\n"
+"#define MIN_VAL (-FLT_MAX)\n"
+"#define MAX_VAL FLT_MAX\n"
+"#elif defined DEPTH_6\n"
+"#define MIN_VAL (-DBL_MAX)\n"
+"#define MAX_VAL DBL_MAX\n"
+"#endif\n"
+"#ifdef OP_ERODE\n"
+"#define VAL MAX_VAL\n"
+"#elif defined OP_DILATE\n"
+"#define VAL MIN_VAL\n"
+"#else\n"
+"#error \"Unknown operation\"\n"
+"#endif\n"
+"#ifdef OP_ERODE\n"
+"#if defined INTEL_DEVICE && defined DEPTH_0\n"
+"#define MORPH_OP(A, B) ((A) < (B) ? (A) : (B))\n"
+"#else\n"
+"#define MORPH_OP(A, B) min((A), (B))\n"
+"#endif\n"
+"#endif\n"
+"#ifdef OP_DILATE\n"
+"#define MORPH_OP(A, B) max((A), (B))\n"
+"#endif\n"
+"#define PROCESS(y, x) \\\n"
+"temp = LDS_DAT[mad24(l_y + y, width, l_x + x)]; \\\n"
+"res = MORPH_OP(res, temp);\n"
+"#define ELEM(i, l_edge, r_edge, elem1, elem2) (i) < (l_edge) | (i) >= (r_edge) ? (elem1) : (elem2)\n"
+"#if defined OP_GRADIENT || defined OP_TOPHAT || defined OP_BLACKHAT\n"
+"#define EXTRA_PARAMS , __global const uchar * matptr, int mat_step, int mat_offset\n"
+"#else\n"
+"#define EXTRA_PARAMS\n"
+"#endif\n"
+"__kernel void morph(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset,\n"
+"int src_offset_x, int src_offset_y, int cols, int rows,\n"
+"int src_whole_cols, int src_whole_rows EXTRA_PARAMS)\n"
+"{\n"
+"int gidx = get_global_id(0), gidy = get_global_id(1);\n"
+"int l_x = get_local_id(0), l_y = get_local_id(1);\n"
+"int x = get_group_id(0) * LSIZE0, y = get_group_id(1) * LSIZE1;\n"
+"int start_x = x + src_offset_x - RADIUSX;\n"
+"int width = mad24(RADIUSX, 2, LSIZE0 + 1);\n"
+"int start_y = y + src_offset_y - RADIUSY;\n"
+"int point1 = mad24(l_y, LSIZE0, l_x);\n"
+"int point2 = point1 + LSIZE0 * LSIZE1;\n"
+"int tl_x = point1 % width, tl_y = point1 / width;\n"
+"int tl_x2 = point2 % width, tl_y2 = point2 / width;\n"
+"int cur_x = start_x + tl_x, cur_y = start_y + tl_y;\n"
+"int cur_x2 = start_x + tl_x2, cur_y2 = start_y + tl_y2;\n"
+"int start_addr = mad24(cur_y, src_step, cur_x * TSIZE);\n"
+"int start_addr2 = mad24(cur_y2, src_step, cur_x2 * TSIZE);\n"
+"__local T LDS_DAT[2 * LSIZE1 * LSIZE0];\n"
+"int end_addr = mad24(src_whole_rows - 1, src_step, src_whole_cols * TSIZE);\n"
+"start_addr = start_addr < end_addr && start_addr > 0 ? start_addr : 0;\n"
+"start_addr2 = start_addr2 < end_addr && start_addr2 > 0 ? start_addr2 : 0;\n"
+"T temp0 = loadpix(srcptr + start_addr);\n"
+"T temp1 = loadpix(srcptr + start_addr2);\n"
+"temp0 = ELEM(cur_x, 0, src_whole_cols, (T)(VAL), temp0);\n"
+"temp0 = ELEM(cur_y, 0, src_whole_rows, (T)(VAL), temp0);\n"
+"temp1 = ELEM(cur_x2, 0, src_whole_cols, (T)(VAL), temp1);\n"
+"temp1 = ELEM(cur_y2, 0, src_whole_rows, (T)(VAL), temp1);\n"
+"LDS_DAT[point1] = temp0;\n"
+"LDS_DAT[point2] = temp1;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (gidx < cols && gidy < rows)\n"
+"{\n"
+"T res = (T)(VAL), temp;\n"
+"PROCESS_ELEMS;\n"
+"int dst_index = mad24(gidy, dst_step, mad24(gidx, TSIZE, dst_offset));\n"
+"#if defined OP_GRADIENT || defined OP_TOPHAT || defined OP_BLACKHAT\n"
+"int mat_index = mad24(gidy, mat_step, mad24(gidx, TSIZE, mat_offset));\n"
+"T value = loadpix(matptr + mat_index);\n"
+"#ifdef OP_GRADIENT\n"
+"storepix(convertToT(convertToWT(res) - convertToWT(value)), dstptr + dst_index);\n"
+"#elif defined OP_TOPHAT\n"
+"storepix(convertToT(convertToWT(value) - convertToWT(res)), dstptr + dst_index);\n"
+"#elif defined OP_BLACKHAT\n"
+"storepix(convertToT(convertToWT(res) - convertToWT(value)), dstptr + dst_index);\n"
+"#endif\n"
+"#else\n"
+"storepix(res, dstptr + dst_index);\n"
+"#endif\n"
+"}\n"
+"}\n"
+, "232e712bff362e53c55027da6e1e1584"};
+ProgramSource morph_oclsrc(morph.programStr);
+const struct ProgramEntry precornerdetect={"precornerdetect",
+"__kernel void preCornerDetect(__global const uchar * Dxptr, int dx_step, int dx_offset,\n"
+"__global const uchar * Dyptr, int dy_step, int dy_offset,\n"
+"__global const uchar * D2xptr, int d2x_step, int d2x_offset,\n"
+"__global const uchar * D2yptr, int d2y_step, int d2y_offset,\n"
+"__global const uchar * Dxyptr, int dxy_step, int dxy_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset,\n"
+"int dst_rows, int dst_cols, float factor)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (x < dst_cols && y < dst_rows)\n"
+"{\n"
+"int dx_index = mad24(dx_step, y, (int)sizeof(float) * x + dx_offset);\n"
+"int dy_index = mad24(dy_step, y, (int)sizeof(float) * x + dy_offset);\n"
+"int d2x_index = mad24(d2x_step, y, (int)sizeof(float) * x + d2x_offset);\n"
+"int d2y_index = mad24(d2y_step, y, (int)sizeof(float) * x + d2y_offset);\n"
+"int dxy_index = mad24(dxy_step, y, (int)sizeof(float) * x + dxy_offset);\n"
+"int dst_index = mad24(dst_step, y, (int)sizeof(float) * x + dst_offset);\n"
+"float dx = *(__global const float *)(Dxptr + dx_index);\n"
+"float dy = *(__global const float *)(Dyptr + dy_index);\n"
+"float d2x = *(__global const float *)(D2xptr + d2x_index);\n"
+"float d2y = *(__global const float *)(D2yptr + d2y_index);\n"
+"float dxy = *(__global const float *)(Dxyptr + dxy_index);\n"
+"__global float * dst = (__global float *)(dstptr + dst_index);\n"
+"dst[0] = factor * (dx*dx*d2y + dy*dy*d2x - 2*dx*dy*dxy);\n"
+"}\n"
+"}\n"
+, "14a94db70b88aa76ff8840f03f3ad556"};
+ProgramSource precornerdetect_oclsrc(precornerdetect.programStr);
+const struct ProgramEntry pyr_down={"pyr_down",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#if defined BORDER_REPLICATE\n"
+"#define EXTRAPOLATE(x, maxV) clamp((x), 0, (maxV)-1)\n"
+"#elif defined BORDER_WRAP\n"
+"#define EXTRAPOLATE(x, maxV) ( (x) + (maxV) ) % (maxV)\n"
+"#elif defined BORDER_REFLECT\n"
+"#define EXTRAPOLATE(x, maxV) clamp(min(((maxV)-1)*2-(x)+1, max((x),-(x)-1) ), 0, (maxV)-1)\n"
+"#elif defined BORDER_REFLECT_101 || defined BORDER_REFLECT101\n"
+"#define EXTRAPOLATE(x, maxV) clamp(min(((maxV)-1)*2-(x), max((x),-(x)) ), 0, (maxV)-1)\n"
+"#else\n"
+"#error No extrapolation method\n"
+"#endif\n"
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const T*)(addr)\n"
+"#define storepix(val, addr) *(__global T*)(addr) = (val)\n"
+"#define PIXSIZE ((int)sizeof(T))\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const T1*)(addr))\n"
+"#define storepix(val, addr) vstore3((val), 0, (__global T1*)(addr))\n"
+"#define PIXSIZE ((int)sizeof(T1)*3)\n"
+"#endif\n"
+"#define SRC(_x,_y) convertToFT(loadpix(srcData + mad24(_y, src_step, PIXSIZE * _x)))\n"
+"#if kercn == 4\n"
+"#define SRC4(_x,_y) convert_float4(vload4(0, srcData + mad24(_y, src_step, PIXSIZE * _x)))\n"
+"#endif\n"
+"#ifdef INTEL_DEVICE\n"
+"#define MAD(x,y,z) fma((x),(y),(z))\n"
+"#else\n"
+"#define MAD(x,y,z) mad((x),(y),(z))\n"
+"#endif\n"
+"#define LOAD_LOCAL(col_gl, col_lcl) \\\n"
+"sum0 = co3* SRC(col_gl, EXTRAPOLATE_(src_y - 2, src_rows)); \\\n"
+"sum0 = MAD(co2, SRC(col_gl, EXTRAPOLATE_(src_y - 1, src_rows)), sum0); \\\n"
+"temp = SRC(col_gl, EXTRAPOLATE_(src_y, src_rows)); \\\n"
+"sum0 = MAD(co1, temp, sum0); \\\n"
+"sum1 = co3 * temp; \\\n"
+"temp = SRC(col_gl, EXTRAPOLATE_(src_y + 1, src_rows)); \\\n"
+"sum0 = MAD(co2, temp, sum0); \\\n"
+"sum1 = MAD(co2, temp, sum1); \\\n"
+"temp = SRC(col_gl, EXTRAPOLATE_(src_y + 2, src_rows)); \\\n"
+"sum0 = MAD(co3, temp, sum0); \\\n"
+"sum1 = MAD(co1, temp, sum1); \\\n"
+"smem[0][col_lcl] = sum0; \\\n"
+"sum1 = MAD(co2, SRC(col_gl, EXTRAPOLATE_(src_y + 3, src_rows)), sum1); \\\n"
+"sum1 = MAD(co3, SRC(col_gl, EXTRAPOLATE_(src_y + 4, src_rows)), sum1); \\\n"
+"smem[1][col_lcl] = sum1;\n"
+"#if kercn == 4\n"
+"#define LOAD_LOCAL4(col_gl, col_lcl) \\\n"
+"sum40 = co3* SRC4(col_gl, EXTRAPOLATE_(src_y - 2, src_rows)); \\\n"
+"sum40 = MAD(co2, SRC4(col_gl, EXTRAPOLATE_(src_y - 1, src_rows)), sum40); \\\n"
+"temp4 = SRC4(col_gl, EXTRAPOLATE_(src_y, src_rows)); \\\n"
+"sum40 = MAD(co1, temp4, sum40); \\\n"
+"sum41 = co3 * temp4; \\\n"
+"temp4 = SRC4(col_gl, EXTRAPOLATE_(src_y + 1, src_rows)); \\\n"
+"sum40 = MAD(co2, temp4, sum40); \\\n"
+"sum41 = MAD(co2, temp4, sum41); \\\n"
+"temp4 = SRC4(col_gl, EXTRAPOLATE_(src_y + 2, src_rows)); \\\n"
+"sum40 = MAD(co3, temp4, sum40); \\\n"
+"sum41 = MAD(co1, temp4, sum41); \\\n"
+"vstore4(sum40, col_lcl, (__local float*) &smem[0][2]); \\\n"
+"sum41 = MAD(co2, SRC4(col_gl, EXTRAPOLATE_(src_y + 3, src_rows)), sum41); \\\n"
+"sum41 = MAD(co3, SRC4(col_gl, EXTRAPOLATE_(src_y + 4, src_rows)), sum41); \\\n"
+"vstore4(sum41, col_lcl, (__local float*) &smem[1][2]);\n"
+"#endif\n"
+"#define noconvert\n"
+"__kernel void pyrDown(__global const uchar * src, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols)\n"
+"{\n"
+"const int x = get_global_id(0)*kercn;\n"
+"const int y = 2*get_global_id(1);\n"
+"__local FT smem[2][LOCAL_SIZE + 4];\n"
+"__global uchar * dstData = dst + dst_offset;\n"
+"__global const uchar * srcData = src + src_offset;\n"
+"FT sum0, sum1, temp;\n"
+"FT co1 = 0.375f;\n"
+"FT co2 = 0.25f;\n"
+"FT co3 = 0.0625f;\n"
+"const int src_y = 2*y;\n"
+"int col;\n"
+"if (src_y >= 2 && src_y < src_rows - 4)\n"
+"{\n"
+"#define EXTRAPOLATE_(val, maxVal) val\n"
+"#if kercn == 1\n"
+"col = EXTRAPOLATE(x, src_cols);\n"
+"LOAD_LOCAL(col, 2 + get_local_id(0))\n"
+"#else\n"
+"if (x < src_cols-4)\n"
+"{\n"
+"float4 sum40, sum41, temp4;\n"
+"LOAD_LOCAL4(x, get_local_id(0))\n"
+"}\n"
+"else\n"
+"{\n"
+"for (int i=0; i<4; i++)\n"
+"{\n"
+"col = EXTRAPOLATE(x+i, src_cols);\n"
+"LOAD_LOCAL(col, 2 + 4 * get_local_id(0) + i)\n"
+"}\n"
+"}\n"
+"#endif\n"
+"if (get_local_id(0) < 2)\n"
+"{\n"
+"col = EXTRAPOLATE((int)(get_group_id(0)*LOCAL_SIZE + get_local_id(0) - 2), src_cols);\n"
+"LOAD_LOCAL(col, get_local_id(0))\n"
+"}\n"
+"else if (get_local_id(0) < 4)\n"
+"{\n"
+"col = EXTRAPOLATE((int)((get_group_id(0)+1)*LOCAL_SIZE + get_local_id(0) - 2), src_cols);\n"
+"LOAD_LOCAL(col, LOCAL_SIZE + get_local_id(0))\n"
+"}\n"
+"}\n"
+"else\n"
+"{\n"
+"#define EXTRAPOLATE_(val, maxVal) EXTRAPOLATE(val, maxVal)\n"
+"#if kercn == 1\n"
+"col = EXTRAPOLATE(x, src_cols);\n"
+"LOAD_LOCAL(col, 2 + get_local_id(0))\n"
+"#else\n"
+"if (x < src_cols-4)\n"
+"{\n"
+"float4 sum40, sum41, temp4;\n"
+"LOAD_LOCAL4(x, get_local_id(0))\n"
+"}\n"
+"else\n"
+"{\n"
+"for (int i=0; i<4; i++)\n"
+"{\n"
+"col = EXTRAPOLATE(x+i, src_cols);\n"
+"LOAD_LOCAL(col, 2 + 4*get_local_id(0) + i)\n"
+"}\n"
+"}\n"
+"#endif\n"
+"if (get_local_id(0) < 2)\n"
+"{\n"
+"col = EXTRAPOLATE((int)(get_group_id(0)*LOCAL_SIZE + get_local_id(0) - 2), src_cols);\n"
+"LOAD_LOCAL(col, get_local_id(0))\n"
+"}\n"
+"else if (get_local_id(0) < 4)\n"
+"{\n"
+"col = EXTRAPOLATE((int)((get_group_id(0)+1)*LOCAL_SIZE + get_local_id(0) - 2), src_cols);\n"
+"LOAD_LOCAL(col, LOCAL_SIZE + get_local_id(0))\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"#if kercn == 1\n"
+"if (get_local_id(0) < LOCAL_SIZE / 2)\n"
+"{\n"
+"const int tid2 = get_local_id(0) * 2;\n"
+"const int dst_x = (get_group_id(0) * get_local_size(0) + tid2) / 2;\n"
+"if (dst_x < dst_cols)\n"
+"{\n"
+"for (int yin = y, y1 = min(dst_rows, y + 2); yin < y1; yin++)\n"
+"{\n"
+"#if cn == 1\n"
+"#if fdepth <= 5\n"
+"FT sum = dot(vload4(0, (__local float*) (&smem) + tid2 + (yin - y) * (LOCAL_SIZE + 4)), (float4)(co3, co2, co1, co2));\n"
+"#else\n"
+"FT sum = dot(vload4(0, (__local double*) (&smem) + tid2 + (yin - y) * (LOCAL_SIZE + 4)), (double4)(co3, co2, co1, co2));\n"
+"#endif\n"
+"#else\n"
+"FT sum = co3 * smem[yin - y][2 + tid2 - 2];\n"
+"sum = MAD(co2, smem[yin - y][2 + tid2 - 1], sum);\n"
+"sum = MAD(co1, smem[yin - y][2 + tid2 ], sum);\n"
+"sum = MAD(co2, smem[yin - y][2 + tid2 + 1], sum);\n"
+"#endif\n"
+"sum = MAD(co3, smem[yin - y][2 + tid2 + 2], sum);\n"
+"storepix(convertToT(sum), dstData + yin * dst_step + dst_x * PIXSIZE);\n"
+"}\n"
+"}\n"
+"}\n"
+"#else\n"
+"int tid4 = get_local_id(0) * 4;\n"
+"int dst_x = (get_group_id(0) * LOCAL_SIZE + tid4) / 2;\n"
+"if (dst_x < dst_cols - 1)\n"
+"{\n"
+"for (int yin = y, y1 = min(dst_rows, y + 2); yin < y1; yin++)\n"
+"{\n"
+"FT sum = co3* smem[yin - y][2 + tid4 + 2];\n"
+"sum = MAD(co3, smem[yin - y][2 + tid4 - 2], sum);\n"
+"sum = MAD(co2, smem[yin - y][2 + tid4 - 1], sum);\n"
+"sum = MAD(co1, smem[yin - y][2 + tid4 ], sum);\n"
+"sum = MAD(co2, smem[yin - y][2 + tid4 + 1], sum);\n"
+"storepix(convertToT(sum), dstData + mad24(yin, dst_step, dst_x * PIXSIZE));\n"
+"dst_x ++;\n"
+"sum = co3* smem[yin - y][2 + tid4 + 4];\n"
+"sum = MAD(co3, smem[yin - y][2 + tid4 ], sum);\n"
+"sum = MAD(co2, smem[yin - y][2 + tid4 + 1], sum);\n"
+"sum = MAD(co1, smem[yin - y][2 + tid4 + 2], sum);\n"
+"sum = MAD(co2, smem[yin - y][2 + tid4 + 3], sum);\n"
+"storepix(convertToT(sum), dstData + mad24(yin, dst_step, dst_x * PIXSIZE));\n"
+"dst_x --;\n"
+"}\n"
+"}\n"
+"else if (dst_x < dst_cols)\n"
+"{\n"
+"for (int yin = y, y1 = min(dst_rows, y + 2); yin < y1; yin++)\n"
+"{\n"
+"FT sum = co3* smem[yin - y][2 + tid4 + 2];\n"
+"sum = MAD(co3, smem[yin - y][2 + tid4 - 2], sum);\n"
+"sum = MAD(co2, smem[yin - y][2 + tid4 - 1], sum);\n"
+"sum = MAD(co1, smem[yin - y][2 + tid4 ], sum);\n"
+"sum = MAD(co2, smem[yin - y][2 + tid4 + 1], sum);\n"
+"storepix(convertToT(sum), dstData + mad24(yin, dst_step, dst_x * PIXSIZE));\n"
+"}\n"
+"}\n"
+"#endif\n"
+"}\n"
+, "3266de56ccdc2bcb8226bf97c932e272"};
+ProgramSource pyr_down_oclsrc(pyr_down.programStr);
+const struct ProgramEntry pyr_up={"pyr_up",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const T*)(addr)\n"
+"#define storepix(val, addr) *(__global T*)(addr) = (val)\n"
+"#define PIXSIZE ((int)sizeof(T))\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const T1*)(addr))\n"
+"#define storepix(val, addr) vstore3((val), 0, (__global T1*)(addr))\n"
+"#define PIXSIZE ((int)sizeof(T1)*3)\n"
+"#endif\n"
+"#define EXTRAPOLATE(x, maxV) min(maxV - 1, (int) abs(x))\n"
+"#define noconvert\n"
+"__kernel void pyrUp(__global const uchar * src, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols)\n"
+"{\n"
+"const int x = get_global_id(0);\n"
+"const int y = get_global_id(1);\n"
+"const int tidx = get_local_id(0);\n"
+"const int tidy = get_local_id(1);\n"
+"__local FT s_srcPatch[LOCAL_SIZE/2 + 2][LOCAL_SIZE/2 + 2];\n"
+"__local FT s_dstPatch[LOCAL_SIZE/2 + 2][LOCAL_SIZE];\n"
+"__global uchar * dstData = dst + dst_offset;\n"
+"__global const uchar * srcData = src + src_offset;\n"
+"if( tidx < (LOCAL_SIZE/2 + 2) && tidy < LOCAL_SIZE/2 + 2 )\n"
+"{\n"
+"int srcx = EXTRAPOLATE(mad24((int)get_group_id(0), LOCAL_SIZE/2, tidx) - 1, src_cols);\n"
+"int srcy = EXTRAPOLATE(mad24((int)get_group_id(1), LOCAL_SIZE/2, tidy) - 1, src_rows);\n"
+"s_srcPatch[tidy][tidx] = convertToFT(loadpix(srcData + srcy * src_step + srcx * PIXSIZE));\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"FT sum = 0.f;\n"
+"const FT co1 = 0.75f;\n"
+"const FT co2 = 0.5f;\n"
+"const FT co3 = 0.125f;\n"
+"const FT coef1 = (tidx & 1) == 0 ? co1 : (FT) 0;\n"
+"const FT coef2 = (tidx & 1) == 0 ? co3 : co2;\n"
+"const FT coefy1 = (tidy & 1) == 0 ? co1 : (FT) 0;\n"
+"const FT coefy2 = (tidy & 1) == 0 ? co3 : co2;\n"
+"if(tidy < LOCAL_SIZE/2 + 2)\n"
+"{\n"
+"sum = coef2* s_srcPatch[tidy][1 + ((tidx - 1) >> 1)];\n"
+"sum = mad(coef1, s_srcPatch[tidy][1 + ((tidx ) >> 1)], sum);\n"
+"sum = mad(coef2, s_srcPatch[tidy][1 + ((tidx + 2) >> 1)], sum);\n"
+"s_dstPatch[tidy][tidx] = sum;\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"sum = coefy2* s_dstPatch[1 + ((tidy - 1) >> 1)][tidx];\n"
+"sum = mad(coefy1, s_dstPatch[1 + ((tidy ) >> 1)][tidx], sum);\n"
+"sum = mad(coefy2, s_dstPatch[1 + ((tidy + 2) >> 1)][tidx], sum);\n"
+"if ((x < dst_cols) && (y < dst_rows))\n"
+"storepix(convertToT(sum), dstData + y * dst_step + x * PIXSIZE);\n"
+"}\n"
+"__kernel void pyrUp_unrolled(__global const uchar * src, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols)\n"
+"{\n"
+"const int lx = 2*get_local_id(0);\n"
+"const int ly = 2*get_local_id(1);\n"
+"__local FT s_srcPatch[LOCAL_SIZE+2][LOCAL_SIZE+2];\n"
+"__local FT s_dstPatch[LOCAL_SIZE+2][2*LOCAL_SIZE];\n"
+"__global uchar * dstData = dst + dst_offset;\n"
+"__global const uchar * srcData = src + src_offset;\n"
+"if( lx < (LOCAL_SIZE+2) && ly < (LOCAL_SIZE+2) )\n"
+"{\n"
+"int srcx = mad24((int)get_group_id(0), LOCAL_SIZE, lx) - 1;\n"
+"int srcy = mad24((int)get_group_id(1), LOCAL_SIZE, ly) - 1;\n"
+"int srcx1 = EXTRAPOLATE(srcx, src_cols);\n"
+"int srcx2 = EXTRAPOLATE(srcx+1, src_cols);\n"
+"int srcy1 = EXTRAPOLATE(srcy, src_rows);\n"
+"int srcy2 = EXTRAPOLATE(srcy+1, src_rows);\n"
+"s_srcPatch[ly][lx] = convertToFT(loadpix(srcData + srcy1 * src_step + srcx1 * PIXSIZE));\n"
+"s_srcPatch[ly+1][lx] = convertToFT(loadpix(srcData + srcy2 * src_step + srcx1 * PIXSIZE));\n"
+"s_srcPatch[ly][lx+1] = convertToFT(loadpix(srcData + srcy1 * src_step + srcx2 * PIXSIZE));\n"
+"s_srcPatch[ly+1][lx+1] = convertToFT(loadpix(srcData + srcy2 * src_step + srcx2 * PIXSIZE));\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"FT sum;\n"
+"const FT co1 = 0.75f;\n"
+"const FT co2 = 0.5f;\n"
+"const FT co3 = 0.125f;\n"
+"sum = co3 * s_srcPatch[1 + (ly >> 1)][1 + ((lx - 2) >> 1)];\n"
+"sum = mad(co1, s_srcPatch[1 + (ly >> 1)][1 + ((lx ) >> 1)], sum);\n"
+"sum = mad(co3, s_srcPatch[1 + (ly >> 1)][1 + ((lx + 2) >> 1)], sum);\n"
+"s_dstPatch[1 + get_local_id(1)][lx] = sum;\n"
+"sum = co2 * s_srcPatch[1 + (ly >> 1)][1 + ((lx + 1 - 1) >> 1)];\n"
+"sum = mad(co2, s_srcPatch[1 + (ly >> 1)][1 + ((lx + 1 + 1) >> 1)], sum);\n"
+"s_dstPatch[1 + get_local_id(1)][lx+1] = sum;\n"
+"if (ly < 1)\n"
+"{\n"
+"sum = co3 * s_srcPatch[0][1 + ((lx - 2) >> 1)];\n"
+"sum = mad(co1, s_srcPatch[0][1 + ((lx ) >> 1)], sum);\n"
+"sum = mad(co3, s_srcPatch[0][1 + ((lx + 2) >> 1)], sum);\n"
+"s_dstPatch[0][lx] = sum;\n"
+"sum = co2 * s_srcPatch[0][1 + ((lx + 1 - 1) >> 1)];\n"
+"sum = mad(co2, s_srcPatch[0][1 + ((lx + 1 + 1) >> 1)], sum);\n"
+"s_dstPatch[0][lx+1] = sum;\n"
+"}\n"
+"if (ly > 2*LOCAL_SIZE-3)\n"
+"{\n"
+"sum = co3 * s_srcPatch[LOCAL_SIZE+1][1 + ((lx - 2) >> 1)];\n"
+"sum = mad(co1, s_srcPatch[LOCAL_SIZE+1][1 + ((lx ) >> 1)], sum);\n"
+"sum = mad(co3, s_srcPatch[LOCAL_SIZE+1][1 + ((lx + 2) >> 1)], sum);\n"
+"s_dstPatch[LOCAL_SIZE+1][lx] = sum;\n"
+"sum = co2 * s_srcPatch[LOCAL_SIZE+1][1 + ((lx + 1 - 1) >> 1)];\n"
+"sum = mad(co2, s_srcPatch[LOCAL_SIZE+1][1 + ((lx + 1 + 1) >> 1)], sum);\n"
+"s_dstPatch[LOCAL_SIZE+1][lx+1] = sum;\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"int dst_x = 2*get_global_id(0);\n"
+"int dst_y = 2*get_global_id(1);\n"
+"if ((dst_x < dst_cols) && (dst_y < dst_rows))\n"
+"{\n"
+"sum = co3 * s_dstPatch[1 + get_local_id(1) - 1][lx];\n"
+"sum = mad(co1, s_dstPatch[1 + get_local_id(1) ][lx], sum);\n"
+"sum = mad(co3, s_dstPatch[1 + get_local_id(1) + 1][lx], sum);\n"
+"storepix(convertToT(sum), dstData + dst_y * dst_step + dst_x * PIXSIZE);\n"
+"sum = co3 * s_dstPatch[1 + get_local_id(1) - 1][lx+1];\n"
+"sum = mad(co1, s_dstPatch[1 + get_local_id(1) ][lx+1], sum);\n"
+"sum = mad(co3, s_dstPatch[1 + get_local_id(1) + 1][lx+1], sum);\n"
+"storepix(convertToT(sum), dstData + dst_y * dst_step + (dst_x+1) * PIXSIZE);\n"
+"sum = co2 * s_dstPatch[1 + get_local_id(1) ][lx];\n"
+"sum = mad(co2, s_dstPatch[1 + get_local_id(1) + 1][lx], sum);\n"
+"storepix(convertToT(sum), dstData + (dst_y+1) * dst_step + dst_x * PIXSIZE);\n"
+"sum = co2 * s_dstPatch[1 + get_local_id(1) ][lx+1];\n"
+"sum = mad(co2, s_dstPatch[1 + get_local_id(1) + 1][lx+1], sum);\n"
+"storepix(convertToT(sum), dstData + (dst_y+1) * dst_step + (dst_x+1) * PIXSIZE);\n"
+"}\n"
+"}\n"
+, "e48abb0036bd5e090ad06600b018eec9"};
+ProgramSource pyr_up_oclsrc(pyr_up.programStr);
+const struct ProgramEntry remap={"remap",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#define noconvert\n"
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const T*)(addr)\n"
+"#define storepix(val, addr) *(__global T*)(addr) = val\n"
+"#define TSIZE ((int)sizeof(T))\n"
+"#define convertScalar(a) (a)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const T1*)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global T1*)(addr))\n"
+"#define TSIZE ((int)sizeof(T1)*3)\n"
+"#define convertScalar(a) (T)(a.x, a.y, a.z)\n"
+"#endif\n"
+"enum\n"
+"{\n"
+"INTER_BITS = 5,\n"
+"INTER_TAB_SIZE = 1 << INTER_BITS,\n"
+"INTER_TAB_SIZE2 = INTER_TAB_SIZE * INTER_TAB_SIZE\n"
+"};\n"
+"#ifdef INTER_NEAREST\n"
+"#define convertToWT\n"
+"#endif\n"
+"#ifdef BORDER_CONSTANT\n"
+"#define EXTRAPOLATE(v2, v) v = scalar;\n"
+"#elif defined BORDER_REPLICATE\n"
+"#define EXTRAPOLATE(v2, v) \\\n"
+"{ \\\n"
+"v2 = max(min(v2, (int2)(src_cols - 1, src_rows - 1)), (int2)(0)); \\\n"
+"v = convertToWT(loadpix((__global const T*)(srcptr + mad24(v2.y, src_step, v2.x * TSIZE + src_offset)))); \\\n"
+"}\n"
+"#elif defined BORDER_WRAP\n"
+"#define EXTRAPOLATE(v2, v) \\\n"
+"{ \\\n"
+"if (v2.x < 0) \\\n"
+"v2.x -= ((v2.x - src_cols + 1) / src_cols) * src_cols; \\\n"
+"if (v2.x >= src_cols) \\\n"
+"v2.x %= src_cols; \\\n"
+"\\\n"
+"if (v2.y < 0) \\\n"
+"v2.y -= ((v2.y - src_rows + 1) / src_rows) * src_rows; \\\n"
+"if( v2.y >= src_rows ) \\\n"
+"v2.y %= src_rows; \\\n"
+"v = convertToWT(loadpix((__global const T*)(srcptr + mad24(v2.y, src_step, v2.x * TSIZE + src_offset)))); \\\n"
+"}\n"
+"#elif defined(BORDER_REFLECT) || defined(BORDER_REFLECT_101)\n"
+"#ifdef BORDER_REFLECT\n"
+"#define DELTA int delta = 0\n"
+"#else\n"
+"#define DELTA int delta = 1\n"
+"#endif\n"
+"#define EXTRAPOLATE(v2, v) \\\n"
+"{ \\\n"
+"DELTA; \\\n"
+"if (src_cols == 1) \\\n"
+"v2.x = 0; \\\n"
+"else \\\n"
+"do \\\n"
+"{ \\\n"
+"if( v2.x < 0 ) \\\n"
+"v2.x = -v2.x - 1 + delta; \\\n"
+"else \\\n"
+"v2.x = src_cols - 1 - (v2.x - src_cols) - delta; \\\n"
+"} \\\n"
+"while (v2.x >= src_cols || v2.x < 0); \\\n"
+"\\\n"
+"if (src_rows == 1) \\\n"
+"v2.y = 0; \\\n"
+"else \\\n"
+"do \\\n"
+"{ \\\n"
+"if( v2.y < 0 ) \\\n"
+"v2.y = -v2.y - 1 + delta; \\\n"
+"else \\\n"
+"v2.y = src_rows - 1 - (v2.y - src_rows) - delta; \\\n"
+"} \\\n"
+"while (v2.y >= src_rows || v2.y < 0); \\\n"
+"v = convertToWT(loadpix((__global const T*)(srcptr + mad24(v2.y, src_step, v2.x * TSIZE + src_offset)))); \\\n"
+"}\n"
+"#else\n"
+"#error No extrapolation method\n"
+"#endif\n"
+"#define NEED_EXTRAPOLATION(gx, gy) (gx >= src_cols || gy >= src_rows || gx < 0 || gy < 0)\n"
+"#ifdef INTER_NEAREST\n"
+"__kernel void remap_2_32FC1(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__global const uchar * map1ptr, int map1_step, int map1_offset,\n"
+"__global const uchar * map2ptr, int map2_step, int map2_offset,\n"
+"ST nVal)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * rowsPerWI;\n"
+"if (x < dst_cols)\n"
+"{\n"
+"T scalar = convertScalar(nVal);\n"
+"int map1_index = mad24(y, map1_step, mad24(x, (int)sizeof(float), map1_offset));\n"
+"int map2_index = mad24(y, map2_step, mad24(x, (int)sizeof(float), map2_offset));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, TSIZE, dst_offset));\n"
+"#pragma unroll\n"
+"for (int i = 0; i < rowsPerWI; ++i, ++y,\n"
+"map1_index += map1_step, map2_index += map2_step, dst_index += dst_step)\n"
+"if (y < dst_rows)\n"
+"{\n"
+"__global const float * map1 = (__global const float *)(map1ptr + map1_index);\n"
+"__global const float * map2 = (__global const float *)(map2ptr + map2_index);\n"
+"__global T * dst = (__global T *)(dstptr + dst_index);\n"
+"int gx = convert_int_sat_rte(map1[0]);\n"
+"int gy = convert_int_sat_rte(map2[0]);\n"
+"if (NEED_EXTRAPOLATION(gx, gy))\n"
+"{\n"
+"#ifndef BORDER_CONSTANT\n"
+"int2 gxy = (int2)(gx, gy);\n"
+"#endif\n"
+"T v;\n"
+"EXTRAPOLATE(gxy, v)\n"
+"storepix(v, dst);\n"
+"}\n"
+"else\n"
+"{\n"
+"int src_index = mad24(gy, src_step, mad24(gx, TSIZE, src_offset));\n"
+"storepix(loadpix((__global const T*)(srcptr + src_index)), dst);\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void remap_32FC2(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__global const uchar * mapptr, int map_step, int map_offset,\n"
+"ST nVal)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * rowsPerWI;\n"
+"if (x < dst_cols)\n"
+"{\n"
+"T scalar = convertScalar(nVal);\n"
+"int dst_index = mad24(y, dst_step, mad24(x, TSIZE, dst_offset));\n"
+"int map_index = mad24(y, map_step, mad24(x, (int)sizeof(float2), map_offset));\n"
+"#pragma unroll\n"
+"for (int i = 0; i < rowsPerWI; ++i, ++y,\n"
+"map_index += map_step, dst_index += dst_step)\n"
+"if (y < dst_rows)\n"
+"{\n"
+"__global const float2 * map = (__global const float2 *)(mapptr + map_index);\n"
+"__global T * dst = (__global T *)(dstptr + dst_index);\n"
+"int2 gxy = convert_int2_sat_rte(map[0]);\n"
+"int gx = gxy.x, gy = gxy.y;\n"
+"if (NEED_EXTRAPOLATION(gx, gy))\n"
+"{\n"
+"T v;\n"
+"EXTRAPOLATE(gxy, v)\n"
+"storepix(v, dst);\n"
+"}\n"
+"else\n"
+"{\n"
+"int src_index = mad24(gy, src_step, mad24(gx, TSIZE, src_offset));\n"
+"storepix(loadpix((__global const T *)(srcptr + src_index)), dst);\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void remap_16SC2(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__global const uchar * mapptr, int map_step, int map_offset,\n"
+"ST nVal)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * rowsPerWI;\n"
+"if (x < dst_cols)\n"
+"{\n"
+"T scalar = convertScalar(nVal);\n"
+"int dst_index = mad24(y, dst_step, mad24(x, TSIZE, dst_offset));\n"
+"int map_index = mad24(y, map_step, mad24(x, (int)sizeof(short2), map_offset));\n"
+"#pragma unroll\n"
+"for (int i = 0; i < rowsPerWI; ++i, ++y,\n"
+"map_index += map_step, dst_index += dst_step)\n"
+"if (y < dst_rows)\n"
+"{\n"
+"__global const short2 * map = (__global const short2 *)(mapptr + map_index);\n"
+"__global T * dst = (__global T *)(dstptr + dst_index);\n"
+"int2 gxy = convert_int2(map[0]);\n"
+"int gx = gxy.x, gy = gxy.y;\n"
+"if (NEED_EXTRAPOLATION(gx, gy))\n"
+"{\n"
+"T v;\n"
+"EXTRAPOLATE(gxy, v)\n"
+"storepix(v, dst);\n"
+"}\n"
+"else\n"
+"{\n"
+"int src_index = mad24(gy, src_step, mad24(gx, TSIZE, src_offset));\n"
+"storepix(loadpix((__global const T *)(srcptr + src_index)), dst);\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void remap_16SC2_16UC1(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__global const uchar * map1ptr, int map1_step, int map1_offset,\n"
+"__global const uchar * map2ptr, int map2_step, int map2_offset,\n"
+"ST nVal)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * rowsPerWI;\n"
+"if (x < dst_cols)\n"
+"{\n"
+"T scalar = convertScalar(nVal);\n"
+"int dst_index = mad24(y, dst_step, mad24(x, TSIZE, dst_offset));\n"
+"int map1_index = mad24(y, map1_step, mad24(x, (int)sizeof(short2), map1_offset));\n"
+"int map2_index = mad24(y, map2_step, mad24(x, (int)sizeof(ushort), map2_offset));\n"
+"#pragma unroll\n"
+"for (int i = 0; i < rowsPerWI; ++i, ++y,\n"
+"map1_index += map1_step, map2_index += map2_step, dst_index += dst_step)\n"
+"if (y < dst_rows)\n"
+"{\n"
+"__global const short2 * map1 = (__global const short2 *)(map1ptr + map1_index);\n"
+"__global const ushort * map2 = (__global const ushort *)(map2ptr + map2_index);\n"
+"__global T * dst = (__global T *)(dstptr + dst_index);\n"
+"int map2Value = convert_int(map2[0]) & (INTER_TAB_SIZE2 - 1);\n"
+"int dx = (map2Value & (INTER_TAB_SIZE - 1)) < (INTER_TAB_SIZE >> 1) ? 1 : 0;\n"
+"int dy = (map2Value >> INTER_BITS) < (INTER_TAB_SIZE >> 1) ? 1 : 0;\n"
+"int2 gxy = convert_int2(map1[0]) + (int2)(dx, dy);\n"
+"int gx = gxy.x, gy = gxy.y;\n"
+"if (NEED_EXTRAPOLATION(gx, gy))\n"
+"{\n"
+"T v;\n"
+"EXTRAPOLATE(gxy, v)\n"
+"storepix(v, dst);\n"
+"}\n"
+"else\n"
+"{\n"
+"int src_index = mad24(gy, src_step, mad24(gx, TSIZE, src_offset));\n"
+"storepix(loadpix((__global const T *)(srcptr + src_index)), dst);\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"#elif defined INTER_LINEAR\n"
+"__constant float coeffs[64] =\n"
+"{ 1.000000f, 0.000000f, 0.968750f, 0.031250f, 0.937500f, 0.062500f, 0.906250f, 0.093750f, 0.875000f, 0.125000f, 0.843750f, 0.156250f,\n"
+"0.812500f, 0.187500f, 0.781250f, 0.218750f, 0.750000f, 0.250000f, 0.718750f, 0.281250f, 0.687500f, 0.312500f, 0.656250f, 0.343750f,\n"
+"0.625000f, 0.375000f, 0.593750f, 0.406250f, 0.562500f, 0.437500f, 0.531250f, 0.468750f, 0.500000f, 0.500000f, 0.468750f, 0.531250f,\n"
+"0.437500f, 0.562500f, 0.406250f, 0.593750f, 0.375000f, 0.625000f, 0.343750f, 0.656250f, 0.312500f, 0.687500f, 0.281250f, 0.718750f,\n"
+"0.250000f, 0.750000f, 0.218750f, 0.781250f, 0.187500f, 0.812500f, 0.156250f, 0.843750f, 0.125000f, 0.875000f, 0.093750f, 0.906250f,\n"
+"0.062500f, 0.937500f, 0.031250f, 0.968750f };\n"
+"__kernel void remap_16SC2_16UC1(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__global const uchar * map1ptr, int map1_step, int map1_offset,\n"
+"__global const uchar * map2ptr, int map2_step, int map2_offset,\n"
+"ST nVal)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * rowsPerWI;\n"
+"if (x < dst_cols)\n"
+"{\n"
+"WT scalar = convertToWT(convertScalar(nVal));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, TSIZE, dst_offset));\n"
+"int map1_index = mad24(y, map1_step, mad24(x, (int)sizeof(short2), map1_offset));\n"
+"int map2_index = mad24(y, map2_step, mad24(x, (int)sizeof(ushort), map2_offset));\n"
+"#pragma unroll\n"
+"for (int i = 0; i < rowsPerWI; ++i, ++y,\n"
+"map1_index += map1_step, map2_index += map2_step, dst_index += dst_step)\n"
+"if (y < dst_rows)\n"
+"{\n"
+"__global const short2 * map1 = (__global const short2 *)(map1ptr + map1_index);\n"
+"__global const ushort * map2 = (__global const ushort *)(map2ptr + map2_index);\n"
+"__global T * dst = (__global T *)(dstptr + dst_index);\n"
+"int2 map_dataA = convert_int2(map1[0]);\n"
+"int2 map_dataB = (int2)(map_dataA.x + 1, map_dataA.y);\n"
+"int2 map_dataC = (int2)(map_dataA.x, map_dataA.y + 1);\n"
+"int2 map_dataD = (int2)(map_dataA.x + 1, map_dataA.y + 1);\n"
+"ushort map2Value = (ushort)(map2[0] & (INTER_TAB_SIZE2 - 1));\n"
+"WT2 u = (WT2)(map2Value & (INTER_TAB_SIZE - 1), map2Value >> INTER_BITS) / (WT2)(INTER_TAB_SIZE);\n"
+"WT a = scalar, b = scalar, c = scalar, d = scalar;\n"
+"if (!NEED_EXTRAPOLATION(map_dataA.x, map_dataA.y))\n"
+"a = convertToWT(loadpix((__global const T *)(srcptr + mad24(map_dataA.y, src_step, map_dataA.x * TSIZE + src_offset))));\n"
+"else\n"
+"EXTRAPOLATE(map_dataA, a);\n"
+"if (!NEED_EXTRAPOLATION(map_dataB.x, map_dataB.y))\n"
+"b = convertToWT(loadpix((__global const T *)(srcptr + mad24(map_dataB.y, src_step, map_dataB.x * TSIZE + src_offset))));\n"
+"else\n"
+"EXTRAPOLATE(map_dataB, b);\n"
+"if (!NEED_EXTRAPOLATION(map_dataC.x, map_dataC.y))\n"
+"c = convertToWT(loadpix((__global const T *)(srcptr + mad24(map_dataC.y, src_step, map_dataC.x * TSIZE + src_offset))));\n"
+"else\n"
+"EXTRAPOLATE(map_dataC, c);\n"
+"if (!NEED_EXTRAPOLATION(map_dataD.x, map_dataD.y))\n"
+"d = convertToWT(loadpix((__global const T *)(srcptr + mad24(map_dataD.y, src_step, map_dataD.x * TSIZE + src_offset))));\n"
+"else\n"
+"EXTRAPOLATE(map_dataD, d);\n"
+"WT dst_data = a * (1 - u.x) * (1 - u.y) +\n"
+"b * (u.x) * (1 - u.y) +\n"
+"c * (1 - u.x) * (u.y) +\n"
+"d * (u.x) * (u.y);\n"
+"storepix(convertToT(dst_data), dst);\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void remap_2_32FC1(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__global const uchar * map1ptr, int map1_step, int map1_offset,\n"
+"__global const uchar * map2ptr, int map2_step, int map2_offset,\n"
+"ST nVal)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * rowsPerWI;\n"
+"if (x < dst_cols)\n"
+"{\n"
+"WT scalar = convertToWT(convertScalar(nVal));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, TSIZE, dst_offset));\n"
+"int map1_index = mad24(y, map1_step, mad24(x, (int)sizeof(float), map1_offset));\n"
+"int map2_index = mad24(y, map2_step, mad24(x, (int)sizeof(float), map2_offset));\n"
+"#pragma unroll\n"
+"for (int i = 0; i < rowsPerWI; ++i, ++y,\n"
+"map1_index += map1_step, map2_index += map2_step, dst_index += dst_step)\n"
+"if (y < dst_rows)\n"
+"{\n"
+"__global const float * map1 = (__global const float *)(map1ptr + map1_index);\n"
+"__global const float * map2 = (__global const float *)(map2ptr + map2_index);\n"
+"__global T * dst = (__global T *)(dstptr + dst_index);\n"
+"#if defined BORDER_CONSTANT\n"
+"float xf = map1[0], yf = map2[0];\n"
+"int sx = convert_int_sat_rtz(mad(xf, INTER_TAB_SIZE, 0.5f)) >> INTER_BITS;\n"
+"int sy = convert_int_sat_rtz(mad(yf, INTER_TAB_SIZE, 0.5f)) >> INTER_BITS;\n"
+"__constant float * coeffs_x = coeffs + ((convert_int_rte(xf * INTER_TAB_SIZE) & (INTER_TAB_SIZE - 1)) << 1);\n"
+"__constant float * coeffs_y = coeffs + ((convert_int_rte(yf * INTER_TAB_SIZE) & (INTER_TAB_SIZE - 1)) << 1);\n"
+"WT sum = (WT)(0), xsum;\n"
+"int src_index = mad24(sy, src_step, mad24(sx, TSIZE, src_offset));\n"
+"#pragma unroll\n"
+"for (int yp = 0; yp < 2; ++yp, src_index += src_step)\n"
+"{\n"
+"if (sy + yp >= 0 && sy + yp < src_rows)\n"
+"{\n"
+"xsum = (WT)(0);\n"
+"if (sx >= 0 && sx + 2 < src_cols)\n"
+"{\n"
+"#if depth == 0 && cn == 1\n"
+"uchar2 value = vload2(0, srcptr + src_index);\n"
+"xsum = dot(convert_float2(value), (float2)(coeffs_x[0], coeffs_x[1]));\n"
+"#else\n"
+"#pragma unroll\n"
+"for (int xp = 0; xp < 2; ++xp)\n"
+"xsum = fma(convertToWT(loadpix(srcptr + mad24(xp, TSIZE, src_index))), coeffs_x[xp], xsum);\n"
+"#endif\n"
+"}\n"
+"else\n"
+"{\n"
+"#pragma unroll\n"
+"for (int xp = 0; xp < 2; ++xp)\n"
+"xsum = fma(sx + xp >= 0 && sx + xp < src_cols ?\n"
+"convertToWT(loadpix(srcptr + mad24(xp, TSIZE, src_index))) : scalar, coeffs_x[xp], xsum);\n"
+"}\n"
+"sum = fma(xsum, coeffs_y[yp], sum);\n"
+"}\n"
+"else\n"
+"sum = fma(scalar, coeffs_y[yp], sum);\n"
+"}\n"
+"storepix(convertToT(sum), dst);\n"
+"#else\n"
+"float2 map_data = (float2)(map1[0], map2[0]);\n"
+"int2 map_dataA = convert_int2_sat_rtn(map_data);\n"
+"int2 map_dataB = (int2)(map_dataA.x + 1, map_dataA.y);\n"
+"int2 map_dataC = (int2)(map_dataA.x, map_dataA.y + 1);\n"
+"int2 map_dataD = (int2)(map_dataA.x + 1, map_dataA.y + 1);\n"
+"float2 _u = map_data - convert_float2(map_dataA);\n"
+"WT2 u = convertToWT2(convert_int2_rte(convertToWT2(_u) * (WT2)INTER_TAB_SIZE)) / (WT2)INTER_TAB_SIZE;\n"
+"WT scalar = convertToWT(convertScalar(nVal));\n"
+"WT a = scalar, b = scalar, c = scalar, d = scalar;\n"
+"if (!NEED_EXTRAPOLATION(map_dataA.x, map_dataA.y))\n"
+"a = convertToWT(loadpix((__global const T *)(srcptr + mad24(map_dataA.y, src_step, map_dataA.x * TSIZE + src_offset))));\n"
+"else\n"
+"EXTRAPOLATE(map_dataA, a);\n"
+"if (!NEED_EXTRAPOLATION(map_dataB.x, map_dataB.y))\n"
+"b = convertToWT(loadpix((__global const T *)(srcptr + mad24(map_dataB.y, src_step, map_dataB.x * TSIZE + src_offset))));\n"
+"else\n"
+"EXTRAPOLATE(map_dataB, b);\n"
+"if (!NEED_EXTRAPOLATION(map_dataC.x, map_dataC.y))\n"
+"c = convertToWT(loadpix((__global const T *)(srcptr + mad24(map_dataC.y, src_step, map_dataC.x * TSIZE + src_offset))));\n"
+"else\n"
+"EXTRAPOLATE(map_dataC, c);\n"
+"if (!NEED_EXTRAPOLATION(map_dataD.x, map_dataD.y))\n"
+"d = convertToWT(loadpix((__global const T *)(srcptr + mad24(map_dataD.y, src_step, map_dataD.x * TSIZE + src_offset))));\n"
+"else\n"
+"EXTRAPOLATE(map_dataD, d);\n"
+"WT dst_data = a * (1 - u.x) * (1 - u.y) +\n"
+"b * (u.x) * (1 - u.y) +\n"
+"c * (1 - u.x) * (u.y) +\n"
+"d * (u.x) * (u.y);\n"
+"storepix(convertToT(dst_data), dst);\n"
+"#endif\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void remap_32FC2(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__global const uchar * mapptr, int map_step, int map_offset,\n"
+"ST nVal)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1) * rowsPerWI;\n"
+"if (x < dst_cols)\n"
+"{\n"
+"WT scalar = convertToWT(convertScalar(nVal));\n"
+"int dst_index = mad24(y, dst_step, mad24(x, TSIZE, dst_offset));\n"
+"int map_index = mad24(y, map_step, mad24(x, (int)sizeof(float2), map_offset));\n"
+"#pragma unroll\n"
+"for (int i = 0; i < rowsPerWI; ++i, ++y,\n"
+"map_index += map_step, dst_index += dst_step)\n"
+"if (y < dst_rows)\n"
+"{\n"
+"__global const float2 * map = (__global const float2 *)(mapptr + map_index);\n"
+"__global T * dst = (__global T *)(dstptr + dst_index);\n"
+"float2 map_data = map[0];\n"
+"int2 map_dataA = convert_int2_sat_rtn(map_data);\n"
+"int2 map_dataB = (int2)(map_dataA.x + 1, map_dataA.y);\n"
+"int2 map_dataC = (int2)(map_dataA.x, map_dataA.y + 1);\n"
+"int2 map_dataD = (int2)(map_dataA.x + 1, map_dataA.y + 1);\n"
+"float2 _u = map_data - convert_float2(map_dataA);\n"
+"WT2 u = convertToWT2(convert_int2_rte(convertToWT2(_u) * (WT2)INTER_TAB_SIZE)) / (WT2)INTER_TAB_SIZE;\n"
+"WT a = scalar, b = scalar, c = scalar, d = scalar;\n"
+"if (!NEED_EXTRAPOLATION(map_dataA.x, map_dataA.y))\n"
+"a = convertToWT(loadpix((__global const T *)(srcptr + mad24(map_dataA.y, src_step, map_dataA.x * TSIZE + src_offset))));\n"
+"else\n"
+"EXTRAPOLATE(map_dataA, a);\n"
+"if (!NEED_EXTRAPOLATION(map_dataB.x, map_dataB.y))\n"
+"b = convertToWT(loadpix((__global const T *)(srcptr + mad24(map_dataB.y, src_step, map_dataB.x * TSIZE + src_offset))));\n"
+"else\n"
+"EXTRAPOLATE(map_dataB, b);\n"
+"if (!NEED_EXTRAPOLATION(map_dataC.x, map_dataC.y))\n"
+"c = convertToWT(loadpix((__global const T *)(srcptr + mad24(map_dataC.y, src_step, map_dataC.x * TSIZE + src_offset))));\n"
+"else\n"
+"EXTRAPOLATE(map_dataC, c);\n"
+"if (!NEED_EXTRAPOLATION(map_dataD.x, map_dataD.y))\n"
+"d = convertToWT(loadpix((__global const T *)(srcptr + mad24(map_dataD.y, src_step, map_dataD.x * TSIZE + src_offset))));\n"
+"else\n"
+"EXTRAPOLATE(map_dataD, d);\n"
+"WT dst_data = a * (1 - u.x) * (1 - u.y) +\n"
+"b * (u.x) * (1 - u.y) +\n"
+"c * (1 - u.x) * (u.y) +\n"
+"d * (u.x) * (u.y);\n"
+"storepix(convertToT(dst_data), dst);\n"
+"}\n"
+"}\n"
+"}\n"
+"#endif\n"
+, "6833b9a226d061c1ff80509eed0dd178"};
+ProgramSource remap_oclsrc(remap.programStr);
+const struct ProgramEntry resize={"resize",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#define INTER_RESIZE_COEF_SCALE (1 << INTER_RESIZE_COEF_BITS)\n"
+"#define CAST_BITS (INTER_RESIZE_COEF_BITS << 1)\n"
+"#define INC(x,l) min(x+1,l-1)\n"
+"#define noconvert\n"
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const T *)(addr)\n"
+"#define storepix(val, addr) *(__global T *)(addr) = val\n"
+"#define TSIZE (int)sizeof(T)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const T1 *)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global T1 *)(addr))\n"
+"#define TSIZE (int)sizeof(T1)*cn\n"
+"#endif\n"
+"#if defined USE_SAMPLER\n"
+"#if cn == 1\n"
+"#define READ_IMAGE(X,Y,Z) read_imagef(X,Y,Z).x\n"
+"#define INTERMEDIATE_TYPE float\n"
+"#elif cn == 2\n"
+"#define READ_IMAGE(X,Y,Z) read_imagef(X,Y,Z).xy\n"
+"#define INTERMEDIATE_TYPE float2\n"
+"#elif cn == 3\n"
+"#define READ_IMAGE(X,Y,Z) read_imagef(X,Y,Z).xyz\n"
+"#define INTERMEDIATE_TYPE float3\n"
+"#elif cn == 4\n"
+"#define READ_IMAGE(X,Y,Z) read_imagef(X,Y,Z)\n"
+"#define INTERMEDIATE_TYPE float4\n"
+"#endif\n"
+"#define __CAT(x, y) x##y\n"
+"#define CAT(x, y) __CAT(x, y)\n"
+"#define float1 float\n"
+"#if depth == 0\n"
+"#define RESULT_SCALE 255.0f\n"
+"#elif depth == 1\n"
+"#define RESULT_SCALE 127.0f\n"
+"#elif depth == 2\n"
+"#define RESULT_SCALE 65535.0f\n"
+"#elif depth == 3\n"
+"#define RESULT_SCALE 32767.0f\n"
+"#else\n"
+"#define RESULT_SCALE 1.0f\n"
+"#endif\n"
+"__kernel void resizeSampler(__read_only image2d_t srcImage,\n"
+"__global uchar* dstptr, int dststep, int dstoffset,\n"
+"int dstrows, int dstcols,\n"
+"float ifx, float ify)\n"
+"{\n"
+"const sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE |\n"
+"CLK_ADDRESS_CLAMP_TO_EDGE |\n"
+"CLK_FILTER_LINEAR;\n"
+"int dx = get_global_id(0);\n"
+"int dy = get_global_id(1);\n"
+"float sx = ((dx+0.5f) * ifx), sy = ((dy+0.5f) * ify);\n"
+"INTERMEDIATE_TYPE intermediate = READ_IMAGE(srcImage, sampler, (float2)(sx, sy));\n"
+"#if depth <= 4\n"
+"T uval = convertToDT(round(intermediate * RESULT_SCALE));\n"
+"#else\n"
+"T uval = convertToDT(intermediate * RESULT_SCALE);\n"
+"#endif\n"
+"if(dx < dstcols && dy < dstrows)\n"
+"{\n"
+"storepix(uval, dstptr + mad24(dy, dststep, dstoffset + dx*TSIZE));\n"
+"}\n"
+"}\n"
+"#elif defined INTER_LINEAR_INTEGER\n"
+"__kernel void resizeLN(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__global const uchar * buffer)\n"
+"{\n"
+"int dx = get_global_id(0);\n"
+"int dy = get_global_id(1);\n"
+"if (dx < dst_cols && dy < dst_rows)\n"
+"{\n"
+"__global const int * xofs = (__global const int *)(buffer), * yofs = xofs + dst_cols;\n"
+"__global const short * ialpha = (__global const short *)(yofs + dst_rows);\n"
+"__global const short * ibeta = ialpha + ((dst_cols + dy) << 1);\n"
+"ialpha += dx << 1;\n"
+"int sx0 = xofs[dx], sy0 = clamp(yofs[dy], 0, src_rows - 1),\n"
+"sy1 = clamp(yofs[dy] + 1, 0, src_rows - 1);\n"
+"short a0 = ialpha[0], a1 = ialpha[1];\n"
+"short b0 = ibeta[0], b1 = ibeta[1];\n"
+"int src_index0 = mad24(sy0, src_step, mad24(sx0, TSIZE, src_offset)),\n"
+"src_index1 = mad24(sy1, src_step, mad24(sx0, TSIZE, src_offset));\n"
+"WT data0 = convertToWT(loadpix(srcptr + src_index0));\n"
+"WT data1 = convertToWT(loadpix(srcptr + src_index0 + TSIZE));\n"
+"WT data2 = convertToWT(loadpix(srcptr + src_index1));\n"
+"WT data3 = convertToWT(loadpix(srcptr + src_index1 + TSIZE));\n"
+"WT val = ( (((data0 * a0 + data1 * a1) >> 4) * b0) >> 16) +\n"
+"( (((data2 * a0 + data3 * a1) >> 4) * b1) >> 16);\n"
+"storepix(convertToDT((val + 2) >> 2),\n"
+"dstptr + mad24(dy, dst_step, mad24(dx, TSIZE, dst_offset)));\n"
+"}\n"
+"}\n"
+"#elif defined INTER_LINEAR\n"
+"__kernel void resizeLN(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"float ifx, float ify)\n"
+"{\n"
+"int dx = get_global_id(0);\n"
+"int dy = get_global_id(1);\n"
+"if (dx < dst_cols && dy < dst_rows)\n"
+"{\n"
+"float sx = ((dx+0.5f) * ifx - 0.5f), sy = ((dy+0.5f) * ify - 0.5f);\n"
+"int x = floor(sx), y = floor(sy);\n"
+"float u = sx - x, v = sy - y;\n"
+"if ( x<0 ) x=0,u=0;\n"
+"if ( x>=src_cols ) x=src_cols-1,u=0;\n"
+"if ( y<0 ) y=0,v=0;\n"
+"if ( y>=src_rows ) y=src_rows-1,v=0;\n"
+"int y_ = INC(y, src_rows);\n"
+"int x_ = INC(x, src_cols);\n"
+"#if depth <= 4\n"
+"u = u * INTER_RESIZE_COEF_SCALE;\n"
+"v = v * INTER_RESIZE_COEF_SCALE;\n"
+"int U = rint(u);\n"
+"int V = rint(v);\n"
+"int U1 = rint(INTER_RESIZE_COEF_SCALE - u);\n"
+"int V1 = rint(INTER_RESIZE_COEF_SCALE - v);\n"
+"WT data0 = convertToWT(loadpix(srcptr + mad24(y, src_step, mad24(x, TSIZE, src_offset))));\n"
+"WT data1 = convertToWT(loadpix(srcptr + mad24(y, src_step, mad24(x_, TSIZE, src_offset))));\n"
+"WT data2 = convertToWT(loadpix(srcptr + mad24(y_, src_step, mad24(x, TSIZE, src_offset))));\n"
+"WT data3 = convertToWT(loadpix(srcptr + mad24(y_, src_step, mad24(x_, TSIZE, src_offset))));\n"
+"WT val = mul24((WT)mul24(U1, V1), data0) + mul24((WT)mul24(U, V1), data1) +\n"
+"mul24((WT)mul24(U1, V), data2) + mul24((WT)mul24(U, V), data3);\n"
+"T uval = convertToDT((val + (1<<(CAST_BITS-1)))>>CAST_BITS);\n"
+"#else\n"
+"float u1 = 1.f - u;\n"
+"float v1 = 1.f - v;\n"
+"WT data0 = convertToWT(loadpix(srcptr + mad24(y, src_step, mad24(x, TSIZE, src_offset))));\n"
+"WT data1 = convertToWT(loadpix(srcptr + mad24(y, src_step, mad24(x_, TSIZE, src_offset))));\n"
+"WT data2 = convertToWT(loadpix(srcptr + mad24(y_, src_step, mad24(x, TSIZE, src_offset))));\n"
+"WT data3 = convertToWT(loadpix(srcptr + mad24(y_, src_step, mad24(x_, TSIZE, src_offset))));\n"
+"T uval = u1 * v1 * data0 + u * v1 * data1 + u1 * v *data2 + u * v *data3;\n"
+"#endif\n"
+"storepix(uval, dstptr + mad24(dy, dst_step, mad24(dx, TSIZE, dst_offset)));\n"
+"}\n"
+"}\n"
+"#elif defined INTER_NEAREST\n"
+"__kernel void resizeNN(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"float ifx, float ify)\n"
+"{\n"
+"int dx = get_global_id(0);\n"
+"int dy = get_global_id(1);\n"
+"if (dx < dst_cols && dy < dst_rows)\n"
+"{\n"
+"float s1 = dx * ifx;\n"
+"float s2 = dy * ify;\n"
+"int sx = min(convert_int_rtz(s1), src_cols - 1);\n"
+"int sy = min(convert_int_rtz(s2), src_rows - 1);\n"
+"storepix(loadpix(srcptr + mad24(sy, src_step, mad24(sx, TSIZE, src_offset))),\n"
+"dstptr + mad24(dy, dst_step, mad24(dx, TSIZE, dst_offset)));\n"
+"}\n"
+"}\n"
+"#elif defined INTER_AREA\n"
+"#ifdef INTER_AREA_FAST\n"
+"__kernel void resizeAREA_FAST(__global const uchar * src, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols)\n"
+"{\n"
+"int dx = get_global_id(0);\n"
+"int dy = get_global_id(1);\n"
+"if (dx < dst_cols && dy < dst_rows)\n"
+"{\n"
+"int dst_index = mad24(dy, dst_step, dst_offset);\n"
+"int sx = XSCALE * dx;\n"
+"int sy = YSCALE * dy;\n"
+"WTV sum = (WTV)(0);\n"
+"#pragma unroll\n"
+"for (int py = 0; py < YSCALE; ++py)\n"
+"{\n"
+"int y = min(sy + py, src_rows - 1);\n"
+"int src_index = mad24(y, src_step, src_offset);\n"
+"#pragma unroll\n"
+"for (int px = 0; px < XSCALE; ++px)\n"
+"{\n"
+"int x = min(sx + px, src_cols - 1);\n"
+"sum += convertToWTV(loadpix(src + src_index + x*TSIZE));\n"
+"}\n"
+"}\n"
+"storepix(convertToT(convertToWT2V(sum) * (WT2V)(SCALE)), dst + mad24(dx, TSIZE, dst_index));\n"
+"}\n"
+"}\n"
+"#else\n"
+"__kernel void resizeAREA(__global const uchar * src, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"float ifx, float ify, __global const int * ofs_tab,\n"
+"__global const int * map_tab, __global const float * alpha_tab)\n"
+"{\n"
+"int dx = get_global_id(0);\n"
+"int dy = get_global_id(1);\n"
+"if (dx < dst_cols && dy < dst_rows)\n"
+"{\n"
+"int dst_index = mad24(dy, dst_step, dst_offset);\n"
+"__global const int * xmap_tab = map_tab;\n"
+"__global const int * ymap_tab = (__global const int *)(map_tab + (src_cols << 1));\n"
+"__global const float * xalpha_tab = alpha_tab;\n"
+"__global const float * yalpha_tab = (__global const float *)(alpha_tab + (src_cols << 1));\n"
+"__global const int * xofs_tab = ofs_tab;\n"
+"__global const int * yofs_tab = (__global const int *)(ofs_tab + dst_cols + 1);\n"
+"int xk0 = xofs_tab[dx], xk1 = xofs_tab[dx + 1];\n"
+"int yk0 = yofs_tab[dy], yk1 = yofs_tab[dy + 1];\n"
+"int sy0 = ymap_tab[yk0], sy1 = ymap_tab[yk1 - 1];\n"
+"int sx0 = xmap_tab[xk0], sx1 = xmap_tab[xk1 - 1];\n"
+"WTV sum = (WTV)(0), buf;\n"
+"int src_index = mad24(sy0, src_step, src_offset);\n"
+"for (int sy = sy0, yk = yk0; sy <= sy1; ++sy, src_index += src_step, ++yk)\n"
+"{\n"
+"WTV beta = (WTV)(yalpha_tab[yk]);\n"
+"buf = (WTV)(0);\n"
+"for (int sx = sx0, xk = xk0; sx <= sx1; ++sx, ++xk)\n"
+"{\n"
+"WTV alpha = (WTV)(xalpha_tab[xk]);\n"
+"buf += convertToWTV(loadpix(src + mad24(sx, TSIZE, src_index))) * alpha;\n"
+"}\n"
+"sum += buf * beta;\n"
+"}\n"
+"storepix(convertToT(sum), dst + mad24(dx, TSIZE, dst_index));\n"
+"}\n"
+"}\n"
+"#endif\n"
+"#endif\n"
+, "3e1ea3c21fc70a7a9166d5cc66b7ff80"};
+ProgramSource resize_oclsrc(resize.programStr);
+const struct ProgramEntry threshold={"threshold",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"__kernel void threshold(__global const uchar * srcptr, int src_step, int src_offset,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int rows, int cols,\n"
+"T1 thresh, T1 max_val, T1 min_val)\n"
+"{\n"
+"int gx = get_global_id(0);\n"
+"int gy = get_global_id(1) * STRIDE_SIZE;\n"
+"if (gx < cols)\n"
+"{\n"
+"int src_index = mad24(gy, src_step, mad24(gx, (int)sizeof(T), src_offset));\n"
+"int dst_index = mad24(gy, dst_step, mad24(gx, (int)sizeof(T), dst_offset));\n"
+"#pragma unroll\n"
+"for (int i = 0; i < STRIDE_SIZE; i++)\n"
+"{\n"
+"if (gy < rows)\n"
+"{\n"
+"T sdata = *(__global const T *)(srcptr + src_index);\n"
+"__global T * dst = (__global T *)(dstptr + dst_index);\n"
+"#ifdef THRESH_BINARY\n"
+"dst[0] = sdata > (thresh) ? (T)(max_val) : (T)(0);\n"
+"#elif defined THRESH_BINARY_INV\n"
+"dst[0] = sdata > (thresh) ? (T)(0) : (T)(max_val);\n"
+"#elif defined THRESH_TRUNC\n"
+"dst[0] = clamp(sdata, (T)min_val, (T)(thresh));\n"
+"#elif defined THRESH_TOZERO\n"
+"dst[0] = sdata > (thresh) ? sdata : (T)(0);\n"
+"#elif defined THRESH_TOZERO_INV\n"
+"dst[0] = sdata > (thresh) ? (T)(0) : sdata;\n"
+"#endif\n"
+"gy++;\n"
+"src_index += src_step;\n"
+"dst_index += dst_step;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+, "f464151682565a20de380a62e09ae458"};
+ProgramSource threshold_oclsrc(threshold.programStr);
+const struct ProgramEntry warp_affine={"warp_affine",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#define CT double\n"
+"#else\n"
+"#define CT float\n"
+"#endif\n"
+"#define INTER_BITS 5\n"
+"#define INTER_TAB_SIZE (1 << INTER_BITS)\n"
+"#define INTER_SCALE 1.f/INTER_TAB_SIZE\n"
+"#define AB_BITS max(10, (int)INTER_BITS)\n"
+"#define AB_SCALE (1 << AB_BITS)\n"
+"#define INTER_REMAP_COEF_BITS 15\n"
+"#define INTER_REMAP_COEF_SCALE (1 << INTER_REMAP_COEF_BITS)\n"
+"#define ROUND_DELTA (1 << (AB_BITS - INTER_BITS - 1))\n"
+"#define noconvert\n"
+"#ifndef ST\n"
+"#define ST T\n"
+"#endif\n"
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const T*)(addr)\n"
+"#define storepix(val, addr) *(__global T*)(addr) = val\n"
+"#define scalar scalar_\n"
+"#define pixsize (int)sizeof(T)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const T1*)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global T1*)(addr))\n"
+"#ifdef INTER_NEAREST\n"
+"#define scalar (T)(scalar_.x, scalar_.y, scalar_.z)\n"
+"#else\n"
+"#define scalar (WT)(scalar_.x, scalar_.y, scalar_.z)\n"
+"#endif\n"
+"#define pixsize ((int)sizeof(T1)*3)\n"
+"#endif\n"
+"#ifdef INTER_NEAREST\n"
+"__kernel void warpAffine(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__constant CT * M, ST scalar_)\n"
+"{\n"
+"int dx = get_global_id(0);\n"
+"int dy0 = get_global_id(1) * rowsPerWI;\n"
+"if (dx < dst_cols)\n"
+"{\n"
+"int round_delta = (AB_SCALE >> 1);\n"
+"int X0_ = rint(M[0] * dx * AB_SCALE);\n"
+"int Y0_ = rint(M[3] * dx * AB_SCALE);\n"
+"int dst_index = mad24(dy0, dst_step, mad24(dx, pixsize, dst_offset));\n"
+"for (int dy = dy0, dy1 = min(dst_rows, dy0 + rowsPerWI); dy < dy1; ++dy, dst_index += dst_step)\n"
+"{\n"
+"int X0 = X0_ + rint(fma(M[1], dy, M[2]) * AB_SCALE) + round_delta;\n"
+"int Y0 = Y0_ + rint(fma(M[4], dy, M[5]) * AB_SCALE) + round_delta;\n"
+"short sx = convert_short_sat(X0 >> AB_BITS);\n"
+"short sy = convert_short_sat(Y0 >> AB_BITS);\n"
+"if (sx >= 0 && sx < src_cols && sy >= 0 && sy < src_rows)\n"
+"{\n"
+"int src_index = mad24(sy, src_step, mad24(sx, pixsize, src_offset));\n"
+"storepix(loadpix(srcptr + src_index), dstptr + dst_index);\n"
+"}\n"
+"else\n"
+"storepix(scalar, dstptr + dst_index);\n"
+"}\n"
+"}\n"
+"}\n"
+"#elif defined INTER_LINEAR\n"
+"__constant float coeffs[64] =\n"
+"{ 1.000000f, 0.000000f, 0.968750f, 0.031250f, 0.937500f, 0.062500f, 0.906250f, 0.093750f, 0.875000f, 0.125000f, 0.843750f, 0.156250f,\n"
+"0.812500f, 0.187500f, 0.781250f, 0.218750f, 0.750000f, 0.250000f, 0.718750f, 0.281250f, 0.687500f, 0.312500f, 0.656250f, 0.343750f,\n"
+"0.625000f, 0.375000f, 0.593750f, 0.406250f, 0.562500f, 0.437500f, 0.531250f, 0.468750f, 0.500000f, 0.500000f, 0.468750f, 0.531250f,\n"
+"0.437500f, 0.562500f, 0.406250f, 0.593750f, 0.375000f, 0.625000f, 0.343750f, 0.656250f, 0.312500f, 0.687500f, 0.281250f, 0.718750f,\n"
+"0.250000f, 0.750000f, 0.218750f, 0.781250f, 0.187500f, 0.812500f, 0.156250f, 0.843750f, 0.125000f, 0.875000f, 0.093750f, 0.906250f,\n"
+"0.062500f, 0.937500f, 0.031250f, 0.968750f };\n"
+"__kernel void warpAffine(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__constant CT * M, ST scalar_)\n"
+"{\n"
+"int dx = get_global_id(0);\n"
+"int dy0 = get_global_id(1) * rowsPerWI;\n"
+"if (dx < dst_cols)\n"
+"{\n"
+"int tmp = dx << AB_BITS;\n"
+"int X0_ = rint(M[0] * tmp);\n"
+"int Y0_ = rint(M[3] * tmp);\n"
+"for (int dy = dy0, dy1 = min(dst_rows, dy0 + rowsPerWI); dy < dy1; ++dy)\n"
+"{\n"
+"int X0 = X0_ + rint(fma(M[1], dy, M[2]) * AB_SCALE) + ROUND_DELTA;\n"
+"int Y0 = Y0_ + rint(fma(M[4], dy, M[5]) * AB_SCALE) + ROUND_DELTA;\n"
+"X0 = X0 >> (AB_BITS - INTER_BITS);\n"
+"Y0 = Y0 >> (AB_BITS - INTER_BITS);\n"
+"short sx = convert_short_sat(X0 >> INTER_BITS), sy = convert_short_sat(Y0 >> INTER_BITS);\n"
+"short ax = convert_short(X0 & (INTER_TAB_SIZE-1)), ay = convert_short(Y0 & (INTER_TAB_SIZE-1));\n"
+"#if defined AMD_DEVICE || depth > 4\n"
+"WT v0 = scalar, v1 = scalar, v2 = scalar, v3 = scalar;\n"
+"if (sx >= 0 && sx < src_cols)\n"
+"{\n"
+"if (sy >= 0 && sy < src_rows)\n"
+"v0 = convertToWT(loadpix(srcptr + mad24(sy, src_step, mad24(sx, pixsize, src_offset))));\n"
+"if (sy+1 >= 0 && sy+1 < src_rows)\n"
+"v2 = convertToWT(loadpix(srcptr + mad24(sy+1, src_step, mad24(sx, pixsize, src_offset))));\n"
+"}\n"
+"if (sx+1 >= 0 && sx+1 < src_cols)\n"
+"{\n"
+"if (sy >= 0 && sy < src_rows)\n"
+"v1 = convertToWT(loadpix(srcptr + mad24(sy, src_step, mad24(sx+1, pixsize, src_offset))));\n"
+"if (sy+1 >= 0 && sy+1 < src_rows)\n"
+"v3 = convertToWT(loadpix(srcptr + mad24(sy+1, src_step, mad24(sx+1, pixsize, src_offset))));\n"
+"}\n"
+"float taby = 1.f/INTER_TAB_SIZE*ay;\n"
+"float tabx = 1.f/INTER_TAB_SIZE*ax;\n"
+"int dst_index = mad24(dy, dst_step, mad24(dx, pixsize, dst_offset));\n"
+"#if depth <= 4\n"
+"int itab0 = convert_short_sat_rte( (1.0f-taby)*(1.0f-tabx) * INTER_REMAP_COEF_SCALE );\n"
+"int itab1 = convert_short_sat_rte( (1.0f-taby)*tabx * INTER_REMAP_COEF_SCALE );\n"
+"int itab2 = convert_short_sat_rte( taby*(1.0f-tabx) * INTER_REMAP_COEF_SCALE );\n"
+"int itab3 = convert_short_sat_rte( taby*tabx * INTER_REMAP_COEF_SCALE );\n"
+"WT val = mad24(v0, itab0, mad24(v1, itab1, mad24(v2, itab2, v3 * itab3)));\n"
+"storepix(convertToT((val + (1 << (INTER_REMAP_COEF_BITS-1))) >> INTER_REMAP_COEF_BITS), dstptr + dst_index);\n"
+"#else\n"
+"float tabx2 = 1.0f - tabx, taby2 = 1.0f - taby;\n"
+"WT val = fma(tabx2, fma(v0, taby2, v2 * taby), tabx * fma(v1, taby2, v3 * taby));\n"
+"storepix(convertToT(val), dstptr + dst_index);\n"
+"#endif\n"
+"#else\n"
+"__constant float * coeffs_y = coeffs + (ay << 1), * coeffs_x = coeffs + (ax << 1);\n"
+"int src_index0 = mad24(sy, src_step, mad24(sx, pixsize, src_offset)), src_index;\n"
+"int dst_index = mad24(dy, dst_step, mad24(dx, pixsize, dst_offset));\n"
+"WT sum = (WT)(0), xsum;\n"
+"#pragma unroll\n"
+"for (int y = 0; y < 2; y++)\n"
+"{\n"
+"src_index = mad24(y, src_step, src_index0);\n"
+"if (sy + y >= 0 && sy + y < src_rows)\n"
+"{\n"
+"xsum = (WT)(0);\n"
+"if (sx >= 0 && sx + 2 < src_cols)\n"
+"{\n"
+"#if depth == 0 && cn == 1\n"
+"uchar2 value = vload2(0, srcptr + src_index);\n"
+"xsum = dot(convert_float2(value), (float2)(coeffs_x[0], coeffs_x[1]));\n"
+"#else\n"
+"#pragma unroll\n"
+"for (int x = 0; x < 2; x++)\n"
+"xsum = fma(convertToWT(loadpix(srcptr + mad24(x, pixsize, src_index))), coeffs_x[x], xsum);\n"
+"#endif\n"
+"}\n"
+"else\n"
+"{\n"
+"#pragma unroll\n"
+"for (int x = 0; x < 2; x++)\n"
+"xsum = fma(sx + x >= 0 && sx + x < src_cols ?\n"
+"convertToWT(loadpix(srcptr + mad24(x, pixsize, src_index))) : scalar, coeffs_x[x], xsum);\n"
+"}\n"
+"sum = fma(xsum, coeffs_y[y], sum);\n"
+"}\n"
+"else\n"
+"sum = fma(scalar, coeffs_y[y], sum);\n"
+"}\n"
+"storepix(convertToT(sum), dstptr + dst_index);\n"
+"#endif\n"
+"}\n"
+"}\n"
+"}\n"
+"#elif defined INTER_CUBIC\n"
+"#ifdef AMD_DEVICE\n"
+"inline void interpolateCubic( float x, float* coeffs )\n"
+"{\n"
+"const float A = -0.75f;\n"
+"coeffs[0] = fma(fma(fma(A, (x + 1.f), - 5.0f*A), (x + 1.f), 8.0f*A), x + 1.f, - 4.0f*A);\n"
+"coeffs[1] = fma(fma(A + 2.f, x, - (A + 3.f)), x*x, 1.f);\n"
+"coeffs[2] = fma(fma(A + 2.f, 1.f - x, - (A + 3.f)), (1.f - x)*(1.f - x), 1.f);\n"
+"coeffs[3] = 1.f - coeffs[0] - coeffs[1] - coeffs[2];\n"
+"}\n"
+"#else\n"
+"__constant float coeffs[128] =\n"
+"{ 0.000000f, 1.000000f, 0.000000f, 0.000000f, -0.021996f, 0.997841f, 0.024864f, -0.000710f, -0.041199f, 0.991516f, 0.052429f, -0.002747f,\n"
+"-0.057747f, 0.981255f, 0.082466f, -0.005974f, -0.071777f, 0.967285f, 0.114746f, -0.010254f, -0.083427f, 0.949837f, 0.149040f, -0.015450f,\n"
+"-0.092834f, 0.929138f, 0.185120f, -0.021423f, -0.100136f, 0.905418f, 0.222755f, -0.028038f, -0.105469f, 0.878906f, 0.261719f, -0.035156f,\n"
+"-0.108971f, 0.849831f, 0.301781f, -0.042641f, -0.110779f, 0.818420f, 0.342712f, -0.050354f, -0.111031f, 0.784904f, 0.384285f, -0.058159f,\n"
+"-0.109863f, 0.749512f, 0.426270f, -0.065918f, -0.107414f, 0.712471f, 0.468437f, -0.073494f, -0.103821f, 0.674011f, 0.510559f, -0.080750f,\n"
+"-0.099220f, 0.634361f, 0.552406f, -0.087547f, -0.093750f, 0.593750f, 0.593750f, -0.093750f, -0.087547f, 0.552406f, 0.634361f, -0.099220f,\n"
+"-0.080750f, 0.510559f, 0.674011f, -0.103821f, -0.073494f, 0.468437f, 0.712471f, -0.107414f, -0.065918f, 0.426270f, 0.749512f, -0.109863f,\n"
+"-0.058159f, 0.384285f, 0.784904f, -0.111031f, -0.050354f, 0.342712f, 0.818420f, -0.110779f, -0.042641f, 0.301781f, 0.849831f, -0.108971f,\n"
+"-0.035156f, 0.261719f, 0.878906f, -0.105469f, -0.028038f, 0.222755f, 0.905418f, -0.100136f, -0.021423f, 0.185120f, 0.929138f, -0.092834f,\n"
+"-0.015450f, 0.149040f, 0.949837f, -0.083427f, -0.010254f, 0.114746f, 0.967285f, -0.071777f, -0.005974f, 0.082466f, 0.981255f, -0.057747f,\n"
+"-0.002747f, 0.052429f, 0.991516f, -0.041199f, -0.000710f, 0.024864f, 0.997841f, -0.021996f };\n"
+"#endif\n"
+"__kernel void warpAffine(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__constant CT * M, ST scalar_)\n"
+"{\n"
+"int dx = get_global_id(0);\n"
+"int dy = get_global_id(1);\n"
+"if (dx < dst_cols && dy < dst_rows)\n"
+"{\n"
+"int tmp = (dx << AB_BITS);\n"
+"int X0 = rint(M[0] * tmp) + rint(fma(M[1], dy, M[2]) * AB_SCALE) + ROUND_DELTA;\n"
+"int Y0 = rint(M[3] * tmp) + rint(fma(M[4], dy, M[5]) * AB_SCALE) + ROUND_DELTA;\n"
+"X0 = X0 >> (AB_BITS - INTER_BITS);\n"
+"Y0 = Y0 >> (AB_BITS - INTER_BITS);\n"
+"int sx = (short)(X0 >> INTER_BITS) - 1, sy = (short)(Y0 >> INTER_BITS) - 1;\n"
+"int ay = (short)(Y0 & (INTER_TAB_SIZE - 1)), ax = (short)(X0 & (INTER_TAB_SIZE - 1));\n"
+"#ifdef AMD_DEVICE\n"
+"WT v[16];\n"
+"#pragma unroll\n"
+"for (int y = 0; y < 4; y++)\n"
+"{\n"
+"if (sy+y >= 0 && sy+y < src_rows)\n"
+"{\n"
+"#pragma unroll\n"
+"for (int x = 0; x < 4; x++)\n"
+"v[mad24(y, 4, x)] = sx+x >= 0 && sx+x < src_cols ?\n"
+"convertToWT(loadpix(srcptr + mad24(sy+y, src_step, mad24(sx+x, pixsize, src_offset)))) : scalar;\n"
+"}\n"
+"else\n"
+"{\n"
+"#pragma unroll\n"
+"for (int x = 0; x < 4; x++)\n"
+"v[mad24(y, 4, x)] = scalar;\n"
+"}\n"
+"}\n"
+"float tab1y[4], tab1x[4];\n"
+"float ayy = INTER_SCALE * ay;\n"
+"float axx = INTER_SCALE * ax;\n"
+"interpolateCubic(ayy, tab1y);\n"
+"interpolateCubic(axx, tab1x);\n"
+"int dst_index = mad24(dy, dst_step, mad24(dx, pixsize, dst_offset));\n"
+"WT sum = (WT)(0);\n"
+"#if depth <= 4\n"
+"int itab[16];\n"
+"#pragma unroll\n"
+"for (int i = 0; i < 16; i++)\n"
+"itab[i] = rint(tab1y[(i>>2)] * tab1x[(i&3)] * INTER_REMAP_COEF_SCALE);\n"
+"#pragma unroll\n"
+"for (int i = 0; i < 16; i++)\n"
+"sum = mad24(v[i], itab[i], sum);\n"
+"storepix(convertToT( (sum + (1 << (INTER_REMAP_COEF_BITS-1))) >> INTER_REMAP_COEF_BITS ), dstptr + dst_index);\n"
+"#else\n"
+"#pragma unroll\n"
+"for (int i = 0; i < 16; i++)\n"
+"sum = fma(v[i], tab1y[(i>>2)] * tab1x[(i&3)], sum);\n"
+"storepix(convertToT( sum ), dstptr + dst_index);\n"
+"#endif\n"
+"#else\n"
+"__constant float * coeffs_y = coeffs + (ay << 2), * coeffs_x = coeffs + (ax << 2);\n"
+"int src_index0 = mad24(sy, src_step, mad24(sx, pixsize, src_offset)), src_index;\n"
+"int dst_index = mad24(dy, dst_step, mad24(dx, pixsize, dst_offset));\n"
+"WT sum = (WT)(0), xsum;\n"
+"#pragma unroll\n"
+"for (int y = 0; y < 4; y++)\n"
+"{\n"
+"src_index = mad24(y, src_step, src_index0);\n"
+"if (sy + y >= 0 && sy + y < src_rows)\n"
+"{\n"
+"xsum = (WT)(0);\n"
+"if (sx >= 0 && sx + 4 < src_cols)\n"
+"{\n"
+"#if depth == 0 && cn == 1\n"
+"uchar4 value = vload4(0, srcptr + src_index);\n"
+"xsum = dot(convert_float4(value), (float4)(coeffs_x[0], coeffs_x[1], coeffs_x[2], coeffs_x[3]));\n"
+"#else\n"
+"#pragma unroll\n"
+"for (int x = 0; x < 4; x++)\n"
+"xsum = fma(convertToWT(loadpix(srcptr + mad24(x, pixsize, src_index))), coeffs_x[x], xsum);\n"
+"#endif\n"
+"}\n"
+"else\n"
+"{\n"
+"#pragma unroll\n"
+"for (int x = 0; x < 4; x++)\n"
+"xsum = fma(sx + x >= 0 && sx + x < src_cols ?\n"
+"convertToWT(loadpix(srcptr + mad24(x, pixsize, src_index))) : scalar, coeffs_x[x], xsum);\n"
+"}\n"
+"sum = fma(xsum, coeffs_y[y], sum);\n"
+"}\n"
+"else\n"
+"sum = fma(scalar, coeffs_y[y], sum);\n"
+"}\n"
+"storepix(convertToT(sum), dstptr + dst_index);\n"
+"#endif\n"
+"}\n"
+"}\n"
+"#endif\n"
+, "582cfe4cf8dd76973e63698796247546"};
+ProgramSource warp_affine_oclsrc(warp_affine.programStr);
+const struct ProgramEntry warp_perspective={"warp_perspective",
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#define CT double\n"
+"#else\n"
+"#define CT float\n"
+"#endif\n"
+"#define INTER_BITS 5\n"
+"#define INTER_TAB_SIZE (1 << INTER_BITS)\n"
+"#define INTER_SCALE 1.f / INTER_TAB_SIZE\n"
+"#define AB_BITS max(10, (int)INTER_BITS)\n"
+"#define AB_SCALE (1 << AB_BITS)\n"
+"#define INTER_REMAP_COEF_BITS 15\n"
+"#define INTER_REMAP_COEF_SCALE (1 << INTER_REMAP_COEF_BITS)\n"
+"#define noconvert\n"
+"#ifndef ST\n"
+"#define ST T\n"
+"#endif\n"
+"#if cn != 3\n"
+"#define loadpix(addr) *(__global const T*)(addr)\n"
+"#define storepix(val, addr) *(__global T*)(addr) = val\n"
+"#define scalar scalar_\n"
+"#define pixsize (int)sizeof(T)\n"
+"#else\n"
+"#define loadpix(addr) vload3(0, (__global const T1*)(addr))\n"
+"#define storepix(val, addr) vstore3(val, 0, (__global T1*)(addr))\n"
+"#ifdef INTER_NEAREST\n"
+"#define scalar (T)(scalar_.x, scalar_.y, scalar_.z)\n"
+"#else\n"
+"#define scalar (WT)(scalar_.x, scalar_.y, scalar_.z)\n"
+"#endif\n"
+"#define pixsize ((int)sizeof(T1)*3)\n"
+"#endif\n"
+"#ifdef INTER_NEAREST\n"
+"__kernel void warpPerspective(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__constant CT * M, ST scalar_)\n"
+"{\n"
+"int dx = get_global_id(0);\n"
+"int dy = get_global_id(1);\n"
+"if (dx < dst_cols && dy < dst_rows)\n"
+"{\n"
+"CT X0 = M[0] * dx + M[1] * dy + M[2];\n"
+"CT Y0 = M[3] * dx + M[4] * dy + M[5];\n"
+"CT W = M[6] * dx + M[7] * dy + M[8];\n"
+"W = W != 0.0f ? 1.f / W : 0.0f;\n"
+"short sx = convert_short_sat_rte(X0*W);\n"
+"short sy = convert_short_sat_rte(Y0*W);\n"
+"int dst_index = mad24(dy, dst_step, dx * pixsize + dst_offset);\n"
+"if (sx >= 0 && sx < src_cols && sy >= 0 && sy < src_rows)\n"
+"{\n"
+"int src_index = mad24(sy, src_step, sx * pixsize + src_offset);\n"
+"storepix(loadpix(srcptr + src_index), dstptr + dst_index);\n"
+"}\n"
+"else\n"
+"storepix(scalar, dstptr + dst_index);\n"
+"}\n"
+"}\n"
+"#elif defined INTER_LINEAR\n"
+"__kernel void warpPerspective(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__constant CT * M, ST scalar_)\n"
+"{\n"
+"int dx = get_global_id(0);\n"
+"int dy = get_global_id(1);\n"
+"if (dx < dst_cols && dy < dst_rows)\n"
+"{\n"
+"CT X0 = M[0] * dx + M[1] * dy + M[2];\n"
+"CT Y0 = M[3] * dx + M[4] * dy + M[5];\n"
+"CT W = M[6] * dx + M[7] * dy + M[8];\n"
+"W = W != 0.0f ? INTER_TAB_SIZE / W : 0.0f;\n"
+"int X = rint(X0 * W), Y = rint(Y0 * W);\n"
+"short sx = convert_short_sat(X >> INTER_BITS);\n"
+"short sy = convert_short_sat(Y >> INTER_BITS);\n"
+"short ay = (short)(Y & (INTER_TAB_SIZE - 1));\n"
+"short ax = (short)(X & (INTER_TAB_SIZE - 1));\n"
+"WT v0 = (sx >= 0 && sx < src_cols && sy >= 0 && sy < src_rows) ?\n"
+"convertToWT(loadpix(srcptr + mad24(sy, src_step, src_offset + sx * pixsize))) : scalar;\n"
+"WT v1 = (sx+1 >= 0 && sx+1 < src_cols && sy >= 0 && sy < src_rows) ?\n"
+"convertToWT(loadpix(srcptr + mad24(sy, src_step, src_offset + (sx+1) * pixsize))) : scalar;\n"
+"WT v2 = (sx >= 0 && sx < src_cols && sy+1 >= 0 && sy+1 < src_rows) ?\n"
+"convertToWT(loadpix(srcptr + mad24(sy+1, src_step, src_offset + sx * pixsize))) : scalar;\n"
+"WT v3 = (sx+1 >= 0 && sx+1 < src_cols && sy+1 >= 0 && sy+1 < src_rows) ?\n"
+"convertToWT(loadpix(srcptr + mad24(sy+1, src_step, src_offset + (sx+1) * pixsize))) : scalar;\n"
+"float taby = 1.f/INTER_TAB_SIZE*ay;\n"
+"float tabx = 1.f/INTER_TAB_SIZE*ax;\n"
+"int dst_index = mad24(dy, dst_step, dst_offset + dx * pixsize);\n"
+"#if depth <= 4\n"
+"int itab0 = convert_short_sat_rte( (1.0f-taby)*(1.0f-tabx) * INTER_REMAP_COEF_SCALE );\n"
+"int itab1 = convert_short_sat_rte( (1.0f-taby)*tabx * INTER_REMAP_COEF_SCALE );\n"
+"int itab2 = convert_short_sat_rte( taby*(1.0f-tabx) * INTER_REMAP_COEF_SCALE );\n"
+"int itab3 = convert_short_sat_rte( taby*tabx * INTER_REMAP_COEF_SCALE );\n"
+"WT val = v0 * itab0 + v1 * itab1 + v2 * itab2 + v3 * itab3;\n"
+"storepix(convertToT((val + (1 << (INTER_REMAP_COEF_BITS-1))) >> INTER_REMAP_COEF_BITS), dstptr + dst_index);\n"
+"#else\n"
+"float tabx2 = 1.0f - tabx, taby2 = 1.0f - taby;\n"
+"WT val = v0 * tabx2 * taby2 + v1 * tabx * taby2 + v2 * tabx2 * taby + v3 * tabx * taby;\n"
+"storepix(convertToT(val), dstptr + dst_index);\n"
+"#endif\n"
+"}\n"
+"}\n"
+"#elif defined INTER_CUBIC\n"
+"inline void interpolateCubic( float x, float* coeffs )\n"
+"{\n"
+"const float A = -0.75f;\n"
+"coeffs[0] = ((A*(x + 1.f) - 5.0f*A)*(x + 1.f) + 8.0f*A)*(x + 1.f) - 4.0f*A;\n"
+"coeffs[1] = ((A + 2.f)*x - (A + 3.f))*x*x + 1.f;\n"
+"coeffs[2] = ((A + 2.f)*(1.f - x) - (A + 3.f))*(1.f - x)*(1.f - x) + 1.f;\n"
+"coeffs[3] = 1.f - coeffs[0] - coeffs[1] - coeffs[2];\n"
+"}\n"
+"__kernel void warpPerspective(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__constant CT * M, ST scalar_)\n"
+"{\n"
+"int dx = get_global_id(0);\n"
+"int dy = get_global_id(1);\n"
+"if (dx < dst_cols && dy < dst_rows)\n"
+"{\n"
+"CT X0 = M[0] * dx + M[1] * dy + M[2];\n"
+"CT Y0 = M[3] * dx + M[4] * dy + M[5];\n"
+"CT W = M[6] * dx + M[7] * dy + M[8];\n"
+"W = W != 0.0f ? INTER_TAB_SIZE / W : 0.0f;\n"
+"int X = rint(X0 * W), Y = rint(Y0 * W);\n"
+"short sx = convert_short_sat(X >> INTER_BITS) - 1;\n"
+"short sy = convert_short_sat(Y >> INTER_BITS) - 1;\n"
+"short ay = (short)(Y & (INTER_TAB_SIZE-1));\n"
+"short ax = (short)(X & (INTER_TAB_SIZE-1));\n"
+"WT v[16];\n"
+"#pragma unroll\n"
+"for (int y = 0; y < 4; y++)\n"
+"#pragma unroll\n"
+"for (int x = 0; x < 4; x++)\n"
+"v[mad24(y, 4, x)] = (sx+x >= 0 && sx+x < src_cols && sy+y >= 0 && sy+y < src_rows) ?\n"
+"convertToWT(loadpix(srcptr + mad24(sy+y, src_step, src_offset + (sx+x) * pixsize))) : scalar;\n"
+"float tab1y[4], tab1x[4];\n"
+"float ayy = INTER_SCALE * ay;\n"
+"float axx = INTER_SCALE * ax;\n"
+"interpolateCubic(ayy, tab1y);\n"
+"interpolateCubic(axx, tab1x);\n"
+"int dst_index = mad24(dy, dst_step, dst_offset + dx * pixsize);\n"
+"WT sum = (WT)(0);\n"
+"#if depth <= 4\n"
+"int itab[16];\n"
+"#pragma unroll\n"
+"for (int i = 0; i < 16; i++)\n"
+"itab[i] = rint(tab1y[(i>>2)] * tab1x[(i&3)] * INTER_REMAP_COEF_SCALE);\n"
+"#pragma unroll\n"
+"for (int i = 0; i < 16; i++)\n"
+"sum += v[i] * itab[i];\n"
+"storepix(convertToT( (sum + (1 << (INTER_REMAP_COEF_BITS-1))) >> INTER_REMAP_COEF_BITS ), dstptr + dst_index);\n"
+"#else\n"
+"#pragma unroll\n"
+"for (int i = 0; i < 16; i++)\n"
+"sum += v[i] * tab1y[(i>>2)] * tab1x[(i&3)];\n"
+"storepix(convertToT( sum ), dstptr + dst_index);\n"
+"#endif\n"
+"}\n"
+"}\n"
+"#endif\n"
+, "1449b5059b082c4595846a86ed5702ad"};
+ProgramSource warp_perspective_oclsrc(warp_perspective.programStr);
+}
+}}
diff --git a/modules/imgproc/opencl_kernels_imgproc.hpp b/modules/imgproc/opencl_kernels_imgproc.hpp
new file mode 100644
index 0000000..cb80038
--- /dev/null
+++ b/modules/imgproc/opencl_kernels_imgproc.hpp
@@ -0,0 +1,81 @@
+// This file is auto-generated. Do not edit!
+
+#include "opencv2/core/ocl.hpp"
+#include "opencv2/core/ocl_genbase.hpp"
+#include "opencv2/core/opencl/ocl_defs.hpp"
+
+namespace cv
+{
+namespace ocl
+{
+namespace imgproc
+{
+
+extern const struct ProgramEntry accumulate;
+extern ProgramSource accumulate_oclsrc;
+extern const struct ProgramEntry bilateral;
+extern ProgramSource bilateral_oclsrc;
+extern const struct ProgramEntry blend_linear;
+extern ProgramSource blend_linear_oclsrc;
+extern const struct ProgramEntry boxFilter;
+extern ProgramSource boxFilter_oclsrc;
+extern const struct ProgramEntry calc_back_project;
+extern ProgramSource calc_back_project_oclsrc;
+extern const struct ProgramEntry canny;
+extern ProgramSource canny_oclsrc;
+extern const struct ProgramEntry clahe;
+extern ProgramSource clahe_oclsrc;
+extern const struct ProgramEntry corner;
+extern ProgramSource corner_oclsrc;
+extern const struct ProgramEntry covardata;
+extern ProgramSource covardata_oclsrc;
+extern const struct ProgramEntry cvtcolor;
+extern ProgramSource cvtcolor_oclsrc;
+extern const struct ProgramEntry filter2D;
+extern ProgramSource filter2D_oclsrc;
+extern const struct ProgramEntry filter2DSmall;
+extern ProgramSource filter2DSmall_oclsrc;
+extern const struct ProgramEntry filterSepCol;
+extern ProgramSource filterSepCol_oclsrc;
+extern const struct ProgramEntry filterSepRow;
+extern ProgramSource filterSepRow_oclsrc;
+extern const struct ProgramEntry filterSep_singlePass;
+extern ProgramSource filterSep_singlePass_oclsrc;
+extern const struct ProgramEntry filterSmall;
+extern ProgramSource filterSmall_oclsrc;
+extern const struct ProgramEntry gftt;
+extern ProgramSource gftt_oclsrc;
+extern const struct ProgramEntry histogram;
+extern ProgramSource histogram_oclsrc;
+extern const struct ProgramEntry hough_lines;
+extern ProgramSource hough_lines_oclsrc;
+extern const struct ProgramEntry integral_sum;
+extern ProgramSource integral_sum_oclsrc;
+extern const struct ProgramEntry laplacian5;
+extern ProgramSource laplacian5_oclsrc;
+extern const struct ProgramEntry match_template;
+extern ProgramSource match_template_oclsrc;
+extern const struct ProgramEntry medianFilter;
+extern ProgramSource medianFilter_oclsrc;
+extern const struct ProgramEntry moments;
+extern ProgramSource moments_oclsrc;
+extern const struct ProgramEntry morph;
+extern ProgramSource morph_oclsrc;
+extern const struct ProgramEntry precornerdetect;
+extern ProgramSource precornerdetect_oclsrc;
+extern const struct ProgramEntry pyr_down;
+extern ProgramSource pyr_down_oclsrc;
+extern const struct ProgramEntry pyr_up;
+extern ProgramSource pyr_up_oclsrc;
+extern const struct ProgramEntry remap;
+extern ProgramSource remap_oclsrc;
+extern const struct ProgramEntry resize;
+extern ProgramSource resize_oclsrc;
+extern const struct ProgramEntry threshold;
+extern ProgramSource threshold_oclsrc;
+extern const struct ProgramEntry warp_affine;
+extern ProgramSource warp_affine_oclsrc;
+extern const struct ProgramEntry warp_perspective;
+extern ProgramSource warp_perspective_oclsrc;
+}
+}}
diff --git a/modules/imgproc/precomp.hpp b/modules/imgproc/precomp.hpp
new file mode 100644
index 0000000..e71a035
--- /dev/null
+++ b/modules/imgproc/precomp.hpp
@@ -0,0 +1,96 @@
+/*M///////////////////////////////////////////////////////////////////////////////////////
+//
+// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+//
+// By downloading, copying, installing or using the software you agree to this license.
+// If you do not agree to this license, do not download, install,
+// copy or use the software.
+//
+//
+// License Agreement
+// For Open Source Computer Vision Library
+//
+// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
+// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// * Redistribution's of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// * Redistribution's in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// * The name of the copyright holders may not be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// This software is provided by the copyright holders and contributors "as is" and
+// any express or implied warranties, including, but not limited to, the implied
+// warranties of merchantability and fitness for a particular purpose are disclaimed.
+// In no event shall the Intel Corporation or contributors be liable for any direct,
+// indirect, incidental, special, exemplary, or consequential damages
+// (including, but not limited to, procurement of substitute goods or services;
+// loss of use, data, or profits; or business interruption) however caused
+// and on any theory of liability, whether in contract, strict liability,
+// or tort (including negligence or otherwise) arising in any way out of
+// the use of this software, even if advised of the possibility of such damage.
+//
+//M*/
+
+#ifndef __OPENCV_PRECOMP_H__
+#define __OPENCV_PRECOMP_H__
+
+#include "opencv2/imgproc.hpp"
+#include "opencv2/core/utility.hpp"
+
+#include "opencv2/imgproc/imgproc_c.h"
+#include "opencv2/core/private.hpp"
+#include "opencv2/core/ocl.hpp"
+
+#include <math.h>
+#include <assert.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <limits.h>
+#include <float.h>
+
+#ifdef HAVE_TEGRA_OPTIMIZATION
+#include "opencv2/imgproc/imgproc_tegra.hpp"
+#else
+#define GET_OPTIMIZED(func) (func)
+#endif
+
+/* helper tables */
+extern const uchar icvSaturate8u_cv[];
+#define CV_FAST_CAST_8U(t) (assert(-256 <= (t) && (t) <= 512), icvSaturate8u_cv[(t)+256])
+#define CV_CALC_MIN_8U(a,b) (a) -= CV_FAST_CAST_8U((a) - (b))
+#define CV_CALC_MAX_8U(a,b) (a) += CV_FAST_CAST_8U((b) - (a))
+
+// -256.f ... 511.f
+extern const float icv8x32fTab_cv[];
+#define CV_8TO32F(x) icv8x32fTab_cv[(x)+256]
+
+// (-128.f)^2 ... (255.f)^2
+extern const float icv8x32fSqrTab[];
+#define CV_8TO32F_SQR(x) icv8x32fSqrTab[(x)+128]
+
+#define CV_COPY( dst, src, len, idx ) \
+ for( (idx) = 0; (idx) < (len); (idx)++) (dst)[idx] = (src)[idx]
+
+#define CV_SET( dst, val, len, idx ) \
+ for( (idx) = 0; (idx) < (len); (idx)++) (dst)[idx] = (val)
+
+#undef CV_CALC_MIN
+#define CV_CALC_MIN(a, b) if((a) > (b)) (a) = (b)
+
+#undef CV_CALC_MAX
+#define CV_CALC_MAX(a, b) if((a) < (b)) (a) = (b)
+
+#include "_geom.h"
+#include "filterengine.hpp"
+
+#endif /*__OPENCV_CV_INTERNAL_H_*/
diff --git a/modules/java/src/calib3d+Calib3d.java b/modules/java/src/calib3d+Calib3d.java
new file mode 100644
index 0000000..d768b4a
--- /dev/null
+++ b/modules/java/src/calib3d+Calib3d.java
@@ -0,0 +1,1312 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.calib3d;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfDouble;
+import org.opencv.core.MatOfPoint2f;
+import org.opencv.core.MatOfPoint3f;
+import org.opencv.core.Point;
+import org.opencv.core.Rect;
+import org.opencv.core.Size;
+import org.opencv.core.TermCriteria;
+import org.opencv.utils.Converters;
+
+public class Calib3d {
+
+ public static final int
+ CALIB_USE_INTRINSIC_GUESS = 1,
+ CALIB_RECOMPUTE_EXTRINSIC = 2,
+ CALIB_CHECK_COND = 4,
+ CALIB_FIX_SKEW = 8,
+ CALIB_FIX_K1 = 16,
+ CALIB_FIX_K2 = 32,
+ CALIB_FIX_K3 = 64,
+ CALIB_FIX_K4 = 128,
+ CALIB_FIX_INTRINSIC = 256,
+ CV_ITERATIVE = 0,
+ CV_EPNP = 1,
+ CV_P3P = 2,
+ CV_DLS = 3,
+ LMEDS = 4,
+ RANSAC = 8,
+ RHO = 16,
+ SOLVEPNP_ITERATIVE = 0,
+ SOLVEPNP_EPNP = 1,
+ SOLVEPNP_P3P = 2,
+ SOLVEPNP_DLS = 3,
+ SOLVEPNP_UPNP = 4,
+ CALIB_CB_ADAPTIVE_THRESH = 1,
+ CALIB_CB_NORMALIZE_IMAGE = 2,
+ CALIB_CB_FILTER_QUADS = 4,
+ CALIB_CB_FAST_CHECK = 8,
+ CALIB_CB_SYMMETRIC_GRID = 1,
+ CALIB_CB_ASYMMETRIC_GRID = 2,
+ CALIB_CB_CLUSTERING = 4,
+ CALIB_FIX_ASPECT_RATIO = 0x00002,
+ CALIB_FIX_PRINCIPAL_POINT = 0x00004,
+ CALIB_ZERO_TANGENT_DIST = 0x00008,
+ CALIB_FIX_FOCAL_LENGTH = 0x00010,
+ CALIB_FIX_K5 = 0x01000,
+ CALIB_FIX_K6 = 0x02000,
+ CALIB_RATIONAL_MODEL = 0x04000,
+ CALIB_THIN_PRISM_MODEL = 0x08000,
+ CALIB_FIX_S1_S2_S3_S4 = 0x10000,
+ CALIB_SAME_FOCAL_LENGTH = 0x00200,
+ CALIB_ZERO_DISPARITY = 0x00400,
+ FM_7POINT = 1,
+ FM_8POINT = 2,
+ FM_LMEDS = 4,
+ FM_RANSAC = 8;
+
+
+ //
+ // C++: void projectPoints(vector_Point3f objectPoints, vector_Point2f& imagePoints, Mat rvec, Mat tvec, Mat K, Mat D, double alpha = 0, Mat& jacobian = Mat())
+ //
+
+ //javadoc: projectPoints(objectPoints, imagePoints, rvec, tvec, K, D, alpha, jacobian)
+ public static void projectPoints(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat rvec, Mat tvec, Mat K, Mat D, double alpha, Mat jacobian)
+ {
+ Mat objectPoints_mat = objectPoints;
+ Mat imagePoints_mat = imagePoints;
+ projectPoints_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, K.nativeObj, D.nativeObj, alpha, jacobian.nativeObj);
+
+ return;
+ }
+
+ //javadoc: projectPoints(objectPoints, imagePoints, rvec, tvec, K, D)
+ public static void projectPoints(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat rvec, Mat tvec, Mat K, Mat D)
+ {
+ Mat objectPoints_mat = objectPoints;
+ Mat imagePoints_mat = imagePoints;
+ projectPoints_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, K.nativeObj, D.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void distortPoints(Mat undistorted, Mat& distorted, Mat K, Mat D, double alpha = 0)
+ //
+
+ //javadoc: distortPoints(undistorted, distorted, K, D, alpha)
+ public static void distortPoints(Mat undistorted, Mat distorted, Mat K, Mat D, double alpha)
+ {
+
+ distortPoints_0(undistorted.nativeObj, distorted.nativeObj, K.nativeObj, D.nativeObj, alpha);
+
+ return;
+ }
+
+ //javadoc: distortPoints(undistorted, distorted, K, D)
+ public static void distortPoints(Mat undistorted, Mat distorted, Mat K, Mat D)
+ {
+
+ distortPoints_1(undistorted.nativeObj, distorted.nativeObj, K.nativeObj, D.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void undistortPoints(Mat distorted, Mat& undistorted, Mat K, Mat D, Mat R = Mat(), Mat P = Mat())
+ //
+
+ //javadoc: undistortPoints(distorted, undistorted, K, D, R, P)
+ public static void undistortPoints(Mat distorted, Mat undistorted, Mat K, Mat D, Mat R, Mat P)
+ {
+
+ undistortPoints_0(distorted.nativeObj, undistorted.nativeObj, K.nativeObj, D.nativeObj, R.nativeObj, P.nativeObj);
+
+ return;
+ }
+
+ //javadoc: undistortPoints(distorted, undistorted, K, D)
+ public static void undistortPoints(Mat distorted, Mat undistorted, Mat K, Mat D)
+ {
+
+ undistortPoints_1(distorted.nativeObj, undistorted.nativeObj, K.nativeObj, D.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void initUndistortRectifyMap(Mat K, Mat D, Mat R, Mat P, Size size, int m1type, Mat& map1, Mat& map2)
+ //
+
+ //javadoc: initUndistortRectifyMap(K, D, R, P, size, m1type, map1, map2)
+ public static void initUndistortRectifyMap(Mat K, Mat D, Mat R, Mat P, Size size, int m1type, Mat map1, Mat map2)
+ {
+
+ initUndistortRectifyMap_0(K.nativeObj, D.nativeObj, R.nativeObj, P.nativeObj, size.width, size.height, m1type, map1.nativeObj, map2.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void undistortImage(Mat distorted, Mat& undistorted, Mat K, Mat D, Mat Knew = cv::Mat(), Size new_size = Size())
+ //
+
+ //javadoc: undistortImage(distorted, undistorted, K, D, Knew, new_size)
+ public static void undistortImage(Mat distorted, Mat undistorted, Mat K, Mat D, Mat Knew, Size new_size)
+ {
+
+ undistortImage_0(distorted.nativeObj, undistorted.nativeObj, K.nativeObj, D.nativeObj, Knew.nativeObj, new_size.width, new_size.height);
+
+ return;
+ }
+
+ //javadoc: undistortImage(distorted, undistorted, K, D)
+ public static void undistortImage(Mat distorted, Mat undistorted, Mat K, Mat D)
+ {
+
+ undistortImage_1(distorted.nativeObj, undistorted.nativeObj, K.nativeObj, D.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void estimateNewCameraMatrixForUndistortRectify(Mat K, Mat D, Size image_size, Mat R, Mat& P, double balance = 0.0, Size new_size = Size(), double fov_scale = 1.0)
+ //
+
+ //javadoc: estimateNewCameraMatrixForUndistortRectify(K, D, image_size, R, P, balance, new_size, fov_scale)
+ public static void estimateNewCameraMatrixForUndistortRectify(Mat K, Mat D, Size image_size, Mat R, Mat P, double balance, Size new_size, double fov_scale)
+ {
+
+ estimateNewCameraMatrixForUndistortRectify_0(K.nativeObj, D.nativeObj, image_size.width, image_size.height, R.nativeObj, P.nativeObj, balance, new_size.width, new_size.height, fov_scale);
+
+ return;
+ }
+
+ //javadoc: estimateNewCameraMatrixForUndistortRectify(K, D, image_size, R, P)
+ public static void estimateNewCameraMatrixForUndistortRectify(Mat K, Mat D, Size image_size, Mat R, Mat P)
+ {
+
+ estimateNewCameraMatrixForUndistortRectify_1(K.nativeObj, D.nativeObj, image_size.width, image_size.height, R.nativeObj, P.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: double calibrate(vector_Mat objectPoints, vector_Mat imagePoints, Size image_size, Mat& K, Mat& D, vector_Mat& rvecs, vector_Mat& tvecs, int flags = 0, TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 100, DBL_EPSILON))
+ //
+
+ //javadoc: calibrate(objectPoints, imagePoints, image_size, K, D, rvecs, tvecs, flags, criteria)
+ public static double calibrate(List<Mat> objectPoints, List<Mat> imagePoints, Size image_size, Mat K, Mat D, List<Mat> rvecs, List<Mat> tvecs, int flags, TermCriteria criteria)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+ Mat rvecs_mat = new Mat();
+ Mat tvecs_mat = new Mat();
+ double retVal = calibrate_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, image_size.width, image_size.height, K.nativeObj, D.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
+ Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
+ rvecs_mat.release();
+ Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
+ tvecs_mat.release();
+ return retVal;
+ }
+
+ //javadoc: calibrate(objectPoints, imagePoints, image_size, K, D, rvecs, tvecs, flags)
+ public static double calibrate(List<Mat> objectPoints, List<Mat> imagePoints, Size image_size, Mat K, Mat D, List<Mat> rvecs, List<Mat> tvecs, int flags)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+ Mat rvecs_mat = new Mat();
+ Mat tvecs_mat = new Mat();
+ double retVal = calibrate_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, image_size.width, image_size.height, K.nativeObj, D.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, flags);
+ Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
+ rvecs_mat.release();
+ Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
+ tvecs_mat.release();
+ return retVal;
+ }
+
+ //javadoc: calibrate(objectPoints, imagePoints, image_size, K, D, rvecs, tvecs)
+ public static double calibrate(List<Mat> objectPoints, List<Mat> imagePoints, Size image_size, Mat K, Mat D, List<Mat> rvecs, List<Mat> tvecs)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+ Mat rvecs_mat = new Mat();
+ Mat tvecs_mat = new Mat();
+ double retVal = calibrate_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, image_size.width, image_size.height, K.nativeObj, D.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj);
+ Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
+ rvecs_mat.release();
+ Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
+ tvecs_mat.release();
+ return retVal;
+ }
+
+
+ //
+ // C++: void stereoRectify(Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat tvec, Mat& R1, Mat& R2, Mat& P1, Mat& P2, Mat& Q, int flags, Size newImageSize = Size(), double balance = 0.0, double fov_scale = 1.0)
+ //
+
+ //javadoc: stereoRectify(K1, D1, K2, D2, imageSize, R, tvec, R1, R2, P1, P2, Q, flags, newImageSize, balance, fov_scale)
+ public static void stereoRectify(Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat tvec, Mat R1, Mat R2, Mat P1, Mat P2, Mat Q, int flags, Size newImageSize, double balance, double fov_scale)
+ {
+
+ stereoRectify_0(K1.nativeObj, D1.nativeObj, K2.nativeObj, D2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, tvec.nativeObj, R1.nativeObj, R2.nativeObj, P1.nativeObj, P2.nativeObj, Q.nativeObj, flags, newImageSize.width, newImageSize.height, balance, fov_scale);
+
+ return;
+ }
+
+ //javadoc: stereoRectify(K1, D1, K2, D2, imageSize, R, tvec, R1, R2, P1, P2, Q, flags)
+ public static void stereoRectify(Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat tvec, Mat R1, Mat R2, Mat P1, Mat P2, Mat Q, int flags)
+ {
+
+ stereoRectify_1(K1.nativeObj, D1.nativeObj, K2.nativeObj, D2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, tvec.nativeObj, R1.nativeObj, R2.nativeObj, P1.nativeObj, P2.nativeObj, Q.nativeObj, flags);
+
+ return;
+ }
+
+
+ //
+ // C++: double stereoCalibrate(vector_Mat objectPoints, vector_Mat imagePoints1, vector_Mat imagePoints2, Mat& K1, Mat& D1, Mat& K2, Mat& D2, Size imageSize, Mat& R, Mat& T, int flags = fisheye::CALIB_FIX_INTRINSIC, TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 100, DBL_EPSILON))
+ //
+
+ //javadoc: stereoCalibrate(objectPoints, imagePoints1, imagePoints2, K1, D1, K2, D2, imageSize, R, T, flags, criteria)
+ public static double stereoCalibrate(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T, int flags, TermCriteria criteria)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
+ Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
+ double retVal = stereoCalibrate_0(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, K1.nativeObj, D1.nativeObj, K2.nativeObj, D2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
+
+ return retVal;
+ }
+
+ //javadoc: stereoCalibrate(objectPoints, imagePoints1, imagePoints2, K1, D1, K2, D2, imageSize, R, T, flags)
+ public static double stereoCalibrate(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T, int flags)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
+ Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
+ double retVal = stereoCalibrate_1(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, K1.nativeObj, D1.nativeObj, K2.nativeObj, D2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, flags);
+
+ return retVal;
+ }
+
+ //javadoc: stereoCalibrate(objectPoints, imagePoints1, imagePoints2, K1, D1, K2, D2, imageSize, R, T)
+ public static double stereoCalibrate(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
+ Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
+ double retVal = stereoCalibrate_2(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, K1.nativeObj, D1.nativeObj, K2.nativeObj, D2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void decomposeProjectionMatrix(Mat projMatrix, Mat& cameraMatrix, Mat& rotMatrix, Mat& transVect, Mat& rotMatrixX = Mat(), Mat& rotMatrixY = Mat(), Mat& rotMatrixZ = Mat(), Mat& eulerAngles = Mat())
+ //
+
+ //javadoc: decomposeProjectionMatrix(projMatrix, cameraMatrix, rotMatrix, transVect, rotMatrixX, rotMatrixY, rotMatrixZ, eulerAngles)
+ public static void decomposeProjectionMatrix(Mat projMatrix, Mat cameraMatrix, Mat rotMatrix, Mat transVect, Mat rotMatrixX, Mat rotMatrixY, Mat rotMatrixZ, Mat eulerAngles)
+ {
+
+ decomposeProjectionMatrix_0(projMatrix.nativeObj, cameraMatrix.nativeObj, rotMatrix.nativeObj, transVect.nativeObj, rotMatrixX.nativeObj, rotMatrixY.nativeObj, rotMatrixZ.nativeObj, eulerAngles.nativeObj);
+
+ return;
+ }
+
+ //javadoc: decomposeProjectionMatrix(projMatrix, cameraMatrix, rotMatrix, transVect)
+ public static void decomposeProjectionMatrix(Mat projMatrix, Mat cameraMatrix, Mat rotMatrix, Mat transVect)
+ {
+
+ decomposeProjectionMatrix_1(projMatrix.nativeObj, cameraMatrix.nativeObj, rotMatrix.nativeObj, transVect.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void matMulDeriv(Mat A, Mat B, Mat& dABdA, Mat& dABdB)
+ //
+
+ //javadoc: matMulDeriv(A, B, dABdA, dABdB)
+ public static void matMulDeriv(Mat A, Mat B, Mat dABdA, Mat dABdB)
+ {
+
+ matMulDeriv_0(A.nativeObj, B.nativeObj, dABdA.nativeObj, dABdB.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat& rvec3, Mat& tvec3, Mat& dr3dr1 = Mat(), Mat& dr3dt1 = Mat(), Mat& dr3dr2 = Mat(), Mat& dr3dt2 = Mat(), Mat& dt3dr1 = Mat(), Mat& dt3dt1 = Mat(), Mat& dt3dr2 = Mat(), Mat& dt3dt2 = Mat())
+ //
+
+ //javadoc: composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3, dr3dr1, dr3dt1, dr3dr2, dr3dt2, dt3dr1, dt3dt1, dt3dr2, dt3dt2)
+ public static void composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat rvec3, Mat tvec3, Mat dr3dr1, Mat dr3dt1, Mat dr3dr2, Mat dr3dt2, Mat dt3dr1, Mat dt3dt1, Mat dt3dr2, Mat dt3dt2)
+ {
+
+ composeRT_0(rvec1.nativeObj, tvec1.nativeObj, rvec2.nativeObj, tvec2.nativeObj, rvec3.nativeObj, tvec3.nativeObj, dr3dr1.nativeObj, dr3dt1.nativeObj, dr3dr2.nativeObj, dr3dt2.nativeObj, dt3dr1.nativeObj, dt3dt1.nativeObj, dt3dr2.nativeObj, dt3dt2.nativeObj);
+
+ return;
+ }
+
+ //javadoc: composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3)
+ public static void composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat rvec3, Mat tvec3)
+ {
+
+ composeRT_1(rvec1.nativeObj, tvec1.nativeObj, rvec2.nativeObj, tvec2.nativeObj, rvec3.nativeObj, tvec3.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void projectPoints(vector_Point3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, vector_double distCoeffs, vector_Point2f& imagePoints, Mat& jacobian = Mat(), double aspectRatio = 0)
+ //
+
+ //javadoc: projectPoints(objectPoints, rvec, tvec, cameraMatrix, distCoeffs, imagePoints, jacobian, aspectRatio)
+ public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints, Mat jacobian, double aspectRatio)
+ {
+ Mat objectPoints_mat = objectPoints;
+ Mat distCoeffs_mat = distCoeffs;
+ Mat imagePoints_mat = imagePoints;
+ projectPoints_2(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj, jacobian.nativeObj, aspectRatio);
+
+ return;
+ }
+
+ //javadoc: projectPoints(objectPoints, rvec, tvec, cameraMatrix, distCoeffs, imagePoints)
+ public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints)
+ {
+ Mat objectPoints_mat = objectPoints;
+ Mat distCoeffs_mat = distCoeffs;
+ Mat imagePoints_mat = imagePoints;
+ projectPoints_3(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: bool solvePnP(vector_Point3f objectPoints, vector_Point2f imagePoints, Mat cameraMatrix, vector_double distCoeffs, Mat& rvec, Mat& tvec, bool useExtrinsicGuess = false, int flags = SOLVEPNP_ITERATIVE)
+ //
+
+ //javadoc: solvePnP(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess, flags)
+ public static boolean solvePnP(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int flags)
+ {
+ Mat objectPoints_mat = objectPoints;
+ Mat imagePoints_mat = imagePoints;
+ Mat distCoeffs_mat = distCoeffs;
+ boolean retVal = solvePnP_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, flags);
+
+ return retVal;
+ }
+
+ //javadoc: solvePnP(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec)
+ public static boolean solvePnP(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec)
+ {
+ Mat objectPoints_mat = objectPoints;
+ Mat imagePoints_mat = imagePoints;
+ Mat distCoeffs_mat = distCoeffs;
+ boolean retVal = solvePnP_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool solvePnPRansac(vector_Point3f objectPoints, vector_Point2f imagePoints, Mat cameraMatrix, vector_double distCoeffs, Mat& rvec, Mat& tvec, bool useExtrinsicGuess = false, int iterationsCount = 100, float reprojectionError = 8.0, double confidence = 0.99, Mat& inliers = Mat(), int flags = SOLVEPNP_ITERATIVE)
+ //
+
+ //javadoc: solvePnPRansac(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess, iterationsCount, reprojectionError, confidence, inliers, flags)
+ public static boolean solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence, Mat inliers, int flags)
+ {
+ Mat objectPoints_mat = objectPoints;
+ Mat imagePoints_mat = imagePoints;
+ Mat distCoeffs_mat = distCoeffs;
+ boolean retVal = solvePnPRansac_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, iterationsCount, reprojectionError, confidence, inliers.nativeObj, flags);
+
+ return retVal;
+ }
+
+ //javadoc: solvePnPRansac(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec)
+ public static boolean solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec)
+ {
+ Mat objectPoints_mat = objectPoints;
+ Mat imagePoints_mat = imagePoints;
+ Mat distCoeffs_mat = distCoeffs;
+ boolean retVal = solvePnPRansac_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat initCameraMatrix2D(vector_vector_Point3f objectPoints, vector_vector_Point2f imagePoints, Size imageSize, double aspectRatio = 1.0)
+ //
+
+ //javadoc: initCameraMatrix2D(objectPoints, imagePoints, imageSize, aspectRatio)
+ public static Mat initCameraMatrix2D(List<MatOfPoint3f> objectPoints, List<MatOfPoint2f> imagePoints, Size imageSize, double aspectRatio)
+ {
+ List<Mat> objectPoints_tmplm = new ArrayList<Mat>((objectPoints != null) ? objectPoints.size() : 0);
+ Mat objectPoints_mat = Converters.vector_vector_Point3f_to_Mat(objectPoints, objectPoints_tmplm);
+ List<Mat> imagePoints_tmplm = new ArrayList<Mat>((imagePoints != null) ? imagePoints.size() : 0);
+ Mat imagePoints_mat = Converters.vector_vector_Point2f_to_Mat(imagePoints, imagePoints_tmplm);
+ Mat retVal = new Mat(initCameraMatrix2D_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, aspectRatio));
+
+ return retVal;
+ }
+
+ //javadoc: initCameraMatrix2D(objectPoints, imagePoints, imageSize)
+ public static Mat initCameraMatrix2D(List<MatOfPoint3f> objectPoints, List<MatOfPoint2f> imagePoints, Size imageSize)
+ {
+ List<Mat> objectPoints_tmplm = new ArrayList<Mat>((objectPoints != null) ? objectPoints.size() : 0);
+ Mat objectPoints_mat = Converters.vector_vector_Point3f_to_Mat(objectPoints, objectPoints_tmplm);
+ List<Mat> imagePoints_tmplm = new ArrayList<Mat>((imagePoints != null) ? imagePoints.size() : 0);
+ Mat imagePoints_mat = Converters.vector_vector_Point2f_to_Mat(imagePoints, imagePoints_tmplm);
+ Mat retVal = new Mat(initCameraMatrix2D_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool findChessboardCorners(Mat image, Size patternSize, vector_Point2f& corners, int flags = CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE)
+ //
+
+ //javadoc: findChessboardCorners(image, patternSize, corners, flags)
+ public static boolean findChessboardCorners(Mat image, Size patternSize, MatOfPoint2f corners, int flags)
+ {
+ Mat corners_mat = corners;
+ boolean retVal = findChessboardCorners_0(image.nativeObj, patternSize.width, patternSize.height, corners_mat.nativeObj, flags);
+
+ return retVal;
+ }
+
+ //javadoc: findChessboardCorners(image, patternSize, corners)
+ public static boolean findChessboardCorners(Mat image, Size patternSize, MatOfPoint2f corners)
+ {
+ Mat corners_mat = corners;
+ boolean retVal = findChessboardCorners_1(image.nativeObj, patternSize.width, patternSize.height, corners_mat.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void drawChessboardCorners(Mat& image, Size patternSize, vector_Point2f corners, bool patternWasFound)
+ //
+
+ //javadoc: drawChessboardCorners(image, patternSize, corners, patternWasFound)
+ public static void drawChessboardCorners(Mat image, Size patternSize, MatOfPoint2f corners, boolean patternWasFound)
+ {
+ Mat corners_mat = corners;
+ drawChessboardCorners_0(image.nativeObj, patternSize.width, patternSize.height, corners_mat.nativeObj, patternWasFound);
+
+ return;
+ }
+
+
+ //
+ // C++: bool findCirclesGrid(Mat image, Size patternSize, Mat& centers, int flags = CALIB_CB_SYMMETRIC_GRID, Ptr_FeatureDetector blobDetector = SimpleBlobDetector::create())
+ //
+
+ //javadoc: findCirclesGrid(image, patternSize, centers, flags)
+ public static boolean findCirclesGrid(Mat image, Size patternSize, Mat centers, int flags)
+ {
+
+ boolean retVal = findCirclesGrid_0(image.nativeObj, patternSize.width, patternSize.height, centers.nativeObj, flags);
+
+ return retVal;
+ }
+
+ //javadoc: findCirclesGrid(image, patternSize, centers)
+ public static boolean findCirclesGrid(Mat image, Size patternSize, Mat centers)
+ {
+
+ boolean retVal = findCirclesGrid_1(image.nativeObj, patternSize.width, patternSize.height, centers.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double calibrateCamera(vector_Mat objectPoints, vector_Mat imagePoints, Size imageSize, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
+ //
+
+ //javadoc: calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, flags, criteria)
+ public static double calibrateCamera(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, int flags, TermCriteria criteria)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+ Mat rvecs_mat = new Mat();
+ Mat tvecs_mat = new Mat();
+ double retVal = calibrateCamera_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
+ Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
+ rvecs_mat.release();
+ Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
+ tvecs_mat.release();
+ return retVal;
+ }
+
+ //javadoc: calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, flags)
+ public static double calibrateCamera(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, int flags)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+ Mat rvecs_mat = new Mat();
+ Mat tvecs_mat = new Mat();
+ double retVal = calibrateCamera_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, flags);
+ Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
+ rvecs_mat.release();
+ Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
+ tvecs_mat.release();
+ return retVal;
+ }
+
+ //javadoc: calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs)
+ public static double calibrateCamera(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+ Mat rvecs_mat = new Mat();
+ Mat tvecs_mat = new Mat();
+ double retVal = calibrateCamera_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj);
+ Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
+ rvecs_mat.release();
+ Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
+ tvecs_mat.release();
+ return retVal;
+ }
+
+
+ //
+ // C++: void calibrationMatrixValues(Mat cameraMatrix, Size imageSize, double apertureWidth, double apertureHeight, double& fovx, double& fovy, double& focalLength, Point2d& principalPoint, double& aspectRatio)
+ //
+
+ //javadoc: calibrationMatrixValues(cameraMatrix, imageSize, apertureWidth, apertureHeight, fovx, fovy, focalLength, principalPoint, aspectRatio)
+ public static void calibrationMatrixValues(Mat cameraMatrix, Size imageSize, double apertureWidth, double apertureHeight, double[] fovx, double[] fovy, double[] focalLength, Point principalPoint, double[] aspectRatio)
+ {
+ double[] fovx_out = new double[1];
+ double[] fovy_out = new double[1];
+ double[] focalLength_out = new double[1];
+ double[] principalPoint_out = new double[2];
+ double[] aspectRatio_out = new double[1];
+ calibrationMatrixValues_0(cameraMatrix.nativeObj, imageSize.width, imageSize.height, apertureWidth, apertureHeight, fovx_out, fovy_out, focalLength_out, principalPoint_out, aspectRatio_out);
+ if(fovx!=null) fovx[0] = (double)fovx_out[0];
+ if(fovy!=null) fovy[0] = (double)fovy_out[0];
+ if(focalLength!=null) focalLength[0] = (double)focalLength_out[0];
+ if(principalPoint!=null){ principalPoint.x = principalPoint_out[0]; principalPoint.y = principalPoint_out[1]; }
+ if(aspectRatio!=null) aspectRatio[0] = (double)aspectRatio_out[0];
+ return;
+ }
+
+
+ //
+ // C++: double stereoCalibrate(vector_Mat objectPoints, vector_Mat imagePoints1, vector_Mat imagePoints2, Mat& cameraMatrix1, Mat& distCoeffs1, Mat& cameraMatrix2, Mat& distCoeffs2, Size imageSize, Mat& R, Mat& T, Mat& E, Mat& F, int flags = CALIB_FIX_INTRINSIC, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 1e-6))
+ //
+
+ //javadoc: stereoCalibrate(objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F, flags, criteria)
+ public static double stereoCalibrate(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, int flags, TermCriteria criteria)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
+ Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
+ double retVal = stereoCalibrate_3(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, E.nativeObj, F.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
+
+ return retVal;
+ }
+
+ //javadoc: stereoCalibrate(objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F, flags)
+ public static double stereoCalibrate(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, int flags)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
+ Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
+ double retVal = stereoCalibrate_4(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, E.nativeObj, F.nativeObj, flags);
+
+ return retVal;
+ }
+
+ //javadoc: stereoCalibrate(objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F)
+ public static double stereoCalibrate(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
+ Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
+ double retVal = stereoCalibrate_5(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, E.nativeObj, F.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Rodrigues(Mat src, Mat& dst, Mat& jacobian = Mat())
+ //
+
+ //javadoc: Rodrigues(src, dst, jacobian)
+ public static void Rodrigues(Mat src, Mat dst, Mat jacobian)
+ {
+
+ Rodrigues_0(src.nativeObj, dst.nativeObj, jacobian.nativeObj);
+
+ return;
+ }
+
+ //javadoc: Rodrigues(src, dst)
+ public static void Rodrigues(Mat src, Mat dst)
+ {
+
+ Rodrigues_1(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat findHomography(vector_Point2f srcPoints, vector_Point2f dstPoints, int method = 0, double ransacReprojThreshold = 3, Mat& mask = Mat(), int maxIters = 2000, double confidence = 0.995)
+ //
+
+ //javadoc: findHomography(srcPoints, dstPoints, method, ransacReprojThreshold, mask, maxIters, confidence)
+ public static Mat findHomography(MatOfPoint2f srcPoints, MatOfPoint2f dstPoints, int method, double ransacReprojThreshold, Mat mask, int maxIters, double confidence)
+ {
+ Mat srcPoints_mat = srcPoints;
+ Mat dstPoints_mat = dstPoints;
+ Mat retVal = new Mat(findHomography_0(srcPoints_mat.nativeObj, dstPoints_mat.nativeObj, method, ransacReprojThreshold, mask.nativeObj, maxIters, confidence));
+
+ return retVal;
+ }
+
+ //javadoc: findHomography(srcPoints, dstPoints, method, ransacReprojThreshold)
+ public static Mat findHomography(MatOfPoint2f srcPoints, MatOfPoint2f dstPoints, int method, double ransacReprojThreshold)
+ {
+ Mat srcPoints_mat = srcPoints;
+ Mat dstPoints_mat = dstPoints;
+ Mat retVal = new Mat(findHomography_1(srcPoints_mat.nativeObj, dstPoints_mat.nativeObj, method, ransacReprojThreshold));
+
+ return retVal;
+ }
+
+ //javadoc: findHomography(srcPoints, dstPoints)
+ public static Mat findHomography(MatOfPoint2f srcPoints, MatOfPoint2f dstPoints)
+ {
+ Mat srcPoints_mat = srcPoints;
+ Mat dstPoints_mat = dstPoints;
+ Mat retVal = new Mat(findHomography_2(srcPoints_mat.nativeObj, dstPoints_mat.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Vec3d RQDecomp3x3(Mat src, Mat& mtxR, Mat& mtxQ, Mat& Qx = Mat(), Mat& Qy = Mat(), Mat& Qz = Mat())
+ //
+
+ //javadoc: RQDecomp3x3(src, mtxR, mtxQ, Qx, Qy, Qz)
+ public static double[] RQDecomp3x3(Mat src, Mat mtxR, Mat mtxQ, Mat Qx, Mat Qy, Mat Qz)
+ {
+
+ double[] retVal = RQDecomp3x3_0(src.nativeObj, mtxR.nativeObj, mtxQ.nativeObj, Qx.nativeObj, Qy.nativeObj, Qz.nativeObj);
+
+ return retVal;
+ }
+
+ //javadoc: RQDecomp3x3(src, mtxR, mtxQ)
+ public static double[] RQDecomp3x3(Mat src, Mat mtxR, Mat mtxQ)
+ {
+
+ double[] retVal = RQDecomp3x3_1(src.nativeObj, mtxR.nativeObj, mtxQ.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void stereoRectify(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat& R1, Mat& R2, Mat& P1, Mat& P2, Mat& Q, int flags = CALIB_ZERO_DISPARITY, double alpha = -1, Size newImageSize = Size(), Rect* validPixROI1 = 0, Rect* validPixROI2 = 0)
+ //
+
+ //javadoc: stereoRectify(cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, R1, R2, P1, P2, Q, flags, alpha, newImageSize, validPixROI1, validPixROI2)
+ public static void stereoRectify(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat R1, Mat R2, Mat P1, Mat P2, Mat Q, int flags, double alpha, Size newImageSize, Rect validPixROI1, Rect validPixROI2)
+ {
+ double[] validPixROI1_out = new double[4];
+ double[] validPixROI2_out = new double[4];
+ stereoRectify_2(cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, R1.nativeObj, R2.nativeObj, P1.nativeObj, P2.nativeObj, Q.nativeObj, flags, alpha, newImageSize.width, newImageSize.height, validPixROI1_out, validPixROI2_out);
+ if(validPixROI1!=null){ validPixROI1.x = (int)validPixROI1_out[0]; validPixROI1.y = (int)validPixROI1_out[1]; validPixROI1.width = (int)validPixROI1_out[2]; validPixROI1.height = (int)validPixROI1_out[3]; }
+ if(validPixROI2!=null){ validPixROI2.x = (int)validPixROI2_out[0]; validPixROI2.y = (int)validPixROI2_out[1]; validPixROI2.width = (int)validPixROI2_out[2]; validPixROI2.height = (int)validPixROI2_out[3]; }
+ return;
+ }
+
+ //javadoc: stereoRectify(cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, R1, R2, P1, P2, Q)
+ public static void stereoRectify(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat R1, Mat R2, Mat P1, Mat P2, Mat Q)
+ {
+
+ stereoRectify_3(cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, R1.nativeObj, R2.nativeObj, P1.nativeObj, P2.nativeObj, Q.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: bool stereoRectifyUncalibrated(Mat points1, Mat points2, Mat F, Size imgSize, Mat& H1, Mat& H2, double threshold = 5)
+ //
+
+ //javadoc: stereoRectifyUncalibrated(points1, points2, F, imgSize, H1, H2, threshold)
+ public static boolean stereoRectifyUncalibrated(Mat points1, Mat points2, Mat F, Size imgSize, Mat H1, Mat H2, double threshold)
+ {
+
+ boolean retVal = stereoRectifyUncalibrated_0(points1.nativeObj, points2.nativeObj, F.nativeObj, imgSize.width, imgSize.height, H1.nativeObj, H2.nativeObj, threshold);
+
+ return retVal;
+ }
+
+ //javadoc: stereoRectifyUncalibrated(points1, points2, F, imgSize, H1, H2)
+ public static boolean stereoRectifyUncalibrated(Mat points1, Mat points2, Mat F, Size imgSize, Mat H1, Mat H2)
+ {
+
+ boolean retVal = stereoRectifyUncalibrated_1(points1.nativeObj, points2.nativeObj, F.nativeObj, imgSize.width, imgSize.height, H1.nativeObj, H2.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: float rectify3Collinear(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Mat cameraMatrix3, Mat distCoeffs3, vector_Mat imgpt1, vector_Mat imgpt3, Size imageSize, Mat R12, Mat T12, Mat R13, Mat T13, Mat& R1, Mat& R2, Mat& R3, Mat& P1, Mat& P2, Mat& P3, Mat& Q, double alpha, Size newImgSize, Rect* roi1, Rect* roi2, int flags)
+ //
+
+ //javadoc: rectify3Collinear(cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, cameraMatrix3, distCoeffs3, imgpt1, imgpt3, imageSize, R12, T12, R13, T13, R1, R2, R3, P1, P2, P3, Q, alpha, newImgSize, roi1, roi2, flags)
+ public static float rectify3Collinear(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Mat cameraMatrix3, Mat distCoeffs3, List<Mat> imgpt1, List<Mat> imgpt3, Size imageSize, Mat R12, Mat T12, Mat R13, Mat T13, Mat R1, Mat R2, Mat R3, Mat P1, Mat P2, Mat P3, Mat Q, double alpha, Size newImgSize, Rect roi1, Rect roi2, int flags)
+ {
+ Mat imgpt1_mat = Converters.vector_Mat_to_Mat(imgpt1);
+ Mat imgpt3_mat = Converters.vector_Mat_to_Mat(imgpt3);
+ double[] roi1_out = new double[4];
+ double[] roi2_out = new double[4];
+ float retVal = rectify3Collinear_0(cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, cameraMatrix3.nativeObj, distCoeffs3.nativeObj, imgpt1_mat.nativeObj, imgpt3_mat.nativeObj, imageSize.width, imageSize.height, R12.nativeObj, T12.nativeObj, R13.nativeObj, T13.nativeObj, R1.nativeObj, R2.nativeObj, R3.nativeObj, P1.nativeObj, P2.nativeObj, P3.nativeObj, Q.nativeObj, alpha, newImgSize.width, newImgSize.height, roi1_out, roi2_out, flags);
+ if(roi1!=null){ roi1.x = (int)roi1_out[0]; roi1.y = (int)roi1_out[1]; roi1.width = (int)roi1_out[2]; roi1.height = (int)roi1_out[3]; }
+ if(roi2!=null){ roi2.x = (int)roi2_out[0]; roi2.y = (int)roi2_out[1]; roi2.width = (int)roi2_out[2]; roi2.height = (int)roi2_out[3]; }
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getOptimalNewCameraMatrix(Mat cameraMatrix, Mat distCoeffs, Size imageSize, double alpha, Size newImgSize = Size(), Rect* validPixROI = 0, bool centerPrincipalPoint = false)
+ //
+
+ //javadoc: getOptimalNewCameraMatrix(cameraMatrix, distCoeffs, imageSize, alpha, newImgSize, validPixROI, centerPrincipalPoint)
+ public static Mat getOptimalNewCameraMatrix(Mat cameraMatrix, Mat distCoeffs, Size imageSize, double alpha, Size newImgSize, Rect validPixROI, boolean centerPrincipalPoint)
+ {
+ double[] validPixROI_out = new double[4];
+ Mat retVal = new Mat(getOptimalNewCameraMatrix_0(cameraMatrix.nativeObj, distCoeffs.nativeObj, imageSize.width, imageSize.height, alpha, newImgSize.width, newImgSize.height, validPixROI_out, centerPrincipalPoint));
+ if(validPixROI!=null){ validPixROI.x = (int)validPixROI_out[0]; validPixROI.y = (int)validPixROI_out[1]; validPixROI.width = (int)validPixROI_out[2]; validPixROI.height = (int)validPixROI_out[3]; }
+ return retVal;
+ }
+
+ //javadoc: getOptimalNewCameraMatrix(cameraMatrix, distCoeffs, imageSize, alpha)
+ public static Mat getOptimalNewCameraMatrix(Mat cameraMatrix, Mat distCoeffs, Size imageSize, double alpha)
+ {
+
+ Mat retVal = new Mat(getOptimalNewCameraMatrix_1(cameraMatrix.nativeObj, distCoeffs.nativeObj, imageSize.width, imageSize.height, alpha));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void convertPointsToHomogeneous(Mat src, Mat& dst)
+ //
+
+ //javadoc: convertPointsToHomogeneous(src, dst)
+ public static void convertPointsToHomogeneous(Mat src, Mat dst)
+ {
+
+ convertPointsToHomogeneous_0(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void convertPointsFromHomogeneous(Mat src, Mat& dst)
+ //
+
+ //javadoc: convertPointsFromHomogeneous(src, dst)
+ public static void convertPointsFromHomogeneous(Mat src, Mat dst)
+ {
+
+ convertPointsFromHomogeneous_0(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat findFundamentalMat(vector_Point2f points1, vector_Point2f points2, int method = FM_RANSAC, double param1 = 3., double param2 = 0.99, Mat& mask = Mat())
+ //
+
+ //javadoc: findFundamentalMat(points1, points2, method, param1, param2, mask)
+ public static Mat findFundamentalMat(MatOfPoint2f points1, MatOfPoint2f points2, int method, double param1, double param2, Mat mask)
+ {
+ Mat points1_mat = points1;
+ Mat points2_mat = points2;
+ Mat retVal = new Mat(findFundamentalMat_0(points1_mat.nativeObj, points2_mat.nativeObj, method, param1, param2, mask.nativeObj));
+
+ return retVal;
+ }
+
+ //javadoc: findFundamentalMat(points1, points2, method, param1, param2)
+ public static Mat findFundamentalMat(MatOfPoint2f points1, MatOfPoint2f points2, int method, double param1, double param2)
+ {
+ Mat points1_mat = points1;
+ Mat points2_mat = points2;
+ Mat retVal = new Mat(findFundamentalMat_1(points1_mat.nativeObj, points2_mat.nativeObj, method, param1, param2));
+
+ return retVal;
+ }
+
+ //javadoc: findFundamentalMat(points1, points2)
+ public static Mat findFundamentalMat(MatOfPoint2f points1, MatOfPoint2f points2)
+ {
+ Mat points1_mat = points1;
+ Mat points2_mat = points2;
+ Mat retVal = new Mat(findFundamentalMat_2(points1_mat.nativeObj, points2_mat.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat findEssentialMat(Mat points1, Mat points2, double focal = 1.0, Point2d pp = Point2d(0, 0), int method = RANSAC, double prob = 0.999, double threshold = 1.0, Mat& mask = Mat())
+ //
+
+ //javadoc: findEssentialMat(points1, points2, focal, pp, method, prob, threshold, mask)
+ public static Mat findEssentialMat(Mat points1, Mat points2, double focal, Point pp, int method, double prob, double threshold, Mat mask)
+ {
+
+ Mat retVal = new Mat(findEssentialMat_0(points1.nativeObj, points2.nativeObj, focal, pp.x, pp.y, method, prob, threshold, mask.nativeObj));
+
+ return retVal;
+ }
+
+ //javadoc: findEssentialMat(points1, points2, focal, pp, method, prob, threshold)
+ public static Mat findEssentialMat(Mat points1, Mat points2, double focal, Point pp, int method, double prob, double threshold)
+ {
+
+ Mat retVal = new Mat(findEssentialMat_1(points1.nativeObj, points2.nativeObj, focal, pp.x, pp.y, method, prob, threshold));
+
+ return retVal;
+ }
+
+ //javadoc: findEssentialMat(points1, points2)
+ public static Mat findEssentialMat(Mat points1, Mat points2)
+ {
+
+ Mat retVal = new Mat(findEssentialMat_2(points1.nativeObj, points2.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void decomposeEssentialMat(Mat E, Mat& R1, Mat& R2, Mat& t)
+ //
+
+ //javadoc: decomposeEssentialMat(E, R1, R2, t)
+ public static void decomposeEssentialMat(Mat E, Mat R1, Mat R2, Mat t)
+ {
+
+ decomposeEssentialMat_0(E.nativeObj, R1.nativeObj, R2.nativeObj, t.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: int recoverPose(Mat E, Mat points1, Mat points2, Mat& R, Mat& t, double focal = 1.0, Point2d pp = Point2d(0, 0), Mat& mask = Mat())
+ //
+
+ //javadoc: recoverPose(E, points1, points2, R, t, focal, pp, mask)
+ public static int recoverPose(Mat E, Mat points1, Mat points2, Mat R, Mat t, double focal, Point pp, Mat mask)
+ {
+
+ int retVal = recoverPose_0(E.nativeObj, points1.nativeObj, points2.nativeObj, R.nativeObj, t.nativeObj, focal, pp.x, pp.y, mask.nativeObj);
+
+ return retVal;
+ }
+
+ //javadoc: recoverPose(E, points1, points2, R, t, focal, pp)
+ public static int recoverPose(Mat E, Mat points1, Mat points2, Mat R, Mat t, double focal, Point pp)
+ {
+
+ int retVal = recoverPose_1(E.nativeObj, points1.nativeObj, points2.nativeObj, R.nativeObj, t.nativeObj, focal, pp.x, pp.y);
+
+ return retVal;
+ }
+
+ //javadoc: recoverPose(E, points1, points2, R, t)
+ public static int recoverPose(Mat E, Mat points1, Mat points2, Mat R, Mat t)
+ {
+
+ int retVal = recoverPose_2(E.nativeObj, points1.nativeObj, points2.nativeObj, R.nativeObj, t.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void computeCorrespondEpilines(Mat points, int whichImage, Mat F, Mat& lines)
+ //
+
+ //javadoc: computeCorrespondEpilines(points, whichImage, F, lines)
+ public static void computeCorrespondEpilines(Mat points, int whichImage, Mat F, Mat lines)
+ {
+
+ computeCorrespondEpilines_0(points.nativeObj, whichImage, F.nativeObj, lines.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void triangulatePoints(Mat projMatr1, Mat projMatr2, Mat projPoints1, Mat projPoints2, Mat& points4D)
+ //
+
+ //javadoc: triangulatePoints(projMatr1, projMatr2, projPoints1, projPoints2, points4D)
+ public static void triangulatePoints(Mat projMatr1, Mat projMatr2, Mat projPoints1, Mat projPoints2, Mat points4D)
+ {
+
+ triangulatePoints_0(projMatr1.nativeObj, projMatr2.nativeObj, projPoints1.nativeObj, projPoints2.nativeObj, points4D.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void correctMatches(Mat F, Mat points1, Mat points2, Mat& newPoints1, Mat& newPoints2)
+ //
+
+ //javadoc: correctMatches(F, points1, points2, newPoints1, newPoints2)
+ public static void correctMatches(Mat F, Mat points1, Mat points2, Mat newPoints1, Mat newPoints2)
+ {
+
+ correctMatches_0(F.nativeObj, points1.nativeObj, points2.nativeObj, newPoints1.nativeObj, newPoints2.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void filterSpeckles(Mat& img, double newVal, int maxSpeckleSize, double maxDiff, Mat& buf = Mat())
+ //
+
+ //javadoc: filterSpeckles(img, newVal, maxSpeckleSize, maxDiff, buf)
+ public static void filterSpeckles(Mat img, double newVal, int maxSpeckleSize, double maxDiff, Mat buf)
+ {
+
+ filterSpeckles_0(img.nativeObj, newVal, maxSpeckleSize, maxDiff, buf.nativeObj);
+
+ return;
+ }
+
+ //javadoc: filterSpeckles(img, newVal, maxSpeckleSize, maxDiff)
+ public static void filterSpeckles(Mat img, double newVal, int maxSpeckleSize, double maxDiff)
+ {
+
+ filterSpeckles_1(img.nativeObj, newVal, maxSpeckleSize, maxDiff);
+
+ return;
+ }
+
+
+ //
+ // C++: Rect getValidDisparityROI(Rect roi1, Rect roi2, int minDisparity, int numberOfDisparities, int SADWindowSize)
+ //
+
+ //javadoc: getValidDisparityROI(roi1, roi2, minDisparity, numberOfDisparities, SADWindowSize)
+ public static Rect getValidDisparityROI(Rect roi1, Rect roi2, int minDisparity, int numberOfDisparities, int SADWindowSize)
+ {
+
+ Rect retVal = new Rect(getValidDisparityROI_0(roi1.x, roi1.y, roi1.width, roi1.height, roi2.x, roi2.y, roi2.width, roi2.height, minDisparity, numberOfDisparities, SADWindowSize));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void validateDisparity(Mat& disparity, Mat cost, int minDisparity, int numberOfDisparities, int disp12MaxDisp = 1)
+ //
+
+ //javadoc: validateDisparity(disparity, cost, minDisparity, numberOfDisparities, disp12MaxDisp)
+ public static void validateDisparity(Mat disparity, Mat cost, int minDisparity, int numberOfDisparities, int disp12MaxDisp)
+ {
+
+ validateDisparity_0(disparity.nativeObj, cost.nativeObj, minDisparity, numberOfDisparities, disp12MaxDisp);
+
+ return;
+ }
+
+ //javadoc: validateDisparity(disparity, cost, minDisparity, numberOfDisparities)
+ public static void validateDisparity(Mat disparity, Mat cost, int minDisparity, int numberOfDisparities)
+ {
+
+ validateDisparity_1(disparity.nativeObj, cost.nativeObj, minDisparity, numberOfDisparities);
+
+ return;
+ }
+
+
+ //
+ // C++: void reprojectImageTo3D(Mat disparity, Mat& _3dImage, Mat Q, bool handleMissingValues = false, int ddepth = -1)
+ //
+
+ //javadoc: reprojectImageTo3D(disparity, _3dImage, Q, handleMissingValues, ddepth)
+ public static void reprojectImageTo3D(Mat disparity, Mat _3dImage, Mat Q, boolean handleMissingValues, int ddepth)
+ {
+
+ reprojectImageTo3D_0(disparity.nativeObj, _3dImage.nativeObj, Q.nativeObj, handleMissingValues, ddepth);
+
+ return;
+ }
+
+ //javadoc: reprojectImageTo3D(disparity, _3dImage, Q, handleMissingValues)
+ public static void reprojectImageTo3D(Mat disparity, Mat _3dImage, Mat Q, boolean handleMissingValues)
+ {
+
+ reprojectImageTo3D_1(disparity.nativeObj, _3dImage.nativeObj, Q.nativeObj, handleMissingValues);
+
+ return;
+ }
+
+ //javadoc: reprojectImageTo3D(disparity, _3dImage, Q)
+ public static void reprojectImageTo3D(Mat disparity, Mat _3dImage, Mat Q)
+ {
+
+ reprojectImageTo3D_2(disparity.nativeObj, _3dImage.nativeObj, Q.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: int estimateAffine3D(Mat src, Mat dst, Mat& out, Mat& inliers, double ransacThreshold = 3, double confidence = 0.99)
+ //
+
+ //javadoc: estimateAffine3D(src, dst, out, inliers, ransacThreshold, confidence)
+ public static int estimateAffine3D(Mat src, Mat dst, Mat out, Mat inliers, double ransacThreshold, double confidence)
+ {
+
+ int retVal = estimateAffine3D_0(src.nativeObj, dst.nativeObj, out.nativeObj, inliers.nativeObj, ransacThreshold, confidence);
+
+ return retVal;
+ }
+
+ //javadoc: estimateAffine3D(src, dst, out, inliers)
+ public static int estimateAffine3D(Mat src, Mat dst, Mat out, Mat inliers)
+ {
+
+ int retVal = estimateAffine3D_1(src.nativeObj, dst.nativeObj, out.nativeObj, inliers.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int decomposeHomographyMat(Mat H, Mat K, vector_Mat& rotations, vector_Mat& translations, vector_Mat& normals)
+ //
+
+ //javadoc: decomposeHomographyMat(H, K, rotations, translations, normals)
+ public static int decomposeHomographyMat(Mat H, Mat K, List<Mat> rotations, List<Mat> translations, List<Mat> normals)
+ {
+ Mat rotations_mat = new Mat();
+ Mat translations_mat = new Mat();
+ Mat normals_mat = new Mat();
+ int retVal = decomposeHomographyMat_0(H.nativeObj, K.nativeObj, rotations_mat.nativeObj, translations_mat.nativeObj, normals_mat.nativeObj);
+ Converters.Mat_to_vector_Mat(rotations_mat, rotations);
+ rotations_mat.release();
+ Converters.Mat_to_vector_Mat(translations_mat, translations);
+ translations_mat.release();
+ Converters.Mat_to_vector_Mat(normals_mat, normals);
+ normals_mat.release();
+ return retVal;
+ }
+
+
+
+
+ // C++: void projectPoints(vector_Point3f objectPoints, vector_Point2f& imagePoints, Mat rvec, Mat tvec, Mat K, Mat D, double alpha = 0, Mat& jacobian = Mat())
+ private static native void projectPoints_0(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, long rvec_nativeObj, long tvec_nativeObj, long K_nativeObj, long D_nativeObj, double alpha, long jacobian_nativeObj);
+ private static native void projectPoints_1(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, long rvec_nativeObj, long tvec_nativeObj, long K_nativeObj, long D_nativeObj);
+
+ // C++: void distortPoints(Mat undistorted, Mat& distorted, Mat K, Mat D, double alpha = 0)
+ private static native void distortPoints_0(long undistorted_nativeObj, long distorted_nativeObj, long K_nativeObj, long D_nativeObj, double alpha);
+ private static native void distortPoints_1(long undistorted_nativeObj, long distorted_nativeObj, long K_nativeObj, long D_nativeObj);
+
+ // C++: void undistortPoints(Mat distorted, Mat& undistorted, Mat K, Mat D, Mat R = Mat(), Mat P = Mat())
+ private static native void undistortPoints_0(long distorted_nativeObj, long undistorted_nativeObj, long K_nativeObj, long D_nativeObj, long R_nativeObj, long P_nativeObj);
+ private static native void undistortPoints_1(long distorted_nativeObj, long undistorted_nativeObj, long K_nativeObj, long D_nativeObj);
+
+ // C++: void initUndistortRectifyMap(Mat K, Mat D, Mat R, Mat P, Size size, int m1type, Mat& map1, Mat& map2)
+ private static native void initUndistortRectifyMap_0(long K_nativeObj, long D_nativeObj, long R_nativeObj, long P_nativeObj, double size_width, double size_height, int m1type, long map1_nativeObj, long map2_nativeObj);
+
+ // C++: void undistortImage(Mat distorted, Mat& undistorted, Mat K, Mat D, Mat Knew = cv::Mat(), Size new_size = Size())
+ private static native void undistortImage_0(long distorted_nativeObj, long undistorted_nativeObj, long K_nativeObj, long D_nativeObj, long Knew_nativeObj, double new_size_width, double new_size_height);
+ private static native void undistortImage_1(long distorted_nativeObj, long undistorted_nativeObj, long K_nativeObj, long D_nativeObj);
+
+ // C++: void estimateNewCameraMatrixForUndistortRectify(Mat K, Mat D, Size image_size, Mat R, Mat& P, double balance = 0.0, Size new_size = Size(), double fov_scale = 1.0)
+ private static native void estimateNewCameraMatrixForUndistortRectify_0(long K_nativeObj, long D_nativeObj, double image_size_width, double image_size_height, long R_nativeObj, long P_nativeObj, double balance, double new_size_width, double new_size_height, double fov_scale);
+ private static native void estimateNewCameraMatrixForUndistortRectify_1(long K_nativeObj, long D_nativeObj, double image_size_width, double image_size_height, long R_nativeObj, long P_nativeObj);
+
+ // C++: double calibrate(vector_Mat objectPoints, vector_Mat imagePoints, Size image_size, Mat& K, Mat& D, vector_Mat& rvecs, vector_Mat& tvecs, int flags = 0, TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 100, DBL_EPSILON))
+ private static native double calibrate_0(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, double image_size_width, double image_size_height, long K_nativeObj, long D_nativeObj, long rvecs_mat_nativeObj, long tvecs_mat_nativeObj, int flags, int criteria_type, int criteria_maxCount, double criteria_epsilon);
+ private static native double calibrate_1(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, double image_size_width, double image_size_height, long K_nativeObj, long D_nativeObj, long rvecs_mat_nativeObj, long tvecs_mat_nativeObj, int flags);
+ private static native double calibrate_2(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, double image_size_width, double image_size_height, long K_nativeObj, long D_nativeObj, long rvecs_mat_nativeObj, long tvecs_mat_nativeObj);
+
+ // C++: void stereoRectify(Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat tvec, Mat& R1, Mat& R2, Mat& P1, Mat& P2, Mat& Q, int flags, Size newImageSize = Size(), double balance = 0.0, double fov_scale = 1.0)
+ private static native void stereoRectify_0(long K1_nativeObj, long D1_nativeObj, long K2_nativeObj, long D2_nativeObj, double imageSize_width, double imageSize_height, long R_nativeObj, long tvec_nativeObj, long R1_nativeObj, long R2_nativeObj, long P1_nativeObj, long P2_nativeObj, long Q_nativeObj, int flags, double newImageSize_width, double newImageSize_height, double balance, double fov_scale);
+ private static native void stereoRectify_1(long K1_nativeObj, long D1_nativeObj, long K2_nativeObj, long D2_nativeObj, double imageSize_width, double imageSize_height, long R_nativeObj, long tvec_nativeObj, long R1_nativeObj, long R2_nativeObj, long P1_nativeObj, long P2_nativeObj, long Q_nativeObj, int flags);
+
+ // C++: double stereoCalibrate(vector_Mat objectPoints, vector_Mat imagePoints1, vector_Mat imagePoints2, Mat& K1, Mat& D1, Mat& K2, Mat& D2, Size imageSize, Mat& R, Mat& T, int flags = fisheye::CALIB_FIX_INTRINSIC, TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 100, DBL_EPSILON))
+ private static native double stereoCalibrate_0(long objectPoints_mat_nativeObj, long imagePoints1_mat_nativeObj, long imagePoints2_mat_nativeObj, long K1_nativeObj, long D1_nativeObj, long K2_nativeObj, long D2_nativeObj, double imageSize_width, double imageSize_height, long R_nativeObj, long T_nativeObj, int flags, int criteria_type, int criteria_maxCount, double criteria_epsilon);
+ private static native double stereoCalibrate_1(long objectPoints_mat_nativeObj, long imagePoints1_mat_nativeObj, long imagePoints2_mat_nativeObj, long K1_nativeObj, long D1_nativeObj, long K2_nativeObj, long D2_nativeObj, double imageSize_width, double imageSize_height, long R_nativeObj, long T_nativeObj, int flags);
+ private static native double stereoCalibrate_2(long objectPoints_mat_nativeObj, long imagePoints1_mat_nativeObj, long imagePoints2_mat_nativeObj, long K1_nativeObj, long D1_nativeObj, long K2_nativeObj, long D2_nativeObj, double imageSize_width, double imageSize_height, long R_nativeObj, long T_nativeObj);
+
+ // C++: void decomposeProjectionMatrix(Mat projMatrix, Mat& cameraMatrix, Mat& rotMatrix, Mat& transVect, Mat& rotMatrixX = Mat(), Mat& rotMatrixY = Mat(), Mat& rotMatrixZ = Mat(), Mat& eulerAngles = Mat())
+ private static native void decomposeProjectionMatrix_0(long projMatrix_nativeObj, long cameraMatrix_nativeObj, long rotMatrix_nativeObj, long transVect_nativeObj, long rotMatrixX_nativeObj, long rotMatrixY_nativeObj, long rotMatrixZ_nativeObj, long eulerAngles_nativeObj);
+ private static native void decomposeProjectionMatrix_1(long projMatrix_nativeObj, long cameraMatrix_nativeObj, long rotMatrix_nativeObj, long transVect_nativeObj);
+
+ // C++: void matMulDeriv(Mat A, Mat B, Mat& dABdA, Mat& dABdB)
+ private static native void matMulDeriv_0(long A_nativeObj, long B_nativeObj, long dABdA_nativeObj, long dABdB_nativeObj);
+
+ // C++: void composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat& rvec3, Mat& tvec3, Mat& dr3dr1 = Mat(), Mat& dr3dt1 = Mat(), Mat& dr3dr2 = Mat(), Mat& dr3dt2 = Mat(), Mat& dt3dr1 = Mat(), Mat& dt3dt1 = Mat(), Mat& dt3dr2 = Mat(), Mat& dt3dt2 = Mat())
+ private static native void composeRT_0(long rvec1_nativeObj, long tvec1_nativeObj, long rvec2_nativeObj, long tvec2_nativeObj, long rvec3_nativeObj, long tvec3_nativeObj, long dr3dr1_nativeObj, long dr3dt1_nativeObj, long dr3dr2_nativeObj, long dr3dt2_nativeObj, long dt3dr1_nativeObj, long dt3dt1_nativeObj, long dt3dr2_nativeObj, long dt3dt2_nativeObj);
+ private static native void composeRT_1(long rvec1_nativeObj, long tvec1_nativeObj, long rvec2_nativeObj, long tvec2_nativeObj, long rvec3_nativeObj, long tvec3_nativeObj);
+
+ // C++: void projectPoints(vector_Point3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, vector_double distCoeffs, vector_Point2f& imagePoints, Mat& jacobian = Mat(), double aspectRatio = 0)
+ private static native void projectPoints_2(long objectPoints_mat_nativeObj, long rvec_nativeObj, long tvec_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_mat_nativeObj, long imagePoints_mat_nativeObj, long jacobian_nativeObj, double aspectRatio);
+ private static native void projectPoints_3(long objectPoints_mat_nativeObj, long rvec_nativeObj, long tvec_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_mat_nativeObj, long imagePoints_mat_nativeObj);
+
+ // C++: bool solvePnP(vector_Point3f objectPoints, vector_Point2f imagePoints, Mat cameraMatrix, vector_double distCoeffs, Mat& rvec, Mat& tvec, bool useExtrinsicGuess = false, int flags = SOLVEPNP_ITERATIVE)
+ private static native boolean solvePnP_0(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_mat_nativeObj, long rvec_nativeObj, long tvec_nativeObj, boolean useExtrinsicGuess, int flags);
+ private static native boolean solvePnP_1(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_mat_nativeObj, long rvec_nativeObj, long tvec_nativeObj);
+
+ // C++: bool solvePnPRansac(vector_Point3f objectPoints, vector_Point2f imagePoints, Mat cameraMatrix, vector_double distCoeffs, Mat& rvec, Mat& tvec, bool useExtrinsicGuess = false, int iterationsCount = 100, float reprojectionError = 8.0, double confidence = 0.99, Mat& inliers = Mat(), int flags = SOLVEPNP_ITERATIVE)
+ private static native boolean solvePnPRansac_0(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_mat_nativeObj, long rvec_nativeObj, long tvec_nativeObj, boolean useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence, long inliers_nativeObj, int flags);
+ private static native boolean solvePnPRansac_1(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_mat_nativeObj, long rvec_nativeObj, long tvec_nativeObj);
+
+ // C++: Mat initCameraMatrix2D(vector_vector_Point3f objectPoints, vector_vector_Point2f imagePoints, Size imageSize, double aspectRatio = 1.0)
+ private static native long initCameraMatrix2D_0(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, double aspectRatio);
+ private static native long initCameraMatrix2D_1(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height);
+
+ // C++: bool findChessboardCorners(Mat image, Size patternSize, vector_Point2f& corners, int flags = CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE)
+ private static native boolean findChessboardCorners_0(long image_nativeObj, double patternSize_width, double patternSize_height, long corners_mat_nativeObj, int flags);
+ private static native boolean findChessboardCorners_1(long image_nativeObj, double patternSize_width, double patternSize_height, long corners_mat_nativeObj);
+
+ // C++: void drawChessboardCorners(Mat& image, Size patternSize, vector_Point2f corners, bool patternWasFound)
+ private static native void drawChessboardCorners_0(long image_nativeObj, double patternSize_width, double patternSize_height, long corners_mat_nativeObj, boolean patternWasFound);
+
+ // C++: bool findCirclesGrid(Mat image, Size patternSize, Mat& centers, int flags = CALIB_CB_SYMMETRIC_GRID, Ptr_FeatureDetector blobDetector = SimpleBlobDetector::create())
+ private static native boolean findCirclesGrid_0(long image_nativeObj, double patternSize_width, double patternSize_height, long centers_nativeObj, int flags);
+ private static native boolean findCirclesGrid_1(long image_nativeObj, double patternSize_width, double patternSize_height, long centers_nativeObj);
+
+ // C++: double calibrateCamera(vector_Mat objectPoints, vector_Mat imagePoints, Size imageSize, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
+ private static native double calibrateCamera_0(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long rvecs_mat_nativeObj, long tvecs_mat_nativeObj, int flags, int criteria_type, int criteria_maxCount, double criteria_epsilon);
+ private static native double calibrateCamera_1(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long rvecs_mat_nativeObj, long tvecs_mat_nativeObj, int flags);
+ private static native double calibrateCamera_2(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long rvecs_mat_nativeObj, long tvecs_mat_nativeObj);
+
+ // C++: void calibrationMatrixValues(Mat cameraMatrix, Size imageSize, double apertureWidth, double apertureHeight, double& fovx, double& fovy, double& focalLength, Point2d& principalPoint, double& aspectRatio)
+ private static native void calibrationMatrixValues_0(long cameraMatrix_nativeObj, double imageSize_width, double imageSize_height, double apertureWidth, double apertureHeight, double[] fovx_out, double[] fovy_out, double[] focalLength_out, double[] principalPoint_out, double[] aspectRatio_out);
+
+ // C++: double stereoCalibrate(vector_Mat objectPoints, vector_Mat imagePoints1, vector_Mat imagePoints2, Mat& cameraMatrix1, Mat& distCoeffs1, Mat& cameraMatrix2, Mat& distCoeffs2, Size imageSize, Mat& R, Mat& T, Mat& E, Mat& F, int flags = CALIB_FIX_INTRINSIC, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 1e-6))
+ private static native double stereoCalibrate_3(long objectPoints_mat_nativeObj, long imagePoints1_mat_nativeObj, long imagePoints2_mat_nativeObj, long cameraMatrix1_nativeObj, long distCoeffs1_nativeObj, long cameraMatrix2_nativeObj, long distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, long R_nativeObj, long T_nativeObj, long E_nativeObj, long F_nativeObj, int flags, int criteria_type, int criteria_maxCount, double criteria_epsilon);
+ private static native double stereoCalibrate_4(long objectPoints_mat_nativeObj, long imagePoints1_mat_nativeObj, long imagePoints2_mat_nativeObj, long cameraMatrix1_nativeObj, long distCoeffs1_nativeObj, long cameraMatrix2_nativeObj, long distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, long R_nativeObj, long T_nativeObj, long E_nativeObj, long F_nativeObj, int flags);
+ private static native double stereoCalibrate_5(long objectPoints_mat_nativeObj, long imagePoints1_mat_nativeObj, long imagePoints2_mat_nativeObj, long cameraMatrix1_nativeObj, long distCoeffs1_nativeObj, long cameraMatrix2_nativeObj, long distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, long R_nativeObj, long T_nativeObj, long E_nativeObj, long F_nativeObj);
+
+ // C++: void Rodrigues(Mat src, Mat& dst, Mat& jacobian = Mat())
+ private static native void Rodrigues_0(long src_nativeObj, long dst_nativeObj, long jacobian_nativeObj);
+ private static native void Rodrigues_1(long src_nativeObj, long dst_nativeObj);
+
+ // C++: Mat findHomography(vector_Point2f srcPoints, vector_Point2f dstPoints, int method = 0, double ransacReprojThreshold = 3, Mat& mask = Mat(), int maxIters = 2000, double confidence = 0.995)
+ private static native long findHomography_0(long srcPoints_mat_nativeObj, long dstPoints_mat_nativeObj, int method, double ransacReprojThreshold, long mask_nativeObj, int maxIters, double confidence);
+ private static native long findHomography_1(long srcPoints_mat_nativeObj, long dstPoints_mat_nativeObj, int method, double ransacReprojThreshold);
+ private static native long findHomography_2(long srcPoints_mat_nativeObj, long dstPoints_mat_nativeObj);
+
+ // C++: Vec3d RQDecomp3x3(Mat src, Mat& mtxR, Mat& mtxQ, Mat& Qx = Mat(), Mat& Qy = Mat(), Mat& Qz = Mat())
+ private static native double[] RQDecomp3x3_0(long src_nativeObj, long mtxR_nativeObj, long mtxQ_nativeObj, long Qx_nativeObj, long Qy_nativeObj, long Qz_nativeObj);
+ private static native double[] RQDecomp3x3_1(long src_nativeObj, long mtxR_nativeObj, long mtxQ_nativeObj);
+
+ // C++: void stereoRectify(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat& R1, Mat& R2, Mat& P1, Mat& P2, Mat& Q, int flags = CALIB_ZERO_DISPARITY, double alpha = -1, Size newImageSize = Size(), Rect* validPixROI1 = 0, Rect* validPixROI2 = 0)
+ private static native void stereoRectify_2(long cameraMatrix1_nativeObj, long distCoeffs1_nativeObj, long cameraMatrix2_nativeObj, long distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, long R_nativeObj, long T_nativeObj, long R1_nativeObj, long R2_nativeObj, long P1_nativeObj, long P2_nativeObj, long Q_nativeObj, int flags, double alpha, double newImageSize_width, double newImageSize_height, double[] validPixROI1_out, double[] validPixROI2_out);
+ private static native void stereoRectify_3(long cameraMatrix1_nativeObj, long distCoeffs1_nativeObj, long cameraMatrix2_nativeObj, long distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, long R_nativeObj, long T_nativeObj, long R1_nativeObj, long R2_nativeObj, long P1_nativeObj, long P2_nativeObj, long Q_nativeObj);
+
+ // C++: bool stereoRectifyUncalibrated(Mat points1, Mat points2, Mat F, Size imgSize, Mat& H1, Mat& H2, double threshold = 5)
+ private static native boolean stereoRectifyUncalibrated_0(long points1_nativeObj, long points2_nativeObj, long F_nativeObj, double imgSize_width, double imgSize_height, long H1_nativeObj, long H2_nativeObj, double threshold);
+ private static native boolean stereoRectifyUncalibrated_1(long points1_nativeObj, long points2_nativeObj, long F_nativeObj, double imgSize_width, double imgSize_height, long H1_nativeObj, long H2_nativeObj);
+
+ // C++: float rectify3Collinear(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Mat cameraMatrix3, Mat distCoeffs3, vector_Mat imgpt1, vector_Mat imgpt3, Size imageSize, Mat R12, Mat T12, Mat R13, Mat T13, Mat& R1, Mat& R2, Mat& R3, Mat& P1, Mat& P2, Mat& P3, Mat& Q, double alpha, Size newImgSize, Rect* roi1, Rect* roi2, int flags)
+ private static native float rectify3Collinear_0(long cameraMatrix1_nativeObj, long distCoeffs1_nativeObj, long cameraMatrix2_nativeObj, long distCoeffs2_nativeObj, long cameraMatrix3_nativeObj, long distCoeffs3_nativeObj, long imgpt1_mat_nativeObj, long imgpt3_mat_nativeObj, double imageSize_width, double imageSize_height, long R12_nativeObj, long T12_nativeObj, long R13_nativeObj, long T13_nativeObj, long R1_nativeObj, long R2_nativeObj, long R3_nativeObj, long P1_nativeObj, long P2_nativeObj, long P3_nativeObj, long Q_nativeObj, double alpha, double newImgSize_width, double newImgSize_height, double[] roi1_out, double[] roi2_out, int flags);
+
+ // C++: Mat getOptimalNewCameraMatrix(Mat cameraMatrix, Mat distCoeffs, Size imageSize, double alpha, Size newImgSize = Size(), Rect* validPixROI = 0, bool centerPrincipalPoint = false)
+ private static native long getOptimalNewCameraMatrix_0(long cameraMatrix_nativeObj, long distCoeffs_nativeObj, double imageSize_width, double imageSize_height, double alpha, double newImgSize_width, double newImgSize_height, double[] validPixROI_out, boolean centerPrincipalPoint);
+ private static native long getOptimalNewCameraMatrix_1(long cameraMatrix_nativeObj, long distCoeffs_nativeObj, double imageSize_width, double imageSize_height, double alpha);
+
+ // C++: void convertPointsToHomogeneous(Mat src, Mat& dst)
+ private static native void convertPointsToHomogeneous_0(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void convertPointsFromHomogeneous(Mat src, Mat& dst)
+ private static native void convertPointsFromHomogeneous_0(long src_nativeObj, long dst_nativeObj);
+
+ // C++: Mat findFundamentalMat(vector_Point2f points1, vector_Point2f points2, int method = FM_RANSAC, double param1 = 3., double param2 = 0.99, Mat& mask = Mat())
+ private static native long findFundamentalMat_0(long points1_mat_nativeObj, long points2_mat_nativeObj, int method, double param1, double param2, long mask_nativeObj);
+ private static native long findFundamentalMat_1(long points1_mat_nativeObj, long points2_mat_nativeObj, int method, double param1, double param2);
+ private static native long findFundamentalMat_2(long points1_mat_nativeObj, long points2_mat_nativeObj);
+
+ // C++: Mat findEssentialMat(Mat points1, Mat points2, double focal = 1.0, Point2d pp = Point2d(0, 0), int method = RANSAC, double prob = 0.999, double threshold = 1.0, Mat& mask = Mat())
+ private static native long findEssentialMat_0(long points1_nativeObj, long points2_nativeObj, double focal, double pp_x, double pp_y, int method, double prob, double threshold, long mask_nativeObj);
+ private static native long findEssentialMat_1(long points1_nativeObj, long points2_nativeObj, double focal, double pp_x, double pp_y, int method, double prob, double threshold);
+ private static native long findEssentialMat_2(long points1_nativeObj, long points2_nativeObj);
+
+ // C++: void decomposeEssentialMat(Mat E, Mat& R1, Mat& R2, Mat& t)
+ private static native void decomposeEssentialMat_0(long E_nativeObj, long R1_nativeObj, long R2_nativeObj, long t_nativeObj);
+
+ // C++: int recoverPose(Mat E, Mat points1, Mat points2, Mat& R, Mat& t, double focal = 1.0, Point2d pp = Point2d(0, 0), Mat& mask = Mat())
+ private static native int recoverPose_0(long E_nativeObj, long points1_nativeObj, long points2_nativeObj, long R_nativeObj, long t_nativeObj, double focal, double pp_x, double pp_y, long mask_nativeObj);
+ private static native int recoverPose_1(long E_nativeObj, long points1_nativeObj, long points2_nativeObj, long R_nativeObj, long t_nativeObj, double focal, double pp_x, double pp_y);
+ private static native int recoverPose_2(long E_nativeObj, long points1_nativeObj, long points2_nativeObj, long R_nativeObj, long t_nativeObj);
+
+ // C++: void computeCorrespondEpilines(Mat points, int whichImage, Mat F, Mat& lines)
+ private static native void computeCorrespondEpilines_0(long points_nativeObj, int whichImage, long F_nativeObj, long lines_nativeObj);
+
+ // C++: void triangulatePoints(Mat projMatr1, Mat projMatr2, Mat projPoints1, Mat projPoints2, Mat& points4D)
+ private static native void triangulatePoints_0(long projMatr1_nativeObj, long projMatr2_nativeObj, long projPoints1_nativeObj, long projPoints2_nativeObj, long points4D_nativeObj);
+
+ // C++: void correctMatches(Mat F, Mat points1, Mat points2, Mat& newPoints1, Mat& newPoints2)
+ private static native void correctMatches_0(long F_nativeObj, long points1_nativeObj, long points2_nativeObj, long newPoints1_nativeObj, long newPoints2_nativeObj);
+
+ // C++: void filterSpeckles(Mat& img, double newVal, int maxSpeckleSize, double maxDiff, Mat& buf = Mat())
+ private static native void filterSpeckles_0(long img_nativeObj, double newVal, int maxSpeckleSize, double maxDiff, long buf_nativeObj);
+ private static native void filterSpeckles_1(long img_nativeObj, double newVal, int maxSpeckleSize, double maxDiff);
+
+ // C++: Rect getValidDisparityROI(Rect roi1, Rect roi2, int minDisparity, int numberOfDisparities, int SADWindowSize)
+ private static native double[] getValidDisparityROI_0(int roi1_x, int roi1_y, int roi1_width, int roi1_height, int roi2_x, int roi2_y, int roi2_width, int roi2_height, int minDisparity, int numberOfDisparities, int SADWindowSize);
+
+ // C++: void validateDisparity(Mat& disparity, Mat cost, int minDisparity, int numberOfDisparities, int disp12MaxDisp = 1)
+ private static native void validateDisparity_0(long disparity_nativeObj, long cost_nativeObj, int minDisparity, int numberOfDisparities, int disp12MaxDisp);
+ private static native void validateDisparity_1(long disparity_nativeObj, long cost_nativeObj, int minDisparity, int numberOfDisparities);
+
+ // C++: void reprojectImageTo3D(Mat disparity, Mat& _3dImage, Mat Q, bool handleMissingValues = false, int ddepth = -1)
+ private static native void reprojectImageTo3D_0(long disparity_nativeObj, long _3dImage_nativeObj, long Q_nativeObj, boolean handleMissingValues, int ddepth);
+ private static native void reprojectImageTo3D_1(long disparity_nativeObj, long _3dImage_nativeObj, long Q_nativeObj, boolean handleMissingValues);
+ private static native void reprojectImageTo3D_2(long disparity_nativeObj, long _3dImage_nativeObj, long Q_nativeObj);
+
+ // C++: int estimateAffine3D(Mat src, Mat dst, Mat& out, Mat& inliers, double ransacThreshold = 3, double confidence = 0.99)
+ private static native int estimateAffine3D_0(long src_nativeObj, long dst_nativeObj, long out_nativeObj, long inliers_nativeObj, double ransacThreshold, double confidence);
+ private static native int estimateAffine3D_1(long src_nativeObj, long dst_nativeObj, long out_nativeObj, long inliers_nativeObj);
+
+ // C++: int decomposeHomographyMat(Mat H, Mat K, vector_Mat& rotations, vector_Mat& translations, vector_Mat& normals)
+ private static native int decomposeHomographyMat_0(long H_nativeObj, long K_nativeObj, long rotations_mat_nativeObj, long translations_mat_nativeObj, long normals_mat_nativeObj);
+
+}
diff --git a/modules/java/src/calib3d+StereoBM.java b/modules/java/src/calib3d+StereoBM.java
new file mode 100644
index 0000000..3fee1c6
--- /dev/null
+++ b/modules/java/src/calib3d+StereoBM.java
@@ -0,0 +1,330 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.calib3d;
+
+import org.opencv.core.Rect;
+
+// C++: class StereoBM
+//javadoc: StereoBM
+public class StereoBM extends StereoMatcher {
+
+ protected StereoBM(long addr) { super(addr); }
+
+
+ public static final int
+ PREFILTER_NORMALIZED_RESPONSE = 0,
+ PREFILTER_XSOBEL = 1;
+
+
+ //
+ // C++: int getPreFilterType()
+ //
+
+ //javadoc: StereoBM::getPreFilterType()
+ public int getPreFilterType()
+ {
+
+ int retVal = getPreFilterType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setPreFilterType(int preFilterType)
+ //
+
+ //javadoc: StereoBM::setPreFilterType(preFilterType)
+ public void setPreFilterType(int preFilterType)
+ {
+
+ setPreFilterType_0(nativeObj, preFilterType);
+
+ return;
+ }
+
+
+ //
+ // C++: int getPreFilterSize()
+ //
+
+ //javadoc: StereoBM::getPreFilterSize()
+ public int getPreFilterSize()
+ {
+
+ int retVal = getPreFilterSize_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setPreFilterSize(int preFilterSize)
+ //
+
+ //javadoc: StereoBM::setPreFilterSize(preFilterSize)
+ public void setPreFilterSize(int preFilterSize)
+ {
+
+ setPreFilterSize_0(nativeObj, preFilterSize);
+
+ return;
+ }
+
+
+ //
+ // C++: int getPreFilterCap()
+ //
+
+ //javadoc: StereoBM::getPreFilterCap()
+ public int getPreFilterCap()
+ {
+
+ int retVal = getPreFilterCap_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setPreFilterCap(int preFilterCap)
+ //
+
+ //javadoc: StereoBM::setPreFilterCap(preFilterCap)
+ public void setPreFilterCap(int preFilterCap)
+ {
+
+ setPreFilterCap_0(nativeObj, preFilterCap);
+
+ return;
+ }
+
+
+ //
+ // C++: int getTextureThreshold()
+ //
+
+ //javadoc: StereoBM::getTextureThreshold()
+ public int getTextureThreshold()
+ {
+
+ int retVal = getTextureThreshold_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setTextureThreshold(int textureThreshold)
+ //
+
+ //javadoc: StereoBM::setTextureThreshold(textureThreshold)
+ public void setTextureThreshold(int textureThreshold)
+ {
+
+ setTextureThreshold_0(nativeObj, textureThreshold);
+
+ return;
+ }
+
+
+ //
+ // C++: int getUniquenessRatio()
+ //
+
+ //javadoc: StereoBM::getUniquenessRatio()
+ public int getUniquenessRatio()
+ {
+
+ int retVal = getUniquenessRatio_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setUniquenessRatio(int uniquenessRatio)
+ //
+
+ //javadoc: StereoBM::setUniquenessRatio(uniquenessRatio)
+ public void setUniquenessRatio(int uniquenessRatio)
+ {
+
+ setUniquenessRatio_0(nativeObj, uniquenessRatio);
+
+ return;
+ }
+
+
+ //
+ // C++: int getSmallerBlockSize()
+ //
+
+ //javadoc: StereoBM::getSmallerBlockSize()
+ public int getSmallerBlockSize()
+ {
+
+ int retVal = getSmallerBlockSize_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setSmallerBlockSize(int blockSize)
+ //
+
+ //javadoc: StereoBM::setSmallerBlockSize(blockSize)
+ public void setSmallerBlockSize(int blockSize)
+ {
+
+ setSmallerBlockSize_0(nativeObj, blockSize);
+
+ return;
+ }
+
+
+ //
+ // C++: Rect getROI1()
+ //
+
+ //javadoc: StereoBM::getROI1()
+ public Rect getROI1()
+ {
+
+ Rect retVal = new Rect(getROI1_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setROI1(Rect roi1)
+ //
+
+ //javadoc: StereoBM::setROI1(roi1)
+ public void setROI1(Rect roi1)
+ {
+
+ setROI1_0(nativeObj, roi1.x, roi1.y, roi1.width, roi1.height);
+
+ return;
+ }
+
+
+ //
+ // C++: Rect getROI2()
+ //
+
+ //javadoc: StereoBM::getROI2()
+ public Rect getROI2()
+ {
+
+ Rect retVal = new Rect(getROI2_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setROI2(Rect roi2)
+ //
+
+ //javadoc: StereoBM::setROI2(roi2)
+ public void setROI2(Rect roi2)
+ {
+
+ setROI2_0(nativeObj, roi2.x, roi2.y, roi2.width, roi2.height);
+
+ return;
+ }
+
+
+ //
+ // C++: static Ptr_StereoBM create(int numDisparities = 0, int blockSize = 21)
+ //
+
+ //javadoc: StereoBM::create(numDisparities, blockSize)
+ public static StereoBM create(int numDisparities, int blockSize)
+ {
+
+ StereoBM retVal = new StereoBM(create_0(numDisparities, blockSize));
+
+ return retVal;
+ }
+
+ //javadoc: StereoBM::create()
+ public static StereoBM create()
+ {
+
+ StereoBM retVal = new StereoBM(create_1());
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: int getPreFilterType()
+ private static native int getPreFilterType_0(long nativeObj);
+
+ // C++: void setPreFilterType(int preFilterType)
+ private static native void setPreFilterType_0(long nativeObj, int preFilterType);
+
+ // C++: int getPreFilterSize()
+ private static native int getPreFilterSize_0(long nativeObj);
+
+ // C++: void setPreFilterSize(int preFilterSize)
+ private static native void setPreFilterSize_0(long nativeObj, int preFilterSize);
+
+ // C++: int getPreFilterCap()
+ private static native int getPreFilterCap_0(long nativeObj);
+
+ // C++: void setPreFilterCap(int preFilterCap)
+ private static native void setPreFilterCap_0(long nativeObj, int preFilterCap);
+
+ // C++: int getTextureThreshold()
+ private static native int getTextureThreshold_0(long nativeObj);
+
+ // C++: void setTextureThreshold(int textureThreshold)
+ private static native void setTextureThreshold_0(long nativeObj, int textureThreshold);
+
+ // C++: int getUniquenessRatio()
+ private static native int getUniquenessRatio_0(long nativeObj);
+
+ // C++: void setUniquenessRatio(int uniquenessRatio)
+ private static native void setUniquenessRatio_0(long nativeObj, int uniquenessRatio);
+
+ // C++: int getSmallerBlockSize()
+ private static native int getSmallerBlockSize_0(long nativeObj);
+
+ // C++: void setSmallerBlockSize(int blockSize)
+ private static native void setSmallerBlockSize_0(long nativeObj, int blockSize);
+
+ // C++: Rect getROI1()
+ private static native double[] getROI1_0(long nativeObj);
+
+ // C++: void setROI1(Rect roi1)
+ private static native void setROI1_0(long nativeObj, int roi1_x, int roi1_y, int roi1_width, int roi1_height);
+
+ // C++: Rect getROI2()
+ private static native double[] getROI2_0(long nativeObj);
+
+ // C++: void setROI2(Rect roi2)
+ private static native void setROI2_0(long nativeObj, int roi2_x, int roi2_y, int roi2_width, int roi2_height);
+
+ // C++: static Ptr_StereoBM create(int numDisparities = 0, int blockSize = 21)
+ private static native long create_0(int numDisparities, int blockSize);
+ private static native long create_1();
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/calib3d+StereoMatcher.java b/modules/java/src/calib3d+StereoMatcher.java
new file mode 100644
index 0000000..31ce673
--- /dev/null
+++ b/modules/java/src/calib3d+StereoMatcher.java
@@ -0,0 +1,253 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.calib3d;
+
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+
+// C++: class StereoMatcher
+//javadoc: StereoMatcher
+public class StereoMatcher extends Algorithm {
+
+ protected StereoMatcher(long addr) { super(addr); }
+
+
+ public static final int
+ DISP_SHIFT = 4,
+ DISP_SCALE = (1 << DISP_SHIFT);
+
+
+ //
+ // C++: void compute(Mat left, Mat right, Mat& disparity)
+ //
+
+ //javadoc: StereoMatcher::compute(left, right, disparity)
+ public void compute(Mat left, Mat right, Mat disparity)
+ {
+
+ compute_0(nativeObj, left.nativeObj, right.nativeObj, disparity.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: int getMinDisparity()
+ //
+
+ //javadoc: StereoMatcher::getMinDisparity()
+ public int getMinDisparity()
+ {
+
+ int retVal = getMinDisparity_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setMinDisparity(int minDisparity)
+ //
+
+ //javadoc: StereoMatcher::setMinDisparity(minDisparity)
+ public void setMinDisparity(int minDisparity)
+ {
+
+ setMinDisparity_0(nativeObj, minDisparity);
+
+ return;
+ }
+
+
+ //
+ // C++: int getNumDisparities()
+ //
+
+ //javadoc: StereoMatcher::getNumDisparities()
+ public int getNumDisparities()
+ {
+
+ int retVal = getNumDisparities_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setNumDisparities(int numDisparities)
+ //
+
+ //javadoc: StereoMatcher::setNumDisparities(numDisparities)
+ public void setNumDisparities(int numDisparities)
+ {
+
+ setNumDisparities_0(nativeObj, numDisparities);
+
+ return;
+ }
+
+
+ //
+ // C++: int getBlockSize()
+ //
+
+ //javadoc: StereoMatcher::getBlockSize()
+ public int getBlockSize()
+ {
+
+ int retVal = getBlockSize_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setBlockSize(int blockSize)
+ //
+
+ //javadoc: StereoMatcher::setBlockSize(blockSize)
+ public void setBlockSize(int blockSize)
+ {
+
+ setBlockSize_0(nativeObj, blockSize);
+
+ return;
+ }
+
+
+ //
+ // C++: int getSpeckleWindowSize()
+ //
+
+ //javadoc: StereoMatcher::getSpeckleWindowSize()
+ public int getSpeckleWindowSize()
+ {
+
+ int retVal = getSpeckleWindowSize_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setSpeckleWindowSize(int speckleWindowSize)
+ //
+
+ //javadoc: StereoMatcher::setSpeckleWindowSize(speckleWindowSize)
+ public void setSpeckleWindowSize(int speckleWindowSize)
+ {
+
+ setSpeckleWindowSize_0(nativeObj, speckleWindowSize);
+
+ return;
+ }
+
+
+ //
+ // C++: int getSpeckleRange()
+ //
+
+ //javadoc: StereoMatcher::getSpeckleRange()
+ public int getSpeckleRange()
+ {
+
+ int retVal = getSpeckleRange_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setSpeckleRange(int speckleRange)
+ //
+
+ //javadoc: StereoMatcher::setSpeckleRange(speckleRange)
+ public void setSpeckleRange(int speckleRange)
+ {
+
+ setSpeckleRange_0(nativeObj, speckleRange);
+
+ return;
+ }
+
+
+ //
+ // C++: int getDisp12MaxDiff()
+ //
+
+ //javadoc: StereoMatcher::getDisp12MaxDiff()
+ public int getDisp12MaxDiff()
+ {
+
+ int retVal = getDisp12MaxDiff_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setDisp12MaxDiff(int disp12MaxDiff)
+ //
+
+ //javadoc: StereoMatcher::setDisp12MaxDiff(disp12MaxDiff)
+ public void setDisp12MaxDiff(int disp12MaxDiff)
+ {
+
+ setDisp12MaxDiff_0(nativeObj, disp12MaxDiff);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void compute(Mat left, Mat right, Mat& disparity)
+ private static native void compute_0(long nativeObj, long left_nativeObj, long right_nativeObj, long disparity_nativeObj);
+
+ // C++: int getMinDisparity()
+ private static native int getMinDisparity_0(long nativeObj);
+
+ // C++: void setMinDisparity(int minDisparity)
+ private static native void setMinDisparity_0(long nativeObj, int minDisparity);
+
+ // C++: int getNumDisparities()
+ private static native int getNumDisparities_0(long nativeObj);
+
+ // C++: void setNumDisparities(int numDisparities)
+ private static native void setNumDisparities_0(long nativeObj, int numDisparities);
+
+ // C++: int getBlockSize()
+ private static native int getBlockSize_0(long nativeObj);
+
+ // C++: void setBlockSize(int blockSize)
+ private static native void setBlockSize_0(long nativeObj, int blockSize);
+
+ // C++: int getSpeckleWindowSize()
+ private static native int getSpeckleWindowSize_0(long nativeObj);
+
+ // C++: void setSpeckleWindowSize(int speckleWindowSize)
+ private static native void setSpeckleWindowSize_0(long nativeObj, int speckleWindowSize);
+
+ // C++: int getSpeckleRange()
+ private static native int getSpeckleRange_0(long nativeObj);
+
+ // C++: void setSpeckleRange(int speckleRange)
+ private static native void setSpeckleRange_0(long nativeObj, int speckleRange);
+
+ // C++: int getDisp12MaxDiff()
+ private static native int getDisp12MaxDiff_0(long nativeObj);
+
+ // C++: void setDisp12MaxDiff(int disp12MaxDiff)
+ private static native void setDisp12MaxDiff_0(long nativeObj, int disp12MaxDiff);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/calib3d+StereoSGBM.java b/modules/java/src/calib3d+StereoSGBM.java
new file mode 100644
index 0000000..3f9bbe6
--- /dev/null
+++ b/modules/java/src/calib3d+StereoSGBM.java
@@ -0,0 +1,228 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.calib3d;
+
+
+
+// C++: class StereoSGBM
+//javadoc: StereoSGBM
+public class StereoSGBM extends StereoMatcher {
+
+ protected StereoSGBM(long addr) { super(addr); }
+
+
+ public static final int
+ MODE_SGBM = 0,
+ MODE_HH = 1;
+
+
+ //
+ // C++: int getPreFilterCap()
+ //
+
+ //javadoc: StereoSGBM::getPreFilterCap()
+ public int getPreFilterCap()
+ {
+
+ int retVal = getPreFilterCap_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setPreFilterCap(int preFilterCap)
+ //
+
+ //javadoc: StereoSGBM::setPreFilterCap(preFilterCap)
+ public void setPreFilterCap(int preFilterCap)
+ {
+
+ setPreFilterCap_0(nativeObj, preFilterCap);
+
+ return;
+ }
+
+
+ //
+ // C++: int getUniquenessRatio()
+ //
+
+ //javadoc: StereoSGBM::getUniquenessRatio()
+ public int getUniquenessRatio()
+ {
+
+ int retVal = getUniquenessRatio_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setUniquenessRatio(int uniquenessRatio)
+ //
+
+ //javadoc: StereoSGBM::setUniquenessRatio(uniquenessRatio)
+ public void setUniquenessRatio(int uniquenessRatio)
+ {
+
+ setUniquenessRatio_0(nativeObj, uniquenessRatio);
+
+ return;
+ }
+
+
+ //
+ // C++: int getP1()
+ //
+
+ //javadoc: StereoSGBM::getP1()
+ public int getP1()
+ {
+
+ int retVal = getP1_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setP1(int P1)
+ //
+
+ //javadoc: StereoSGBM::setP1(P1)
+ public void setP1(int P1)
+ {
+
+ setP1_0(nativeObj, P1);
+
+ return;
+ }
+
+
+ //
+ // C++: int getP2()
+ //
+
+ //javadoc: StereoSGBM::getP2()
+ public int getP2()
+ {
+
+ int retVal = getP2_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setP2(int P2)
+ //
+
+ //javadoc: StereoSGBM::setP2(P2)
+ public void setP2(int P2)
+ {
+
+ setP2_0(nativeObj, P2);
+
+ return;
+ }
+
+
+ //
+ // C++: int getMode()
+ //
+
+ //javadoc: StereoSGBM::getMode()
+ public int getMode()
+ {
+
+ int retVal = getMode_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setMode(int mode)
+ //
+
+ //javadoc: StereoSGBM::setMode(mode)
+ public void setMode(int mode)
+ {
+
+ setMode_0(nativeObj, mode);
+
+ return;
+ }
+
+
+ //
+ // C++: static Ptr_StereoSGBM create(int minDisparity, int numDisparities, int blockSize, int P1 = 0, int P2 = 0, int disp12MaxDiff = 0, int preFilterCap = 0, int uniquenessRatio = 0, int speckleWindowSize = 0, int speckleRange = 0, int mode = StereoSGBM::MODE_SGBM)
+ //
+
+ //javadoc: StereoSGBM::create(minDisparity, numDisparities, blockSize, P1, P2, disp12MaxDiff, preFilterCap, uniquenessRatio, speckleWindowSize, speckleRange, mode)
+ public static StereoSGBM create(int minDisparity, int numDisparities, int blockSize, int P1, int P2, int disp12MaxDiff, int preFilterCap, int uniquenessRatio, int speckleWindowSize, int speckleRange, int mode)
+ {
+
+ StereoSGBM retVal = new StereoSGBM(create_0(minDisparity, numDisparities, blockSize, P1, P2, disp12MaxDiff, preFilterCap, uniquenessRatio, speckleWindowSize, speckleRange, mode));
+
+ return retVal;
+ }
+
+ //javadoc: StereoSGBM::create(minDisparity, numDisparities, blockSize)
+ public static StereoSGBM create(int minDisparity, int numDisparities, int blockSize)
+ {
+
+ StereoSGBM retVal = new StereoSGBM(create_1(minDisparity, numDisparities, blockSize));
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: int getPreFilterCap()
+ private static native int getPreFilterCap_0(long nativeObj);
+
+ // C++: void setPreFilterCap(int preFilterCap)
+ private static native void setPreFilterCap_0(long nativeObj, int preFilterCap);
+
+ // C++: int getUniquenessRatio()
+ private static native int getUniquenessRatio_0(long nativeObj);
+
+ // C++: void setUniquenessRatio(int uniquenessRatio)
+ private static native void setUniquenessRatio_0(long nativeObj, int uniquenessRatio);
+
+ // C++: int getP1()
+ private static native int getP1_0(long nativeObj);
+
+ // C++: void setP1(int P1)
+ private static native void setP1_0(long nativeObj, int P1);
+
+ // C++: int getP2()
+ private static native int getP2_0(long nativeObj);
+
+ // C++: void setP2(int P2)
+ private static native void setP2_0(long nativeObj, int P2);
+
+ // C++: int getMode()
+ private static native int getMode_0(long nativeObj);
+
+ // C++: void setMode(int mode)
+ private static native void setMode_0(long nativeObj, int mode);
+
+ // C++: static Ptr_StereoSGBM create(int minDisparity, int numDisparities, int blockSize, int P1 = 0, int P2 = 0, int disp12MaxDiff = 0, int preFilterCap = 0, int uniquenessRatio = 0, int speckleWindowSize = 0, int speckleRange = 0, int mode = StereoSGBM::MODE_SGBM)
+ private static native long create_0(int minDisparity, int numDisparities, int blockSize, int P1, int P2, int disp12MaxDiff, int preFilterCap, int uniquenessRatio, int speckleWindowSize, int speckleRange, int mode);
+ private static native long create_1(int minDisparity, int numDisparities, int blockSize);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/calib3d.cpp b/modules/java/src/calib3d.cpp
new file mode 100644
index 0000000..93ef755
--- /dev/null
+++ b/modules/java/src/calib3d.cpp
@@ -0,0 +1,3671 @@
+
+//
+// This file is auto-generated, please don't edit!
+//
+
+#define LOG_TAG "org.opencv.calib3d"
+
+#include "common.h"
+
+#include "opencv2/opencv_modules.hpp"
+#ifdef HAVE_OPENCV_CALIB3D
+
+#include <string>
+
+#include "opencv2/calib3d.hpp"
+
+#include "../../calib3d/include/opencv2/calib3d/calib3d_c.h"
+#include "../../calib3d/include/opencv2/calib3d.hpp"
+
+using namespace cv;
+
+/// throw java exception
+static void throwJavaException(JNIEnv *env, const std::exception *e, const char *method) {
+ std::string what = "unknown exception";
+ jclass je = 0;
+
+ if(e) {
+ std::string exception_type = "std::exception";
+
+ if(dynamic_cast<const cv::Exception*>(e)) {
+ exception_type = "cv::Exception";
+ je = env->FindClass("org/opencv/core/CvException");
+ }
+
+ what = exception_type + ": " + e->what();
+ }
+
+ if(!je) je = env->FindClass("java/lang/Exception");
+ env->ThrowNew(je, what.c_str());
+
+ LOGE("%s caught %s", method, what.c_str());
+ (void)method; // avoid "unused" warning
+}
+
+
+extern "C" {
+
+
+//
+// int getPreFilterCap()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoSGBM_getPreFilterCap_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoSGBM_getPreFilterCap_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getPreFilterCap_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoSGBM>* me = (Ptr<cv::StereoSGBM>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getPreFilterCap( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setPreFilterCap(int preFilterCap)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoSGBM_setPreFilterCap_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoSGBM_setPreFilterCap_10
+ (JNIEnv* env, jclass , jlong self, jint preFilterCap)
+{
+ static const char method_name[] = "calib3d::setPreFilterCap_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoSGBM>* me = (Ptr<cv::StereoSGBM>*) self; //TODO: check for NULL
+ (*me)->setPreFilterCap( (int)preFilterCap );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getUniquenessRatio()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoSGBM_getUniquenessRatio_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoSGBM_getUniquenessRatio_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getUniquenessRatio_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoSGBM>* me = (Ptr<cv::StereoSGBM>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getUniquenessRatio( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setUniquenessRatio(int uniquenessRatio)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoSGBM_setUniquenessRatio_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoSGBM_setUniquenessRatio_10
+ (JNIEnv* env, jclass , jlong self, jint uniquenessRatio)
+{
+ static const char method_name[] = "calib3d::setUniquenessRatio_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoSGBM>* me = (Ptr<cv::StereoSGBM>*) self; //TODO: check for NULL
+ (*me)->setUniquenessRatio( (int)uniquenessRatio );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getP1()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoSGBM_getP1_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoSGBM_getP1_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getP1_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoSGBM>* me = (Ptr<cv::StereoSGBM>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getP1( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setP1(int P1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoSGBM_setP1_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoSGBM_setP1_10
+ (JNIEnv* env, jclass , jlong self, jint P1)
+{
+ static const char method_name[] = "calib3d::setP1_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoSGBM>* me = (Ptr<cv::StereoSGBM>*) self; //TODO: check for NULL
+ (*me)->setP1( (int)P1 );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getP2()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoSGBM_getP2_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoSGBM_getP2_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getP2_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoSGBM>* me = (Ptr<cv::StereoSGBM>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getP2( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setP2(int P2)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoSGBM_setP2_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoSGBM_setP2_10
+ (JNIEnv* env, jclass , jlong self, jint P2)
+{
+ static const char method_name[] = "calib3d::setP2_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoSGBM>* me = (Ptr<cv::StereoSGBM>*) self; //TODO: check for NULL
+ (*me)->setP2( (int)P2 );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getMode()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoSGBM_getMode_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoSGBM_getMode_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getMode_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoSGBM>* me = (Ptr<cv::StereoSGBM>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getMode( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setMode(int mode)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoSGBM_setMode_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoSGBM_setMode_10
+ (JNIEnv* env, jclass , jlong self, jint mode)
+{
+ static const char method_name[] = "calib3d::setMode_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoSGBM>* me = (Ptr<cv::StereoSGBM>*) self; //TODO: check for NULL
+ (*me)->setMode( (int)mode );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// static Ptr_StereoSGBM create(int minDisparity, int numDisparities, int blockSize, int P1 = 0, int P2 = 0, int disp12MaxDiff = 0, int preFilterCap = 0, int uniquenessRatio = 0, int speckleWindowSize = 0, int speckleRange = 0, int mode = StereoSGBM::MODE_SGBM)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_StereoSGBM_create_10 (JNIEnv*, jclass, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_StereoSGBM_create_10
+ (JNIEnv* env, jclass , jint minDisparity, jint numDisparities, jint blockSize, jint P1, jint P2, jint disp12MaxDiff, jint preFilterCap, jint uniquenessRatio, jint speckleWindowSize, jint speckleRange, jint mode)
+{
+ static const char method_name[] = "calib3d::create_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::StereoSGBM> Ptr_StereoSGBM;
+ Ptr_StereoSGBM _retval_ = cv::StereoSGBM::create( (int)minDisparity, (int)numDisparities, (int)blockSize, (int)P1, (int)P2, (int)disp12MaxDiff, (int)preFilterCap, (int)uniquenessRatio, (int)speckleWindowSize, (int)speckleRange, (int)mode );
+ return (jlong)(new Ptr_StereoSGBM(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_StereoSGBM_create_11 (JNIEnv*, jclass, jint, jint, jint);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_StereoSGBM_create_11
+ (JNIEnv* env, jclass , jint minDisparity, jint numDisparities, jint blockSize)
+{
+ static const char method_name[] = "calib3d::create_11()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::StereoSGBM> Ptr_StereoSGBM;
+ Ptr_StereoSGBM _retval_ = cv::StereoSGBM::create( (int)minDisparity, (int)numDisparities, (int)blockSize );
+ return (jlong)(new Ptr_StereoSGBM(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::StereoSGBM>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoSGBM_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoSGBM_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::StereoSGBM>*) self;
+}
+
+
+//
+// int getPreFilterType()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoBM_getPreFilterType_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoBM_getPreFilterType_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getPreFilterType_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoBM>* me = (Ptr<cv::StereoBM>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getPreFilterType( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setPreFilterType(int preFilterType)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoBM_setPreFilterType_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoBM_setPreFilterType_10
+ (JNIEnv* env, jclass , jlong self, jint preFilterType)
+{
+ static const char method_name[] = "calib3d::setPreFilterType_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoBM>* me = (Ptr<cv::StereoBM>*) self; //TODO: check for NULL
+ (*me)->setPreFilterType( (int)preFilterType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getPreFilterSize()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoBM_getPreFilterSize_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoBM_getPreFilterSize_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getPreFilterSize_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoBM>* me = (Ptr<cv::StereoBM>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getPreFilterSize( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setPreFilterSize(int preFilterSize)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoBM_setPreFilterSize_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoBM_setPreFilterSize_10
+ (JNIEnv* env, jclass , jlong self, jint preFilterSize)
+{
+ static const char method_name[] = "calib3d::setPreFilterSize_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoBM>* me = (Ptr<cv::StereoBM>*) self; //TODO: check for NULL
+ (*me)->setPreFilterSize( (int)preFilterSize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getPreFilterCap()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoBM_getPreFilterCap_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoBM_getPreFilterCap_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getPreFilterCap_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoBM>* me = (Ptr<cv::StereoBM>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getPreFilterCap( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setPreFilterCap(int preFilterCap)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoBM_setPreFilterCap_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoBM_setPreFilterCap_10
+ (JNIEnv* env, jclass , jlong self, jint preFilterCap)
+{
+ static const char method_name[] = "calib3d::setPreFilterCap_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoBM>* me = (Ptr<cv::StereoBM>*) self; //TODO: check for NULL
+ (*me)->setPreFilterCap( (int)preFilterCap );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getTextureThreshold()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoBM_getTextureThreshold_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoBM_getTextureThreshold_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getTextureThreshold_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoBM>* me = (Ptr<cv::StereoBM>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getTextureThreshold( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setTextureThreshold(int textureThreshold)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoBM_setTextureThreshold_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoBM_setTextureThreshold_10
+ (JNIEnv* env, jclass , jlong self, jint textureThreshold)
+{
+ static const char method_name[] = "calib3d::setTextureThreshold_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoBM>* me = (Ptr<cv::StereoBM>*) self; //TODO: check for NULL
+ (*me)->setTextureThreshold( (int)textureThreshold );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getUniquenessRatio()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoBM_getUniquenessRatio_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoBM_getUniquenessRatio_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getUniquenessRatio_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoBM>* me = (Ptr<cv::StereoBM>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getUniquenessRatio( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setUniquenessRatio(int uniquenessRatio)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoBM_setUniquenessRatio_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoBM_setUniquenessRatio_10
+ (JNIEnv* env, jclass , jlong self, jint uniquenessRatio)
+{
+ static const char method_name[] = "calib3d::setUniquenessRatio_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoBM>* me = (Ptr<cv::StereoBM>*) self; //TODO: check for NULL
+ (*me)->setUniquenessRatio( (int)uniquenessRatio );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getSmallerBlockSize()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoBM_getSmallerBlockSize_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoBM_getSmallerBlockSize_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getSmallerBlockSize_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoBM>* me = (Ptr<cv::StereoBM>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getSmallerBlockSize( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setSmallerBlockSize(int blockSize)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoBM_setSmallerBlockSize_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoBM_setSmallerBlockSize_10
+ (JNIEnv* env, jclass , jlong self, jint blockSize)
+{
+ static const char method_name[] = "calib3d::setSmallerBlockSize_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoBM>* me = (Ptr<cv::StereoBM>*) self; //TODO: check for NULL
+ (*me)->setSmallerBlockSize( (int)blockSize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Rect getROI1()
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_calib3d_StereoBM_getROI1_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_calib3d_StereoBM_getROI1_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getROI1_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoBM>* me = (Ptr<cv::StereoBM>*) self; //TODO: check for NULL
+ Rect _retval_ = (*me)->getROI1( );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(4); jdouble _tmp_retval_[4] = {_retval_.x, _retval_.y, _retval_.width, _retval_.height}; env->SetDoubleArrayRegion(_da_retval_, 0, 4, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setROI1(Rect roi1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoBM_setROI1_10 (JNIEnv*, jclass, jlong, jint, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoBM_setROI1_10
+ (JNIEnv* env, jclass , jlong self, jint roi1_x, jint roi1_y, jint roi1_width, jint roi1_height)
+{
+ static const char method_name[] = "calib3d::setROI1_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoBM>* me = (Ptr<cv::StereoBM>*) self; //TODO: check for NULL
+ Rect roi1(roi1_x, roi1_y, roi1_width, roi1_height);
+ (*me)->setROI1( roi1 );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Rect getROI2()
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_calib3d_StereoBM_getROI2_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_calib3d_StereoBM_getROI2_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getROI2_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoBM>* me = (Ptr<cv::StereoBM>*) self; //TODO: check for NULL
+ Rect _retval_ = (*me)->getROI2( );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(4); jdouble _tmp_retval_[4] = {_retval_.x, _retval_.y, _retval_.width, _retval_.height}; env->SetDoubleArrayRegion(_da_retval_, 0, 4, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setROI2(Rect roi2)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoBM_setROI2_10 (JNIEnv*, jclass, jlong, jint, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoBM_setROI2_10
+ (JNIEnv* env, jclass , jlong self, jint roi2_x, jint roi2_y, jint roi2_width, jint roi2_height)
+{
+ static const char method_name[] = "calib3d::setROI2_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoBM>* me = (Ptr<cv::StereoBM>*) self; //TODO: check for NULL
+ Rect roi2(roi2_x, roi2_y, roi2_width, roi2_height);
+ (*me)->setROI2( roi2 );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// static Ptr_StereoBM create(int numDisparities = 0, int blockSize = 21)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_StereoBM_create_10 (JNIEnv*, jclass, jint, jint);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_StereoBM_create_10
+ (JNIEnv* env, jclass , jint numDisparities, jint blockSize)
+{
+ static const char method_name[] = "calib3d::create_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::StereoBM> Ptr_StereoBM;
+ Ptr_StereoBM _retval_ = cv::StereoBM::create( (int)numDisparities, (int)blockSize );
+ return (jlong)(new Ptr_StereoBM(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_StereoBM_create_11 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_StereoBM_create_11
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "calib3d::create_11()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::StereoBM> Ptr_StereoBM;
+ Ptr_StereoBM _retval_ = cv::StereoBM::create( );
+ return (jlong)(new Ptr_StereoBM(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::StereoBM>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoBM_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoBM_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::StereoBM>*) self;
+}
+
+
+//
+// void compute(Mat left, Mat right, Mat& disparity)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoMatcher_compute_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoMatcher_compute_10
+ (JNIEnv* env, jclass , jlong self, jlong left_nativeObj, jlong right_nativeObj, jlong disparity_nativeObj)
+{
+ static const char method_name[] = "calib3d::compute_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoMatcher>* me = (Ptr<cv::StereoMatcher>*) self; //TODO: check for NULL
+ Mat& left = *((Mat*)left_nativeObj);
+ Mat& right = *((Mat*)right_nativeObj);
+ Mat& disparity = *((Mat*)disparity_nativeObj);
+ (*me)->compute( left, right, disparity );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getMinDisparity()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoMatcher_getMinDisparity_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoMatcher_getMinDisparity_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getMinDisparity_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoMatcher>* me = (Ptr<cv::StereoMatcher>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getMinDisparity( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setMinDisparity(int minDisparity)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoMatcher_setMinDisparity_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoMatcher_setMinDisparity_10
+ (JNIEnv* env, jclass , jlong self, jint minDisparity)
+{
+ static const char method_name[] = "calib3d::setMinDisparity_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoMatcher>* me = (Ptr<cv::StereoMatcher>*) self; //TODO: check for NULL
+ (*me)->setMinDisparity( (int)minDisparity );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getNumDisparities()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoMatcher_getNumDisparities_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoMatcher_getNumDisparities_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getNumDisparities_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoMatcher>* me = (Ptr<cv::StereoMatcher>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getNumDisparities( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setNumDisparities(int numDisparities)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoMatcher_setNumDisparities_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoMatcher_setNumDisparities_10
+ (JNIEnv* env, jclass , jlong self, jint numDisparities)
+{
+ static const char method_name[] = "calib3d::setNumDisparities_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoMatcher>* me = (Ptr<cv::StereoMatcher>*) self; //TODO: check for NULL
+ (*me)->setNumDisparities( (int)numDisparities );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getBlockSize()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoMatcher_getBlockSize_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoMatcher_getBlockSize_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getBlockSize_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoMatcher>* me = (Ptr<cv::StereoMatcher>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getBlockSize( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setBlockSize(int blockSize)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoMatcher_setBlockSize_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoMatcher_setBlockSize_10
+ (JNIEnv* env, jclass , jlong self, jint blockSize)
+{
+ static const char method_name[] = "calib3d::setBlockSize_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoMatcher>* me = (Ptr<cv::StereoMatcher>*) self; //TODO: check for NULL
+ (*me)->setBlockSize( (int)blockSize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getSpeckleWindowSize()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoMatcher_getSpeckleWindowSize_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoMatcher_getSpeckleWindowSize_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getSpeckleWindowSize_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoMatcher>* me = (Ptr<cv::StereoMatcher>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getSpeckleWindowSize( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setSpeckleWindowSize(int speckleWindowSize)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoMatcher_setSpeckleWindowSize_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoMatcher_setSpeckleWindowSize_10
+ (JNIEnv* env, jclass , jlong self, jint speckleWindowSize)
+{
+ static const char method_name[] = "calib3d::setSpeckleWindowSize_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoMatcher>* me = (Ptr<cv::StereoMatcher>*) self; //TODO: check for NULL
+ (*me)->setSpeckleWindowSize( (int)speckleWindowSize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getSpeckleRange()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoMatcher_getSpeckleRange_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoMatcher_getSpeckleRange_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getSpeckleRange_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoMatcher>* me = (Ptr<cv::StereoMatcher>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getSpeckleRange( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setSpeckleRange(int speckleRange)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoMatcher_setSpeckleRange_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoMatcher_setSpeckleRange_10
+ (JNIEnv* env, jclass , jlong self, jint speckleRange)
+{
+ static const char method_name[] = "calib3d::setSpeckleRange_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoMatcher>* me = (Ptr<cv::StereoMatcher>*) self; //TODO: check for NULL
+ (*me)->setSpeckleRange( (int)speckleRange );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getDisp12MaxDiff()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoMatcher_getDisp12MaxDiff_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_StereoMatcher_getDisp12MaxDiff_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "calib3d::getDisp12MaxDiff_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoMatcher>* me = (Ptr<cv::StereoMatcher>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getDisp12MaxDiff( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setDisp12MaxDiff(int disp12MaxDiff)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoMatcher_setDisp12MaxDiff_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoMatcher_setDisp12MaxDiff_10
+ (JNIEnv* env, jclass , jlong self, jint disp12MaxDiff)
+{
+ static const char method_name[] = "calib3d::setDisp12MaxDiff_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::StereoMatcher>* me = (Ptr<cv::StereoMatcher>*) self; //TODO: check for NULL
+ (*me)->setDisp12MaxDiff( (int)disp12MaxDiff );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::StereoMatcher>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoMatcher_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_StereoMatcher_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::StereoMatcher>*) self;
+}
+
+
+//
+// void projectPoints(vector_Point3f objectPoints, vector_Point2f& imagePoints, Mat rvec, Mat tvec, Mat K, Mat D, double alpha = 0, Mat& jacobian = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_projectPoints_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jdouble, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_projectPoints_10
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints_mat_nativeObj, jlong rvec_nativeObj, jlong tvec_nativeObj, jlong K_nativeObj, jlong D_nativeObj, jdouble alpha, jlong jacobian_nativeObj)
+{
+ static const char method_name[] = "calib3d::projectPoints_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point3f> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Point3f( objectPoints_mat, objectPoints );
+ std::vector<Point2f> imagePoints;
+ Mat& imagePoints_mat = *((Mat*)imagePoints_mat_nativeObj);
+ Mat& rvec = *((Mat*)rvec_nativeObj);
+ Mat& tvec = *((Mat*)tvec_nativeObj);
+ Mat& K = *((Mat*)K_nativeObj);
+ Mat& D = *((Mat*)D_nativeObj);
+ Mat& jacobian = *((Mat*)jacobian_nativeObj);
+ cv::fisheye::projectPoints( objectPoints, imagePoints, rvec, tvec, K, D, (double)alpha, jacobian );
+ vector_Point2f_to_Mat( imagePoints, imagePoints_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_projectPoints_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_projectPoints_11
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints_mat_nativeObj, jlong rvec_nativeObj, jlong tvec_nativeObj, jlong K_nativeObj, jlong D_nativeObj)
+{
+ static const char method_name[] = "calib3d::projectPoints_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point3f> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Point3f( objectPoints_mat, objectPoints );
+ std::vector<Point2f> imagePoints;
+ Mat& imagePoints_mat = *((Mat*)imagePoints_mat_nativeObj);
+ Mat& rvec = *((Mat*)rvec_nativeObj);
+ Mat& tvec = *((Mat*)tvec_nativeObj);
+ Mat& K = *((Mat*)K_nativeObj);
+ Mat& D = *((Mat*)D_nativeObj);
+ cv::fisheye::projectPoints( objectPoints, imagePoints, rvec, tvec, K, D );
+ vector_Point2f_to_Mat( imagePoints, imagePoints_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void distortPoints(Mat undistorted, Mat& distorted, Mat K, Mat D, double alpha = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_distortPoints_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_distortPoints_10
+ (JNIEnv* env, jclass , jlong undistorted_nativeObj, jlong distorted_nativeObj, jlong K_nativeObj, jlong D_nativeObj, jdouble alpha)
+{
+ static const char method_name[] = "calib3d::distortPoints_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& undistorted = *((Mat*)undistorted_nativeObj);
+ Mat& distorted = *((Mat*)distorted_nativeObj);
+ Mat& K = *((Mat*)K_nativeObj);
+ Mat& D = *((Mat*)D_nativeObj);
+ cv::fisheye::distortPoints( undistorted, distorted, K, D, (double)alpha );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_distortPoints_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_distortPoints_11
+ (JNIEnv* env, jclass , jlong undistorted_nativeObj, jlong distorted_nativeObj, jlong K_nativeObj, jlong D_nativeObj)
+{
+ static const char method_name[] = "calib3d::distortPoints_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& undistorted = *((Mat*)undistorted_nativeObj);
+ Mat& distorted = *((Mat*)distorted_nativeObj);
+ Mat& K = *((Mat*)K_nativeObj);
+ Mat& D = *((Mat*)D_nativeObj);
+ cv::fisheye::distortPoints( undistorted, distorted, K, D );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void undistortPoints(Mat distorted, Mat& undistorted, Mat K, Mat D, Mat R = Mat(), Mat P = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_undistortPoints_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_undistortPoints_10
+ (JNIEnv* env, jclass , jlong distorted_nativeObj, jlong undistorted_nativeObj, jlong K_nativeObj, jlong D_nativeObj, jlong R_nativeObj, jlong P_nativeObj)
+{
+ static const char method_name[] = "calib3d::undistortPoints_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& distorted = *((Mat*)distorted_nativeObj);
+ Mat& undistorted = *((Mat*)undistorted_nativeObj);
+ Mat& K = *((Mat*)K_nativeObj);
+ Mat& D = *((Mat*)D_nativeObj);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& P = *((Mat*)P_nativeObj);
+ cv::fisheye::undistortPoints( distorted, undistorted, K, D, R, P );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_undistortPoints_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_undistortPoints_11
+ (JNIEnv* env, jclass , jlong distorted_nativeObj, jlong undistorted_nativeObj, jlong K_nativeObj, jlong D_nativeObj)
+{
+ static const char method_name[] = "calib3d::undistortPoints_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& distorted = *((Mat*)distorted_nativeObj);
+ Mat& undistorted = *((Mat*)undistorted_nativeObj);
+ Mat& K = *((Mat*)K_nativeObj);
+ Mat& D = *((Mat*)D_nativeObj);
+ cv::fisheye::undistortPoints( distorted, undistorted, K, D );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void initUndistortRectifyMap(Mat K, Mat D, Mat R, Mat P, Size size, int m1type, Mat& map1, Mat& map2)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_initUndistortRectifyMap_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jdouble, jdouble, jint, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_initUndistortRectifyMap_10
+ (JNIEnv* env, jclass , jlong K_nativeObj, jlong D_nativeObj, jlong R_nativeObj, jlong P_nativeObj, jdouble size_width, jdouble size_height, jint m1type, jlong map1_nativeObj, jlong map2_nativeObj)
+{
+ static const char method_name[] = "calib3d::initUndistortRectifyMap_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& K = *((Mat*)K_nativeObj);
+ Mat& D = *((Mat*)D_nativeObj);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& P = *((Mat*)P_nativeObj);
+ Size size((int)size_width, (int)size_height);
+ Mat& map1 = *((Mat*)map1_nativeObj);
+ Mat& map2 = *((Mat*)map2_nativeObj);
+ cv::fisheye::initUndistortRectifyMap( K, D, R, P, size, (int)m1type, map1, map2 );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void undistortImage(Mat distorted, Mat& undistorted, Mat K, Mat D, Mat Knew = cv::Mat(), Size new_size = Size())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_undistortImage_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_undistortImage_10
+ (JNIEnv* env, jclass , jlong distorted_nativeObj, jlong undistorted_nativeObj, jlong K_nativeObj, jlong D_nativeObj, jlong Knew_nativeObj, jdouble new_size_width, jdouble new_size_height)
+{
+ static const char method_name[] = "calib3d::undistortImage_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& distorted = *((Mat*)distorted_nativeObj);
+ Mat& undistorted = *((Mat*)undistorted_nativeObj);
+ Mat& K = *((Mat*)K_nativeObj);
+ Mat& D = *((Mat*)D_nativeObj);
+ Mat& Knew = *((Mat*)Knew_nativeObj);
+ Size new_size((int)new_size_width, (int)new_size_height);
+ cv::fisheye::undistortImage( distorted, undistorted, K, D, Knew, new_size );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_undistortImage_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_undistortImage_11
+ (JNIEnv* env, jclass , jlong distorted_nativeObj, jlong undistorted_nativeObj, jlong K_nativeObj, jlong D_nativeObj)
+{
+ static const char method_name[] = "calib3d::undistortImage_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& distorted = *((Mat*)distorted_nativeObj);
+ Mat& undistorted = *((Mat*)undistorted_nativeObj);
+ Mat& K = *((Mat*)K_nativeObj);
+ Mat& D = *((Mat*)D_nativeObj);
+ cv::fisheye::undistortImage( distorted, undistorted, K, D );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void estimateNewCameraMatrixForUndistortRectify(Mat K, Mat D, Size image_size, Mat R, Mat& P, double balance = 0.0, Size new_size = Size(), double fov_scale = 1.0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_estimateNewCameraMatrixForUndistortRectify_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jlong, jlong, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_estimateNewCameraMatrixForUndistortRectify_10
+ (JNIEnv* env, jclass , jlong K_nativeObj, jlong D_nativeObj, jdouble image_size_width, jdouble image_size_height, jlong R_nativeObj, jlong P_nativeObj, jdouble balance, jdouble new_size_width, jdouble new_size_height, jdouble fov_scale)
+{
+ static const char method_name[] = "calib3d::estimateNewCameraMatrixForUndistortRectify_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& K = *((Mat*)K_nativeObj);
+ Mat& D = *((Mat*)D_nativeObj);
+ Size image_size((int)image_size_width, (int)image_size_height);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& P = *((Mat*)P_nativeObj);
+ Size new_size((int)new_size_width, (int)new_size_height);
+ cv::fisheye::estimateNewCameraMatrixForUndistortRectify( K, D, image_size, R, P, (double)balance, new_size, (double)fov_scale );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_estimateNewCameraMatrixForUndistortRectify_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_estimateNewCameraMatrixForUndistortRectify_11
+ (JNIEnv* env, jclass , jlong K_nativeObj, jlong D_nativeObj, jdouble image_size_width, jdouble image_size_height, jlong R_nativeObj, jlong P_nativeObj)
+{
+ static const char method_name[] = "calib3d::estimateNewCameraMatrixForUndistortRectify_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& K = *((Mat*)K_nativeObj);
+ Mat& D = *((Mat*)D_nativeObj);
+ Size image_size((int)image_size_width, (int)image_size_height);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& P = *((Mat*)P_nativeObj);
+ cv::fisheye::estimateNewCameraMatrixForUndistortRectify( K, D, image_size, R, P );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double calibrate(vector_Mat objectPoints, vector_Mat imagePoints, Size image_size, Mat& K, Mat& D, vector_Mat& rvecs, vector_Mat& tvecs, int flags = 0, TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 100, DBL_EPSILON))
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_calibrate_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jlong, jlong, jlong, jlong, jint, jint, jint, jdouble);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_calibrate_10
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints_mat_nativeObj, jdouble image_size_width, jdouble image_size_height, jlong K_nativeObj, jlong D_nativeObj, jlong rvecs_mat_nativeObj, jlong tvecs_mat_nativeObj, jint flags, jint criteria_type, jint criteria_maxCount, jdouble criteria_epsilon)
+{
+ static const char method_name[] = "calib3d::calibrate_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Mat( objectPoints_mat, objectPoints );
+ std::vector<Mat> imagePoints;
+ Mat& imagePoints_mat = *((Mat*)imagePoints_mat_nativeObj);
+ Mat_to_vector_Mat( imagePoints_mat, imagePoints );
+ std::vector<Mat> rvecs;
+ Mat& rvecs_mat = *((Mat*)rvecs_mat_nativeObj);
+ std::vector<Mat> tvecs;
+ Mat& tvecs_mat = *((Mat*)tvecs_mat_nativeObj);
+ Size image_size((int)image_size_width, (int)image_size_height);
+ Mat& K = *((Mat*)K_nativeObj);
+ Mat& D = *((Mat*)D_nativeObj);
+ TermCriteria criteria(criteria_type, criteria_maxCount, criteria_epsilon);
+ double _retval_ = cv::fisheye::calibrate( objectPoints, imagePoints, image_size, K, D, rvecs, tvecs, (int)flags, criteria );
+ vector_Mat_to_Mat( rvecs, rvecs_mat ); vector_Mat_to_Mat( tvecs, tvecs_mat );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_calibrate_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jlong, jlong, jlong, jlong, jint);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_calibrate_11
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints_mat_nativeObj, jdouble image_size_width, jdouble image_size_height, jlong K_nativeObj, jlong D_nativeObj, jlong rvecs_mat_nativeObj, jlong tvecs_mat_nativeObj, jint flags)
+{
+ static const char method_name[] = "calib3d::calibrate_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Mat( objectPoints_mat, objectPoints );
+ std::vector<Mat> imagePoints;
+ Mat& imagePoints_mat = *((Mat*)imagePoints_mat_nativeObj);
+ Mat_to_vector_Mat( imagePoints_mat, imagePoints );
+ std::vector<Mat> rvecs;
+ Mat& rvecs_mat = *((Mat*)rvecs_mat_nativeObj);
+ std::vector<Mat> tvecs;
+ Mat& tvecs_mat = *((Mat*)tvecs_mat_nativeObj);
+ Size image_size((int)image_size_width, (int)image_size_height);
+ Mat& K = *((Mat*)K_nativeObj);
+ Mat& D = *((Mat*)D_nativeObj);
+ double _retval_ = cv::fisheye::calibrate( objectPoints, imagePoints, image_size, K, D, rvecs, tvecs, (int)flags );
+ vector_Mat_to_Mat( rvecs, rvecs_mat ); vector_Mat_to_Mat( tvecs, tvecs_mat );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_calibrate_12 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jlong, jlong, jlong, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_calibrate_12
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints_mat_nativeObj, jdouble image_size_width, jdouble image_size_height, jlong K_nativeObj, jlong D_nativeObj, jlong rvecs_mat_nativeObj, jlong tvecs_mat_nativeObj)
+{
+ static const char method_name[] = "calib3d::calibrate_12()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Mat( objectPoints_mat, objectPoints );
+ std::vector<Mat> imagePoints;
+ Mat& imagePoints_mat = *((Mat*)imagePoints_mat_nativeObj);
+ Mat_to_vector_Mat( imagePoints_mat, imagePoints );
+ std::vector<Mat> rvecs;
+ Mat& rvecs_mat = *((Mat*)rvecs_mat_nativeObj);
+ std::vector<Mat> tvecs;
+ Mat& tvecs_mat = *((Mat*)tvecs_mat_nativeObj);
+ Size image_size((int)image_size_width, (int)image_size_height);
+ Mat& K = *((Mat*)K_nativeObj);
+ Mat& D = *((Mat*)D_nativeObj);
+ double _retval_ = cv::fisheye::calibrate( objectPoints, imagePoints, image_size, K, D, rvecs, tvecs );
+ vector_Mat_to_Mat( rvecs, rvecs_mat ); vector_Mat_to_Mat( tvecs, tvecs_mat );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void stereoRectify(Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat tvec, Mat& R1, Mat& R2, Mat& P1, Mat& P2, Mat& Q, int flags, Size newImageSize = Size(), double balance = 0.0, double fov_scale = 1.0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_stereoRectify_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jdouble, jdouble, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jint, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_stereoRectify_10
+ (JNIEnv* env, jclass , jlong K1_nativeObj, jlong D1_nativeObj, jlong K2_nativeObj, jlong D2_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jlong R_nativeObj, jlong tvec_nativeObj, jlong R1_nativeObj, jlong R2_nativeObj, jlong P1_nativeObj, jlong P2_nativeObj, jlong Q_nativeObj, jint flags, jdouble newImageSize_width, jdouble newImageSize_height, jdouble balance, jdouble fov_scale)
+{
+ static const char method_name[] = "calib3d::stereoRectify_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& K1 = *((Mat*)K1_nativeObj);
+ Mat& D1 = *((Mat*)D1_nativeObj);
+ Mat& K2 = *((Mat*)K2_nativeObj);
+ Mat& D2 = *((Mat*)D2_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& tvec = *((Mat*)tvec_nativeObj);
+ Mat& R1 = *((Mat*)R1_nativeObj);
+ Mat& R2 = *((Mat*)R2_nativeObj);
+ Mat& P1 = *((Mat*)P1_nativeObj);
+ Mat& P2 = *((Mat*)P2_nativeObj);
+ Mat& Q = *((Mat*)Q_nativeObj);
+ Size newImageSize((int)newImageSize_width, (int)newImageSize_height);
+ cv::fisheye::stereoRectify( K1, D1, K2, D2, imageSize, R, tvec, R1, R2, P1, P2, Q, (int)flags, newImageSize, (double)balance, (double)fov_scale );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_stereoRectify_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jdouble, jdouble, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_stereoRectify_11
+ (JNIEnv* env, jclass , jlong K1_nativeObj, jlong D1_nativeObj, jlong K2_nativeObj, jlong D2_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jlong R_nativeObj, jlong tvec_nativeObj, jlong R1_nativeObj, jlong R2_nativeObj, jlong P1_nativeObj, jlong P2_nativeObj, jlong Q_nativeObj, jint flags)
+{
+ static const char method_name[] = "calib3d::stereoRectify_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& K1 = *((Mat*)K1_nativeObj);
+ Mat& D1 = *((Mat*)D1_nativeObj);
+ Mat& K2 = *((Mat*)K2_nativeObj);
+ Mat& D2 = *((Mat*)D2_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& tvec = *((Mat*)tvec_nativeObj);
+ Mat& R1 = *((Mat*)R1_nativeObj);
+ Mat& R2 = *((Mat*)R2_nativeObj);
+ Mat& P1 = *((Mat*)P1_nativeObj);
+ Mat& P2 = *((Mat*)P2_nativeObj);
+ Mat& Q = *((Mat*)Q_nativeObj);
+ cv::fisheye::stereoRectify( K1, D1, K2, D2, imageSize, R, tvec, R1, R2, P1, P2, Q, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double stereoCalibrate(vector_Mat objectPoints, vector_Mat imagePoints1, vector_Mat imagePoints2, Mat& K1, Mat& D1, Mat& K2, Mat& D2, Size imageSize, Mat& R, Mat& T, int flags = fisheye::CALIB_FIX_INTRINSIC, TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 100, DBL_EPSILON))
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_stereoCalibrate_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jdouble, jdouble, jlong, jlong, jint, jint, jint, jdouble);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_stereoCalibrate_10
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints1_mat_nativeObj, jlong imagePoints2_mat_nativeObj, jlong K1_nativeObj, jlong D1_nativeObj, jlong K2_nativeObj, jlong D2_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jlong R_nativeObj, jlong T_nativeObj, jint flags, jint criteria_type, jint criteria_maxCount, jdouble criteria_epsilon)
+{
+ static const char method_name[] = "calib3d::stereoCalibrate_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Mat( objectPoints_mat, objectPoints );
+ std::vector<Mat> imagePoints1;
+ Mat& imagePoints1_mat = *((Mat*)imagePoints1_mat_nativeObj);
+ Mat_to_vector_Mat( imagePoints1_mat, imagePoints1 );
+ std::vector<Mat> imagePoints2;
+ Mat& imagePoints2_mat = *((Mat*)imagePoints2_mat_nativeObj);
+ Mat_to_vector_Mat( imagePoints2_mat, imagePoints2 );
+ Mat& K1 = *((Mat*)K1_nativeObj);
+ Mat& D1 = *((Mat*)D1_nativeObj);
+ Mat& K2 = *((Mat*)K2_nativeObj);
+ Mat& D2 = *((Mat*)D2_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& T = *((Mat*)T_nativeObj);
+ TermCriteria criteria(criteria_type, criteria_maxCount, criteria_epsilon);
+ double _retval_ = cv::fisheye::stereoCalibrate( objectPoints, imagePoints1, imagePoints2, K1, D1, K2, D2, imageSize, R, T, (int)flags, criteria );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_stereoCalibrate_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jdouble, jdouble, jlong, jlong, jint);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_stereoCalibrate_11
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints1_mat_nativeObj, jlong imagePoints2_mat_nativeObj, jlong K1_nativeObj, jlong D1_nativeObj, jlong K2_nativeObj, jlong D2_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jlong R_nativeObj, jlong T_nativeObj, jint flags)
+{
+ static const char method_name[] = "calib3d::stereoCalibrate_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Mat( objectPoints_mat, objectPoints );
+ std::vector<Mat> imagePoints1;
+ Mat& imagePoints1_mat = *((Mat*)imagePoints1_mat_nativeObj);
+ Mat_to_vector_Mat( imagePoints1_mat, imagePoints1 );
+ std::vector<Mat> imagePoints2;
+ Mat& imagePoints2_mat = *((Mat*)imagePoints2_mat_nativeObj);
+ Mat_to_vector_Mat( imagePoints2_mat, imagePoints2 );
+ Mat& K1 = *((Mat*)K1_nativeObj);
+ Mat& D1 = *((Mat*)D1_nativeObj);
+ Mat& K2 = *((Mat*)K2_nativeObj);
+ Mat& D2 = *((Mat*)D2_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& T = *((Mat*)T_nativeObj);
+ double _retval_ = cv::fisheye::stereoCalibrate( objectPoints, imagePoints1, imagePoints2, K1, D1, K2, D2, imageSize, R, T, (int)flags );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_stereoCalibrate_12 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jdouble, jdouble, jlong, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_stereoCalibrate_12
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints1_mat_nativeObj, jlong imagePoints2_mat_nativeObj, jlong K1_nativeObj, jlong D1_nativeObj, jlong K2_nativeObj, jlong D2_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jlong R_nativeObj, jlong T_nativeObj)
+{
+ static const char method_name[] = "calib3d::stereoCalibrate_12()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Mat( objectPoints_mat, objectPoints );
+ std::vector<Mat> imagePoints1;
+ Mat& imagePoints1_mat = *((Mat*)imagePoints1_mat_nativeObj);
+ Mat_to_vector_Mat( imagePoints1_mat, imagePoints1 );
+ std::vector<Mat> imagePoints2;
+ Mat& imagePoints2_mat = *((Mat*)imagePoints2_mat_nativeObj);
+ Mat_to_vector_Mat( imagePoints2_mat, imagePoints2 );
+ Mat& K1 = *((Mat*)K1_nativeObj);
+ Mat& D1 = *((Mat*)D1_nativeObj);
+ Mat& K2 = *((Mat*)K2_nativeObj);
+ Mat& D2 = *((Mat*)D2_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& T = *((Mat*)T_nativeObj);
+ double _retval_ = cv::fisheye::stereoCalibrate( objectPoints, imagePoints1, imagePoints2, K1, D1, K2, D2, imageSize, R, T );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void decomposeProjectionMatrix(Mat projMatrix, Mat& cameraMatrix, Mat& rotMatrix, Mat& transVect, Mat& rotMatrixX = Mat(), Mat& rotMatrixY = Mat(), Mat& rotMatrixZ = Mat(), Mat& eulerAngles = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_decomposeProjectionMatrix_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_decomposeProjectionMatrix_10
+ (JNIEnv* env, jclass , jlong projMatrix_nativeObj, jlong cameraMatrix_nativeObj, jlong rotMatrix_nativeObj, jlong transVect_nativeObj, jlong rotMatrixX_nativeObj, jlong rotMatrixY_nativeObj, jlong rotMatrixZ_nativeObj, jlong eulerAngles_nativeObj)
+{
+ static const char method_name[] = "calib3d::decomposeProjectionMatrix_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& projMatrix = *((Mat*)projMatrix_nativeObj);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& rotMatrix = *((Mat*)rotMatrix_nativeObj);
+ Mat& transVect = *((Mat*)transVect_nativeObj);
+ Mat& rotMatrixX = *((Mat*)rotMatrixX_nativeObj);
+ Mat& rotMatrixY = *((Mat*)rotMatrixY_nativeObj);
+ Mat& rotMatrixZ = *((Mat*)rotMatrixZ_nativeObj);
+ Mat& eulerAngles = *((Mat*)eulerAngles_nativeObj);
+ cv::decomposeProjectionMatrix( projMatrix, cameraMatrix, rotMatrix, transVect, rotMatrixX, rotMatrixY, rotMatrixZ, eulerAngles );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_decomposeProjectionMatrix_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_decomposeProjectionMatrix_11
+ (JNIEnv* env, jclass , jlong projMatrix_nativeObj, jlong cameraMatrix_nativeObj, jlong rotMatrix_nativeObj, jlong transVect_nativeObj)
+{
+ static const char method_name[] = "calib3d::decomposeProjectionMatrix_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& projMatrix = *((Mat*)projMatrix_nativeObj);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& rotMatrix = *((Mat*)rotMatrix_nativeObj);
+ Mat& transVect = *((Mat*)transVect_nativeObj);
+ cv::decomposeProjectionMatrix( projMatrix, cameraMatrix, rotMatrix, transVect );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void matMulDeriv(Mat A, Mat B, Mat& dABdA, Mat& dABdB)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_matMulDeriv_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_matMulDeriv_10
+ (JNIEnv* env, jclass , jlong A_nativeObj, jlong B_nativeObj, jlong dABdA_nativeObj, jlong dABdB_nativeObj)
+{
+ static const char method_name[] = "calib3d::matMulDeriv_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& A = *((Mat*)A_nativeObj);
+ Mat& B = *((Mat*)B_nativeObj);
+ Mat& dABdA = *((Mat*)dABdA_nativeObj);
+ Mat& dABdB = *((Mat*)dABdB_nativeObj);
+ cv::matMulDeriv( A, B, dABdA, dABdB );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat& rvec3, Mat& tvec3, Mat& dr3dr1 = Mat(), Mat& dr3dt1 = Mat(), Mat& dr3dr2 = Mat(), Mat& dr3dt2 = Mat(), Mat& dt3dr1 = Mat(), Mat& dt3dt1 = Mat(), Mat& dt3dr2 = Mat(), Mat& dt3dt2 = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_composeRT_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_composeRT_10
+ (JNIEnv* env, jclass , jlong rvec1_nativeObj, jlong tvec1_nativeObj, jlong rvec2_nativeObj, jlong tvec2_nativeObj, jlong rvec3_nativeObj, jlong tvec3_nativeObj, jlong dr3dr1_nativeObj, jlong dr3dt1_nativeObj, jlong dr3dr2_nativeObj, jlong dr3dt2_nativeObj, jlong dt3dr1_nativeObj, jlong dt3dt1_nativeObj, jlong dt3dr2_nativeObj, jlong dt3dt2_nativeObj)
+{
+ static const char method_name[] = "calib3d::composeRT_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& rvec1 = *((Mat*)rvec1_nativeObj);
+ Mat& tvec1 = *((Mat*)tvec1_nativeObj);
+ Mat& rvec2 = *((Mat*)rvec2_nativeObj);
+ Mat& tvec2 = *((Mat*)tvec2_nativeObj);
+ Mat& rvec3 = *((Mat*)rvec3_nativeObj);
+ Mat& tvec3 = *((Mat*)tvec3_nativeObj);
+ Mat& dr3dr1 = *((Mat*)dr3dr1_nativeObj);
+ Mat& dr3dt1 = *((Mat*)dr3dt1_nativeObj);
+ Mat& dr3dr2 = *((Mat*)dr3dr2_nativeObj);
+ Mat& dr3dt2 = *((Mat*)dr3dt2_nativeObj);
+ Mat& dt3dr1 = *((Mat*)dt3dr1_nativeObj);
+ Mat& dt3dt1 = *((Mat*)dt3dt1_nativeObj);
+ Mat& dt3dr2 = *((Mat*)dt3dr2_nativeObj);
+ Mat& dt3dt2 = *((Mat*)dt3dt2_nativeObj);
+ cv::composeRT( rvec1, tvec1, rvec2, tvec2, rvec3, tvec3, dr3dr1, dr3dt1, dr3dr2, dr3dt2, dt3dr1, dt3dt1, dt3dr2, dt3dt2 );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_composeRT_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_composeRT_11
+ (JNIEnv* env, jclass , jlong rvec1_nativeObj, jlong tvec1_nativeObj, jlong rvec2_nativeObj, jlong tvec2_nativeObj, jlong rvec3_nativeObj, jlong tvec3_nativeObj)
+{
+ static const char method_name[] = "calib3d::composeRT_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& rvec1 = *((Mat*)rvec1_nativeObj);
+ Mat& tvec1 = *((Mat*)tvec1_nativeObj);
+ Mat& rvec2 = *((Mat*)rvec2_nativeObj);
+ Mat& tvec2 = *((Mat*)tvec2_nativeObj);
+ Mat& rvec3 = *((Mat*)rvec3_nativeObj);
+ Mat& tvec3 = *((Mat*)tvec3_nativeObj);
+ cv::composeRT( rvec1, tvec1, rvec2, tvec2, rvec3, tvec3 );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void projectPoints(vector_Point3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, vector_double distCoeffs, vector_Point2f& imagePoints, Mat& jacobian = Mat(), double aspectRatio = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_projectPoints_12 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_projectPoints_12
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong rvec_nativeObj, jlong tvec_nativeObj, jlong cameraMatrix_nativeObj, jlong distCoeffs_mat_nativeObj, jlong imagePoints_mat_nativeObj, jlong jacobian_nativeObj, jdouble aspectRatio)
+{
+ static const char method_name[] = "calib3d::projectPoints_12()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point3f> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Point3f( objectPoints_mat, objectPoints );
+ std::vector<double> distCoeffs;
+ Mat& distCoeffs_mat = *((Mat*)distCoeffs_mat_nativeObj);
+ Mat_to_vector_double( distCoeffs_mat, distCoeffs );
+ std::vector<Point2f> imagePoints;
+ Mat& imagePoints_mat = *((Mat*)imagePoints_mat_nativeObj);
+ Mat& rvec = *((Mat*)rvec_nativeObj);
+ Mat& tvec = *((Mat*)tvec_nativeObj);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& jacobian = *((Mat*)jacobian_nativeObj);
+ cv::projectPoints( objectPoints, rvec, tvec, cameraMatrix, distCoeffs, imagePoints, jacobian, (double)aspectRatio );
+ vector_Point2f_to_Mat( imagePoints, imagePoints_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_projectPoints_13 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_projectPoints_13
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong rvec_nativeObj, jlong tvec_nativeObj, jlong cameraMatrix_nativeObj, jlong distCoeffs_mat_nativeObj, jlong imagePoints_mat_nativeObj)
+{
+ static const char method_name[] = "calib3d::projectPoints_13()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point3f> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Point3f( objectPoints_mat, objectPoints );
+ std::vector<double> distCoeffs;
+ Mat& distCoeffs_mat = *((Mat*)distCoeffs_mat_nativeObj);
+ Mat_to_vector_double( distCoeffs_mat, distCoeffs );
+ std::vector<Point2f> imagePoints;
+ Mat& imagePoints_mat = *((Mat*)imagePoints_mat_nativeObj);
+ Mat& rvec = *((Mat*)rvec_nativeObj);
+ Mat& tvec = *((Mat*)tvec_nativeObj);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ cv::projectPoints( objectPoints, rvec, tvec, cameraMatrix, distCoeffs, imagePoints );
+ vector_Point2f_to_Mat( imagePoints, imagePoints_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool solvePnP(vector_Point3f objectPoints, vector_Point2f imagePoints, Mat cameraMatrix, vector_double distCoeffs, Mat& rvec, Mat& tvec, bool useExtrinsicGuess = false, int flags = SOLVEPNP_ITERATIVE)
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_solvePnP_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jboolean, jint);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_solvePnP_10
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints_mat_nativeObj, jlong cameraMatrix_nativeObj, jlong distCoeffs_mat_nativeObj, jlong rvec_nativeObj, jlong tvec_nativeObj, jboolean useExtrinsicGuess, jint flags)
+{
+ static const char method_name[] = "calib3d::solvePnP_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point3f> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Point3f( objectPoints_mat, objectPoints );
+ std::vector<Point2f> imagePoints;
+ Mat& imagePoints_mat = *((Mat*)imagePoints_mat_nativeObj);
+ Mat_to_vector_Point2f( imagePoints_mat, imagePoints );
+ std::vector<double> distCoeffs;
+ Mat& distCoeffs_mat = *((Mat*)distCoeffs_mat_nativeObj);
+ Mat_to_vector_double( distCoeffs_mat, distCoeffs );
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& rvec = *((Mat*)rvec_nativeObj);
+ Mat& tvec = *((Mat*)tvec_nativeObj);
+ bool _retval_ = cv::solvePnP( objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, (bool)useExtrinsicGuess, (int)flags );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_solvePnP_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_solvePnP_11
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints_mat_nativeObj, jlong cameraMatrix_nativeObj, jlong distCoeffs_mat_nativeObj, jlong rvec_nativeObj, jlong tvec_nativeObj)
+{
+ static const char method_name[] = "calib3d::solvePnP_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point3f> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Point3f( objectPoints_mat, objectPoints );
+ std::vector<Point2f> imagePoints;
+ Mat& imagePoints_mat = *((Mat*)imagePoints_mat_nativeObj);
+ Mat_to_vector_Point2f( imagePoints_mat, imagePoints );
+ std::vector<double> distCoeffs;
+ Mat& distCoeffs_mat = *((Mat*)distCoeffs_mat_nativeObj);
+ Mat_to_vector_double( distCoeffs_mat, distCoeffs );
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& rvec = *((Mat*)rvec_nativeObj);
+ Mat& tvec = *((Mat*)tvec_nativeObj);
+ bool _retval_ = cv::solvePnP( objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool solvePnPRansac(vector_Point3f objectPoints, vector_Point2f imagePoints, Mat cameraMatrix, vector_double distCoeffs, Mat& rvec, Mat& tvec, bool useExtrinsicGuess = false, int iterationsCount = 100, float reprojectionError = 8.0, double confidence = 0.99, Mat& inliers = Mat(), int flags = SOLVEPNP_ITERATIVE)
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_solvePnPRansac_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jboolean, jint, jfloat, jdouble, jlong, jint);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_solvePnPRansac_10
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints_mat_nativeObj, jlong cameraMatrix_nativeObj, jlong distCoeffs_mat_nativeObj, jlong rvec_nativeObj, jlong tvec_nativeObj, jboolean useExtrinsicGuess, jint iterationsCount, jfloat reprojectionError, jdouble confidence, jlong inliers_nativeObj, jint flags)
+{
+ static const char method_name[] = "calib3d::solvePnPRansac_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point3f> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Point3f( objectPoints_mat, objectPoints );
+ std::vector<Point2f> imagePoints;
+ Mat& imagePoints_mat = *((Mat*)imagePoints_mat_nativeObj);
+ Mat_to_vector_Point2f( imagePoints_mat, imagePoints );
+ std::vector<double> distCoeffs;
+ Mat& distCoeffs_mat = *((Mat*)distCoeffs_mat_nativeObj);
+ Mat_to_vector_double( distCoeffs_mat, distCoeffs );
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& rvec = *((Mat*)rvec_nativeObj);
+ Mat& tvec = *((Mat*)tvec_nativeObj);
+ Mat& inliers = *((Mat*)inliers_nativeObj);
+ bool _retval_ = cv::solvePnPRansac( objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, (bool)useExtrinsicGuess, (int)iterationsCount, (float)reprojectionError, (double)confidence, inliers, (int)flags );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_solvePnPRansac_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_solvePnPRansac_11
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints_mat_nativeObj, jlong cameraMatrix_nativeObj, jlong distCoeffs_mat_nativeObj, jlong rvec_nativeObj, jlong tvec_nativeObj)
+{
+ static const char method_name[] = "calib3d::solvePnPRansac_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point3f> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Point3f( objectPoints_mat, objectPoints );
+ std::vector<Point2f> imagePoints;
+ Mat& imagePoints_mat = *((Mat*)imagePoints_mat_nativeObj);
+ Mat_to_vector_Point2f( imagePoints_mat, imagePoints );
+ std::vector<double> distCoeffs;
+ Mat& distCoeffs_mat = *((Mat*)distCoeffs_mat_nativeObj);
+ Mat_to_vector_double( distCoeffs_mat, distCoeffs );
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& rvec = *((Mat*)rvec_nativeObj);
+ Mat& tvec = *((Mat*)tvec_nativeObj);
+ bool _retval_ = cv::solvePnPRansac( objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat initCameraMatrix2D(vector_vector_Point3f objectPoints, vector_vector_Point2f imagePoints, Size imageSize, double aspectRatio = 1.0)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_initCameraMatrix2D_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_initCameraMatrix2D_10
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints_mat_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jdouble aspectRatio)
+{
+ static const char method_name[] = "calib3d::initCameraMatrix2D_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<Point3f> > objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_vector_Point3f( objectPoints_mat, objectPoints );
+ std::vector< std::vector<Point2f> > imagePoints;
+ Mat& imagePoints_mat = *((Mat*)imagePoints_mat_nativeObj);
+ Mat_to_vector_vector_Point2f( imagePoints_mat, imagePoints );
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ ::Mat _retval_ = cv::initCameraMatrix2D( objectPoints, imagePoints, imageSize, (double)aspectRatio );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_initCameraMatrix2D_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_initCameraMatrix2D_11
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints_mat_nativeObj, jdouble imageSize_width, jdouble imageSize_height)
+{
+ static const char method_name[] = "calib3d::initCameraMatrix2D_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<Point3f> > objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_vector_Point3f( objectPoints_mat, objectPoints );
+ std::vector< std::vector<Point2f> > imagePoints;
+ Mat& imagePoints_mat = *((Mat*)imagePoints_mat_nativeObj);
+ Mat_to_vector_vector_Point2f( imagePoints_mat, imagePoints );
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ ::Mat _retval_ = cv::initCameraMatrix2D( objectPoints, imagePoints, imageSize );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool findChessboardCorners(Mat image, Size patternSize, vector_Point2f& corners, int flags = CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE)
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_findChessboardCorners_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jlong, jint);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_findChessboardCorners_10
+ (JNIEnv* env, jclass , jlong image_nativeObj, jdouble patternSize_width, jdouble patternSize_height, jlong corners_mat_nativeObj, jint flags)
+{
+ static const char method_name[] = "calib3d::findChessboardCorners_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> corners;
+ Mat& corners_mat = *((Mat*)corners_mat_nativeObj);
+ Mat& image = *((Mat*)image_nativeObj);
+ Size patternSize((int)patternSize_width, (int)patternSize_height);
+ bool _retval_ = cv::findChessboardCorners( image, patternSize, corners, (int)flags );
+ vector_Point2f_to_Mat( corners, corners_mat );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_findChessboardCorners_11 (JNIEnv*, jclass, jlong, jdouble, jdouble, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_findChessboardCorners_11
+ (JNIEnv* env, jclass , jlong image_nativeObj, jdouble patternSize_width, jdouble patternSize_height, jlong corners_mat_nativeObj)
+{
+ static const char method_name[] = "calib3d::findChessboardCorners_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> corners;
+ Mat& corners_mat = *((Mat*)corners_mat_nativeObj);
+ Mat& image = *((Mat*)image_nativeObj);
+ Size patternSize((int)patternSize_width, (int)patternSize_height);
+ bool _retval_ = cv::findChessboardCorners( image, patternSize, corners );
+ vector_Point2f_to_Mat( corners, corners_mat );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void drawChessboardCorners(Mat& image, Size patternSize, vector_Point2f corners, bool patternWasFound)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_drawChessboardCorners_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_drawChessboardCorners_10
+ (JNIEnv* env, jclass , jlong image_nativeObj, jdouble patternSize_width, jdouble patternSize_height, jlong corners_mat_nativeObj, jboolean patternWasFound)
+{
+ static const char method_name[] = "calib3d::drawChessboardCorners_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> corners;
+ Mat& corners_mat = *((Mat*)corners_mat_nativeObj);
+ Mat_to_vector_Point2f( corners_mat, corners );
+ Mat& image = *((Mat*)image_nativeObj);
+ Size patternSize((int)patternSize_width, (int)patternSize_height);
+ cv::drawChessboardCorners( image, patternSize, corners, (bool)patternWasFound );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool findCirclesGrid(Mat image, Size patternSize, Mat& centers, int flags = CALIB_CB_SYMMETRIC_GRID, Ptr_FeatureDetector blobDetector = SimpleBlobDetector::create())
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_findCirclesGrid_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jlong, jint);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_findCirclesGrid_10
+ (JNIEnv* env, jclass , jlong image_nativeObj, jdouble patternSize_width, jdouble patternSize_height, jlong centers_nativeObj, jint flags)
+{
+ static const char method_name[] = "calib3d::findCirclesGrid_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Size patternSize((int)patternSize_width, (int)patternSize_height);
+ Mat& centers = *((Mat*)centers_nativeObj);
+ bool _retval_ = cv::findCirclesGrid( image, patternSize, centers, (int)flags, SimpleBlobDetector::create() );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_findCirclesGrid_11 (JNIEnv*, jclass, jlong, jdouble, jdouble, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_findCirclesGrid_11
+ (JNIEnv* env, jclass , jlong image_nativeObj, jdouble patternSize_width, jdouble patternSize_height, jlong centers_nativeObj)
+{
+ static const char method_name[] = "calib3d::findCirclesGrid_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Size patternSize((int)patternSize_width, (int)patternSize_height);
+ Mat& centers = *((Mat*)centers_nativeObj);
+ bool _retval_ = cv::findCirclesGrid( image, patternSize, centers );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// double calibrateCamera(vector_Mat objectPoints, vector_Mat imagePoints, Size imageSize, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_calibrateCamera_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jlong, jlong, jlong, jlong, jint, jint, jint, jdouble);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_calibrateCamera_10
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints_mat_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jlong cameraMatrix_nativeObj, jlong distCoeffs_nativeObj, jlong rvecs_mat_nativeObj, jlong tvecs_mat_nativeObj, jint flags, jint criteria_type, jint criteria_maxCount, jdouble criteria_epsilon)
+{
+ static const char method_name[] = "calib3d::calibrateCamera_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Mat( objectPoints_mat, objectPoints );
+ std::vector<Mat> imagePoints;
+ Mat& imagePoints_mat = *((Mat*)imagePoints_mat_nativeObj);
+ Mat_to_vector_Mat( imagePoints_mat, imagePoints );
+ std::vector<Mat> rvecs;
+ Mat& rvecs_mat = *((Mat*)rvecs_mat_nativeObj);
+ std::vector<Mat> tvecs;
+ Mat& tvecs_mat = *((Mat*)tvecs_mat_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& distCoeffs = *((Mat*)distCoeffs_nativeObj);
+ TermCriteria criteria(criteria_type, criteria_maxCount, criteria_epsilon);
+ double _retval_ = cv::calibrateCamera( objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, (int)flags, criteria );
+ vector_Mat_to_Mat( rvecs, rvecs_mat ); vector_Mat_to_Mat( tvecs, tvecs_mat );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_calibrateCamera_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jlong, jlong, jlong, jlong, jint);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_calibrateCamera_11
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints_mat_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jlong cameraMatrix_nativeObj, jlong distCoeffs_nativeObj, jlong rvecs_mat_nativeObj, jlong tvecs_mat_nativeObj, jint flags)
+{
+ static const char method_name[] = "calib3d::calibrateCamera_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Mat( objectPoints_mat, objectPoints );
+ std::vector<Mat> imagePoints;
+ Mat& imagePoints_mat = *((Mat*)imagePoints_mat_nativeObj);
+ Mat_to_vector_Mat( imagePoints_mat, imagePoints );
+ std::vector<Mat> rvecs;
+ Mat& rvecs_mat = *((Mat*)rvecs_mat_nativeObj);
+ std::vector<Mat> tvecs;
+ Mat& tvecs_mat = *((Mat*)tvecs_mat_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& distCoeffs = *((Mat*)distCoeffs_nativeObj);
+ double _retval_ = cv::calibrateCamera( objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, (int)flags );
+ vector_Mat_to_Mat( rvecs, rvecs_mat ); vector_Mat_to_Mat( tvecs, tvecs_mat );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_calibrateCamera_12 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jlong, jlong, jlong, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_calibrateCamera_12
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints_mat_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jlong cameraMatrix_nativeObj, jlong distCoeffs_nativeObj, jlong rvecs_mat_nativeObj, jlong tvecs_mat_nativeObj)
+{
+ static const char method_name[] = "calib3d::calibrateCamera_12()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Mat( objectPoints_mat, objectPoints );
+ std::vector<Mat> imagePoints;
+ Mat& imagePoints_mat = *((Mat*)imagePoints_mat_nativeObj);
+ Mat_to_vector_Mat( imagePoints_mat, imagePoints );
+ std::vector<Mat> rvecs;
+ Mat& rvecs_mat = *((Mat*)rvecs_mat_nativeObj);
+ std::vector<Mat> tvecs;
+ Mat& tvecs_mat = *((Mat*)tvecs_mat_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& distCoeffs = *((Mat*)distCoeffs_nativeObj);
+ double _retval_ = cv::calibrateCamera( objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs );
+ vector_Mat_to_Mat( rvecs, rvecs_mat ); vector_Mat_to_Mat( tvecs, tvecs_mat );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void calibrationMatrixValues(Mat cameraMatrix, Size imageSize, double apertureWidth, double apertureHeight, double& fovx, double& fovy, double& focalLength, Point2d& principalPoint, double& aspectRatio)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_calibrationMatrixValues_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jdoubleArray, jdoubleArray, jdoubleArray, jdoubleArray, jdoubleArray);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_calibrationMatrixValues_10
+ (JNIEnv* env, jclass , jlong cameraMatrix_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jdouble apertureWidth, jdouble apertureHeight, jdoubleArray fovx_out, jdoubleArray fovy_out, jdoubleArray focalLength_out, jdoubleArray principalPoint_out, jdoubleArray aspectRatio_out)
+{
+ static const char method_name[] = "calib3d::calibrationMatrixValues_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ double fovx;
+ double fovy;
+ double focalLength;
+ Point2d principalPoint;
+ double aspectRatio;
+ cv::calibrationMatrixValues( cameraMatrix, imageSize, (double)apertureWidth, (double)apertureHeight, fovx, fovy, focalLength, principalPoint, aspectRatio );
+ jdouble tmp_fovx[1] = {fovx}; env->SetDoubleArrayRegion(fovx_out, 0, 1, tmp_fovx); jdouble tmp_fovy[1] = {fovy}; env->SetDoubleArrayRegion(fovy_out, 0, 1, tmp_fovy); jdouble tmp_focalLength[1] = {focalLength}; env->SetDoubleArrayRegion(focalLength_out, 0, 1, tmp_focalLength); jdouble tmp_principalPoint[2] = {principalPoint.x, principalPoint.y}; env->SetDoubleArrayRegion(principalPoint_out, 0, 2, tmp_principalPoint); jdouble tmp_aspectRatio[1] = {aspectRatio}; env->SetDoubleArrayRegion(aspectRatio_out, 0, 1, tmp_aspectRatio);
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double stereoCalibrate(vector_Mat objectPoints, vector_Mat imagePoints1, vector_Mat imagePoints2, Mat& cameraMatrix1, Mat& distCoeffs1, Mat& cameraMatrix2, Mat& distCoeffs2, Size imageSize, Mat& R, Mat& T, Mat& E, Mat& F, int flags = CALIB_FIX_INTRINSIC, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 1e-6))
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_stereoCalibrate_13 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jdouble, jdouble, jlong, jlong, jlong, jlong, jint, jint, jint, jdouble);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_stereoCalibrate_13
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints1_mat_nativeObj, jlong imagePoints2_mat_nativeObj, jlong cameraMatrix1_nativeObj, jlong distCoeffs1_nativeObj, jlong cameraMatrix2_nativeObj, jlong distCoeffs2_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jlong R_nativeObj, jlong T_nativeObj, jlong E_nativeObj, jlong F_nativeObj, jint flags, jint criteria_type, jint criteria_maxCount, jdouble criteria_epsilon)
+{
+ static const char method_name[] = "calib3d::stereoCalibrate_13()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Mat( objectPoints_mat, objectPoints );
+ std::vector<Mat> imagePoints1;
+ Mat& imagePoints1_mat = *((Mat*)imagePoints1_mat_nativeObj);
+ Mat_to_vector_Mat( imagePoints1_mat, imagePoints1 );
+ std::vector<Mat> imagePoints2;
+ Mat& imagePoints2_mat = *((Mat*)imagePoints2_mat_nativeObj);
+ Mat_to_vector_Mat( imagePoints2_mat, imagePoints2 );
+ Mat& cameraMatrix1 = *((Mat*)cameraMatrix1_nativeObj);
+ Mat& distCoeffs1 = *((Mat*)distCoeffs1_nativeObj);
+ Mat& cameraMatrix2 = *((Mat*)cameraMatrix2_nativeObj);
+ Mat& distCoeffs2 = *((Mat*)distCoeffs2_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& T = *((Mat*)T_nativeObj);
+ Mat& E = *((Mat*)E_nativeObj);
+ Mat& F = *((Mat*)F_nativeObj);
+ TermCriteria criteria(criteria_type, criteria_maxCount, criteria_epsilon);
+ double _retval_ = cv::stereoCalibrate( objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F, (int)flags, criteria );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_stereoCalibrate_14 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jdouble, jdouble, jlong, jlong, jlong, jlong, jint);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_stereoCalibrate_14
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints1_mat_nativeObj, jlong imagePoints2_mat_nativeObj, jlong cameraMatrix1_nativeObj, jlong distCoeffs1_nativeObj, jlong cameraMatrix2_nativeObj, jlong distCoeffs2_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jlong R_nativeObj, jlong T_nativeObj, jlong E_nativeObj, jlong F_nativeObj, jint flags)
+{
+ static const char method_name[] = "calib3d::stereoCalibrate_14()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Mat( objectPoints_mat, objectPoints );
+ std::vector<Mat> imagePoints1;
+ Mat& imagePoints1_mat = *((Mat*)imagePoints1_mat_nativeObj);
+ Mat_to_vector_Mat( imagePoints1_mat, imagePoints1 );
+ std::vector<Mat> imagePoints2;
+ Mat& imagePoints2_mat = *((Mat*)imagePoints2_mat_nativeObj);
+ Mat_to_vector_Mat( imagePoints2_mat, imagePoints2 );
+ Mat& cameraMatrix1 = *((Mat*)cameraMatrix1_nativeObj);
+ Mat& distCoeffs1 = *((Mat*)distCoeffs1_nativeObj);
+ Mat& cameraMatrix2 = *((Mat*)cameraMatrix2_nativeObj);
+ Mat& distCoeffs2 = *((Mat*)distCoeffs2_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& T = *((Mat*)T_nativeObj);
+ Mat& E = *((Mat*)E_nativeObj);
+ Mat& F = *((Mat*)F_nativeObj);
+ double _retval_ = cv::stereoCalibrate( objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F, (int)flags );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_stereoCalibrate_15 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jdouble, jdouble, jlong, jlong, jlong, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_calib3d_Calib3d_stereoCalibrate_15
+ (JNIEnv* env, jclass , jlong objectPoints_mat_nativeObj, jlong imagePoints1_mat_nativeObj, jlong imagePoints2_mat_nativeObj, jlong cameraMatrix1_nativeObj, jlong distCoeffs1_nativeObj, jlong cameraMatrix2_nativeObj, jlong distCoeffs2_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jlong R_nativeObj, jlong T_nativeObj, jlong E_nativeObj, jlong F_nativeObj)
+{
+ static const char method_name[] = "calib3d::stereoCalibrate_15()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> objectPoints;
+ Mat& objectPoints_mat = *((Mat*)objectPoints_mat_nativeObj);
+ Mat_to_vector_Mat( objectPoints_mat, objectPoints );
+ std::vector<Mat> imagePoints1;
+ Mat& imagePoints1_mat = *((Mat*)imagePoints1_mat_nativeObj);
+ Mat_to_vector_Mat( imagePoints1_mat, imagePoints1 );
+ std::vector<Mat> imagePoints2;
+ Mat& imagePoints2_mat = *((Mat*)imagePoints2_mat_nativeObj);
+ Mat_to_vector_Mat( imagePoints2_mat, imagePoints2 );
+ Mat& cameraMatrix1 = *((Mat*)cameraMatrix1_nativeObj);
+ Mat& distCoeffs1 = *((Mat*)distCoeffs1_nativeObj);
+ Mat& cameraMatrix2 = *((Mat*)cameraMatrix2_nativeObj);
+ Mat& distCoeffs2 = *((Mat*)distCoeffs2_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& T = *((Mat*)T_nativeObj);
+ Mat& E = *((Mat*)E_nativeObj);
+ Mat& F = *((Mat*)F_nativeObj);
+ double _retval_ = cv::stereoCalibrate( objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void Rodrigues(Mat src, Mat& dst, Mat& jacobian = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_Rodrigues_10 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_Rodrigues_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong jacobian_nativeObj)
+{
+ static const char method_name[] = "calib3d::Rodrigues_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& jacobian = *((Mat*)jacobian_nativeObj);
+ cv::Rodrigues( src, dst, jacobian );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_Rodrigues_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_Rodrigues_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "calib3d::Rodrigues_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::Rodrigues( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat findHomography(vector_Point2f srcPoints, vector_Point2f dstPoints, int method = 0, double ransacReprojThreshold = 3, Mat& mask = Mat(), int maxIters = 2000, double confidence = 0.995)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_findHomography_10 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jlong, jint, jdouble);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_findHomography_10
+ (JNIEnv* env, jclass , jlong srcPoints_mat_nativeObj, jlong dstPoints_mat_nativeObj, jint method, jdouble ransacReprojThreshold, jlong mask_nativeObj, jint maxIters, jdouble confidence)
+{
+ static const char method_name[] = "calib3d::findHomography_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> srcPoints;
+ Mat& srcPoints_mat = *((Mat*)srcPoints_mat_nativeObj);
+ Mat_to_vector_Point2f( srcPoints_mat, srcPoints );
+ std::vector<Point2f> dstPoints;
+ Mat& dstPoints_mat = *((Mat*)dstPoints_mat_nativeObj);
+ Mat_to_vector_Point2f( dstPoints_mat, dstPoints );
+ Mat& mask = *((Mat*)mask_nativeObj);
+ ::Mat _retval_ = cv::findHomography( srcPoints, dstPoints, (int)method, (double)ransacReprojThreshold, mask, (int)maxIters, (double)confidence );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_findHomography_11 (JNIEnv*, jclass, jlong, jlong, jint, jdouble);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_findHomography_11
+ (JNIEnv* env, jclass , jlong srcPoints_mat_nativeObj, jlong dstPoints_mat_nativeObj, jint method, jdouble ransacReprojThreshold)
+{
+ static const char method_name[] = "calib3d::findHomography_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> srcPoints;
+ Mat& srcPoints_mat = *((Mat*)srcPoints_mat_nativeObj);
+ Mat_to_vector_Point2f( srcPoints_mat, srcPoints );
+ std::vector<Point2f> dstPoints;
+ Mat& dstPoints_mat = *((Mat*)dstPoints_mat_nativeObj);
+ Mat_to_vector_Point2f( dstPoints_mat, dstPoints );
+ ::Mat _retval_ = cv::findHomography( srcPoints, dstPoints, (int)method, (double)ransacReprojThreshold );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_findHomography_12 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_findHomography_12
+ (JNIEnv* env, jclass , jlong srcPoints_mat_nativeObj, jlong dstPoints_mat_nativeObj)
+{
+ static const char method_name[] = "calib3d::findHomography_12()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> srcPoints;
+ Mat& srcPoints_mat = *((Mat*)srcPoints_mat_nativeObj);
+ Mat_to_vector_Point2f( srcPoints_mat, srcPoints );
+ std::vector<Point2f> dstPoints;
+ Mat& dstPoints_mat = *((Mat*)dstPoints_mat_nativeObj);
+ Mat_to_vector_Point2f( dstPoints_mat, dstPoints );
+ ::Mat _retval_ = cv::findHomography( srcPoints, dstPoints );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Vec3d RQDecomp3x3(Mat src, Mat& mtxR, Mat& mtxQ, Mat& Qx = Mat(), Mat& Qy = Mat(), Mat& Qz = Mat())
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_calib3d_Calib3d_RQDecomp3x3_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_calib3d_Calib3d_RQDecomp3x3_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong mtxR_nativeObj, jlong mtxQ_nativeObj, jlong Qx_nativeObj, jlong Qy_nativeObj, jlong Qz_nativeObj)
+{
+ static const char method_name[] = "calib3d::RQDecomp3x3_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& mtxR = *((Mat*)mtxR_nativeObj);
+ Mat& mtxQ = *((Mat*)mtxQ_nativeObj);
+ Mat& Qx = *((Mat*)Qx_nativeObj);
+ Mat& Qy = *((Mat*)Qy_nativeObj);
+ Mat& Qz = *((Mat*)Qz_nativeObj);
+ Vec3d _retval_ = cv::RQDecomp3x3( src, mtxR, mtxQ, Qx, Qy, Qz );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(3); jdouble _tmp_retval_[3] = {_retval_.val[0], _retval_.val[1], _retval_.val[2]}; env->SetDoubleArrayRegion(_da_retval_, 0, 3, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_calib3d_Calib3d_RQDecomp3x3_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_calib3d_Calib3d_RQDecomp3x3_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong mtxR_nativeObj, jlong mtxQ_nativeObj)
+{
+ static const char method_name[] = "calib3d::RQDecomp3x3_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& mtxR = *((Mat*)mtxR_nativeObj);
+ Mat& mtxQ = *((Mat*)mtxQ_nativeObj);
+ Vec3d _retval_ = cv::RQDecomp3x3( src, mtxR, mtxQ );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(3); jdouble _tmp_retval_[3] = {_retval_.val[0], _retval_.val[1], _retval_.val[2]}; env->SetDoubleArrayRegion(_da_retval_, 0, 3, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void stereoRectify(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat& R1, Mat& R2, Mat& P1, Mat& P2, Mat& Q, int flags = CALIB_ZERO_DISPARITY, double alpha = -1, Size newImageSize = Size(), Rect* validPixROI1 = 0, Rect* validPixROI2 = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_stereoRectify_12 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jdouble, jdouble, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jint, jdouble, jdouble, jdouble, jdoubleArray, jdoubleArray);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_stereoRectify_12
+ (JNIEnv* env, jclass , jlong cameraMatrix1_nativeObj, jlong distCoeffs1_nativeObj, jlong cameraMatrix2_nativeObj, jlong distCoeffs2_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jlong R_nativeObj, jlong T_nativeObj, jlong R1_nativeObj, jlong R2_nativeObj, jlong P1_nativeObj, jlong P2_nativeObj, jlong Q_nativeObj, jint flags, jdouble alpha, jdouble newImageSize_width, jdouble newImageSize_height, jdoubleArray validPixROI1_out, jdoubleArray validPixROI2_out)
+{
+ static const char method_name[] = "calib3d::stereoRectify_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& cameraMatrix1 = *((Mat*)cameraMatrix1_nativeObj);
+ Mat& distCoeffs1 = *((Mat*)distCoeffs1_nativeObj);
+ Mat& cameraMatrix2 = *((Mat*)cameraMatrix2_nativeObj);
+ Mat& distCoeffs2 = *((Mat*)distCoeffs2_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& T = *((Mat*)T_nativeObj);
+ Mat& R1 = *((Mat*)R1_nativeObj);
+ Mat& R2 = *((Mat*)R2_nativeObj);
+ Mat& P1 = *((Mat*)P1_nativeObj);
+ Mat& P2 = *((Mat*)P2_nativeObj);
+ Mat& Q = *((Mat*)Q_nativeObj);
+ Size newImageSize((int)newImageSize_width, (int)newImageSize_height);
+ Rect validPixROI1;
+ Rect validPixROI2;
+ cv::stereoRectify( cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, R1, R2, P1, P2, Q, (int)flags, (double)alpha, newImageSize, &validPixROI1, &validPixROI2 );
+ jdouble tmp_validPixROI1[4] = {validPixROI1.x, validPixROI1.y, validPixROI1.width, validPixROI1.height}; env->SetDoubleArrayRegion(validPixROI1_out, 0, 4, tmp_validPixROI1); jdouble tmp_validPixROI2[4] = {validPixROI2.x, validPixROI2.y, validPixROI2.width, validPixROI2.height}; env->SetDoubleArrayRegion(validPixROI2_out, 0, 4, tmp_validPixROI2);
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_stereoRectify_13 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jdouble, jdouble, jlong, jlong, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_stereoRectify_13
+ (JNIEnv* env, jclass , jlong cameraMatrix1_nativeObj, jlong distCoeffs1_nativeObj, jlong cameraMatrix2_nativeObj, jlong distCoeffs2_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jlong R_nativeObj, jlong T_nativeObj, jlong R1_nativeObj, jlong R2_nativeObj, jlong P1_nativeObj, jlong P2_nativeObj, jlong Q_nativeObj)
+{
+ static const char method_name[] = "calib3d::stereoRectify_13()";
+ try {
+ LOGD("%s", method_name);
+ Mat& cameraMatrix1 = *((Mat*)cameraMatrix1_nativeObj);
+ Mat& distCoeffs1 = *((Mat*)distCoeffs1_nativeObj);
+ Mat& cameraMatrix2 = *((Mat*)cameraMatrix2_nativeObj);
+ Mat& distCoeffs2 = *((Mat*)distCoeffs2_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& T = *((Mat*)T_nativeObj);
+ Mat& R1 = *((Mat*)R1_nativeObj);
+ Mat& R2 = *((Mat*)R2_nativeObj);
+ Mat& P1 = *((Mat*)P1_nativeObj);
+ Mat& P2 = *((Mat*)P2_nativeObj);
+ Mat& Q = *((Mat*)Q_nativeObj);
+ cv::stereoRectify( cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, R1, R2, P1, P2, Q );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool stereoRectifyUncalibrated(Mat points1, Mat points2, Mat F, Size imgSize, Mat& H1, Mat& H2, double threshold = 5)
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_stereoRectifyUncalibrated_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jdouble, jlong, jlong, jdouble);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_stereoRectifyUncalibrated_10
+ (JNIEnv* env, jclass , jlong points1_nativeObj, jlong points2_nativeObj, jlong F_nativeObj, jdouble imgSize_width, jdouble imgSize_height, jlong H1_nativeObj, jlong H2_nativeObj, jdouble threshold)
+{
+ static const char method_name[] = "calib3d::stereoRectifyUncalibrated_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& points1 = *((Mat*)points1_nativeObj);
+ Mat& points2 = *((Mat*)points2_nativeObj);
+ Mat& F = *((Mat*)F_nativeObj);
+ Size imgSize((int)imgSize_width, (int)imgSize_height);
+ Mat& H1 = *((Mat*)H1_nativeObj);
+ Mat& H2 = *((Mat*)H2_nativeObj);
+ bool _retval_ = cv::stereoRectifyUncalibrated( points1, points2, F, imgSize, H1, H2, (double)threshold );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_stereoRectifyUncalibrated_11 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jdouble, jlong, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_calib3d_Calib3d_stereoRectifyUncalibrated_11
+ (JNIEnv* env, jclass , jlong points1_nativeObj, jlong points2_nativeObj, jlong F_nativeObj, jdouble imgSize_width, jdouble imgSize_height, jlong H1_nativeObj, jlong H2_nativeObj)
+{
+ static const char method_name[] = "calib3d::stereoRectifyUncalibrated_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& points1 = *((Mat*)points1_nativeObj);
+ Mat& points2 = *((Mat*)points2_nativeObj);
+ Mat& F = *((Mat*)F_nativeObj);
+ Size imgSize((int)imgSize_width, (int)imgSize_height);
+ Mat& H1 = *((Mat*)H1_nativeObj);
+ Mat& H2 = *((Mat*)H2_nativeObj);
+ bool _retval_ = cv::stereoRectifyUncalibrated( points1, points2, F, imgSize, H1, H2 );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// float rectify3Collinear(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Mat cameraMatrix3, Mat distCoeffs3, vector_Mat imgpt1, vector_Mat imgpt3, Size imageSize, Mat R12, Mat T12, Mat R13, Mat T13, Mat& R1, Mat& R2, Mat& R3, Mat& P1, Mat& P2, Mat& P3, Mat& Q, double alpha, Size newImgSize, Rect* roi1, Rect* roi2, int flags)
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_calib3d_Calib3d_rectify3Collinear_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jdouble, jdouble, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jdouble, jdouble, jdouble, jdoubleArray, jdoubleArray, jint);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_calib3d_Calib3d_rectify3Collinear_10
+ (JNIEnv* env, jclass , jlong cameraMatrix1_nativeObj, jlong distCoeffs1_nativeObj, jlong cameraMatrix2_nativeObj, jlong distCoeffs2_nativeObj, jlong cameraMatrix3_nativeObj, jlong distCoeffs3_nativeObj, jlong imgpt1_mat_nativeObj, jlong imgpt3_mat_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jlong R12_nativeObj, jlong T12_nativeObj, jlong R13_nativeObj, jlong T13_nativeObj, jlong R1_nativeObj, jlong R2_nativeObj, jlong R3_nativeObj, jlong P1_nativeObj, jlong P2_nativeObj, jlong P3_nativeObj, jlong Q_nativeObj, jdouble alpha, jdouble newImgSize_width, jdouble newImgSize_height, jdoubleArray roi1_out, jdoubleArray roi2_out, jint flags)
+{
+ static const char method_name[] = "calib3d::rectify3Collinear_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> imgpt1;
+ Mat& imgpt1_mat = *((Mat*)imgpt1_mat_nativeObj);
+ Mat_to_vector_Mat( imgpt1_mat, imgpt1 );
+ std::vector<Mat> imgpt3;
+ Mat& imgpt3_mat = *((Mat*)imgpt3_mat_nativeObj);
+ Mat_to_vector_Mat( imgpt3_mat, imgpt3 );
+ Mat& cameraMatrix1 = *((Mat*)cameraMatrix1_nativeObj);
+ Mat& distCoeffs1 = *((Mat*)distCoeffs1_nativeObj);
+ Mat& cameraMatrix2 = *((Mat*)cameraMatrix2_nativeObj);
+ Mat& distCoeffs2 = *((Mat*)distCoeffs2_nativeObj);
+ Mat& cameraMatrix3 = *((Mat*)cameraMatrix3_nativeObj);
+ Mat& distCoeffs3 = *((Mat*)distCoeffs3_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ Mat& R12 = *((Mat*)R12_nativeObj);
+ Mat& T12 = *((Mat*)T12_nativeObj);
+ Mat& R13 = *((Mat*)R13_nativeObj);
+ Mat& T13 = *((Mat*)T13_nativeObj);
+ Mat& R1 = *((Mat*)R1_nativeObj);
+ Mat& R2 = *((Mat*)R2_nativeObj);
+ Mat& R3 = *((Mat*)R3_nativeObj);
+ Mat& P1 = *((Mat*)P1_nativeObj);
+ Mat& P2 = *((Mat*)P2_nativeObj);
+ Mat& P3 = *((Mat*)P3_nativeObj);
+ Mat& Q = *((Mat*)Q_nativeObj);
+ Size newImgSize((int)newImgSize_width, (int)newImgSize_height);
+ Rect roi1;
+ Rect roi2;
+ float _retval_ = cv::rectify3Collinear( cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, cameraMatrix3, distCoeffs3, imgpt1, imgpt3, imageSize, R12, T12, R13, T13, R1, R2, R3, P1, P2, P3, Q, (double)alpha, newImgSize, &roi1, &roi2, (int)flags );
+ jdouble tmp_roi1[4] = {roi1.x, roi1.y, roi1.width, roi1.height}; env->SetDoubleArrayRegion(roi1_out, 0, 4, tmp_roi1); jdouble tmp_roi2[4] = {roi2.x, roi2.y, roi2.width, roi2.height}; env->SetDoubleArrayRegion(roi2_out, 0, 4, tmp_roi2);
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getOptimalNewCameraMatrix(Mat cameraMatrix, Mat distCoeffs, Size imageSize, double alpha, Size newImgSize = Size(), Rect* validPixROI = 0, bool centerPrincipalPoint = false)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_getOptimalNewCameraMatrix_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdoubleArray, jboolean);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_getOptimalNewCameraMatrix_10
+ (JNIEnv* env, jclass , jlong cameraMatrix_nativeObj, jlong distCoeffs_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jdouble alpha, jdouble newImgSize_width, jdouble newImgSize_height, jdoubleArray validPixROI_out, jboolean centerPrincipalPoint)
+{
+ static const char method_name[] = "calib3d::getOptimalNewCameraMatrix_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& distCoeffs = *((Mat*)distCoeffs_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ Size newImgSize((int)newImgSize_width, (int)newImgSize_height);
+ Rect validPixROI;
+ ::Mat _retval_ = cv::getOptimalNewCameraMatrix( cameraMatrix, distCoeffs, imageSize, (double)alpha, newImgSize, &validPixROI, (bool)centerPrincipalPoint );
+ jdouble tmp_validPixROI[4] = {validPixROI.x, validPixROI.y, validPixROI.width, validPixROI.height}; env->SetDoubleArrayRegion(validPixROI_out, 0, 4, tmp_validPixROI);
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_getOptimalNewCameraMatrix_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_getOptimalNewCameraMatrix_11
+ (JNIEnv* env, jclass , jlong cameraMatrix_nativeObj, jlong distCoeffs_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jdouble alpha)
+{
+ static const char method_name[] = "calib3d::getOptimalNewCameraMatrix_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& distCoeffs = *((Mat*)distCoeffs_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ ::Mat _retval_ = cv::getOptimalNewCameraMatrix( cameraMatrix, distCoeffs, imageSize, (double)alpha );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void convertPointsToHomogeneous(Mat src, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_convertPointsToHomogeneous_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_convertPointsToHomogeneous_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "calib3d::convertPointsToHomogeneous_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::convertPointsToHomogeneous( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void convertPointsFromHomogeneous(Mat src, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_convertPointsFromHomogeneous_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_convertPointsFromHomogeneous_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "calib3d::convertPointsFromHomogeneous_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::convertPointsFromHomogeneous( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat findFundamentalMat(vector_Point2f points1, vector_Point2f points2, int method = FM_RANSAC, double param1 = 3., double param2 = 0.99, Mat& mask = Mat())
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_findFundamentalMat_10 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jdouble, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_findFundamentalMat_10
+ (JNIEnv* env, jclass , jlong points1_mat_nativeObj, jlong points2_mat_nativeObj, jint method, jdouble param1, jdouble param2, jlong mask_nativeObj)
+{
+ static const char method_name[] = "calib3d::findFundamentalMat_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> points1;
+ Mat& points1_mat = *((Mat*)points1_mat_nativeObj);
+ Mat_to_vector_Point2f( points1_mat, points1 );
+ std::vector<Point2f> points2;
+ Mat& points2_mat = *((Mat*)points2_mat_nativeObj);
+ Mat_to_vector_Point2f( points2_mat, points2 );
+ Mat& mask = *((Mat*)mask_nativeObj);
+ ::Mat _retval_ = cv::findFundamentalMat( points1, points2, (int)method, (double)param1, (double)param2, mask );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_findFundamentalMat_11 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jdouble);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_findFundamentalMat_11
+ (JNIEnv* env, jclass , jlong points1_mat_nativeObj, jlong points2_mat_nativeObj, jint method, jdouble param1, jdouble param2)
+{
+ static const char method_name[] = "calib3d::findFundamentalMat_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> points1;
+ Mat& points1_mat = *((Mat*)points1_mat_nativeObj);
+ Mat_to_vector_Point2f( points1_mat, points1 );
+ std::vector<Point2f> points2;
+ Mat& points2_mat = *((Mat*)points2_mat_nativeObj);
+ Mat_to_vector_Point2f( points2_mat, points2 );
+ ::Mat _retval_ = cv::findFundamentalMat( points1, points2, (int)method, (double)param1, (double)param2 );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_findFundamentalMat_12 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_findFundamentalMat_12
+ (JNIEnv* env, jclass , jlong points1_mat_nativeObj, jlong points2_mat_nativeObj)
+{
+ static const char method_name[] = "calib3d::findFundamentalMat_12()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> points1;
+ Mat& points1_mat = *((Mat*)points1_mat_nativeObj);
+ Mat_to_vector_Point2f( points1_mat, points1 );
+ std::vector<Point2f> points2;
+ Mat& points2_mat = *((Mat*)points2_mat_nativeObj);
+ Mat_to_vector_Point2f( points2_mat, points2 );
+ ::Mat _retval_ = cv::findFundamentalMat( points1, points2 );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat findEssentialMat(Mat points1, Mat points2, double focal = 1.0, Point2d pp = Point2d(0, 0), int method = RANSAC, double prob = 0.999, double threshold = 1.0, Mat& mask = Mat())
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_findEssentialMat_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble, jint, jdouble, jdouble, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_findEssentialMat_10
+ (JNIEnv* env, jclass , jlong points1_nativeObj, jlong points2_nativeObj, jdouble focal, jdouble pp_x, jdouble pp_y, jint method, jdouble prob, jdouble threshold, jlong mask_nativeObj)
+{
+ static const char method_name[] = "calib3d::findEssentialMat_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& points1 = *((Mat*)points1_nativeObj);
+ Mat& points2 = *((Mat*)points2_nativeObj);
+ Point2d pp(pp_x, pp_y);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ ::Mat _retval_ = cv::findEssentialMat( points1, points2, (double)focal, pp, (int)method, (double)prob, (double)threshold, mask );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_findEssentialMat_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble, jint, jdouble, jdouble);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_findEssentialMat_11
+ (JNIEnv* env, jclass , jlong points1_nativeObj, jlong points2_nativeObj, jdouble focal, jdouble pp_x, jdouble pp_y, jint method, jdouble prob, jdouble threshold)
+{
+ static const char method_name[] = "calib3d::findEssentialMat_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& points1 = *((Mat*)points1_nativeObj);
+ Mat& points2 = *((Mat*)points2_nativeObj);
+ Point2d pp(pp_x, pp_y);
+ ::Mat _retval_ = cv::findEssentialMat( points1, points2, (double)focal, pp, (int)method, (double)prob, (double)threshold );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_findEssentialMat_12 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_calib3d_Calib3d_findEssentialMat_12
+ (JNIEnv* env, jclass , jlong points1_nativeObj, jlong points2_nativeObj)
+{
+ static const char method_name[] = "calib3d::findEssentialMat_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& points1 = *((Mat*)points1_nativeObj);
+ Mat& points2 = *((Mat*)points2_nativeObj);
+ ::Mat _retval_ = cv::findEssentialMat( points1, points2 );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void decomposeEssentialMat(Mat E, Mat& R1, Mat& R2, Mat& t)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_decomposeEssentialMat_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_decomposeEssentialMat_10
+ (JNIEnv* env, jclass , jlong E_nativeObj, jlong R1_nativeObj, jlong R2_nativeObj, jlong t_nativeObj)
+{
+ static const char method_name[] = "calib3d::decomposeEssentialMat_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& E = *((Mat*)E_nativeObj);
+ Mat& R1 = *((Mat*)R1_nativeObj);
+ Mat& R2 = *((Mat*)R2_nativeObj);
+ Mat& t = *((Mat*)t_nativeObj);
+ cv::decomposeEssentialMat( E, R1, R2, t );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int recoverPose(Mat E, Mat points1, Mat points2, Mat& R, Mat& t, double focal = 1.0, Point2d pp = Point2d(0, 0), Mat& mask = Mat())
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_Calib3d_recoverPose_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jdouble, jdouble, jdouble, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_Calib3d_recoverPose_10
+ (JNIEnv* env, jclass , jlong E_nativeObj, jlong points1_nativeObj, jlong points2_nativeObj, jlong R_nativeObj, jlong t_nativeObj, jdouble focal, jdouble pp_x, jdouble pp_y, jlong mask_nativeObj)
+{
+ static const char method_name[] = "calib3d::recoverPose_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& E = *((Mat*)E_nativeObj);
+ Mat& points1 = *((Mat*)points1_nativeObj);
+ Mat& points2 = *((Mat*)points2_nativeObj);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& t = *((Mat*)t_nativeObj);
+ Point2d pp(pp_x, pp_y);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ int _retval_ = cv::recoverPose( E, points1, points2, R, t, (double)focal, pp, mask );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_Calib3d_recoverPose_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jdouble, jdouble, jdouble);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_Calib3d_recoverPose_11
+ (JNIEnv* env, jclass , jlong E_nativeObj, jlong points1_nativeObj, jlong points2_nativeObj, jlong R_nativeObj, jlong t_nativeObj, jdouble focal, jdouble pp_x, jdouble pp_y)
+{
+ static const char method_name[] = "calib3d::recoverPose_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& E = *((Mat*)E_nativeObj);
+ Mat& points1 = *((Mat*)points1_nativeObj);
+ Mat& points2 = *((Mat*)points2_nativeObj);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& t = *((Mat*)t_nativeObj);
+ Point2d pp(pp_x, pp_y);
+ int _retval_ = cv::recoverPose( E, points1, points2, R, t, (double)focal, pp );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_Calib3d_recoverPose_12 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_Calib3d_recoverPose_12
+ (JNIEnv* env, jclass , jlong E_nativeObj, jlong points1_nativeObj, jlong points2_nativeObj, jlong R_nativeObj, jlong t_nativeObj)
+{
+ static const char method_name[] = "calib3d::recoverPose_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& E = *((Mat*)E_nativeObj);
+ Mat& points1 = *((Mat*)points1_nativeObj);
+ Mat& points2 = *((Mat*)points2_nativeObj);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& t = *((Mat*)t_nativeObj);
+ int _retval_ = cv::recoverPose( E, points1, points2, R, t );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void computeCorrespondEpilines(Mat points, int whichImage, Mat F, Mat& lines)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_computeCorrespondEpilines_10 (JNIEnv*, jclass, jlong, jint, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_computeCorrespondEpilines_10
+ (JNIEnv* env, jclass , jlong points_nativeObj, jint whichImage, jlong F_nativeObj, jlong lines_nativeObj)
+{
+ static const char method_name[] = "calib3d::computeCorrespondEpilines_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& points = *((Mat*)points_nativeObj);
+ Mat& F = *((Mat*)F_nativeObj);
+ Mat& lines = *((Mat*)lines_nativeObj);
+ cv::computeCorrespondEpilines( points, (int)whichImage, F, lines );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void triangulatePoints(Mat projMatr1, Mat projMatr2, Mat projPoints1, Mat projPoints2, Mat& points4D)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_triangulatePoints_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_triangulatePoints_10
+ (JNIEnv* env, jclass , jlong projMatr1_nativeObj, jlong projMatr2_nativeObj, jlong projPoints1_nativeObj, jlong projPoints2_nativeObj, jlong points4D_nativeObj)
+{
+ static const char method_name[] = "calib3d::triangulatePoints_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& projMatr1 = *((Mat*)projMatr1_nativeObj);
+ Mat& projMatr2 = *((Mat*)projMatr2_nativeObj);
+ Mat& projPoints1 = *((Mat*)projPoints1_nativeObj);
+ Mat& projPoints2 = *((Mat*)projPoints2_nativeObj);
+ Mat& points4D = *((Mat*)points4D_nativeObj);
+ cv::triangulatePoints( projMatr1, projMatr2, projPoints1, projPoints2, points4D );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void correctMatches(Mat F, Mat points1, Mat points2, Mat& newPoints1, Mat& newPoints2)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_correctMatches_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_correctMatches_10
+ (JNIEnv* env, jclass , jlong F_nativeObj, jlong points1_nativeObj, jlong points2_nativeObj, jlong newPoints1_nativeObj, jlong newPoints2_nativeObj)
+{
+ static const char method_name[] = "calib3d::correctMatches_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& F = *((Mat*)F_nativeObj);
+ Mat& points1 = *((Mat*)points1_nativeObj);
+ Mat& points2 = *((Mat*)points2_nativeObj);
+ Mat& newPoints1 = *((Mat*)newPoints1_nativeObj);
+ Mat& newPoints2 = *((Mat*)newPoints2_nativeObj);
+ cv::correctMatches( F, points1, points2, newPoints1, newPoints2 );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void filterSpeckles(Mat& img, double newVal, int maxSpeckleSize, double maxDiff, Mat& buf = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_filterSpeckles_10 (JNIEnv*, jclass, jlong, jdouble, jint, jdouble, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_filterSpeckles_10
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble newVal, jint maxSpeckleSize, jdouble maxDiff, jlong buf_nativeObj)
+{
+ static const char method_name[] = "calib3d::filterSpeckles_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ Mat& buf = *((Mat*)buf_nativeObj);
+ cv::filterSpeckles( img, (double)newVal, (int)maxSpeckleSize, (double)maxDiff, buf );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_filterSpeckles_11 (JNIEnv*, jclass, jlong, jdouble, jint, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_filterSpeckles_11
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble newVal, jint maxSpeckleSize, jdouble maxDiff)
+{
+ static const char method_name[] = "calib3d::filterSpeckles_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ cv::filterSpeckles( img, (double)newVal, (int)maxSpeckleSize, (double)maxDiff );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Rect getValidDisparityROI(Rect roi1, Rect roi2, int minDisparity, int numberOfDisparities, int SADWindowSize)
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_calib3d_Calib3d_getValidDisparityROI_10 (JNIEnv*, jclass, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_calib3d_Calib3d_getValidDisparityROI_10
+ (JNIEnv* env, jclass , jint roi1_x, jint roi1_y, jint roi1_width, jint roi1_height, jint roi2_x, jint roi2_y, jint roi2_width, jint roi2_height, jint minDisparity, jint numberOfDisparities, jint SADWindowSize)
+{
+ static const char method_name[] = "calib3d::getValidDisparityROI_10()";
+ try {
+ LOGD("%s", method_name);
+ Rect roi1(roi1_x, roi1_y, roi1_width, roi1_height);
+ Rect roi2(roi2_x, roi2_y, roi2_width, roi2_height);
+ Rect _retval_ = cv::getValidDisparityROI( roi1, roi2, (int)minDisparity, (int)numberOfDisparities, (int)SADWindowSize );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(4); jdouble _tmp_retval_[4] = {_retval_.x, _retval_.y, _retval_.width, _retval_.height}; env->SetDoubleArrayRegion(_da_retval_, 0, 4, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void validateDisparity(Mat& disparity, Mat cost, int minDisparity, int numberOfDisparities, int disp12MaxDisp = 1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_validateDisparity_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_validateDisparity_10
+ (JNIEnv* env, jclass , jlong disparity_nativeObj, jlong cost_nativeObj, jint minDisparity, jint numberOfDisparities, jint disp12MaxDisp)
+{
+ static const char method_name[] = "calib3d::validateDisparity_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& disparity = *((Mat*)disparity_nativeObj);
+ Mat& cost = *((Mat*)cost_nativeObj);
+ cv::validateDisparity( disparity, cost, (int)minDisparity, (int)numberOfDisparities, (int)disp12MaxDisp );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_validateDisparity_11 (JNIEnv*, jclass, jlong, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_validateDisparity_11
+ (JNIEnv* env, jclass , jlong disparity_nativeObj, jlong cost_nativeObj, jint minDisparity, jint numberOfDisparities)
+{
+ static const char method_name[] = "calib3d::validateDisparity_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& disparity = *((Mat*)disparity_nativeObj);
+ Mat& cost = *((Mat*)cost_nativeObj);
+ cv::validateDisparity( disparity, cost, (int)minDisparity, (int)numberOfDisparities );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void reprojectImageTo3D(Mat disparity, Mat& _3dImage, Mat Q, bool handleMissingValues = false, int ddepth = -1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_reprojectImageTo3D_10 (JNIEnv*, jclass, jlong, jlong, jlong, jboolean, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_reprojectImageTo3D_10
+ (JNIEnv* env, jclass , jlong disparity_nativeObj, jlong _3dImage_nativeObj, jlong Q_nativeObj, jboolean handleMissingValues, jint ddepth)
+{
+ static const char method_name[] = "calib3d::reprojectImageTo3D_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& disparity = *((Mat*)disparity_nativeObj);
+ Mat& _3dImage = *((Mat*)_3dImage_nativeObj);
+ Mat& Q = *((Mat*)Q_nativeObj);
+ cv::reprojectImageTo3D( disparity, _3dImage, Q, (bool)handleMissingValues, (int)ddepth );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_reprojectImageTo3D_11 (JNIEnv*, jclass, jlong, jlong, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_reprojectImageTo3D_11
+ (JNIEnv* env, jclass , jlong disparity_nativeObj, jlong _3dImage_nativeObj, jlong Q_nativeObj, jboolean handleMissingValues)
+{
+ static const char method_name[] = "calib3d::reprojectImageTo3D_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& disparity = *((Mat*)disparity_nativeObj);
+ Mat& _3dImage = *((Mat*)_3dImage_nativeObj);
+ Mat& Q = *((Mat*)Q_nativeObj);
+ cv::reprojectImageTo3D( disparity, _3dImage, Q, (bool)handleMissingValues );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_reprojectImageTo3D_12 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_calib3d_Calib3d_reprojectImageTo3D_12
+ (JNIEnv* env, jclass , jlong disparity_nativeObj, jlong _3dImage_nativeObj, jlong Q_nativeObj)
+{
+ static const char method_name[] = "calib3d::reprojectImageTo3D_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& disparity = *((Mat*)disparity_nativeObj);
+ Mat& _3dImage = *((Mat*)_3dImage_nativeObj);
+ Mat& Q = *((Mat*)Q_nativeObj);
+ cv::reprojectImageTo3D( disparity, _3dImage, Q );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int estimateAffine3D(Mat src, Mat dst, Mat& out, Mat& inliers, double ransacThreshold = 3, double confidence = 0.99)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_Calib3d_estimateAffine3D_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jdouble, jdouble);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_Calib3d_estimateAffine3D_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong out_nativeObj, jlong inliers_nativeObj, jdouble ransacThreshold, jdouble confidence)
+{
+ static const char method_name[] = "calib3d::estimateAffine3D_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& out = *((Mat*)out_nativeObj);
+ Mat& inliers = *((Mat*)inliers_nativeObj);
+ int _retval_ = cv::estimateAffine3D( src, dst, out, inliers, (double)ransacThreshold, (double)confidence );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_Calib3d_estimateAffine3D_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_Calib3d_estimateAffine3D_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong out_nativeObj, jlong inliers_nativeObj)
+{
+ static const char method_name[] = "calib3d::estimateAffine3D_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& out = *((Mat*)out_nativeObj);
+ Mat& inliers = *((Mat*)inliers_nativeObj);
+ int _retval_ = cv::estimateAffine3D( src, dst, out, inliers );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int decomposeHomographyMat(Mat H, Mat K, vector_Mat& rotations, vector_Mat& translations, vector_Mat& normals)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_Calib3d_decomposeHomographyMat_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_calib3d_Calib3d_decomposeHomographyMat_10
+ (JNIEnv* env, jclass , jlong H_nativeObj, jlong K_nativeObj, jlong rotations_mat_nativeObj, jlong translations_mat_nativeObj, jlong normals_mat_nativeObj)
+{
+ static const char method_name[] = "calib3d::decomposeHomographyMat_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> rotations;
+ Mat& rotations_mat = *((Mat*)rotations_mat_nativeObj);
+ std::vector<Mat> translations;
+ Mat& translations_mat = *((Mat*)translations_mat_nativeObj);
+ std::vector<Mat> normals;
+ Mat& normals_mat = *((Mat*)normals_mat_nativeObj);
+ Mat& H = *((Mat*)H_nativeObj);
+ Mat& K = *((Mat*)K_nativeObj);
+ int _retval_ = cv::decomposeHomographyMat( H, K, rotations, translations, normals );
+ vector_Mat_to_Mat( rotations, rotations_mat ); vector_Mat_to_Mat( translations, translations_mat ); vector_Mat_to_Mat( normals, normals_mat );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+
+} // extern "C"
+
+#endif // HAVE_OPENCV_CALIB3D
diff --git a/modules/java/src/core+Algorithm.java b/modules/java/src/core+Algorithm.java
new file mode 100644
index 0000000..f5186b6
--- /dev/null
+++ b/modules/java/src/core+Algorithm.java
@@ -0,0 +1,78 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.core;
+
+import java.lang.String;
+
+// C++: class Algorithm
+//javadoc: Algorithm
+public class Algorithm {
+
+ protected final long nativeObj;
+ protected Algorithm(long addr) { nativeObj = addr; }
+
+
+ //
+ // C++: void clear()
+ //
+
+ //javadoc: Algorithm::clear()
+ public void clear()
+ {
+
+ clear_0(nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void save(String filename)
+ //
+
+ //javadoc: Algorithm::save(filename)
+ public void save(String filename)
+ {
+
+ save_0(nativeObj, filename);
+
+ return;
+ }
+
+
+ //
+ // C++: String getDefaultName()
+ //
+
+ //javadoc: Algorithm::getDefaultName()
+ public String getDefaultName()
+ {
+
+ String retVal = getDefaultName_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void clear()
+ private static native void clear_0(long nativeObj);
+
+ // C++: void save(String filename)
+ private static native void save_0(long nativeObj, String filename);
+
+ // C++: String getDefaultName()
+ private static native String getDefaultName_0(long nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/core+Core.java b/modules/java/src/core+Core.java
new file mode 100644
index 0000000..8218211
--- /dev/null
+++ b/modules/java/src/core+Core.java
@@ -0,0 +1,2544 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.core;
+
+import java.lang.String;
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfDouble;
+import org.opencv.core.MatOfInt;
+import org.opencv.core.Scalar;
+import org.opencv.core.TermCriteria;
+import org.opencv.utils.Converters;
+
+public class Core {
+
+ // these constants are wrapped inside functions to prevent inlining
+ private static String getVersion() { return "3.0.0-dev"; }
+ private static String getNativeLibraryName() { return "opencv_java300"; }
+ private static int getVersionMajor() { return 3; }
+ private static int getVersionMinor() { return 0; }
+ private static int getVersionRevision() { return 0; }
+ private static String getVersionStatus() { return "-dev"; }
+
+ public static final String VERSION = getVersion();
+ public static final String NATIVE_LIBRARY_NAME = getNativeLibraryName();
+ public static final int VERSION_MAJOR = getVersionMajor();
+ public static final int VERSION_MINOR = getVersionMinor();
+ public static final int VERSION_REVISION = getVersionRevision();
+ public static final String VERSION_STATUS = getVersionStatus();
+
+ private static final int
+ CV_8U = 0,
+ CV_8S = 1,
+ CV_16U = 2,
+ CV_16S = 3,
+ CV_32S = 4,
+ CV_32F = 5,
+ CV_64F = 6,
+ CV_USRTYPE1 = 7;
+
+
+ public static final int
+ SVD_MODIFY_A = 1,
+ SVD_NO_UV = 2,
+ SVD_FULL_UV = 4,
+ FILLED = -1,
+ REDUCE_SUM = 0,
+ REDUCE_AVG = 1,
+ REDUCE_MAX = 2,
+ REDUCE_MIN = 3,
+ StsOk = 0,
+ StsBackTrace = -1,
+ StsError = -2,
+ StsInternal = -3,
+ StsNoMem = -4,
+ StsBadArg = -5,
+ StsBadFunc = -6,
+ StsNoConv = -7,
+ StsAutoTrace = -8,
+ HeaderIsNull = -9,
+ BadImageSize = -10,
+ BadOffset = -11,
+ BadDataPtr = -12,
+ BadStep = -13,
+ BadModelOrChSeq = -14,
+ BadNumChannels = -15,
+ BadNumChannel1U = -16,
+ BadDepth = -17,
+ BadAlphaChannel = -18,
+ BadOrder = -19,
+ BadOrigin = -20,
+ BadAlign = -21,
+ BadCallBack = -22,
+ BadTileSize = -23,
+ BadCOI = -24,
+ BadROISize = -25,
+ MaskIsTiled = -26,
+ StsNullPtr = -27,
+ StsVecLengthErr = -28,
+ StsFilterStructContentErr = -29,
+ StsKernelStructContentErr = -30,
+ StsFilterOffsetErr = -31,
+ StsBadSize = -201,
+ StsDivByZero = -202,
+ StsInplaceNotSupported = -203,
+ StsObjectNotFound = -204,
+ StsUnmatchedFormats = -205,
+ StsBadFlag = -206,
+ StsBadPoint = -207,
+ StsBadMask = -208,
+ StsUnmatchedSizes = -209,
+ StsUnsupportedFormat = -210,
+ StsOutOfRange = -211,
+ StsParseError = -212,
+ StsNotImplemented = -213,
+ StsBadMemBlock = -214,
+ StsAssert = -215,
+ GpuNotSupported = -216,
+ GpuApiCallError = -217,
+ OpenGlNotSupported = -218,
+ OpenGlApiCallError = -219,
+ OpenCLApiCallError = -220,
+ OpenCLDoubleNotSupported = -221,
+ OpenCLInitError = -222,
+ OpenCLNoAMDBlasFft = -223,
+ DECOMP_LU = 0,
+ DECOMP_SVD = 1,
+ DECOMP_EIG = 2,
+ DECOMP_CHOLESKY = 3,
+ DECOMP_QR = 4,
+ DECOMP_NORMAL = 16,
+ NORM_INF = 1,
+ NORM_L1 = 2,
+ NORM_L2 = 4,
+ NORM_L2SQR = 5,
+ NORM_HAMMING = 6,
+ NORM_HAMMING2 = 7,
+ NORM_TYPE_MASK = 7,
+ NORM_RELATIVE = 8,
+ NORM_MINMAX = 32,
+ CMP_EQ = 0,
+ CMP_GT = 1,
+ CMP_GE = 2,
+ CMP_LT = 3,
+ CMP_LE = 4,
+ CMP_NE = 5,
+ GEMM_1_T = 1,
+ GEMM_2_T = 2,
+ GEMM_3_T = 4,
+ DFT_INVERSE = 1,
+ DFT_SCALE = 2,
+ DFT_ROWS = 4,
+ DFT_COMPLEX_OUTPUT = 16,
+ DFT_REAL_OUTPUT = 32,
+ DCT_INVERSE = DFT_INVERSE,
+ DCT_ROWS = DFT_ROWS,
+ BORDER_CONSTANT = 0,
+ BORDER_REPLICATE = 1,
+ BORDER_REFLECT = 2,
+ BORDER_WRAP = 3,
+ BORDER_REFLECT_101 = 4,
+ BORDER_TRANSPARENT = 5,
+ BORDER_REFLECT101 = BORDER_REFLECT_101,
+ BORDER_DEFAULT = BORDER_REFLECT_101,
+ BORDER_ISOLATED = 16,
+ SORT_EVERY_ROW = 0,
+ SORT_EVERY_COLUMN = 1,
+ SORT_ASCENDING = 0,
+ SORT_DESCENDING = 16,
+ COVAR_SCRAMBLED = 0,
+ COVAR_NORMAL = 1,
+ COVAR_USE_AVG = 2,
+ COVAR_SCALE = 4,
+ COVAR_ROWS = 8,
+ COVAR_COLS = 16,
+ KMEANS_RANDOM_CENTERS = 0,
+ KMEANS_PP_CENTERS = 2,
+ KMEANS_USE_INITIAL_LABELS = 1,
+ LINE_4 = 4,
+ LINE_8 = 8,
+ LINE_AA = 16,
+ FONT_HERSHEY_SIMPLEX = 0,
+ FONT_HERSHEY_PLAIN = 1,
+ FONT_HERSHEY_DUPLEX = 2,
+ FONT_HERSHEY_COMPLEX = 3,
+ FONT_HERSHEY_TRIPLEX = 4,
+ FONT_HERSHEY_COMPLEX_SMALL = 5,
+ FONT_HERSHEY_SCRIPT_SIMPLEX = 6,
+ FONT_HERSHEY_SCRIPT_COMPLEX = 7,
+ FONT_ITALIC = 16,
+ CPU_MMX = 1,
+ CPU_SSE = 2,
+ CPU_SSE2 = 3,
+ CPU_SSE3 = 4,
+ CPU_SSSE3 = 5,
+ CPU_SSE4_1 = 6,
+ CPU_SSE4_2 = 7,
+ CPU_POPCNT = 8,
+ CPU_AVX = 10,
+ CPU_AVX2 = 11,
+ CPU_FMA3 = 12,
+ CPU_AVX_512F = 13,
+ CPU_AVX_512BW = 14,
+ CPU_AVX_512CD = 15,
+ CPU_AVX_512DQ = 16,
+ CPU_AVX_512ER = 17,
+ CPU_AVX_512IFMA512 = 18,
+ CPU_AVX_512PF = 19,
+ CPU_AVX_512VBMI = 20,
+ CPU_AVX_512VL = 21,
+ CPU_NEON = 100;
+
+
+ //
+ // C++: double getTickFrequency()
+ //
+
+ //javadoc: getTickFrequency()
+ public static double getTickFrequency()
+ {
+
+ double retVal = getTickFrequency_0();
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int64 getCPUTickCount()
+ //
+
+ //javadoc: getCPUTickCount()
+ public static long getCPUTickCount()
+ {
+
+ long retVal = getCPUTickCount_0();
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setErrorVerbosity(bool verbose)
+ //
+
+ //javadoc: setErrorVerbosity(verbose)
+ public static void setErrorVerbosity(boolean verbose)
+ {
+
+ setErrorVerbosity_0(verbose);
+
+ return;
+ }
+
+
+ //
+ // C++: void mulSpectrums(Mat a, Mat b, Mat& c, int flags, bool conjB = false)
+ //
+
+ //javadoc: mulSpectrums(a, b, c, flags, conjB)
+ public static void mulSpectrums(Mat a, Mat b, Mat c, int flags, boolean conjB)
+ {
+
+ mulSpectrums_0(a.nativeObj, b.nativeObj, c.nativeObj, flags, conjB);
+
+ return;
+ }
+
+ //javadoc: mulSpectrums(a, b, c, flags)
+ public static void mulSpectrums(Mat a, Mat b, Mat c, int flags)
+ {
+
+ mulSpectrums_1(a.nativeObj, b.nativeObj, c.nativeObj, flags);
+
+ return;
+ }
+
+
+ //
+ // C++: int getOptimalDFTSize(int vecsize)
+ //
+
+ //javadoc: getOptimalDFTSize(vecsize)
+ public static int getOptimalDFTSize(int vecsize)
+ {
+
+ int retVal = getOptimalDFTSize_0(vecsize);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void randu(Mat& dst, double low, double high)
+ //
+
+ //javadoc: randu(dst, low, high)
+ public static void randu(Mat dst, double low, double high)
+ {
+
+ randu_0(dst.nativeObj, low, high);
+
+ return;
+ }
+
+
+ //
+ // C++: void randn(Mat& dst, double mean, double stddev)
+ //
+
+ //javadoc: randn(dst, mean, stddev)
+ public static void randn(Mat dst, double mean, double stddev)
+ {
+
+ randn_0(dst.nativeObj, mean, stddev);
+
+ return;
+ }
+
+
+ //
+ // C++: void randShuffle(Mat& dst, double iterFactor = 1., RNG* rng = 0)
+ //
+
+ //javadoc: randShuffle(dst, iterFactor)
+ public static void randShuffle(Mat dst, double iterFactor)
+ {
+
+ randShuffle_0(dst.nativeObj, iterFactor);
+
+ return;
+ }
+
+ //javadoc: randShuffle(dst)
+ public static void randShuffle(Mat dst)
+ {
+
+ randShuffle_1(dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: double kmeans(Mat data, int K, Mat& bestLabels, TermCriteria criteria, int attempts, int flags, Mat& centers = Mat())
+ //
+
+ //javadoc: kmeans(data, K, bestLabels, criteria, attempts, flags, centers)
+ public static double kmeans(Mat data, int K, Mat bestLabels, TermCriteria criteria, int attempts, int flags, Mat centers)
+ {
+
+ double retVal = kmeans_0(data.nativeObj, K, bestLabels.nativeObj, criteria.type, criteria.maxCount, criteria.epsilon, attempts, flags, centers.nativeObj);
+
+ return retVal;
+ }
+
+ //javadoc: kmeans(data, K, bestLabels, criteria, attempts, flags)
+ public static double kmeans(Mat data, int K, Mat bestLabels, TermCriteria criteria, int attempts, int flags)
+ {
+
+ double retVal = kmeans_1(data.nativeObj, K, bestLabels.nativeObj, criteria.type, criteria.maxCount, criteria.epsilon, attempts, flags);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int borderInterpolate(int p, int len, int borderType)
+ //
+
+ //javadoc: borderInterpolate(p, len, borderType)
+ public static int borderInterpolate(int p, int len, int borderType)
+ {
+
+ int retVal = borderInterpolate_0(p, len, borderType);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void copyMakeBorder(Mat src, Mat& dst, int top, int bottom, int left, int right, int borderType, Scalar value = Scalar())
+ //
+
+ //javadoc: copyMakeBorder(src, dst, top, bottom, left, right, borderType, value)
+ public static void copyMakeBorder(Mat src, Mat dst, int top, int bottom, int left, int right, int borderType, Scalar value)
+ {
+
+ copyMakeBorder_0(src.nativeObj, dst.nativeObj, top, bottom, left, right, borderType, value.val[0], value.val[1], value.val[2], value.val[3]);
+
+ return;
+ }
+
+ //javadoc: copyMakeBorder(src, dst, top, bottom, left, right, borderType)
+ public static void copyMakeBorder(Mat src, Mat dst, int top, int bottom, int left, int right, int borderType)
+ {
+
+ copyMakeBorder_1(src.nativeObj, dst.nativeObj, top, bottom, left, right, borderType);
+
+ return;
+ }
+
+
+ //
+ // C++: void add(Mat src1, Mat src2, Mat& dst, Mat mask = Mat(), int dtype = -1)
+ //
+
+ //javadoc: add(src1, src2, dst, mask, dtype)
+ public static void add(Mat src1, Mat src2, Mat dst, Mat mask, int dtype)
+ {
+
+ add_0(src1.nativeObj, src2.nativeObj, dst.nativeObj, mask.nativeObj, dtype);
+
+ return;
+ }
+
+ //javadoc: add(src1, src2, dst, mask)
+ public static void add(Mat src1, Mat src2, Mat dst, Mat mask)
+ {
+
+ add_1(src1.nativeObj, src2.nativeObj, dst.nativeObj, mask.nativeObj);
+
+ return;
+ }
+
+ //javadoc: add(src1, src2, dst)
+ public static void add(Mat src1, Mat src2, Mat dst)
+ {
+
+ add_2(src1.nativeObj, src2.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void subtract(Mat src1, Mat src2, Mat& dst, Mat mask = Mat(), int dtype = -1)
+ //
+
+ //javadoc: subtract(src1, src2, dst, mask, dtype)
+ public static void subtract(Mat src1, Mat src2, Mat dst, Mat mask, int dtype)
+ {
+
+ subtract_0(src1.nativeObj, src2.nativeObj, dst.nativeObj, mask.nativeObj, dtype);
+
+ return;
+ }
+
+ //javadoc: subtract(src1, src2, dst, mask)
+ public static void subtract(Mat src1, Mat src2, Mat dst, Mat mask)
+ {
+
+ subtract_1(src1.nativeObj, src2.nativeObj, dst.nativeObj, mask.nativeObj);
+
+ return;
+ }
+
+ //javadoc: subtract(src1, src2, dst)
+ public static void subtract(Mat src1, Mat src2, Mat dst)
+ {
+
+ subtract_2(src1.nativeObj, src2.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void multiply(Mat src1, Mat src2, Mat& dst, double scale = 1, int dtype = -1)
+ //
+
+ //javadoc: multiply(src1, src2, dst, scale, dtype)
+ public static void multiply(Mat src1, Mat src2, Mat dst, double scale, int dtype)
+ {
+
+ multiply_0(src1.nativeObj, src2.nativeObj, dst.nativeObj, scale, dtype);
+
+ return;
+ }
+
+ //javadoc: multiply(src1, src2, dst, scale)
+ public static void multiply(Mat src1, Mat src2, Mat dst, double scale)
+ {
+
+ multiply_1(src1.nativeObj, src2.nativeObj, dst.nativeObj, scale);
+
+ return;
+ }
+
+ //javadoc: multiply(src1, src2, dst)
+ public static void multiply(Mat src1, Mat src2, Mat dst)
+ {
+
+ multiply_2(src1.nativeObj, src2.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void divide(Mat src1, Mat src2, Mat& dst, double scale = 1, int dtype = -1)
+ //
+
+ //javadoc: divide(src1, src2, dst, scale, dtype)
+ public static void divide(Mat src1, Mat src2, Mat dst, double scale, int dtype)
+ {
+
+ divide_0(src1.nativeObj, src2.nativeObj, dst.nativeObj, scale, dtype);
+
+ return;
+ }
+
+ //javadoc: divide(src1, src2, dst, scale)
+ public static void divide(Mat src1, Mat src2, Mat dst, double scale)
+ {
+
+ divide_1(src1.nativeObj, src2.nativeObj, dst.nativeObj, scale);
+
+ return;
+ }
+
+ //javadoc: divide(src1, src2, dst)
+ public static void divide(Mat src1, Mat src2, Mat dst)
+ {
+
+ divide_2(src1.nativeObj, src2.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void divide(double scale, Mat src2, Mat& dst, int dtype = -1)
+ //
+
+ //javadoc: divide(scale, src2, dst, dtype)
+ public static void divide(double scale, Mat src2, Mat dst, int dtype)
+ {
+
+ divide_3(scale, src2.nativeObj, dst.nativeObj, dtype);
+
+ return;
+ }
+
+ //javadoc: divide(scale, src2, dst)
+ public static void divide(double scale, Mat src2, Mat dst)
+ {
+
+ divide_4(scale, src2.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void scaleAdd(Mat src1, double alpha, Mat src2, Mat& dst)
+ //
+
+ //javadoc: scaleAdd(src1, alpha, src2, dst)
+ public static void scaleAdd(Mat src1, double alpha, Mat src2, Mat dst)
+ {
+
+ scaleAdd_0(src1.nativeObj, alpha, src2.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void addWeighted(Mat src1, double alpha, Mat src2, double beta, double gamma, Mat& dst, int dtype = -1)
+ //
+
+ //javadoc: addWeighted(src1, alpha, src2, beta, gamma, dst, dtype)
+ public static void addWeighted(Mat src1, double alpha, Mat src2, double beta, double gamma, Mat dst, int dtype)
+ {
+
+ addWeighted_0(src1.nativeObj, alpha, src2.nativeObj, beta, gamma, dst.nativeObj, dtype);
+
+ return;
+ }
+
+ //javadoc: addWeighted(src1, alpha, src2, beta, gamma, dst)
+ public static void addWeighted(Mat src1, double alpha, Mat src2, double beta, double gamma, Mat dst)
+ {
+
+ addWeighted_1(src1.nativeObj, alpha, src2.nativeObj, beta, gamma, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void convertScaleAbs(Mat src, Mat& dst, double alpha = 1, double beta = 0)
+ //
+
+ //javadoc: convertScaleAbs(src, dst, alpha, beta)
+ public static void convertScaleAbs(Mat src, Mat dst, double alpha, double beta)
+ {
+
+ convertScaleAbs_0(src.nativeObj, dst.nativeObj, alpha, beta);
+
+ return;
+ }
+
+ //javadoc: convertScaleAbs(src, dst)
+ public static void convertScaleAbs(Mat src, Mat dst)
+ {
+
+ convertScaleAbs_1(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: Scalar sum(Mat src)
+ //
+
+ //javadoc: sum(src)
+ public static Scalar sumElems(Mat src)
+ {
+
+ Scalar retVal = new Scalar(sumElems_0(src.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void LUT(Mat src, Mat lut, Mat& dst)
+ //
+
+ //javadoc: LUT(src, lut, dst)
+ public static void LUT(Mat src, Mat lut, Mat dst)
+ {
+
+ LUT_0(src.nativeObj, lut.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void findNonZero(Mat src, Mat& idx)
+ //
+
+ //javadoc: findNonZero(src, idx)
+ public static void findNonZero(Mat src, Mat idx)
+ {
+
+ findNonZero_0(src.nativeObj, idx.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: int countNonZero(Mat src)
+ //
+
+ //javadoc: countNonZero(src)
+ public static int countNonZero(Mat src)
+ {
+
+ int retVal = countNonZero_0(src.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Scalar mean(Mat src, Mat mask = Mat())
+ //
+
+ //javadoc: mean(src, mask)
+ public static Scalar mean(Mat src, Mat mask)
+ {
+
+ Scalar retVal = new Scalar(mean_0(src.nativeObj, mask.nativeObj));
+
+ return retVal;
+ }
+
+ //javadoc: mean(src)
+ public static Scalar mean(Mat src)
+ {
+
+ Scalar retVal = new Scalar(mean_1(src.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void meanStdDev(Mat src, vector_double& mean, vector_double& stddev, Mat mask = Mat())
+ //
+
+ //javadoc: meanStdDev(src, mean, stddev, mask)
+ public static void meanStdDev(Mat src, MatOfDouble mean, MatOfDouble stddev, Mat mask)
+ {
+ Mat mean_mat = mean;
+ Mat stddev_mat = stddev;
+ meanStdDev_0(src.nativeObj, mean_mat.nativeObj, stddev_mat.nativeObj, mask.nativeObj);
+
+ return;
+ }
+
+ //javadoc: meanStdDev(src, mean, stddev)
+ public static void meanStdDev(Mat src, MatOfDouble mean, MatOfDouble stddev)
+ {
+ Mat mean_mat = mean;
+ Mat stddev_mat = stddev;
+ meanStdDev_1(src.nativeObj, mean_mat.nativeObj, stddev_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: double norm(Mat src1, int normType = NORM_L2, Mat mask = Mat())
+ //
+
+ //javadoc: norm(src1, normType, mask)
+ public static double norm(Mat src1, int normType, Mat mask)
+ {
+
+ double retVal = norm_0(src1.nativeObj, normType, mask.nativeObj);
+
+ return retVal;
+ }
+
+ //javadoc: norm(src1, normType)
+ public static double norm(Mat src1, int normType)
+ {
+
+ double retVal = norm_1(src1.nativeObj, normType);
+
+ return retVal;
+ }
+
+ //javadoc: norm(src1)
+ public static double norm(Mat src1)
+ {
+
+ double retVal = norm_2(src1.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double norm(Mat src1, Mat src2, int normType = NORM_L2, Mat mask = Mat())
+ //
+
+ //javadoc: norm(src1, src2, normType, mask)
+ public static double norm(Mat src1, Mat src2, int normType, Mat mask)
+ {
+
+ double retVal = norm_3(src1.nativeObj, src2.nativeObj, normType, mask.nativeObj);
+
+ return retVal;
+ }
+
+ //javadoc: norm(src1, src2, normType)
+ public static double norm(Mat src1, Mat src2, int normType)
+ {
+
+ double retVal = norm_4(src1.nativeObj, src2.nativeObj, normType);
+
+ return retVal;
+ }
+
+ //javadoc: norm(src1, src2)
+ public static double norm(Mat src1, Mat src2)
+ {
+
+ double retVal = norm_5(src1.nativeObj, src2.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double PSNR(Mat src1, Mat src2)
+ //
+
+ //javadoc: PSNR(src1, src2)
+ public static double PSNR(Mat src1, Mat src2)
+ {
+
+ double retVal = PSNR_0(src1.nativeObj, src2.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void batchDistance(Mat src1, Mat src2, Mat& dist, int dtype, Mat& nidx, int normType = NORM_L2, int K = 0, Mat mask = Mat(), int update = 0, bool crosscheck = false)
+ //
+
+ //javadoc: batchDistance(src1, src2, dist, dtype, nidx, normType, K, mask, update, crosscheck)
+ public static void batchDistance(Mat src1, Mat src2, Mat dist, int dtype, Mat nidx, int normType, int K, Mat mask, int update, boolean crosscheck)
+ {
+
+ batchDistance_0(src1.nativeObj, src2.nativeObj, dist.nativeObj, dtype, nidx.nativeObj, normType, K, mask.nativeObj, update, crosscheck);
+
+ return;
+ }
+
+ //javadoc: batchDistance(src1, src2, dist, dtype, nidx, normType, K)
+ public static void batchDistance(Mat src1, Mat src2, Mat dist, int dtype, Mat nidx, int normType, int K)
+ {
+
+ batchDistance_1(src1.nativeObj, src2.nativeObj, dist.nativeObj, dtype, nidx.nativeObj, normType, K);
+
+ return;
+ }
+
+ //javadoc: batchDistance(src1, src2, dist, dtype, nidx)
+ public static void batchDistance(Mat src1, Mat src2, Mat dist, int dtype, Mat nidx)
+ {
+
+ batchDistance_2(src1.nativeObj, src2.nativeObj, dist.nativeObj, dtype, nidx.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: float cubeRoot(float val)
+ //
+
+ //javadoc: cubeRoot(val)
+ public static float cubeRoot(float val)
+ {
+
+ float retVal = cubeRoot_0(val);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: float fastAtan2(float y, float x)
+ //
+
+ //javadoc: fastAtan2(y, x)
+ public static float fastAtan2(float y, float x)
+ {
+
+ float retVal = fastAtan2_0(y, x);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void merge(vector_Mat mv, Mat& dst)
+ //
+
+ //javadoc: merge(mv, dst)
+ public static void merge(List<Mat> mv, Mat dst)
+ {
+ Mat mv_mat = Converters.vector_Mat_to_Mat(mv);
+ merge_0(mv_mat.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void split(Mat m, vector_Mat& mv)
+ //
+
+ //javadoc: split(m, mv)
+ public static void split(Mat m, List<Mat> mv)
+ {
+ Mat mv_mat = new Mat();
+ split_0(m.nativeObj, mv_mat.nativeObj);
+ Converters.Mat_to_vector_Mat(mv_mat, mv);
+ mv_mat.release();
+ return;
+ }
+
+
+ //
+ // C++: void mixChannels(vector_Mat src, vector_Mat dst, vector_int fromTo)
+ //
+
+ //javadoc: mixChannels(src, dst, fromTo)
+ public static void mixChannels(List<Mat> src, List<Mat> dst, MatOfInt fromTo)
+ {
+ Mat src_mat = Converters.vector_Mat_to_Mat(src);
+ Mat dst_mat = Converters.vector_Mat_to_Mat(dst);
+ Mat fromTo_mat = fromTo;
+ mixChannels_0(src_mat.nativeObj, dst_mat.nativeObj, fromTo_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void extractChannel(Mat src, Mat& dst, int coi)
+ //
+
+ //javadoc: extractChannel(src, dst, coi)
+ public static void extractChannel(Mat src, Mat dst, int coi)
+ {
+
+ extractChannel_0(src.nativeObj, dst.nativeObj, coi);
+
+ return;
+ }
+
+
+ //
+ // C++: void insertChannel(Mat src, Mat& dst, int coi)
+ //
+
+ //javadoc: insertChannel(src, dst, coi)
+ public static void insertChannel(Mat src, Mat dst, int coi)
+ {
+
+ insertChannel_0(src.nativeObj, dst.nativeObj, coi);
+
+ return;
+ }
+
+
+ //
+ // C++: void normalize(Mat src, Mat& dst, double alpha = 1, double beta = 0, int norm_type = NORM_L2, int dtype = -1, Mat mask = Mat())
+ //
+
+ //javadoc: normalize(src, dst, alpha, beta, norm_type, dtype, mask)
+ public static void normalize(Mat src, Mat dst, double alpha, double beta, int norm_type, int dtype, Mat mask)
+ {
+
+ normalize_0(src.nativeObj, dst.nativeObj, alpha, beta, norm_type, dtype, mask.nativeObj);
+
+ return;
+ }
+
+ //javadoc: normalize(src, dst, alpha, beta, norm_type, dtype)
+ public static void normalize(Mat src, Mat dst, double alpha, double beta, int norm_type, int dtype)
+ {
+
+ normalize_1(src.nativeObj, dst.nativeObj, alpha, beta, norm_type, dtype);
+
+ return;
+ }
+
+ //javadoc: normalize(src, dst, alpha, beta, norm_type)
+ public static void normalize(Mat src, Mat dst, double alpha, double beta, int norm_type)
+ {
+
+ normalize_2(src.nativeObj, dst.nativeObj, alpha, beta, norm_type);
+
+ return;
+ }
+
+ //javadoc: normalize(src, dst)
+ public static void normalize(Mat src, Mat dst)
+ {
+
+ normalize_3(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void reduce(Mat src, Mat& dst, int dim, int rtype, int dtype = -1)
+ //
+
+ //javadoc: reduce(src, dst, dim, rtype, dtype)
+ public static void reduce(Mat src, Mat dst, int dim, int rtype, int dtype)
+ {
+
+ reduce_0(src.nativeObj, dst.nativeObj, dim, rtype, dtype);
+
+ return;
+ }
+
+ //javadoc: reduce(src, dst, dim, rtype)
+ public static void reduce(Mat src, Mat dst, int dim, int rtype)
+ {
+
+ reduce_1(src.nativeObj, dst.nativeObj, dim, rtype);
+
+ return;
+ }
+
+
+ //
+ // C++: int getNumberOfCPUs()
+ //
+
+ //javadoc: getNumberOfCPUs()
+ public static int getNumberOfCPUs()
+ {
+
+ int retVal = getNumberOfCPUs_0();
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void add(Mat src1, Scalar src2, Mat& dst, Mat mask = Mat(), int dtype = -1)
+ //
+
+ //javadoc: add(src1, src2, dst, mask, dtype)
+ public static void add(Mat src1, Scalar src2, Mat dst, Mat mask, int dtype)
+ {
+
+ add_3(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj, mask.nativeObj, dtype);
+
+ return;
+ }
+
+ //javadoc: add(src1, src2, dst, mask)
+ public static void add(Mat src1, Scalar src2, Mat dst, Mat mask)
+ {
+
+ add_4(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj, mask.nativeObj);
+
+ return;
+ }
+
+ //javadoc: add(src1, src2, dst)
+ public static void add(Mat src1, Scalar src2, Mat dst)
+ {
+
+ add_5(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void subtract(Mat src1, Scalar src2, Mat& dst, Mat mask = Mat(), int dtype = -1)
+ //
+
+ //javadoc: subtract(src1, src2, dst, mask, dtype)
+ public static void subtract(Mat src1, Scalar src2, Mat dst, Mat mask, int dtype)
+ {
+
+ subtract_3(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj, mask.nativeObj, dtype);
+
+ return;
+ }
+
+ //javadoc: subtract(src1, src2, dst, mask)
+ public static void subtract(Mat src1, Scalar src2, Mat dst, Mat mask)
+ {
+
+ subtract_4(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj, mask.nativeObj);
+
+ return;
+ }
+
+ //javadoc: subtract(src1, src2, dst)
+ public static void subtract(Mat src1, Scalar src2, Mat dst)
+ {
+
+ subtract_5(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void multiply(Mat src1, Scalar src2, Mat& dst, double scale = 1, int dtype = -1)
+ //
+
+ //javadoc: multiply(src1, src2, dst, scale, dtype)
+ public static void multiply(Mat src1, Scalar src2, Mat dst, double scale, int dtype)
+ {
+
+ multiply_3(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj, scale, dtype);
+
+ return;
+ }
+
+ //javadoc: multiply(src1, src2, dst, scale)
+ public static void multiply(Mat src1, Scalar src2, Mat dst, double scale)
+ {
+
+ multiply_4(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj, scale);
+
+ return;
+ }
+
+ //javadoc: multiply(src1, src2, dst)
+ public static void multiply(Mat src1, Scalar src2, Mat dst)
+ {
+
+ multiply_5(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void divide(Mat src1, Scalar src2, Mat& dst, double scale = 1, int dtype = -1)
+ //
+
+ //javadoc: divide(src1, src2, dst, scale, dtype)
+ public static void divide(Mat src1, Scalar src2, Mat dst, double scale, int dtype)
+ {
+
+ divide_5(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj, scale, dtype);
+
+ return;
+ }
+
+ //javadoc: divide(src1, src2, dst, scale)
+ public static void divide(Mat src1, Scalar src2, Mat dst, double scale)
+ {
+
+ divide_6(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj, scale);
+
+ return;
+ }
+
+ //javadoc: divide(src1, src2, dst)
+ public static void divide(Mat src1, Scalar src2, Mat dst)
+ {
+
+ divide_7(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void absdiff(Mat src1, Scalar src2, Mat& dst)
+ //
+
+ //javadoc: absdiff(src1, src2, dst)
+ public static void absdiff(Mat src1, Scalar src2, Mat dst)
+ {
+
+ absdiff_0(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void compare(Mat src1, Scalar src2, Mat& dst, int cmpop)
+ //
+
+ //javadoc: compare(src1, src2, dst, cmpop)
+ public static void compare(Mat src1, Scalar src2, Mat dst, int cmpop)
+ {
+
+ compare_0(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj, cmpop);
+
+ return;
+ }
+
+
+ //
+ // C++: void min(Mat src1, Scalar src2, Mat& dst)
+ //
+
+ //javadoc: min(src1, src2, dst)
+ public static void min(Mat src1, Scalar src2, Mat dst)
+ {
+
+ min_0(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void max(Mat src1, Scalar src2, Mat& dst)
+ //
+
+ //javadoc: max(src1, src2, dst)
+ public static void max(Mat src1, Scalar src2, Mat dst)
+ {
+
+ max_0(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: int64 getTickCount()
+ //
+
+ //javadoc: getTickCount()
+ public static long getTickCount()
+ {
+
+ long retVal = getTickCount_0();
+
+ return retVal;
+ }
+
+
+ //
+ // C++: String getBuildInformation()
+ //
+
+ //javadoc: getBuildInformation()
+ public static String getBuildInformation()
+ {
+
+ String retVal = getBuildInformation_0();
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void flip(Mat src, Mat& dst, int flipCode)
+ //
+
+ //javadoc: flip(src, dst, flipCode)
+ public static void flip(Mat src, Mat dst, int flipCode)
+ {
+
+ flip_0(src.nativeObj, dst.nativeObj, flipCode);
+
+ return;
+ }
+
+
+ //
+ // C++: void repeat(Mat src, int ny, int nx, Mat& dst)
+ //
+
+ //javadoc: repeat(src, ny, nx, dst)
+ public static void repeat(Mat src, int ny, int nx, Mat dst)
+ {
+
+ repeat_0(src.nativeObj, ny, nx, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void hconcat(vector_Mat src, Mat& dst)
+ //
+
+ //javadoc: hconcat(src, dst)
+ public static void hconcat(List<Mat> src, Mat dst)
+ {
+ Mat src_mat = Converters.vector_Mat_to_Mat(src);
+ hconcat_0(src_mat.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void vconcat(vector_Mat src, Mat& dst)
+ //
+
+ //javadoc: vconcat(src, dst)
+ public static void vconcat(List<Mat> src, Mat dst)
+ {
+ Mat src_mat = Converters.vector_Mat_to_Mat(src);
+ vconcat_0(src_mat.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void bitwise_and(Mat src1, Mat src2, Mat& dst, Mat mask = Mat())
+ //
+
+ //javadoc: bitwise_and(src1, src2, dst, mask)
+ public static void bitwise_and(Mat src1, Mat src2, Mat dst, Mat mask)
+ {
+
+ bitwise_and_0(src1.nativeObj, src2.nativeObj, dst.nativeObj, mask.nativeObj);
+
+ return;
+ }
+
+ //javadoc: bitwise_and(src1, src2, dst)
+ public static void bitwise_and(Mat src1, Mat src2, Mat dst)
+ {
+
+ bitwise_and_1(src1.nativeObj, src2.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void bitwise_or(Mat src1, Mat src2, Mat& dst, Mat mask = Mat())
+ //
+
+ //javadoc: bitwise_or(src1, src2, dst, mask)
+ public static void bitwise_or(Mat src1, Mat src2, Mat dst, Mat mask)
+ {
+
+ bitwise_or_0(src1.nativeObj, src2.nativeObj, dst.nativeObj, mask.nativeObj);
+
+ return;
+ }
+
+ //javadoc: bitwise_or(src1, src2, dst)
+ public static void bitwise_or(Mat src1, Mat src2, Mat dst)
+ {
+
+ bitwise_or_1(src1.nativeObj, src2.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void bitwise_xor(Mat src1, Mat src2, Mat& dst, Mat mask = Mat())
+ //
+
+ //javadoc: bitwise_xor(src1, src2, dst, mask)
+ public static void bitwise_xor(Mat src1, Mat src2, Mat dst, Mat mask)
+ {
+
+ bitwise_xor_0(src1.nativeObj, src2.nativeObj, dst.nativeObj, mask.nativeObj);
+
+ return;
+ }
+
+ //javadoc: bitwise_xor(src1, src2, dst)
+ public static void bitwise_xor(Mat src1, Mat src2, Mat dst)
+ {
+
+ bitwise_xor_1(src1.nativeObj, src2.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void bitwise_not(Mat src, Mat& dst, Mat mask = Mat())
+ //
+
+ //javadoc: bitwise_not(src, dst, mask)
+ public static void bitwise_not(Mat src, Mat dst, Mat mask)
+ {
+
+ bitwise_not_0(src.nativeObj, dst.nativeObj, mask.nativeObj);
+
+ return;
+ }
+
+ //javadoc: bitwise_not(src, dst)
+ public static void bitwise_not(Mat src, Mat dst)
+ {
+
+ bitwise_not_1(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void absdiff(Mat src1, Mat src2, Mat& dst)
+ //
+
+ //javadoc: absdiff(src1, src2, dst)
+ public static void absdiff(Mat src1, Mat src2, Mat dst)
+ {
+
+ absdiff_1(src1.nativeObj, src2.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void inRange(Mat src, Scalar lowerb, Scalar upperb, Mat& dst)
+ //
+
+ //javadoc: inRange(src, lowerb, upperb, dst)
+ public static void inRange(Mat src, Scalar lowerb, Scalar upperb, Mat dst)
+ {
+
+ inRange_0(src.nativeObj, lowerb.val[0], lowerb.val[1], lowerb.val[2], lowerb.val[3], upperb.val[0], upperb.val[1], upperb.val[2], upperb.val[3], dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void compare(Mat src1, Mat src2, Mat& dst, int cmpop)
+ //
+
+ //javadoc: compare(src1, src2, dst, cmpop)
+ public static void compare(Mat src1, Mat src2, Mat dst, int cmpop)
+ {
+
+ compare_1(src1.nativeObj, src2.nativeObj, dst.nativeObj, cmpop);
+
+ return;
+ }
+
+
+ //
+ // C++: void min(Mat src1, Mat src2, Mat& dst)
+ //
+
+ //javadoc: min(src1, src2, dst)
+ public static void min(Mat src1, Mat src2, Mat dst)
+ {
+
+ min_1(src1.nativeObj, src2.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void max(Mat src1, Mat src2, Mat& dst)
+ //
+
+ //javadoc: max(src1, src2, dst)
+ public static void max(Mat src1, Mat src2, Mat dst)
+ {
+
+ max_1(src1.nativeObj, src2.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void sqrt(Mat src, Mat& dst)
+ //
+
+ //javadoc: sqrt(src, dst)
+ public static void sqrt(Mat src, Mat dst)
+ {
+
+ sqrt_0(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void pow(Mat src, double power, Mat& dst)
+ //
+
+ //javadoc: pow(src, power, dst)
+ public static void pow(Mat src, double power, Mat dst)
+ {
+
+ pow_0(src.nativeObj, power, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void exp(Mat src, Mat& dst)
+ //
+
+ //javadoc: exp(src, dst)
+ public static void exp(Mat src, Mat dst)
+ {
+
+ exp_0(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void log(Mat src, Mat& dst)
+ //
+
+ //javadoc: log(src, dst)
+ public static void log(Mat src, Mat dst)
+ {
+
+ log_0(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void polarToCart(Mat magnitude, Mat angle, Mat& x, Mat& y, bool angleInDegrees = false)
+ //
+
+ //javadoc: polarToCart(magnitude, angle, x, y, angleInDegrees)
+ public static void polarToCart(Mat magnitude, Mat angle, Mat x, Mat y, boolean angleInDegrees)
+ {
+
+ polarToCart_0(magnitude.nativeObj, angle.nativeObj, x.nativeObj, y.nativeObj, angleInDegrees);
+
+ return;
+ }
+
+ //javadoc: polarToCart(magnitude, angle, x, y)
+ public static void polarToCart(Mat magnitude, Mat angle, Mat x, Mat y)
+ {
+
+ polarToCart_1(magnitude.nativeObj, angle.nativeObj, x.nativeObj, y.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void cartToPolar(Mat x, Mat y, Mat& magnitude, Mat& angle, bool angleInDegrees = false)
+ //
+
+ //javadoc: cartToPolar(x, y, magnitude, angle, angleInDegrees)
+ public static void cartToPolar(Mat x, Mat y, Mat magnitude, Mat angle, boolean angleInDegrees)
+ {
+
+ cartToPolar_0(x.nativeObj, y.nativeObj, magnitude.nativeObj, angle.nativeObj, angleInDegrees);
+
+ return;
+ }
+
+ //javadoc: cartToPolar(x, y, magnitude, angle)
+ public static void cartToPolar(Mat x, Mat y, Mat magnitude, Mat angle)
+ {
+
+ cartToPolar_1(x.nativeObj, y.nativeObj, magnitude.nativeObj, angle.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void phase(Mat x, Mat y, Mat& angle, bool angleInDegrees = false)
+ //
+
+ //javadoc: phase(x, y, angle, angleInDegrees)
+ public static void phase(Mat x, Mat y, Mat angle, boolean angleInDegrees)
+ {
+
+ phase_0(x.nativeObj, y.nativeObj, angle.nativeObj, angleInDegrees);
+
+ return;
+ }
+
+ //javadoc: phase(x, y, angle)
+ public static void phase(Mat x, Mat y, Mat angle)
+ {
+
+ phase_1(x.nativeObj, y.nativeObj, angle.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void magnitude(Mat x, Mat y, Mat& magnitude)
+ //
+
+ //javadoc: magnitude(x, y, magnitude)
+ public static void magnitude(Mat x, Mat y, Mat magnitude)
+ {
+
+ magnitude_0(x.nativeObj, y.nativeObj, magnitude.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: bool checkRange(Mat a, bool quiet = true, _hidden_ * pos = 0, double minVal = -DBL_MAX, double maxVal = DBL_MAX)
+ //
+
+ //javadoc: checkRange(a, quiet, minVal, maxVal)
+ public static boolean checkRange(Mat a, boolean quiet, double minVal, double maxVal)
+ {
+
+ boolean retVal = checkRange_0(a.nativeObj, quiet, minVal, maxVal);
+
+ return retVal;
+ }
+
+ //javadoc: checkRange(a)
+ public static boolean checkRange(Mat a)
+ {
+
+ boolean retVal = checkRange_1(a.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void patchNaNs(Mat& a, double val = 0)
+ //
+
+ //javadoc: patchNaNs(a, val)
+ public static void patchNaNs(Mat a, double val)
+ {
+
+ patchNaNs_0(a.nativeObj, val);
+
+ return;
+ }
+
+ //javadoc: patchNaNs(a)
+ public static void patchNaNs(Mat a)
+ {
+
+ patchNaNs_1(a.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void gemm(Mat src1, Mat src2, double alpha, Mat src3, double beta, Mat& dst, int flags = 0)
+ //
+
+ //javadoc: gemm(src1, src2, alpha, src3, beta, dst, flags)
+ public static void gemm(Mat src1, Mat src2, double alpha, Mat src3, double beta, Mat dst, int flags)
+ {
+
+ gemm_0(src1.nativeObj, src2.nativeObj, alpha, src3.nativeObj, beta, dst.nativeObj, flags);
+
+ return;
+ }
+
+ //javadoc: gemm(src1, src2, alpha, src3, beta, dst)
+ public static void gemm(Mat src1, Mat src2, double alpha, Mat src3, double beta, Mat dst)
+ {
+
+ gemm_1(src1.nativeObj, src2.nativeObj, alpha, src3.nativeObj, beta, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void mulTransposed(Mat src, Mat& dst, bool aTa, Mat delta = Mat(), double scale = 1, int dtype = -1)
+ //
+
+ //javadoc: mulTransposed(src, dst, aTa, delta, scale, dtype)
+ public static void mulTransposed(Mat src, Mat dst, boolean aTa, Mat delta, double scale, int dtype)
+ {
+
+ mulTransposed_0(src.nativeObj, dst.nativeObj, aTa, delta.nativeObj, scale, dtype);
+
+ return;
+ }
+
+ //javadoc: mulTransposed(src, dst, aTa, delta, scale)
+ public static void mulTransposed(Mat src, Mat dst, boolean aTa, Mat delta, double scale)
+ {
+
+ mulTransposed_1(src.nativeObj, dst.nativeObj, aTa, delta.nativeObj, scale);
+
+ return;
+ }
+
+ //javadoc: mulTransposed(src, dst, aTa)
+ public static void mulTransposed(Mat src, Mat dst, boolean aTa)
+ {
+
+ mulTransposed_2(src.nativeObj, dst.nativeObj, aTa);
+
+ return;
+ }
+
+
+ //
+ // C++: void transpose(Mat src, Mat& dst)
+ //
+
+ //javadoc: transpose(src, dst)
+ public static void transpose(Mat src, Mat dst)
+ {
+
+ transpose_0(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void transform(Mat src, Mat& dst, Mat m)
+ //
+
+ //javadoc: transform(src, dst, m)
+ public static void transform(Mat src, Mat dst, Mat m)
+ {
+
+ transform_0(src.nativeObj, dst.nativeObj, m.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void perspectiveTransform(Mat src, Mat& dst, Mat m)
+ //
+
+ //javadoc: perspectiveTransform(src, dst, m)
+ public static void perspectiveTransform(Mat src, Mat dst, Mat m)
+ {
+
+ perspectiveTransform_0(src.nativeObj, dst.nativeObj, m.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void completeSymm(Mat& mtx, bool lowerToUpper = false)
+ //
+
+ //javadoc: completeSymm(mtx, lowerToUpper)
+ public static void completeSymm(Mat mtx, boolean lowerToUpper)
+ {
+
+ completeSymm_0(mtx.nativeObj, lowerToUpper);
+
+ return;
+ }
+
+ //javadoc: completeSymm(mtx)
+ public static void completeSymm(Mat mtx)
+ {
+
+ completeSymm_1(mtx.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void setIdentity(Mat& mtx, Scalar s = Scalar(1))
+ //
+
+ //javadoc: setIdentity(mtx, s)
+ public static void setIdentity(Mat mtx, Scalar s)
+ {
+
+ setIdentity_0(mtx.nativeObj, s.val[0], s.val[1], s.val[2], s.val[3]);
+
+ return;
+ }
+
+ //javadoc: setIdentity(mtx)
+ public static void setIdentity(Mat mtx)
+ {
+
+ setIdentity_1(mtx.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: double determinant(Mat mtx)
+ //
+
+ //javadoc: determinant(mtx)
+ public static double determinant(Mat mtx)
+ {
+
+ double retVal = determinant_0(mtx.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Scalar trace(Mat mtx)
+ //
+
+ //javadoc: trace(mtx)
+ public static Scalar trace(Mat mtx)
+ {
+
+ Scalar retVal = new Scalar(trace_0(mtx.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double invert(Mat src, Mat& dst, int flags = DECOMP_LU)
+ //
+
+ //javadoc: invert(src, dst, flags)
+ public static double invert(Mat src, Mat dst, int flags)
+ {
+
+ double retVal = invert_0(src.nativeObj, dst.nativeObj, flags);
+
+ return retVal;
+ }
+
+ //javadoc: invert(src, dst)
+ public static double invert(Mat src, Mat dst)
+ {
+
+ double retVal = invert_1(src.nativeObj, dst.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool solve(Mat src1, Mat src2, Mat& dst, int flags = DECOMP_LU)
+ //
+
+ //javadoc: solve(src1, src2, dst, flags)
+ public static boolean solve(Mat src1, Mat src2, Mat dst, int flags)
+ {
+
+ boolean retVal = solve_0(src1.nativeObj, src2.nativeObj, dst.nativeObj, flags);
+
+ return retVal;
+ }
+
+ //javadoc: solve(src1, src2, dst)
+ public static boolean solve(Mat src1, Mat src2, Mat dst)
+ {
+
+ boolean retVal = solve_1(src1.nativeObj, src2.nativeObj, dst.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void sort(Mat src, Mat& dst, int flags)
+ //
+
+ //javadoc: sort(src, dst, flags)
+ public static void sort(Mat src, Mat dst, int flags)
+ {
+
+ sort_0(src.nativeObj, dst.nativeObj, flags);
+
+ return;
+ }
+
+
+ //
+ // C++: void sortIdx(Mat src, Mat& dst, int flags)
+ //
+
+ //javadoc: sortIdx(src, dst, flags)
+ public static void sortIdx(Mat src, Mat dst, int flags)
+ {
+
+ sortIdx_0(src.nativeObj, dst.nativeObj, flags);
+
+ return;
+ }
+
+
+ //
+ // C++: int solveCubic(Mat coeffs, Mat& roots)
+ //
+
+ //javadoc: solveCubic(coeffs, roots)
+ public static int solveCubic(Mat coeffs, Mat roots)
+ {
+
+ int retVal = solveCubic_0(coeffs.nativeObj, roots.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double solvePoly(Mat coeffs, Mat& roots, int maxIters = 300)
+ //
+
+ //javadoc: solvePoly(coeffs, roots, maxIters)
+ public static double solvePoly(Mat coeffs, Mat roots, int maxIters)
+ {
+
+ double retVal = solvePoly_0(coeffs.nativeObj, roots.nativeObj, maxIters);
+
+ return retVal;
+ }
+
+ //javadoc: solvePoly(coeffs, roots)
+ public static double solvePoly(Mat coeffs, Mat roots)
+ {
+
+ double retVal = solvePoly_1(coeffs.nativeObj, roots.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool eigen(Mat src, Mat& eigenvalues, Mat& eigenvectors = Mat())
+ //
+
+ //javadoc: eigen(src, eigenvalues, eigenvectors)
+ public static boolean eigen(Mat src, Mat eigenvalues, Mat eigenvectors)
+ {
+
+ boolean retVal = eigen_0(src.nativeObj, eigenvalues.nativeObj, eigenvectors.nativeObj);
+
+ return retVal;
+ }
+
+ //javadoc: eigen(src, eigenvalues)
+ public static boolean eigen(Mat src, Mat eigenvalues)
+ {
+
+ boolean retVal = eigen_1(src.nativeObj, eigenvalues.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void calcCovarMatrix(Mat samples, Mat& covar, Mat& mean, int flags, int ctype = CV_64F)
+ //
+
+ //javadoc: calcCovarMatrix(samples, covar, mean, flags, ctype)
+ public static void calcCovarMatrix(Mat samples, Mat covar, Mat mean, int flags, int ctype)
+ {
+
+ calcCovarMatrix_0(samples.nativeObj, covar.nativeObj, mean.nativeObj, flags, ctype);
+
+ return;
+ }
+
+ //javadoc: calcCovarMatrix(samples, covar, mean, flags)
+ public static void calcCovarMatrix(Mat samples, Mat covar, Mat mean, int flags)
+ {
+
+ calcCovarMatrix_1(samples.nativeObj, covar.nativeObj, mean.nativeObj, flags);
+
+ return;
+ }
+
+
+ //
+ // C++: void PCACompute(Mat data, Mat& mean, Mat& eigenvectors, int maxComponents = 0)
+ //
+
+ //javadoc: PCACompute(data, mean, eigenvectors, maxComponents)
+ public static void PCACompute(Mat data, Mat mean, Mat eigenvectors, int maxComponents)
+ {
+
+ PCACompute_0(data.nativeObj, mean.nativeObj, eigenvectors.nativeObj, maxComponents);
+
+ return;
+ }
+
+ //javadoc: PCACompute(data, mean, eigenvectors)
+ public static void PCACompute(Mat data, Mat mean, Mat eigenvectors)
+ {
+
+ PCACompute_1(data.nativeObj, mean.nativeObj, eigenvectors.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void PCACompute(Mat data, Mat& mean, Mat& eigenvectors, double retainedVariance)
+ //
+
+ //javadoc: PCACompute(data, mean, eigenvectors, retainedVariance)
+ public static void PCACompute(Mat data, Mat mean, Mat eigenvectors, double retainedVariance)
+ {
+
+ PCACompute_2(data.nativeObj, mean.nativeObj, eigenvectors.nativeObj, retainedVariance);
+
+ return;
+ }
+
+
+ //
+ // C++: void PCAProject(Mat data, Mat mean, Mat eigenvectors, Mat& result)
+ //
+
+ //javadoc: PCAProject(data, mean, eigenvectors, result)
+ public static void PCAProject(Mat data, Mat mean, Mat eigenvectors, Mat result)
+ {
+
+ PCAProject_0(data.nativeObj, mean.nativeObj, eigenvectors.nativeObj, result.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void PCABackProject(Mat data, Mat mean, Mat eigenvectors, Mat& result)
+ //
+
+ //javadoc: PCABackProject(data, mean, eigenvectors, result)
+ public static void PCABackProject(Mat data, Mat mean, Mat eigenvectors, Mat result)
+ {
+
+ PCABackProject_0(data.nativeObj, mean.nativeObj, eigenvectors.nativeObj, result.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void SVDecomp(Mat src, Mat& w, Mat& u, Mat& vt, int flags = 0)
+ //
+
+ //javadoc: SVDecomp(src, w, u, vt, flags)
+ public static void SVDecomp(Mat src, Mat w, Mat u, Mat vt, int flags)
+ {
+
+ SVDecomp_0(src.nativeObj, w.nativeObj, u.nativeObj, vt.nativeObj, flags);
+
+ return;
+ }
+
+ //javadoc: SVDecomp(src, w, u, vt)
+ public static void SVDecomp(Mat src, Mat w, Mat u, Mat vt)
+ {
+
+ SVDecomp_1(src.nativeObj, w.nativeObj, u.nativeObj, vt.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void SVBackSubst(Mat w, Mat u, Mat vt, Mat rhs, Mat& dst)
+ //
+
+ //javadoc: SVBackSubst(w, u, vt, rhs, dst)
+ public static void SVBackSubst(Mat w, Mat u, Mat vt, Mat rhs, Mat dst)
+ {
+
+ SVBackSubst_0(w.nativeObj, u.nativeObj, vt.nativeObj, rhs.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: double Mahalanobis(Mat v1, Mat v2, Mat icovar)
+ //
+
+ //javadoc: Mahalanobis(v1, v2, icovar)
+ public static double Mahalanobis(Mat v1, Mat v2, Mat icovar)
+ {
+
+ double retVal = Mahalanobis_0(v1.nativeObj, v2.nativeObj, icovar.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void dft(Mat src, Mat& dst, int flags = 0, int nonzeroRows = 0)
+ //
+
+ //javadoc: dft(src, dst, flags, nonzeroRows)
+ public static void dft(Mat src, Mat dst, int flags, int nonzeroRows)
+ {
+
+ dft_0(src.nativeObj, dst.nativeObj, flags, nonzeroRows);
+
+ return;
+ }
+
+ //javadoc: dft(src, dst)
+ public static void dft(Mat src, Mat dst)
+ {
+
+ dft_1(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void idft(Mat src, Mat& dst, int flags = 0, int nonzeroRows = 0)
+ //
+
+ //javadoc: idft(src, dst, flags, nonzeroRows)
+ public static void idft(Mat src, Mat dst, int flags, int nonzeroRows)
+ {
+
+ idft_0(src.nativeObj, dst.nativeObj, flags, nonzeroRows);
+
+ return;
+ }
+
+ //javadoc: idft(src, dst)
+ public static void idft(Mat src, Mat dst)
+ {
+
+ idft_1(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void dct(Mat src, Mat& dst, int flags = 0)
+ //
+
+ //javadoc: dct(src, dst, flags)
+ public static void dct(Mat src, Mat dst, int flags)
+ {
+
+ dct_0(src.nativeObj, dst.nativeObj, flags);
+
+ return;
+ }
+
+ //javadoc: dct(src, dst)
+ public static void dct(Mat src, Mat dst)
+ {
+
+ dct_1(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void idct(Mat src, Mat& dst, int flags = 0)
+ //
+
+ //javadoc: idct(src, dst, flags)
+ public static void idct(Mat src, Mat dst, int flags)
+ {
+
+ idct_0(src.nativeObj, dst.nativeObj, flags);
+
+ return;
+ }
+
+ //javadoc: idct(src, dst)
+ public static void idct(Mat src, Mat dst)
+ {
+
+ idct_1(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ // manual port
+ public static class MinMaxLocResult {
+ public double minVal;
+ public double maxVal;
+ public Point minLoc;
+ public Point maxLoc;
+
+ public MinMaxLocResult() {
+ minVal=0; maxVal=0;
+ minLoc=new Point();
+ maxLoc=new Point();
+ }
+ }
+
+ // C++: minMaxLoc(Mat src, double* minVal, double* maxVal=0, Point* minLoc=0, Point* maxLoc=0, InputArray mask=noArray())
+
+ //javadoc: minMaxLoc(src, mask)
+ public static MinMaxLocResult minMaxLoc(Mat src, Mat mask) {
+ MinMaxLocResult res = new MinMaxLocResult();
+ long maskNativeObj=0;
+ if (mask != null) {
+ maskNativeObj=mask.nativeObj;
+ }
+ double resarr[] = n_minMaxLocManual(src.nativeObj, maskNativeObj);
+ res.minVal=resarr[0];
+ res.maxVal=resarr[1];
+ res.minLoc.x=resarr[2];
+ res.minLoc.y=resarr[3];
+ res.maxLoc.x=resarr[4];
+ res.maxLoc.y=resarr[5];
+ return res;
+ }
+
+ //javadoc: minMaxLoc(src)
+ public static MinMaxLocResult minMaxLoc(Mat src) {
+ return minMaxLoc(src, null);
+ }
+
+
+
+
+ // C++: double getTickFrequency()
+ private static native double getTickFrequency_0();
+
+ // C++: int64 getCPUTickCount()
+ private static native long getCPUTickCount_0();
+
+ // C++: void setErrorVerbosity(bool verbose)
+ private static native void setErrorVerbosity_0(boolean verbose);
+
+ // C++: void mulSpectrums(Mat a, Mat b, Mat& c, int flags, bool conjB = false)
+ private static native void mulSpectrums_0(long a_nativeObj, long b_nativeObj, long c_nativeObj, int flags, boolean conjB);
+ private static native void mulSpectrums_1(long a_nativeObj, long b_nativeObj, long c_nativeObj, int flags);
+
+ // C++: int getOptimalDFTSize(int vecsize)
+ private static native int getOptimalDFTSize_0(int vecsize);
+
+ // C++: void randu(Mat& dst, double low, double high)
+ private static native void randu_0(long dst_nativeObj, double low, double high);
+
+ // C++: void randn(Mat& dst, double mean, double stddev)
+ private static native void randn_0(long dst_nativeObj, double mean, double stddev);
+
+ // C++: void randShuffle(Mat& dst, double iterFactor = 1., RNG* rng = 0)
+ private static native void randShuffle_0(long dst_nativeObj, double iterFactor);
+ private static native void randShuffle_1(long dst_nativeObj);
+
+ // C++: double kmeans(Mat data, int K, Mat& bestLabels, TermCriteria criteria, int attempts, int flags, Mat& centers = Mat())
+ private static native double kmeans_0(long data_nativeObj, int K, long bestLabels_nativeObj, int criteria_type, int criteria_maxCount, double criteria_epsilon, int attempts, int flags, long centers_nativeObj);
+ private static native double kmeans_1(long data_nativeObj, int K, long bestLabels_nativeObj, int criteria_type, int criteria_maxCount, double criteria_epsilon, int attempts, int flags);
+
+ // C++: int borderInterpolate(int p, int len, int borderType)
+ private static native int borderInterpolate_0(int p, int len, int borderType);
+
+ // C++: void copyMakeBorder(Mat src, Mat& dst, int top, int bottom, int left, int right, int borderType, Scalar value = Scalar())
+ private static native void copyMakeBorder_0(long src_nativeObj, long dst_nativeObj, int top, int bottom, int left, int right, int borderType, double value_val0, double value_val1, double value_val2, double value_val3);
+ private static native void copyMakeBorder_1(long src_nativeObj, long dst_nativeObj, int top, int bottom, int left, int right, int borderType);
+
+ // C++: void add(Mat src1, Mat src2, Mat& dst, Mat mask = Mat(), int dtype = -1)
+ private static native void add_0(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj, long mask_nativeObj, int dtype);
+ private static native void add_1(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj, long mask_nativeObj);
+ private static native void add_2(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+ // C++: void subtract(Mat src1, Mat src2, Mat& dst, Mat mask = Mat(), int dtype = -1)
+ private static native void subtract_0(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj, long mask_nativeObj, int dtype);
+ private static native void subtract_1(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj, long mask_nativeObj);
+ private static native void subtract_2(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+ // C++: void multiply(Mat src1, Mat src2, Mat& dst, double scale = 1, int dtype = -1)
+ private static native void multiply_0(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj, double scale, int dtype);
+ private static native void multiply_1(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj, double scale);
+ private static native void multiply_2(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+ // C++: void divide(Mat src1, Mat src2, Mat& dst, double scale = 1, int dtype = -1)
+ private static native void divide_0(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj, double scale, int dtype);
+ private static native void divide_1(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj, double scale);
+ private static native void divide_2(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+ // C++: void divide(double scale, Mat src2, Mat& dst, int dtype = -1)
+ private static native void divide_3(double scale, long src2_nativeObj, long dst_nativeObj, int dtype);
+ private static native void divide_4(double scale, long src2_nativeObj, long dst_nativeObj);
+
+ // C++: void scaleAdd(Mat src1, double alpha, Mat src2, Mat& dst)
+ private static native void scaleAdd_0(long src1_nativeObj, double alpha, long src2_nativeObj, long dst_nativeObj);
+
+ // C++: void addWeighted(Mat src1, double alpha, Mat src2, double beta, double gamma, Mat& dst, int dtype = -1)
+ private static native void addWeighted_0(long src1_nativeObj, double alpha, long src2_nativeObj, double beta, double gamma, long dst_nativeObj, int dtype);
+ private static native void addWeighted_1(long src1_nativeObj, double alpha, long src2_nativeObj, double beta, double gamma, long dst_nativeObj);
+
+ // C++: void convertScaleAbs(Mat src, Mat& dst, double alpha = 1, double beta = 0)
+ private static native void convertScaleAbs_0(long src_nativeObj, long dst_nativeObj, double alpha, double beta);
+ private static native void convertScaleAbs_1(long src_nativeObj, long dst_nativeObj);
+
+ // C++: Scalar sum(Mat src)
+ private static native double[] sumElems_0(long src_nativeObj);
+
+ // C++: void LUT(Mat src, Mat lut, Mat& dst)
+ private static native void LUT_0(long src_nativeObj, long lut_nativeObj, long dst_nativeObj);
+
+ // C++: void findNonZero(Mat src, Mat& idx)
+ private static native void findNonZero_0(long src_nativeObj, long idx_nativeObj);
+
+ // C++: int countNonZero(Mat src)
+ private static native int countNonZero_0(long src_nativeObj);
+
+ // C++: Scalar mean(Mat src, Mat mask = Mat())
+ private static native double[] mean_0(long src_nativeObj, long mask_nativeObj);
+ private static native double[] mean_1(long src_nativeObj);
+
+ // C++: void meanStdDev(Mat src, vector_double& mean, vector_double& stddev, Mat mask = Mat())
+ private static native void meanStdDev_0(long src_nativeObj, long mean_mat_nativeObj, long stddev_mat_nativeObj, long mask_nativeObj);
+ private static native void meanStdDev_1(long src_nativeObj, long mean_mat_nativeObj, long stddev_mat_nativeObj);
+
+ // C++: double norm(Mat src1, int normType = NORM_L2, Mat mask = Mat())
+ private static native double norm_0(long src1_nativeObj, int normType, long mask_nativeObj);
+ private static native double norm_1(long src1_nativeObj, int normType);
+ private static native double norm_2(long src1_nativeObj);
+
+ // C++: double norm(Mat src1, Mat src2, int normType = NORM_L2, Mat mask = Mat())
+ private static native double norm_3(long src1_nativeObj, long src2_nativeObj, int normType, long mask_nativeObj);
+ private static native double norm_4(long src1_nativeObj, long src2_nativeObj, int normType);
+ private static native double norm_5(long src1_nativeObj, long src2_nativeObj);
+
+ // C++: double PSNR(Mat src1, Mat src2)
+ private static native double PSNR_0(long src1_nativeObj, long src2_nativeObj);
+
+ // C++: void batchDistance(Mat src1, Mat src2, Mat& dist, int dtype, Mat& nidx, int normType = NORM_L2, int K = 0, Mat mask = Mat(), int update = 0, bool crosscheck = false)
+ private static native void batchDistance_0(long src1_nativeObj, long src2_nativeObj, long dist_nativeObj, int dtype, long nidx_nativeObj, int normType, int K, long mask_nativeObj, int update, boolean crosscheck);
+ private static native void batchDistance_1(long src1_nativeObj, long src2_nativeObj, long dist_nativeObj, int dtype, long nidx_nativeObj, int normType, int K);
+ private static native void batchDistance_2(long src1_nativeObj, long src2_nativeObj, long dist_nativeObj, int dtype, long nidx_nativeObj);
+
+ // C++: float cubeRoot(float val)
+ private static native float cubeRoot_0(float val);
+
+ // C++: float fastAtan2(float y, float x)
+ private static native float fastAtan2_0(float y, float x);
+
+ // C++: void merge(vector_Mat mv, Mat& dst)
+ private static native void merge_0(long mv_mat_nativeObj, long dst_nativeObj);
+
+ // C++: void split(Mat m, vector_Mat& mv)
+ private static native void split_0(long m_nativeObj, long mv_mat_nativeObj);
+
+ // C++: void mixChannels(vector_Mat src, vector_Mat dst, vector_int fromTo)
+ private static native void mixChannels_0(long src_mat_nativeObj, long dst_mat_nativeObj, long fromTo_mat_nativeObj);
+
+ // C++: void extractChannel(Mat src, Mat& dst, int coi)
+ private static native void extractChannel_0(long src_nativeObj, long dst_nativeObj, int coi);
+
+ // C++: void insertChannel(Mat src, Mat& dst, int coi)
+ private static native void insertChannel_0(long src_nativeObj, long dst_nativeObj, int coi);
+
+ // C++: void normalize(Mat src, Mat& dst, double alpha = 1, double beta = 0, int norm_type = NORM_L2, int dtype = -1, Mat mask = Mat())
+ private static native void normalize_0(long src_nativeObj, long dst_nativeObj, double alpha, double beta, int norm_type, int dtype, long mask_nativeObj);
+ private static native void normalize_1(long src_nativeObj, long dst_nativeObj, double alpha, double beta, int norm_type, int dtype);
+ private static native void normalize_2(long src_nativeObj, long dst_nativeObj, double alpha, double beta, int norm_type);
+ private static native void normalize_3(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void reduce(Mat src, Mat& dst, int dim, int rtype, int dtype = -1)
+ private static native void reduce_0(long src_nativeObj, long dst_nativeObj, int dim, int rtype, int dtype);
+ private static native void reduce_1(long src_nativeObj, long dst_nativeObj, int dim, int rtype);
+
+ // C++: int getNumberOfCPUs()
+ private static native int getNumberOfCPUs_0();
+
+ // C++: void add(Mat src1, Scalar src2, Mat& dst, Mat mask = Mat(), int dtype = -1)
+ private static native void add_3(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj, long mask_nativeObj, int dtype);
+ private static native void add_4(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj, long mask_nativeObj);
+ private static native void add_5(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj);
+
+ // C++: void subtract(Mat src1, Scalar src2, Mat& dst, Mat mask = Mat(), int dtype = -1)
+ private static native void subtract_3(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj, long mask_nativeObj, int dtype);
+ private static native void subtract_4(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj, long mask_nativeObj);
+ private static native void subtract_5(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj);
+
+ // C++: void multiply(Mat src1, Scalar src2, Mat& dst, double scale = 1, int dtype = -1)
+ private static native void multiply_3(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj, double scale, int dtype);
+ private static native void multiply_4(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj, double scale);
+ private static native void multiply_5(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj);
+
+ // C++: void divide(Mat src1, Scalar src2, Mat& dst, double scale = 1, int dtype = -1)
+ private static native void divide_5(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj, double scale, int dtype);
+ private static native void divide_6(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj, double scale);
+ private static native void divide_7(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj);
+
+ // C++: void absdiff(Mat src1, Scalar src2, Mat& dst)
+ private static native void absdiff_0(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj);
+
+ // C++: void compare(Mat src1, Scalar src2, Mat& dst, int cmpop)
+ private static native void compare_0(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj, int cmpop);
+
+ // C++: void min(Mat src1, Scalar src2, Mat& dst)
+ private static native void min_0(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj);
+
+ // C++: void max(Mat src1, Scalar src2, Mat& dst)
+ private static native void max_0(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj);
+
+ // C++: int64 getTickCount()
+ private static native long getTickCount_0();
+
+ // C++: String getBuildInformation()
+ private static native String getBuildInformation_0();
+
+ // C++: void flip(Mat src, Mat& dst, int flipCode)
+ private static native void flip_0(long src_nativeObj, long dst_nativeObj, int flipCode);
+
+ // C++: void repeat(Mat src, int ny, int nx, Mat& dst)
+ private static native void repeat_0(long src_nativeObj, int ny, int nx, long dst_nativeObj);
+
+ // C++: void hconcat(vector_Mat src, Mat& dst)
+ private static native void hconcat_0(long src_mat_nativeObj, long dst_nativeObj);
+
+ // C++: void vconcat(vector_Mat src, Mat& dst)
+ private static native void vconcat_0(long src_mat_nativeObj, long dst_nativeObj);
+
+ // C++: void bitwise_and(Mat src1, Mat src2, Mat& dst, Mat mask = Mat())
+ private static native void bitwise_and_0(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj, long mask_nativeObj);
+ private static native void bitwise_and_1(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+ // C++: void bitwise_or(Mat src1, Mat src2, Mat& dst, Mat mask = Mat())
+ private static native void bitwise_or_0(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj, long mask_nativeObj);
+ private static native void bitwise_or_1(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+ // C++: void bitwise_xor(Mat src1, Mat src2, Mat& dst, Mat mask = Mat())
+ private static native void bitwise_xor_0(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj, long mask_nativeObj);
+ private static native void bitwise_xor_1(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+ // C++: void bitwise_not(Mat src, Mat& dst, Mat mask = Mat())
+ private static native void bitwise_not_0(long src_nativeObj, long dst_nativeObj, long mask_nativeObj);
+ private static native void bitwise_not_1(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void absdiff(Mat src1, Mat src2, Mat& dst)
+ private static native void absdiff_1(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+ // C++: void inRange(Mat src, Scalar lowerb, Scalar upperb, Mat& dst)
+ private static native void inRange_0(long src_nativeObj, double lowerb_val0, double lowerb_val1, double lowerb_val2, double lowerb_val3, double upperb_val0, double upperb_val1, double upperb_val2, double upperb_val3, long dst_nativeObj);
+
+ // C++: void compare(Mat src1, Mat src2, Mat& dst, int cmpop)
+ private static native void compare_1(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj, int cmpop);
+
+ // C++: void min(Mat src1, Mat src2, Mat& dst)
+ private static native void min_1(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+ // C++: void max(Mat src1, Mat src2, Mat& dst)
+ private static native void max_1(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+ // C++: void sqrt(Mat src, Mat& dst)
+ private static native void sqrt_0(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void pow(Mat src, double power, Mat& dst)
+ private static native void pow_0(long src_nativeObj, double power, long dst_nativeObj);
+
+ // C++: void exp(Mat src, Mat& dst)
+ private static native void exp_0(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void log(Mat src, Mat& dst)
+ private static native void log_0(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void polarToCart(Mat magnitude, Mat angle, Mat& x, Mat& y, bool angleInDegrees = false)
+ private static native void polarToCart_0(long magnitude_nativeObj, long angle_nativeObj, long x_nativeObj, long y_nativeObj, boolean angleInDegrees);
+ private static native void polarToCart_1(long magnitude_nativeObj, long angle_nativeObj, long x_nativeObj, long y_nativeObj);
+
+ // C++: void cartToPolar(Mat x, Mat y, Mat& magnitude, Mat& angle, bool angleInDegrees = false)
+ private static native void cartToPolar_0(long x_nativeObj, long y_nativeObj, long magnitude_nativeObj, long angle_nativeObj, boolean angleInDegrees);
+ private static native void cartToPolar_1(long x_nativeObj, long y_nativeObj, long magnitude_nativeObj, long angle_nativeObj);
+
+ // C++: void phase(Mat x, Mat y, Mat& angle, bool angleInDegrees = false)
+ private static native void phase_0(long x_nativeObj, long y_nativeObj, long angle_nativeObj, boolean angleInDegrees);
+ private static native void phase_1(long x_nativeObj, long y_nativeObj, long angle_nativeObj);
+
+ // C++: void magnitude(Mat x, Mat y, Mat& magnitude)
+ private static native void magnitude_0(long x_nativeObj, long y_nativeObj, long magnitude_nativeObj);
+
+ // C++: bool checkRange(Mat a, bool quiet = true, _hidden_ * pos = 0, double minVal = -DBL_MAX, double maxVal = DBL_MAX)
+ private static native boolean checkRange_0(long a_nativeObj, boolean quiet, double minVal, double maxVal);
+ private static native boolean checkRange_1(long a_nativeObj);
+
+ // C++: void patchNaNs(Mat& a, double val = 0)
+ private static native void patchNaNs_0(long a_nativeObj, double val);
+ private static native void patchNaNs_1(long a_nativeObj);
+
+ // C++: void gemm(Mat src1, Mat src2, double alpha, Mat src3, double beta, Mat& dst, int flags = 0)
+ private static native void gemm_0(long src1_nativeObj, long src2_nativeObj, double alpha, long src3_nativeObj, double beta, long dst_nativeObj, int flags);
+ private static native void gemm_1(long src1_nativeObj, long src2_nativeObj, double alpha, long src3_nativeObj, double beta, long dst_nativeObj);
+
+ // C++: void mulTransposed(Mat src, Mat& dst, bool aTa, Mat delta = Mat(), double scale = 1, int dtype = -1)
+ private static native void mulTransposed_0(long src_nativeObj, long dst_nativeObj, boolean aTa, long delta_nativeObj, double scale, int dtype);
+ private static native void mulTransposed_1(long src_nativeObj, long dst_nativeObj, boolean aTa, long delta_nativeObj, double scale);
+ private static native void mulTransposed_2(long src_nativeObj, long dst_nativeObj, boolean aTa);
+
+ // C++: void transpose(Mat src, Mat& dst)
+ private static native void transpose_0(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void transform(Mat src, Mat& dst, Mat m)
+ private static native void transform_0(long src_nativeObj, long dst_nativeObj, long m_nativeObj);
+
+ // C++: void perspectiveTransform(Mat src, Mat& dst, Mat m)
+ private static native void perspectiveTransform_0(long src_nativeObj, long dst_nativeObj, long m_nativeObj);
+
+ // C++: void completeSymm(Mat& mtx, bool lowerToUpper = false)
+ private static native void completeSymm_0(long mtx_nativeObj, boolean lowerToUpper);
+ private static native void completeSymm_1(long mtx_nativeObj);
+
+ // C++: void setIdentity(Mat& mtx, Scalar s = Scalar(1))
+ private static native void setIdentity_0(long mtx_nativeObj, double s_val0, double s_val1, double s_val2, double s_val3);
+ private static native void setIdentity_1(long mtx_nativeObj);
+
+ // C++: double determinant(Mat mtx)
+ private static native double determinant_0(long mtx_nativeObj);
+
+ // C++: Scalar trace(Mat mtx)
+ private static native double[] trace_0(long mtx_nativeObj);
+
+ // C++: double invert(Mat src, Mat& dst, int flags = DECOMP_LU)
+ private static native double invert_0(long src_nativeObj, long dst_nativeObj, int flags);
+ private static native double invert_1(long src_nativeObj, long dst_nativeObj);
+
+ // C++: bool solve(Mat src1, Mat src2, Mat& dst, int flags = DECOMP_LU)
+ private static native boolean solve_0(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj, int flags);
+ private static native boolean solve_1(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+ // C++: void sort(Mat src, Mat& dst, int flags)
+ private static native void sort_0(long src_nativeObj, long dst_nativeObj, int flags);
+
+ // C++: void sortIdx(Mat src, Mat& dst, int flags)
+ private static native void sortIdx_0(long src_nativeObj, long dst_nativeObj, int flags);
+
+ // C++: int solveCubic(Mat coeffs, Mat& roots)
+ private static native int solveCubic_0(long coeffs_nativeObj, long roots_nativeObj);
+
+ // C++: double solvePoly(Mat coeffs, Mat& roots, int maxIters = 300)
+ private static native double solvePoly_0(long coeffs_nativeObj, long roots_nativeObj, int maxIters);
+ private static native double solvePoly_1(long coeffs_nativeObj, long roots_nativeObj);
+
+ // C++: bool eigen(Mat src, Mat& eigenvalues, Mat& eigenvectors = Mat())
+ private static native boolean eigen_0(long src_nativeObj, long eigenvalues_nativeObj, long eigenvectors_nativeObj);
+ private static native boolean eigen_1(long src_nativeObj, long eigenvalues_nativeObj);
+
+ // C++: void calcCovarMatrix(Mat samples, Mat& covar, Mat& mean, int flags, int ctype = CV_64F)
+ private static native void calcCovarMatrix_0(long samples_nativeObj, long covar_nativeObj, long mean_nativeObj, int flags, int ctype);
+ private static native void calcCovarMatrix_1(long samples_nativeObj, long covar_nativeObj, long mean_nativeObj, int flags);
+
+ // C++: void PCACompute(Mat data, Mat& mean, Mat& eigenvectors, int maxComponents = 0)
+ private static native void PCACompute_0(long data_nativeObj, long mean_nativeObj, long eigenvectors_nativeObj, int maxComponents);
+ private static native void PCACompute_1(long data_nativeObj, long mean_nativeObj, long eigenvectors_nativeObj);
+
+ // C++: void PCACompute(Mat data, Mat& mean, Mat& eigenvectors, double retainedVariance)
+ private static native void PCACompute_2(long data_nativeObj, long mean_nativeObj, long eigenvectors_nativeObj, double retainedVariance);
+
+ // C++: void PCAProject(Mat data, Mat mean, Mat eigenvectors, Mat& result)
+ private static native void PCAProject_0(long data_nativeObj, long mean_nativeObj, long eigenvectors_nativeObj, long result_nativeObj);
+
+ // C++: void PCABackProject(Mat data, Mat mean, Mat eigenvectors, Mat& result)
+ private static native void PCABackProject_0(long data_nativeObj, long mean_nativeObj, long eigenvectors_nativeObj, long result_nativeObj);
+
+ // C++: void SVDecomp(Mat src, Mat& w, Mat& u, Mat& vt, int flags = 0)
+ private static native void SVDecomp_0(long src_nativeObj, long w_nativeObj, long u_nativeObj, long vt_nativeObj, int flags);
+ private static native void SVDecomp_1(long src_nativeObj, long w_nativeObj, long u_nativeObj, long vt_nativeObj);
+
+ // C++: void SVBackSubst(Mat w, Mat u, Mat vt, Mat rhs, Mat& dst)
+ private static native void SVBackSubst_0(long w_nativeObj, long u_nativeObj, long vt_nativeObj, long rhs_nativeObj, long dst_nativeObj);
+
+ // C++: double Mahalanobis(Mat v1, Mat v2, Mat icovar)
+ private static native double Mahalanobis_0(long v1_nativeObj, long v2_nativeObj, long icovar_nativeObj);
+
+ // C++: void dft(Mat src, Mat& dst, int flags = 0, int nonzeroRows = 0)
+ private static native void dft_0(long src_nativeObj, long dst_nativeObj, int flags, int nonzeroRows);
+ private static native void dft_1(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void idft(Mat src, Mat& dst, int flags = 0, int nonzeroRows = 0)
+ private static native void idft_0(long src_nativeObj, long dst_nativeObj, int flags, int nonzeroRows);
+ private static native void idft_1(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void dct(Mat src, Mat& dst, int flags = 0)
+ private static native void dct_0(long src_nativeObj, long dst_nativeObj, int flags);
+ private static native void dct_1(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void idct(Mat src, Mat& dst, int flags = 0)
+ private static native void idct_0(long src_nativeObj, long dst_nativeObj, int flags);
+ private static native void idct_1(long src_nativeObj, long dst_nativeObj);
+ private static native double[] n_minMaxLocManual(long src_nativeObj, long mask_nativeObj);
+
+}
diff --git a/modules/java/src/core.cpp b/modules/java/src/core.cpp
new file mode 100644
index 0000000..2de272b
--- /dev/null
+++ b/modules/java/src/core.cpp
@@ -0,0 +1,4225 @@
+
+//
+// This file is auto-generated, please don't edit!
+//
+
+#define LOG_TAG "org.opencv.core"
+
+#include "common.h"
+
+#include "opencv2/opencv_modules.hpp"
+#ifdef HAVE_OPENCV_CORE
+
+#include <string>
+
+#include "opencv2/core.hpp"
+
+#include "../../core/include/opencv2/core/base.hpp"
+#include "../../core/include/opencv2/core.hpp"
+#include "../../core/include/opencv2/core/utility.hpp"
+#include "../../core/misc/java/src/cpp/core_manual.hpp"
+
+using namespace cv;
+
+/// throw java exception
+static void throwJavaException(JNIEnv *env, const std::exception *e, const char *method) {
+ std::string what = "unknown exception";
+ jclass je = 0;
+
+ if(e) {
+ std::string exception_type = "std::exception";
+
+ if(dynamic_cast<const cv::Exception*>(e)) {
+ exception_type = "cv::Exception";
+ je = env->FindClass("org/opencv/core/CvException");
+ }
+
+ what = exception_type + ": " + e->what();
+ }
+
+ if(!je) je = env->FindClass("java/lang/Exception");
+ env->ThrowNew(je, what.c_str());
+
+ LOGE("%s caught %s", method, what.c_str());
+ (void)method; // avoid "unused" warning
+}
+
+
+extern "C" {
+
+
+//
+// double getTickFrequency()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_getTickFrequency_10 (JNIEnv*, jclass);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_getTickFrequency_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "core::getTickFrequency_10()";
+ try {
+ LOGD("%s", method_name);
+
+ double _retval_ = cv::getTickFrequency( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int64 getCPUTickCount()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_core_Core_getCPUTickCount_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_core_Core_getCPUTickCount_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "core::getCPUTickCount_10()";
+ try {
+ LOGD("%s", method_name);
+
+ int64 _retval_ = cv::getCPUTickCount( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setErrorVerbosity(bool verbose)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_setErrorVerbosity_10 (JNIEnv*, jclass, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_setErrorVerbosity_10
+ (JNIEnv* env, jclass , jboolean verbose)
+{
+ static const char method_name[] = "core::setErrorVerbosity_10()";
+ try {
+ LOGD("%s", method_name);
+
+ cv::setErrorVerbosity( (bool)verbose );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void mulSpectrums(Mat a, Mat b, Mat& c, int flags, bool conjB = false)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulSpectrums_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulSpectrums_10
+ (JNIEnv* env, jclass , jlong a_nativeObj, jlong b_nativeObj, jlong c_nativeObj, jint flags, jboolean conjB)
+{
+ static const char method_name[] = "core::mulSpectrums_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& a = *((Mat*)a_nativeObj);
+ Mat& b = *((Mat*)b_nativeObj);
+ Mat& c = *((Mat*)c_nativeObj);
+ cv::mulSpectrums( a, b, c, (int)flags, (bool)conjB );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulSpectrums_11 (JNIEnv*, jclass, jlong, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulSpectrums_11
+ (JNIEnv* env, jclass , jlong a_nativeObj, jlong b_nativeObj, jlong c_nativeObj, jint flags)
+{
+ static const char method_name[] = "core::mulSpectrums_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& a = *((Mat*)a_nativeObj);
+ Mat& b = *((Mat*)b_nativeObj);
+ Mat& c = *((Mat*)c_nativeObj);
+ cv::mulSpectrums( a, b, c, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getOptimalDFTSize(int vecsize)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_core_Core_getOptimalDFTSize_10 (JNIEnv*, jclass, jint);
+
+JNIEXPORT jint JNICALL Java_org_opencv_core_Core_getOptimalDFTSize_10
+ (JNIEnv* env, jclass , jint vecsize)
+{
+ static const char method_name[] = "core::getOptimalDFTSize_10()";
+ try {
+ LOGD("%s", method_name);
+
+ int _retval_ = cv::getOptimalDFTSize( (int)vecsize );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void randu(Mat& dst, double low, double high)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_randu_10 (JNIEnv*, jclass, jlong, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_randu_10
+ (JNIEnv* env, jclass , jlong dst_nativeObj, jdouble low, jdouble high)
+{
+ static const char method_name[] = "core::randu_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::randu( dst, (double)low, (double)high );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void randn(Mat& dst, double mean, double stddev)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_randn_10 (JNIEnv*, jclass, jlong, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_randn_10
+ (JNIEnv* env, jclass , jlong dst_nativeObj, jdouble mean, jdouble stddev)
+{
+ static const char method_name[] = "core::randn_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::randn( dst, (double)mean, (double)stddev );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void randShuffle(Mat& dst, double iterFactor = 1., RNG* rng = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_randShuffle_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_randShuffle_10
+ (JNIEnv* env, jclass , jlong dst_nativeObj, jdouble iterFactor)
+{
+ static const char method_name[] = "core::randShuffle_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::randShuffle( dst, (double)iterFactor, 0 );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_randShuffle_11 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_randShuffle_11
+ (JNIEnv* env, jclass , jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::randShuffle_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::randShuffle( dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double kmeans(Mat data, int K, Mat& bestLabels, TermCriteria criteria, int attempts, int flags, Mat& centers = Mat())
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_kmeans_10 (JNIEnv*, jclass, jlong, jint, jlong, jint, jint, jdouble, jint, jint, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_kmeans_10
+ (JNIEnv* env, jclass , jlong data_nativeObj, jint K, jlong bestLabels_nativeObj, jint criteria_type, jint criteria_maxCount, jdouble criteria_epsilon, jint attempts, jint flags, jlong centers_nativeObj)
+{
+ static const char method_name[] = "core::kmeans_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& data = *((Mat*)data_nativeObj);
+ Mat& bestLabels = *((Mat*)bestLabels_nativeObj);
+ TermCriteria criteria(criteria_type, criteria_maxCount, criteria_epsilon);
+ Mat& centers = *((Mat*)centers_nativeObj);
+ double _retval_ = cv::kmeans( data, (int)K, bestLabels, criteria, (int)attempts, (int)flags, centers );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_kmeans_11 (JNIEnv*, jclass, jlong, jint, jlong, jint, jint, jdouble, jint, jint);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_kmeans_11
+ (JNIEnv* env, jclass , jlong data_nativeObj, jint K, jlong bestLabels_nativeObj, jint criteria_type, jint criteria_maxCount, jdouble criteria_epsilon, jint attempts, jint flags)
+{
+ static const char method_name[] = "core::kmeans_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& data = *((Mat*)data_nativeObj);
+ Mat& bestLabels = *((Mat*)bestLabels_nativeObj);
+ TermCriteria criteria(criteria_type, criteria_maxCount, criteria_epsilon);
+ double _retval_ = cv::kmeans( data, (int)K, bestLabels, criteria, (int)attempts, (int)flags );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int borderInterpolate(int p, int len, int borderType)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_core_Core_borderInterpolate_10 (JNIEnv*, jclass, jint, jint, jint);
+
+JNIEXPORT jint JNICALL Java_org_opencv_core_Core_borderInterpolate_10
+ (JNIEnv* env, jclass , jint p, jint len, jint borderType)
+{
+ static const char method_name[] = "core::borderInterpolate_10()";
+ try {
+ LOGD("%s", method_name);
+
+ int _retval_ = cv::borderInterpolate( (int)p, (int)len, (int)borderType );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void copyMakeBorder(Mat src, Mat& dst, int top, int bottom, int left, int right, int borderType, Scalar value = Scalar())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_copyMakeBorder_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint, jint, jint, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_copyMakeBorder_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint top, jint bottom, jint left, jint right, jint borderType, jdouble value_val0, jdouble value_val1, jdouble value_val2, jdouble value_val3)
+{
+ static const char method_name[] = "core::copyMakeBorder_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Scalar value(value_val0, value_val1, value_val2, value_val3);
+ cv::copyMakeBorder( src, dst, (int)top, (int)bottom, (int)left, (int)right, (int)borderType, value );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_copyMakeBorder_11 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_copyMakeBorder_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint top, jint bottom, jint left, jint right, jint borderType)
+{
+ static const char method_name[] = "core::copyMakeBorder_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::copyMakeBorder( src, dst, (int)top, (int)bottom, (int)left, (int)right, (int)borderType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void add(Mat src1, Mat src2, Mat& dst, Mat mask = Mat(), int dtype = -1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj, jint dtype)
+{
+ static const char method_name[] = "core::add_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::add( src1, src2, dst, mask, (int)dtype );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_11
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj)
+{
+ static const char method_name[] = "core::add_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::add( src1, src2, dst, mask );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_12 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_12
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::add_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::add( src1, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void subtract(Mat src1, Mat src2, Mat& dst, Mat mask = Mat(), int dtype = -1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj, jint dtype)
+{
+ static const char method_name[] = "core::subtract_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::subtract( src1, src2, dst, mask, (int)dtype );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_11
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj)
+{
+ static const char method_name[] = "core::subtract_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::subtract( src1, src2, dst, mask );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_12 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_12
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::subtract_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::subtract( src1, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void multiply(Mat src1, Mat src2, Mat& dst, double scale = 1, int dtype = -1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jdouble scale, jint dtype)
+{
+ static const char method_name[] = "core::multiply_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::multiply( src1, src2, dst, (double)scale, (int)dtype );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_11 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_11
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jdouble scale)
+{
+ static const char method_name[] = "core::multiply_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::multiply( src1, src2, dst, (double)scale );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_12 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_12
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::multiply_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::multiply( src1, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void divide(Mat src1, Mat src2, Mat& dst, double scale = 1, int dtype = -1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jdouble scale, jint dtype)
+{
+ static const char method_name[] = "core::divide_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::divide( src1, src2, dst, (double)scale, (int)dtype );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_11 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_11
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jdouble scale)
+{
+ static const char method_name[] = "core::divide_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::divide( src1, src2, dst, (double)scale );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_12 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_12
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::divide_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::divide( src1, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void divide(double scale, Mat src2, Mat& dst, int dtype = -1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_13 (JNIEnv*, jclass, jdouble, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_13
+ (JNIEnv* env, jclass , jdouble scale, jlong src2_nativeObj, jlong dst_nativeObj, jint dtype)
+{
+ static const char method_name[] = "core::divide_13()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::divide( (double)scale, src2, dst, (int)dtype );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_14 (JNIEnv*, jclass, jdouble, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_14
+ (JNIEnv* env, jclass , jdouble scale, jlong src2_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::divide_14()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::divide( (double)scale, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void scaleAdd(Mat src1, double alpha, Mat src2, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_scaleAdd_10 (JNIEnv*, jclass, jlong, jdouble, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_scaleAdd_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble alpha, jlong src2_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::scaleAdd_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::scaleAdd( src1, (double)alpha, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void addWeighted(Mat src1, double alpha, Mat src2, double beta, double gamma, Mat& dst, int dtype = -1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_addWeighted_10 (JNIEnv*, jclass, jlong, jdouble, jlong, jdouble, jdouble, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_addWeighted_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble alpha, jlong src2_nativeObj, jdouble beta, jdouble gamma, jlong dst_nativeObj, jint dtype)
+{
+ static const char method_name[] = "core::addWeighted_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::addWeighted( src1, (double)alpha, src2, (double)beta, (double)gamma, dst, (int)dtype );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_addWeighted_11 (JNIEnv*, jclass, jlong, jdouble, jlong, jdouble, jdouble, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_addWeighted_11
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble alpha, jlong src2_nativeObj, jdouble beta, jdouble gamma, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::addWeighted_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::addWeighted( src1, (double)alpha, src2, (double)beta, (double)gamma, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void convertScaleAbs(Mat src, Mat& dst, double alpha = 1, double beta = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_convertScaleAbs_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_convertScaleAbs_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble alpha, jdouble beta)
+{
+ static const char method_name[] = "core::convertScaleAbs_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::convertScaleAbs( src, dst, (double)alpha, (double)beta );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_convertScaleAbs_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_convertScaleAbs_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::convertScaleAbs_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::convertScaleAbs( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Scalar sum(Mat src)
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_sumElems_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_sumElems_10
+ (JNIEnv* env, jclass , jlong src_nativeObj)
+{
+ static const char method_name[] = "core::sumElems_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Scalar _retval_ = cv::sum( src );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(4); jdouble _tmp_retval_[4] = {_retval_.val[0], _retval_.val[1], _retval_.val[2], _retval_.val[3]}; env->SetDoubleArrayRegion(_da_retval_, 0, 4, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void LUT(Mat src, Mat lut, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_LUT_10 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_LUT_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong lut_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::LUT_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& lut = *((Mat*)lut_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::LUT( src, lut, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void findNonZero(Mat src, Mat& idx)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_findNonZero_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_findNonZero_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong idx_nativeObj)
+{
+ static const char method_name[] = "core::findNonZero_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& idx = *((Mat*)idx_nativeObj);
+ cv::findNonZero( src, idx );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int countNonZero(Mat src)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_core_Core_countNonZero_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_core_Core_countNonZero_10
+ (JNIEnv* env, jclass , jlong src_nativeObj)
+{
+ static const char method_name[] = "core::countNonZero_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ int _retval_ = cv::countNonZero( src );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Scalar mean(Mat src, Mat mask = Mat())
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_mean_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_mean_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong mask_nativeObj)
+{
+ static const char method_name[] = "core::mean_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ Scalar _retval_ = cv::mean( src, mask );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(4); jdouble _tmp_retval_[4] = {_retval_.val[0], _retval_.val[1], _retval_.val[2], _retval_.val[3]}; env->SetDoubleArrayRegion(_da_retval_, 0, 4, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_mean_11 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_mean_11
+ (JNIEnv* env, jclass , jlong src_nativeObj)
+{
+ static const char method_name[] = "core::mean_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Scalar _retval_ = cv::mean( src );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(4); jdouble _tmp_retval_[4] = {_retval_.val[0], _retval_.val[1], _retval_.val[2], _retval_.val[3]}; env->SetDoubleArrayRegion(_da_retval_, 0, 4, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void meanStdDev(Mat src, vector_double& mean, vector_double& stddev, Mat mask = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_meanStdDev_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_meanStdDev_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong mean_mat_nativeObj, jlong stddev_mat_nativeObj, jlong mask_nativeObj)
+{
+ static const char method_name[] = "core::meanStdDev_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<double> mean;
+ Mat& mean_mat = *((Mat*)mean_mat_nativeObj);
+ std::vector<double> stddev;
+ Mat& stddev_mat = *((Mat*)stddev_mat_nativeObj);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::meanStdDev( src, mean, stddev, mask );
+ vector_double_to_Mat( mean, mean_mat ); vector_double_to_Mat( stddev, stddev_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_meanStdDev_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_meanStdDev_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong mean_mat_nativeObj, jlong stddev_mat_nativeObj)
+{
+ static const char method_name[] = "core::meanStdDev_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<double> mean;
+ Mat& mean_mat = *((Mat*)mean_mat_nativeObj);
+ std::vector<double> stddev;
+ Mat& stddev_mat = *((Mat*)stddev_mat_nativeObj);
+ Mat& src = *((Mat*)src_nativeObj);
+ cv::meanStdDev( src, mean, stddev );
+ vector_double_to_Mat( mean, mean_mat ); vector_double_to_Mat( stddev, stddev_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double norm(Mat src1, int normType = NORM_L2, Mat mask = Mat())
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_10 (JNIEnv*, jclass, jlong, jint, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jint normType, jlong mask_nativeObj)
+{
+ static const char method_name[] = "core::norm_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ double _retval_ = cv::norm( src1, (int)normType, mask );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_11 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_11
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jint normType)
+{
+ static const char method_name[] = "core::norm_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ double _retval_ = cv::norm( src1, (int)normType );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_12 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_12
+ (JNIEnv* env, jclass , jlong src1_nativeObj)
+{
+ static const char method_name[] = "core::norm_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ double _retval_ = cv::norm( src1 );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// double norm(Mat src1, Mat src2, int normType = NORM_L2, Mat mask = Mat())
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_13 (JNIEnv*, jclass, jlong, jlong, jint, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_13
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jint normType, jlong mask_nativeObj)
+{
+ static const char method_name[] = "core::norm_13()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ double _retval_ = cv::norm( src1, src2, (int)normType, mask );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_14 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_14
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jint normType)
+{
+ static const char method_name[] = "core::norm_14()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ double _retval_ = cv::norm( src1, src2, (int)normType );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_15 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_norm_15
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj)
+{
+ static const char method_name[] = "core::norm_15()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ double _retval_ = cv::norm( src1, src2 );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// double PSNR(Mat src1, Mat src2)
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_PSNR_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_PSNR_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj)
+{
+ static const char method_name[] = "core::PSNR_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ double _retval_ = cv::PSNR( src1, src2 );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void batchDistance(Mat src1, Mat src2, Mat& dist, int dtype, Mat& nidx, int normType = NORM_L2, int K = 0, Mat mask = Mat(), int update = 0, bool crosscheck = false)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_batchDistance_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jlong, jint, jint, jlong, jint, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_batchDistance_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dist_nativeObj, jint dtype, jlong nidx_nativeObj, jint normType, jint K, jlong mask_nativeObj, jint update, jboolean crosscheck)
+{
+ static const char method_name[] = "core::batchDistance_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dist = *((Mat*)dist_nativeObj);
+ Mat& nidx = *((Mat*)nidx_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::batchDistance( src1, src2, dist, (int)dtype, nidx, (int)normType, (int)K, mask, (int)update, (bool)crosscheck );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_batchDistance_11 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_batchDistance_11
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dist_nativeObj, jint dtype, jlong nidx_nativeObj, jint normType, jint K)
+{
+ static const char method_name[] = "core::batchDistance_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dist = *((Mat*)dist_nativeObj);
+ Mat& nidx = *((Mat*)nidx_nativeObj);
+ cv::batchDistance( src1, src2, dist, (int)dtype, nidx, (int)normType, (int)K );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_batchDistance_12 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_batchDistance_12
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dist_nativeObj, jint dtype, jlong nidx_nativeObj)
+{
+ static const char method_name[] = "core::batchDistance_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dist = *((Mat*)dist_nativeObj);
+ Mat& nidx = *((Mat*)nidx_nativeObj);
+ cv::batchDistance( src1, src2, dist, (int)dtype, nidx );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// float cubeRoot(float val)
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_core_Core_cubeRoot_10 (JNIEnv*, jclass, jfloat);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_core_Core_cubeRoot_10
+ (JNIEnv* env, jclass , jfloat val)
+{
+ static const char method_name[] = "core::cubeRoot_10()";
+ try {
+ LOGD("%s", method_name);
+
+ float _retval_ = cv::cubeRoot( (float)val );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// float fastAtan2(float y, float x)
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_core_Core_fastAtan2_10 (JNIEnv*, jclass, jfloat, jfloat);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_core_Core_fastAtan2_10
+ (JNIEnv* env, jclass , jfloat y, jfloat x)
+{
+ static const char method_name[] = "core::fastAtan2_10()";
+ try {
+ LOGD("%s", method_name);
+
+ float _retval_ = cv::fastAtan2( (float)y, (float)x );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void merge(vector_Mat mv, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_merge_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_merge_10
+ (JNIEnv* env, jclass , jlong mv_mat_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::merge_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> mv;
+ Mat& mv_mat = *((Mat*)mv_mat_nativeObj);
+ Mat_to_vector_Mat( mv_mat, mv );
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::merge( mv, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void split(Mat m, vector_Mat& mv)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_split_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_split_10
+ (JNIEnv* env, jclass , jlong m_nativeObj, jlong mv_mat_nativeObj)
+{
+ static const char method_name[] = "core::split_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> mv;
+ Mat& mv_mat = *((Mat*)mv_mat_nativeObj);
+ Mat& m = *((Mat*)m_nativeObj);
+ cv::split( m, mv );
+ vector_Mat_to_Mat( mv, mv_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void mixChannels(vector_Mat src, vector_Mat dst, vector_int fromTo)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_mixChannels_10 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_mixChannels_10
+ (JNIEnv* env, jclass , jlong src_mat_nativeObj, jlong dst_mat_nativeObj, jlong fromTo_mat_nativeObj)
+{
+ static const char method_name[] = "core::mixChannels_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> src;
+ Mat& src_mat = *((Mat*)src_mat_nativeObj);
+ Mat_to_vector_Mat( src_mat, src );
+ std::vector<Mat> dst;
+ Mat& dst_mat = *((Mat*)dst_mat_nativeObj);
+ Mat_to_vector_Mat( dst_mat, dst );
+ std::vector<int> fromTo;
+ Mat& fromTo_mat = *((Mat*)fromTo_mat_nativeObj);
+ Mat_to_vector_int( fromTo_mat, fromTo );
+ cv::mixChannels( src, dst, fromTo );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void extractChannel(Mat src, Mat& dst, int coi)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_extractChannel_10 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_extractChannel_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint coi)
+{
+ static const char method_name[] = "core::extractChannel_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::extractChannel( src, dst, (int)coi );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void insertChannel(Mat src, Mat& dst, int coi)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_insertChannel_10 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_insertChannel_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint coi)
+{
+ static const char method_name[] = "core::insertChannel_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::insertChannel( src, dst, (int)coi );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void normalize(Mat src, Mat& dst, double alpha = 1, double beta = 0, int norm_type = NORM_L2, int dtype = -1, Mat mask = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_normalize_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint, jint, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_normalize_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble alpha, jdouble beta, jint norm_type, jint dtype, jlong mask_nativeObj)
+{
+ static const char method_name[] = "core::normalize_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::normalize( src, dst, (double)alpha, (double)beta, (int)norm_type, (int)dtype, mask );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_normalize_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_normalize_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble alpha, jdouble beta, jint norm_type, jint dtype)
+{
+ static const char method_name[] = "core::normalize_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::normalize( src, dst, (double)alpha, (double)beta, (int)norm_type, (int)dtype );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_normalize_12 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_normalize_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble alpha, jdouble beta, jint norm_type)
+{
+ static const char method_name[] = "core::normalize_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::normalize( src, dst, (double)alpha, (double)beta, (int)norm_type );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_normalize_13 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_normalize_13
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::normalize_13()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::normalize( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void reduce(Mat src, Mat& dst, int dim, int rtype, int dtype = -1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_reduce_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_reduce_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint dim, jint rtype, jint dtype)
+{
+ static const char method_name[] = "core::reduce_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::reduce( src, dst, (int)dim, (int)rtype, (int)dtype );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_reduce_11 (JNIEnv*, jclass, jlong, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_reduce_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint dim, jint rtype)
+{
+ static const char method_name[] = "core::reduce_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::reduce( src, dst, (int)dim, (int)rtype );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getNumberOfCPUs()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_core_Core_getNumberOfCPUs_10 (JNIEnv*, jclass);
+
+JNIEXPORT jint JNICALL Java_org_opencv_core_Core_getNumberOfCPUs_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "core::getNumberOfCPUs_10()";
+ try {
+ LOGD("%s", method_name);
+
+ int _retval_ = cv::getNumberOfCPUs( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void add(Mat src1, Scalar src2, Mat& dst, Mat mask = Mat(), int dtype = -1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_13 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_13
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj, jlong mask_nativeObj, jint dtype)
+{
+ static const char method_name[] = "core::add_13()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::add( src1, src2, dst, mask, (int)dtype );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_14 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_14
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj, jlong mask_nativeObj)
+{
+ static const char method_name[] = "core::add_14()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::add( src1, src2, dst, mask );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_15 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_add_15
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::add_15()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::add( src1, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void subtract(Mat src1, Scalar src2, Mat& dst, Mat mask = Mat(), int dtype = -1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_13 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_13
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj, jlong mask_nativeObj, jint dtype)
+{
+ static const char method_name[] = "core::subtract_13()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::subtract( src1, src2, dst, mask, (int)dtype );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_14 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_14
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj, jlong mask_nativeObj)
+{
+ static const char method_name[] = "core::subtract_14()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::subtract( src1, src2, dst, mask );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_15 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_subtract_15
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::subtract_15()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::subtract( src1, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void multiply(Mat src1, Scalar src2, Mat& dst, double scale = 1, int dtype = -1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_13 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_13
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj, jdouble scale, jint dtype)
+{
+ static const char method_name[] = "core::multiply_13()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::multiply( src1, src2, dst, (double)scale, (int)dtype );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_14 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_14
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj, jdouble scale)
+{
+ static const char method_name[] = "core::multiply_14()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::multiply( src1, src2, dst, (double)scale );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_15 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_multiply_15
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::multiply_15()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::multiply( src1, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void divide(Mat src1, Scalar src2, Mat& dst, double scale = 1, int dtype = -1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_15 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_15
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj, jdouble scale, jint dtype)
+{
+ static const char method_name[] = "core::divide_15()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::divide( src1, src2, dst, (double)scale, (int)dtype );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_16 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_16
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj, jdouble scale)
+{
+ static const char method_name[] = "core::divide_16()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::divide( src1, src2, dst, (double)scale );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_17 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_divide_17
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::divide_17()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::divide( src1, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void absdiff(Mat src1, Scalar src2, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_absdiff_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_absdiff_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::absdiff_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::absdiff( src1, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void compare(Mat src1, Scalar src2, Mat& dst, int cmpop)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_compare_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_compare_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj, jint cmpop)
+{
+ static const char method_name[] = "core::compare_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::compare( src1, src2, dst, (int)cmpop );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void min(Mat src1, Scalar src2, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_min_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_min_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::min_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::min( src1, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void max(Mat src1, Scalar src2, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_max_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_max_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jdouble src2_val0, jdouble src2_val1, jdouble src2_val2, jdouble src2_val3, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::max_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Scalar src2(src2_val0, src2_val1, src2_val2, src2_val3);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::max( src1, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int64 getTickCount()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_core_Core_getTickCount_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_core_Core_getTickCount_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "core::getTickCount_10()";
+ try {
+ LOGD("%s", method_name);
+
+ int64 _retval_ = cv::getTickCount( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// String getBuildInformation()
+//
+
+JNIEXPORT jstring JNICALL Java_org_opencv_core_Core_getBuildInformation_10 (JNIEnv*, jclass);
+
+JNIEXPORT jstring JNICALL Java_org_opencv_core_Core_getBuildInformation_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "core::getBuildInformation_10()";
+ try {
+ LOGD("%s", method_name);
+
+ cv::String _retval_ = cv::getBuildInformation( );
+ return env->NewStringUTF(_retval_.c_str());
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return env->NewStringUTF("");
+}
+
+
+
+//
+// void flip(Mat src, Mat& dst, int flipCode)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_flip_10 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_flip_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint flipCode)
+{
+ static const char method_name[] = "core::flip_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::flip( src, dst, (int)flipCode );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void repeat(Mat src, int ny, int nx, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_repeat_10 (JNIEnv*, jclass, jlong, jint, jint, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_repeat_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jint ny, jint nx, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::repeat_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::repeat( src, (int)ny, (int)nx, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void hconcat(vector_Mat src, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_hconcat_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_hconcat_10
+ (JNIEnv* env, jclass , jlong src_mat_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::hconcat_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> src;
+ Mat& src_mat = *((Mat*)src_mat_nativeObj);
+ Mat_to_vector_Mat( src_mat, src );
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::hconcat( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void vconcat(vector_Mat src, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_vconcat_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_vconcat_10
+ (JNIEnv* env, jclass , jlong src_mat_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::vconcat_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> src;
+ Mat& src_mat = *((Mat*)src_mat_nativeObj);
+ Mat_to_vector_Mat( src_mat, src );
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::vconcat( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void bitwise_and(Mat src1, Mat src2, Mat& dst, Mat mask = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1and_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1and_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj)
+{
+ static const char method_name[] = "core::bitwise_1and_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::bitwise_and( src1, src2, dst, mask );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1and_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1and_11
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::bitwise_1and_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::bitwise_and( src1, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void bitwise_or(Mat src1, Mat src2, Mat& dst, Mat mask = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1or_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1or_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj)
+{
+ static const char method_name[] = "core::bitwise_1or_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::bitwise_or( src1, src2, dst, mask );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1or_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1or_11
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::bitwise_1or_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::bitwise_or( src1, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void bitwise_xor(Mat src1, Mat src2, Mat& dst, Mat mask = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1xor_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1xor_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj)
+{
+ static const char method_name[] = "core::bitwise_1xor_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::bitwise_xor( src1, src2, dst, mask );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1xor_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1xor_11
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::bitwise_1xor_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::bitwise_xor( src1, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void bitwise_not(Mat src, Mat& dst, Mat mask = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1not_10 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1not_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj)
+{
+ static const char method_name[] = "core::bitwise_1not_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::bitwise_not( src, dst, mask );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1not_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_bitwise_1not_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::bitwise_1not_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::bitwise_not( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void absdiff(Mat src1, Mat src2, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_absdiff_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_absdiff_11
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::absdiff_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::absdiff( src1, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void inRange(Mat src, Scalar lowerb, Scalar upperb, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_inRange_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_inRange_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jdouble lowerb_val0, jdouble lowerb_val1, jdouble lowerb_val2, jdouble lowerb_val3, jdouble upperb_val0, jdouble upperb_val1, jdouble upperb_val2, jdouble upperb_val3, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::inRange_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Scalar lowerb(lowerb_val0, lowerb_val1, lowerb_val2, lowerb_val3);
+ Scalar upperb(upperb_val0, upperb_val1, upperb_val2, upperb_val3);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::inRange( src, lowerb, upperb, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void compare(Mat src1, Mat src2, Mat& dst, int cmpop)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_compare_11 (JNIEnv*, jclass, jlong, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_compare_11
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jint cmpop)
+{
+ static const char method_name[] = "core::compare_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::compare( src1, src2, dst, (int)cmpop );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void min(Mat src1, Mat src2, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_min_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_min_11
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::min_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::min( src1, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void max(Mat src1, Mat src2, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_max_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_max_11
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::max_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::max( src1, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void sqrt(Mat src, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_sqrt_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_sqrt_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::sqrt_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::sqrt( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void pow(Mat src, double power, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_pow_10 (JNIEnv*, jclass, jlong, jdouble, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_pow_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jdouble power, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::pow_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::pow( src, (double)power, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void exp(Mat src, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_exp_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_exp_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::exp_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::exp( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void log(Mat src, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_log_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_log_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::log_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::log( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void polarToCart(Mat magnitude, Mat angle, Mat& x, Mat& y, bool angleInDegrees = false)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_polarToCart_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_polarToCart_10
+ (JNIEnv* env, jclass , jlong magnitude_nativeObj, jlong angle_nativeObj, jlong x_nativeObj, jlong y_nativeObj, jboolean angleInDegrees)
+{
+ static const char method_name[] = "core::polarToCart_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& magnitude = *((Mat*)magnitude_nativeObj);
+ Mat& angle = *((Mat*)angle_nativeObj);
+ Mat& x = *((Mat*)x_nativeObj);
+ Mat& y = *((Mat*)y_nativeObj);
+ cv::polarToCart( magnitude, angle, x, y, (bool)angleInDegrees );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_polarToCart_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_polarToCart_11
+ (JNIEnv* env, jclass , jlong magnitude_nativeObj, jlong angle_nativeObj, jlong x_nativeObj, jlong y_nativeObj)
+{
+ static const char method_name[] = "core::polarToCart_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& magnitude = *((Mat*)magnitude_nativeObj);
+ Mat& angle = *((Mat*)angle_nativeObj);
+ Mat& x = *((Mat*)x_nativeObj);
+ Mat& y = *((Mat*)y_nativeObj);
+ cv::polarToCart( magnitude, angle, x, y );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void cartToPolar(Mat x, Mat y, Mat& magnitude, Mat& angle, bool angleInDegrees = false)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_cartToPolar_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_cartToPolar_10
+ (JNIEnv* env, jclass , jlong x_nativeObj, jlong y_nativeObj, jlong magnitude_nativeObj, jlong angle_nativeObj, jboolean angleInDegrees)
+{
+ static const char method_name[] = "core::cartToPolar_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& x = *((Mat*)x_nativeObj);
+ Mat& y = *((Mat*)y_nativeObj);
+ Mat& magnitude = *((Mat*)magnitude_nativeObj);
+ Mat& angle = *((Mat*)angle_nativeObj);
+ cv::cartToPolar( x, y, magnitude, angle, (bool)angleInDegrees );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_cartToPolar_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_cartToPolar_11
+ (JNIEnv* env, jclass , jlong x_nativeObj, jlong y_nativeObj, jlong magnitude_nativeObj, jlong angle_nativeObj)
+{
+ static const char method_name[] = "core::cartToPolar_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& x = *((Mat*)x_nativeObj);
+ Mat& y = *((Mat*)y_nativeObj);
+ Mat& magnitude = *((Mat*)magnitude_nativeObj);
+ Mat& angle = *((Mat*)angle_nativeObj);
+ cv::cartToPolar( x, y, magnitude, angle );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void phase(Mat x, Mat y, Mat& angle, bool angleInDegrees = false)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_phase_10 (JNIEnv*, jclass, jlong, jlong, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_phase_10
+ (JNIEnv* env, jclass , jlong x_nativeObj, jlong y_nativeObj, jlong angle_nativeObj, jboolean angleInDegrees)
+{
+ static const char method_name[] = "core::phase_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& x = *((Mat*)x_nativeObj);
+ Mat& y = *((Mat*)y_nativeObj);
+ Mat& angle = *((Mat*)angle_nativeObj);
+ cv::phase( x, y, angle, (bool)angleInDegrees );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_phase_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_phase_11
+ (JNIEnv* env, jclass , jlong x_nativeObj, jlong y_nativeObj, jlong angle_nativeObj)
+{
+ static const char method_name[] = "core::phase_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& x = *((Mat*)x_nativeObj);
+ Mat& y = *((Mat*)y_nativeObj);
+ Mat& angle = *((Mat*)angle_nativeObj);
+ cv::phase( x, y, angle );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void magnitude(Mat x, Mat y, Mat& magnitude)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_magnitude_10 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_magnitude_10
+ (JNIEnv* env, jclass , jlong x_nativeObj, jlong y_nativeObj, jlong magnitude_nativeObj)
+{
+ static const char method_name[] = "core::magnitude_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& x = *((Mat*)x_nativeObj);
+ Mat& y = *((Mat*)y_nativeObj);
+ Mat& magnitude = *((Mat*)magnitude_nativeObj);
+ cv::magnitude( x, y, magnitude );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool checkRange(Mat a, bool quiet = true, _hidden_ * pos = 0, double minVal = -DBL_MAX, double maxVal = DBL_MAX)
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_checkRange_10 (JNIEnv*, jclass, jlong, jboolean, jdouble, jdouble);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_checkRange_10
+ (JNIEnv* env, jclass , jlong a_nativeObj, jboolean quiet, jdouble minVal, jdouble maxVal)
+{
+ static const char method_name[] = "core::checkRange_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& a = *((Mat*)a_nativeObj);
+ bool _retval_ = cv::checkRange( a, (bool)quiet, 0, (double)minVal, (double)maxVal );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_checkRange_11 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_checkRange_11
+ (JNIEnv* env, jclass , jlong a_nativeObj)
+{
+ static const char method_name[] = "core::checkRange_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& a = *((Mat*)a_nativeObj);
+ bool _retval_ = cv::checkRange( a );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void patchNaNs(Mat& a, double val = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_patchNaNs_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_patchNaNs_10
+ (JNIEnv* env, jclass , jlong a_nativeObj, jdouble val)
+{
+ static const char method_name[] = "core::patchNaNs_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& a = *((Mat*)a_nativeObj);
+ cv::patchNaNs( a, (double)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_patchNaNs_11 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_patchNaNs_11
+ (JNIEnv* env, jclass , jlong a_nativeObj)
+{
+ static const char method_name[] = "core::patchNaNs_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& a = *((Mat*)a_nativeObj);
+ cv::patchNaNs( a );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void gemm(Mat src1, Mat src2, double alpha, Mat src3, double beta, Mat& dst, int flags = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_gemm_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jlong, jdouble, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_gemm_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jdouble alpha, jlong src3_nativeObj, jdouble beta, jlong dst_nativeObj, jint flags)
+{
+ static const char method_name[] = "core::gemm_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& src3 = *((Mat*)src3_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::gemm( src1, src2, (double)alpha, src3, (double)beta, dst, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_gemm_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jlong, jdouble, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_gemm_11
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jdouble alpha, jlong src3_nativeObj, jdouble beta, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::gemm_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& src3 = *((Mat*)src3_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::gemm( src1, src2, (double)alpha, src3, (double)beta, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void mulTransposed(Mat src, Mat& dst, bool aTa, Mat delta = Mat(), double scale = 1, int dtype = -1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulTransposed_10 (JNIEnv*, jclass, jlong, jlong, jboolean, jlong, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulTransposed_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jboolean aTa, jlong delta_nativeObj, jdouble scale, jint dtype)
+{
+ static const char method_name[] = "core::mulTransposed_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& delta = *((Mat*)delta_nativeObj);
+ cv::mulTransposed( src, dst, (bool)aTa, delta, (double)scale, (int)dtype );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulTransposed_11 (JNIEnv*, jclass, jlong, jlong, jboolean, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulTransposed_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jboolean aTa, jlong delta_nativeObj, jdouble scale)
+{
+ static const char method_name[] = "core::mulTransposed_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& delta = *((Mat*)delta_nativeObj);
+ cv::mulTransposed( src, dst, (bool)aTa, delta, (double)scale );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulTransposed_12 (JNIEnv*, jclass, jlong, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_mulTransposed_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jboolean aTa)
+{
+ static const char method_name[] = "core::mulTransposed_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::mulTransposed( src, dst, (bool)aTa );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void transpose(Mat src, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_transpose_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_transpose_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::transpose_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::transpose( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void transform(Mat src, Mat& dst, Mat m)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_transform_10 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_transform_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong m_nativeObj)
+{
+ static const char method_name[] = "core::transform_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& m = *((Mat*)m_nativeObj);
+ cv::transform( src, dst, m );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void perspectiveTransform(Mat src, Mat& dst, Mat m)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_perspectiveTransform_10 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_perspectiveTransform_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong m_nativeObj)
+{
+ static const char method_name[] = "core::perspectiveTransform_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& m = *((Mat*)m_nativeObj);
+ cv::perspectiveTransform( src, dst, m );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void completeSymm(Mat& mtx, bool lowerToUpper = false)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_completeSymm_10 (JNIEnv*, jclass, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_completeSymm_10
+ (JNIEnv* env, jclass , jlong mtx_nativeObj, jboolean lowerToUpper)
+{
+ static const char method_name[] = "core::completeSymm_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& mtx = *((Mat*)mtx_nativeObj);
+ cv::completeSymm( mtx, (bool)lowerToUpper );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_completeSymm_11 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_completeSymm_11
+ (JNIEnv* env, jclass , jlong mtx_nativeObj)
+{
+ static const char method_name[] = "core::completeSymm_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& mtx = *((Mat*)mtx_nativeObj);
+ cv::completeSymm( mtx );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void setIdentity(Mat& mtx, Scalar s = Scalar(1))
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_setIdentity_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_setIdentity_10
+ (JNIEnv* env, jclass , jlong mtx_nativeObj, jdouble s_val0, jdouble s_val1, jdouble s_val2, jdouble s_val3)
+{
+ static const char method_name[] = "core::setIdentity_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& mtx = *((Mat*)mtx_nativeObj);
+ Scalar s(s_val0, s_val1, s_val2, s_val3);
+ cv::setIdentity( mtx, s );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_setIdentity_11 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_setIdentity_11
+ (JNIEnv* env, jclass , jlong mtx_nativeObj)
+{
+ static const char method_name[] = "core::setIdentity_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& mtx = *((Mat*)mtx_nativeObj);
+ cv::setIdentity( mtx );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double determinant(Mat mtx)
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_determinant_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_determinant_10
+ (JNIEnv* env, jclass , jlong mtx_nativeObj)
+{
+ static const char method_name[] = "core::determinant_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& mtx = *((Mat*)mtx_nativeObj);
+ double _retval_ = cv::determinant( mtx );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Scalar trace(Mat mtx)
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_trace_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_trace_10
+ (JNIEnv* env, jclass , jlong mtx_nativeObj)
+{
+ static const char method_name[] = "core::trace_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& mtx = *((Mat*)mtx_nativeObj);
+ Scalar _retval_ = cv::trace( mtx );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(4); jdouble _tmp_retval_[4] = {_retval_.val[0], _retval_.val[1], _retval_.val[2], _retval_.val[3]}; env->SetDoubleArrayRegion(_da_retval_, 0, 4, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// double invert(Mat src, Mat& dst, int flags = DECOMP_LU)
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_invert_10 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_invert_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint flags)
+{
+ static const char method_name[] = "core::invert_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ double _retval_ = cv::invert( src, dst, (int)flags );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_invert_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_invert_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::invert_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ double _retval_ = cv::invert( src, dst );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool solve(Mat src1, Mat src2, Mat& dst, int flags = DECOMP_LU)
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_solve_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_solve_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jint flags)
+{
+ static const char method_name[] = "core::solve_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ bool _retval_ = cv::solve( src1, src2, dst, (int)flags );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_solve_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_solve_11
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::solve_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ bool _retval_ = cv::solve( src1, src2, dst );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void sort(Mat src, Mat& dst, int flags)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_sort_10 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_sort_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint flags)
+{
+ static const char method_name[] = "core::sort_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::sort( src, dst, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void sortIdx(Mat src, Mat& dst, int flags)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_sortIdx_10 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_sortIdx_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint flags)
+{
+ static const char method_name[] = "core::sortIdx_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::sortIdx( src, dst, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int solveCubic(Mat coeffs, Mat& roots)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_core_Core_solveCubic_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_core_Core_solveCubic_10
+ (JNIEnv* env, jclass , jlong coeffs_nativeObj, jlong roots_nativeObj)
+{
+ static const char method_name[] = "core::solveCubic_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& coeffs = *((Mat*)coeffs_nativeObj);
+ Mat& roots = *((Mat*)roots_nativeObj);
+ int _retval_ = cv::solveCubic( coeffs, roots );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// double solvePoly(Mat coeffs, Mat& roots, int maxIters = 300)
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_solvePoly_10 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_solvePoly_10
+ (JNIEnv* env, jclass , jlong coeffs_nativeObj, jlong roots_nativeObj, jint maxIters)
+{
+ static const char method_name[] = "core::solvePoly_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& coeffs = *((Mat*)coeffs_nativeObj);
+ Mat& roots = *((Mat*)roots_nativeObj);
+ double _retval_ = cv::solvePoly( coeffs, roots, (int)maxIters );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_solvePoly_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_solvePoly_11
+ (JNIEnv* env, jclass , jlong coeffs_nativeObj, jlong roots_nativeObj)
+{
+ static const char method_name[] = "core::solvePoly_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& coeffs = *((Mat*)coeffs_nativeObj);
+ Mat& roots = *((Mat*)roots_nativeObj);
+ double _retval_ = cv::solvePoly( coeffs, roots );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool eigen(Mat src, Mat& eigenvalues, Mat& eigenvectors = Mat())
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_eigen_10 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_eigen_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong eigenvalues_nativeObj, jlong eigenvectors_nativeObj)
+{
+ static const char method_name[] = "core::eigen_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& eigenvalues = *((Mat*)eigenvalues_nativeObj);
+ Mat& eigenvectors = *((Mat*)eigenvectors_nativeObj);
+ bool _retval_ = cv::eigen( src, eigenvalues, eigenvectors );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_eigen_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_core_Core_eigen_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong eigenvalues_nativeObj)
+{
+ static const char method_name[] = "core::eigen_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& eigenvalues = *((Mat*)eigenvalues_nativeObj);
+ bool _retval_ = cv::eigen( src, eigenvalues );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void calcCovarMatrix(Mat samples, Mat& covar, Mat& mean, int flags, int ctype = CV_64F)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_calcCovarMatrix_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_calcCovarMatrix_10
+ (JNIEnv* env, jclass , jlong samples_nativeObj, jlong covar_nativeObj, jlong mean_nativeObj, jint flags, jint ctype)
+{
+ static const char method_name[] = "core::calcCovarMatrix_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& samples = *((Mat*)samples_nativeObj);
+ Mat& covar = *((Mat*)covar_nativeObj);
+ Mat& mean = *((Mat*)mean_nativeObj);
+ cv::calcCovarMatrix( samples, covar, mean, (int)flags, (int)ctype );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_calcCovarMatrix_11 (JNIEnv*, jclass, jlong, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_calcCovarMatrix_11
+ (JNIEnv* env, jclass , jlong samples_nativeObj, jlong covar_nativeObj, jlong mean_nativeObj, jint flags)
+{
+ static const char method_name[] = "core::calcCovarMatrix_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& samples = *((Mat*)samples_nativeObj);
+ Mat& covar = *((Mat*)covar_nativeObj);
+ Mat& mean = *((Mat*)mean_nativeObj);
+ cv::calcCovarMatrix( samples, covar, mean, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void PCACompute(Mat data, Mat& mean, Mat& eigenvectors, int maxComponents = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCACompute_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCACompute_10
+ (JNIEnv* env, jclass , jlong data_nativeObj, jlong mean_nativeObj, jlong eigenvectors_nativeObj, jint maxComponents)
+{
+ static const char method_name[] = "core::PCACompute_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& data = *((Mat*)data_nativeObj);
+ Mat& mean = *((Mat*)mean_nativeObj);
+ Mat& eigenvectors = *((Mat*)eigenvectors_nativeObj);
+ cv::PCACompute( data, mean, eigenvectors, (int)maxComponents );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCACompute_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCACompute_11
+ (JNIEnv* env, jclass , jlong data_nativeObj, jlong mean_nativeObj, jlong eigenvectors_nativeObj)
+{
+ static const char method_name[] = "core::PCACompute_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& data = *((Mat*)data_nativeObj);
+ Mat& mean = *((Mat*)mean_nativeObj);
+ Mat& eigenvectors = *((Mat*)eigenvectors_nativeObj);
+ cv::PCACompute( data, mean, eigenvectors );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void PCACompute(Mat data, Mat& mean, Mat& eigenvectors, double retainedVariance)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCACompute_12 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCACompute_12
+ (JNIEnv* env, jclass , jlong data_nativeObj, jlong mean_nativeObj, jlong eigenvectors_nativeObj, jdouble retainedVariance)
+{
+ static const char method_name[] = "core::PCACompute_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& data = *((Mat*)data_nativeObj);
+ Mat& mean = *((Mat*)mean_nativeObj);
+ Mat& eigenvectors = *((Mat*)eigenvectors_nativeObj);
+ cv::PCACompute( data, mean, eigenvectors, (double)retainedVariance );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void PCAProject(Mat data, Mat mean, Mat eigenvectors, Mat& result)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCAProject_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCAProject_10
+ (JNIEnv* env, jclass , jlong data_nativeObj, jlong mean_nativeObj, jlong eigenvectors_nativeObj, jlong result_nativeObj)
+{
+ static const char method_name[] = "core::PCAProject_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& data = *((Mat*)data_nativeObj);
+ Mat& mean = *((Mat*)mean_nativeObj);
+ Mat& eigenvectors = *((Mat*)eigenvectors_nativeObj);
+ Mat& result = *((Mat*)result_nativeObj);
+ cv::PCAProject( data, mean, eigenvectors, result );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void PCABackProject(Mat data, Mat mean, Mat eigenvectors, Mat& result)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCABackProject_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_PCABackProject_10
+ (JNIEnv* env, jclass , jlong data_nativeObj, jlong mean_nativeObj, jlong eigenvectors_nativeObj, jlong result_nativeObj)
+{
+ static const char method_name[] = "core::PCABackProject_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& data = *((Mat*)data_nativeObj);
+ Mat& mean = *((Mat*)mean_nativeObj);
+ Mat& eigenvectors = *((Mat*)eigenvectors_nativeObj);
+ Mat& result = *((Mat*)result_nativeObj);
+ cv::PCABackProject( data, mean, eigenvectors, result );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void SVDecomp(Mat src, Mat& w, Mat& u, Mat& vt, int flags = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_SVDecomp_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_SVDecomp_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong w_nativeObj, jlong u_nativeObj, jlong vt_nativeObj, jint flags)
+{
+ static const char method_name[] = "core::SVDecomp_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& w = *((Mat*)w_nativeObj);
+ Mat& u = *((Mat*)u_nativeObj);
+ Mat& vt = *((Mat*)vt_nativeObj);
+ cv::SVDecomp( src, w, u, vt, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_SVDecomp_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_SVDecomp_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong w_nativeObj, jlong u_nativeObj, jlong vt_nativeObj)
+{
+ static const char method_name[] = "core::SVDecomp_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& w = *((Mat*)w_nativeObj);
+ Mat& u = *((Mat*)u_nativeObj);
+ Mat& vt = *((Mat*)vt_nativeObj);
+ cv::SVDecomp( src, w, u, vt );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void SVBackSubst(Mat w, Mat u, Mat vt, Mat rhs, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_SVBackSubst_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_SVBackSubst_10
+ (JNIEnv* env, jclass , jlong w_nativeObj, jlong u_nativeObj, jlong vt_nativeObj, jlong rhs_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::SVBackSubst_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& w = *((Mat*)w_nativeObj);
+ Mat& u = *((Mat*)u_nativeObj);
+ Mat& vt = *((Mat*)vt_nativeObj);
+ Mat& rhs = *((Mat*)rhs_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::SVBackSubst( w, u, vt, rhs, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double Mahalanobis(Mat v1, Mat v2, Mat icovar)
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_Mahalanobis_10 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_core_Core_Mahalanobis_10
+ (JNIEnv* env, jclass , jlong v1_nativeObj, jlong v2_nativeObj, jlong icovar_nativeObj)
+{
+ static const char method_name[] = "core::Mahalanobis_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& v1 = *((Mat*)v1_nativeObj);
+ Mat& v2 = *((Mat*)v2_nativeObj);
+ Mat& icovar = *((Mat*)icovar_nativeObj);
+ double _retval_ = cv::Mahalanobis( v1, v2, icovar );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void dft(Mat src, Mat& dst, int flags = 0, int nonzeroRows = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_dft_10 (JNIEnv*, jclass, jlong, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_dft_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint flags, jint nonzeroRows)
+{
+ static const char method_name[] = "core::dft_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::dft( src, dst, (int)flags, (int)nonzeroRows );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_dft_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_dft_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::dft_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::dft( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void idft(Mat src, Mat& dst, int flags = 0, int nonzeroRows = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_idft_10 (JNIEnv*, jclass, jlong, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_idft_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint flags, jint nonzeroRows)
+{
+ static const char method_name[] = "core::idft_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::idft( src, dst, (int)flags, (int)nonzeroRows );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_idft_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_idft_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::idft_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::idft( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void dct(Mat src, Mat& dst, int flags = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_dct_10 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_dct_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint flags)
+{
+ static const char method_name[] = "core::dct_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::dct( src, dst, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_dct_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_dct_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::dct_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::dct( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void idct(Mat src, Mat& dst, int flags = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_idct_10 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_idct_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint flags)
+{
+ static const char method_name[] = "core::idct_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::idct( src, dst, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_idct_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Core_idct_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "core::idct_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::idct( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+// C++: minMaxLoc(Mat src, double* minVal, double* maxVal=0, Point* minLoc=0, Point* maxLoc=0, InputArray mask=noArray())
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1minMaxLocManual (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1minMaxLocManual
+ (JNIEnv* env, jclass, jlong src_nativeObj, jlong mask_nativeObj)
+{
+ try {
+ LOGD("Core::n_1minMaxLoc()");
+ jdoubleArray result;
+ result = env->NewDoubleArray(6);
+ if (result == NULL) {
+ return NULL; /* out of memory error thrown */
+ }
+
+ Mat& src = *((Mat*)src_nativeObj);
+
+ double minVal, maxVal;
+ Point minLoc, maxLoc;
+ if (mask_nativeObj != 0) {
+ Mat& mask = *((Mat*)mask_nativeObj);
+ minMaxLoc(src, &minVal, &maxVal, &minLoc, &maxLoc, mask);
+ } else {
+ minMaxLoc(src, &minVal, &maxVal, &minLoc, &maxLoc);
+ }
+
+ jdouble fill[6];
+ fill[0]=minVal;
+ fill[1]=maxVal;
+ fill[2]=minLoc.x;
+ fill[3]=minLoc.y;
+ fill[4]=maxLoc.x;
+ fill[5]=maxLoc.y;
+
+ env->SetDoubleArrayRegion(result, 0, 6, fill);
+
+ return result;
+
+ } catch(const cv::Exception& e) {
+ LOGD("Core::n_1minMaxLoc() 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 NULL;
+ } catch (...) {
+ LOGD("Core::n_1minMaxLoc() catched unknown exception (...)");
+ jclass je = env->FindClass("java/lang/Exception");
+ env->ThrowNew(je, "Unknown exception in JNI code {core::minMaxLoc()}");
+ return NULL;
+ }
+}
+
+
+//
+// void clear()
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Algorithm_clear_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Algorithm_clear_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "core::clear_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::Algorithm* me = (cv::Algorithm*) self; //TODO: check for NULL
+ me->clear( );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void save(String filename)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Algorithm_save_10 (JNIEnv*, jclass, jlong, jstring);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Algorithm_save_10
+ (JNIEnv* env, jclass , jlong self, jstring filename)
+{
+ static const char method_name[] = "core::save_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::Algorithm* me = (cv::Algorithm*) self; //TODO: check for NULL
+ const char* utf_filename = env->GetStringUTFChars(filename, 0); String n_filename( utf_filename ? utf_filename : "" ); env->ReleaseStringUTFChars(filename, utf_filename);
+ me->save( n_filename );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// String getDefaultName()
+//
+
+JNIEXPORT jstring JNICALL Java_org_opencv_core_Algorithm_getDefaultName_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jstring JNICALL Java_org_opencv_core_Algorithm_getDefaultName_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "core::getDefaultName_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::Algorithm* me = (cv::Algorithm*) self; //TODO: check for NULL
+ cv::String _retval_ = me->getDefaultName( );
+ return env->NewStringUTF(_retval_.c_str());
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return env->NewStringUTF("");
+}
+
+
+
+//
+// native support for java finalize()
+// static void cv::Algorithm::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_core_Algorithm_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_core_Algorithm_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (cv::Algorithm*) self;
+}
+
+
+
+} // extern "C"
+
+#endif // HAVE_OPENCV_CORE
diff --git a/modules/java/src/features2d+DescriptorExtractor.java b/modules/java/src/features2d+DescriptorExtractor.java
new file mode 100644
index 0000000..1d5ff9a
--- /dev/null
+++ b/modules/java/src/features2d+DescriptorExtractor.java
@@ -0,0 +1,195 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import java.lang.String;
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfKeyPoint;
+import org.opencv.utils.Converters;
+
+// C++: class javaDescriptorExtractor
+//javadoc: javaDescriptorExtractor
+public class DescriptorExtractor {
+
+ protected final long nativeObj;
+ protected DescriptorExtractor(long addr) { nativeObj = addr; }
+
+
+ private static final int
+ OPPONENTEXTRACTOR = 1000;
+
+
+ public static final int
+ SIFT = 1,
+ SURF = 2,
+ ORB = 3,
+ BRIEF = 4,
+ BRISK = 5,
+ FREAK = 6,
+ AKAZE = 7,
+ OPPONENT_SIFT = OPPONENTEXTRACTOR + SIFT,
+ OPPONENT_SURF = OPPONENTEXTRACTOR + SURF,
+ OPPONENT_ORB = OPPONENTEXTRACTOR + ORB,
+ OPPONENT_BRIEF = OPPONENTEXTRACTOR + BRIEF,
+ OPPONENT_BRISK = OPPONENTEXTRACTOR + BRISK,
+ OPPONENT_FREAK = OPPONENTEXTRACTOR + FREAK,
+ OPPONENT_AKAZE = OPPONENTEXTRACTOR + AKAZE;
+
+
+ //
+ // C++: void compute(Mat image, vector_KeyPoint& keypoints, Mat descriptors)
+ //
+
+ //javadoc: javaDescriptorExtractor::compute(image, keypoints, descriptors)
+ public void compute(Mat image, MatOfKeyPoint keypoints, Mat descriptors)
+ {
+ Mat keypoints_mat = keypoints;
+ compute_0(nativeObj, image.nativeObj, keypoints_mat.nativeObj, descriptors.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void compute(vector_Mat images, vector_vector_KeyPoint& keypoints, vector_Mat& descriptors)
+ //
+
+ //javadoc: javaDescriptorExtractor::compute(images, keypoints, descriptors)
+ public void compute(List<Mat> images, List<MatOfKeyPoint> keypoints, List<Mat> descriptors)
+ {
+ Mat images_mat = Converters.vector_Mat_to_Mat(images);
+ List<Mat> keypoints_tmplm = new ArrayList<Mat>((keypoints != null) ? keypoints.size() : 0);
+ Mat keypoints_mat = Converters.vector_vector_KeyPoint_to_Mat(keypoints, keypoints_tmplm);
+ Mat descriptors_mat = new Mat();
+ compute_1(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj, descriptors_mat.nativeObj);
+ Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints);
+ keypoints_mat.release();
+ Converters.Mat_to_vector_Mat(descriptors_mat, descriptors);
+ descriptors_mat.release();
+ return;
+ }
+
+
+ //
+ // C++: int descriptorSize()
+ //
+
+ //javadoc: javaDescriptorExtractor::descriptorSize()
+ public int descriptorSize()
+ {
+
+ int retVal = descriptorSize_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int descriptorType()
+ //
+
+ //javadoc: javaDescriptorExtractor::descriptorType()
+ public int descriptorType()
+ {
+
+ int retVal = descriptorType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool empty()
+ //
+
+ //javadoc: javaDescriptorExtractor::empty()
+ public boolean empty()
+ {
+
+ boolean retVal = empty_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static javaDescriptorExtractor* create(int extractorType)
+ //
+
+ //javadoc: javaDescriptorExtractor::create(extractorType)
+ public static DescriptorExtractor create(int extractorType)
+ {
+
+ DescriptorExtractor retVal = new DescriptorExtractor(create_0(extractorType));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void write(String fileName)
+ //
+
+ //javadoc: javaDescriptorExtractor::write(fileName)
+ public void write(String fileName)
+ {
+
+ write_0(nativeObj, fileName);
+
+ return;
+ }
+
+
+ //
+ // C++: void read(String fileName)
+ //
+
+ //javadoc: javaDescriptorExtractor::read(fileName)
+ public void read(String fileName)
+ {
+
+ read_0(nativeObj, fileName);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void compute(Mat image, vector_KeyPoint& keypoints, Mat descriptors)
+ private static native void compute_0(long nativeObj, long image_nativeObj, long keypoints_mat_nativeObj, long descriptors_nativeObj);
+
+ // C++: void compute(vector_Mat images, vector_vector_KeyPoint& keypoints, vector_Mat& descriptors)
+ private static native void compute_1(long nativeObj, long images_mat_nativeObj, long keypoints_mat_nativeObj, long descriptors_mat_nativeObj);
+
+ // C++: int descriptorSize()
+ private static native int descriptorSize_0(long nativeObj);
+
+ // C++: int descriptorType()
+ private static native int descriptorType_0(long nativeObj);
+
+ // C++: bool empty()
+ private static native boolean empty_0(long nativeObj);
+
+ // C++: static javaDescriptorExtractor* create(int extractorType)
+ private static native long create_0(int extractorType);
+
+ // C++: void write(String fileName)
+ private static native void write_0(long nativeObj, String fileName);
+
+ // C++: void read(String fileName)
+ private static native void read_0(long nativeObj, String fileName);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/features2d+DescriptorMatcher.java b/modules/java/src/features2d+DescriptorMatcher.java
new file mode 100644
index 0000000..7123751
--- /dev/null
+++ b/modules/java/src/features2d+DescriptorMatcher.java
@@ -0,0 +1,394 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import java.lang.String;
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfDMatch;
+import org.opencv.utils.Converters;
+
+// C++: class javaDescriptorMatcher
+//javadoc: javaDescriptorMatcher
+public class DescriptorMatcher {
+
+ protected final long nativeObj;
+ protected DescriptorMatcher(long addr) { nativeObj = addr; }
+
+
+ public static final int
+ FLANNBASED = 1,
+ BRUTEFORCE = 2,
+ BRUTEFORCE_L1 = 3,
+ BRUTEFORCE_HAMMING = 4,
+ BRUTEFORCE_HAMMINGLUT = 5,
+ BRUTEFORCE_SL2 = 6;
+
+
+ //
+ // C++: bool isMaskSupported()
+ //
+
+ //javadoc: javaDescriptorMatcher::isMaskSupported()
+ public boolean isMaskSupported()
+ {
+
+ boolean retVal = isMaskSupported_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void add(vector_Mat descriptors)
+ //
+
+ //javadoc: javaDescriptorMatcher::add(descriptors)
+ public void add(List<Mat> descriptors)
+ {
+ Mat descriptors_mat = Converters.vector_Mat_to_Mat(descriptors);
+ add_0(nativeObj, descriptors_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: vector_Mat getTrainDescriptors()
+ //
+
+ //javadoc: javaDescriptorMatcher::getTrainDescriptors()
+ public List<Mat> getTrainDescriptors()
+ {
+ List<Mat> retVal = new ArrayList<Mat>();
+ Mat retValMat = new Mat(getTrainDescriptors_0(nativeObj));
+ Converters.Mat_to_vector_Mat(retValMat, retVal);
+ return retVal;
+ }
+
+
+ //
+ // C++: void clear()
+ //
+
+ //javadoc: javaDescriptorMatcher::clear()
+ public void clear()
+ {
+
+ clear_0(nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: bool empty()
+ //
+
+ //javadoc: javaDescriptorMatcher::empty()
+ public boolean empty()
+ {
+
+ boolean retVal = empty_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void train()
+ //
+
+ //javadoc: javaDescriptorMatcher::train()
+ public void train()
+ {
+
+ train_0(nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void match(Mat queryDescriptors, Mat trainDescriptors, vector_DMatch& matches, Mat mask = Mat())
+ //
+
+ //javadoc: javaDescriptorMatcher::match(queryDescriptors, trainDescriptors, matches, mask)
+ public void match(Mat queryDescriptors, Mat trainDescriptors, MatOfDMatch matches, Mat mask)
+ {
+ Mat matches_mat = matches;
+ match_0(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, mask.nativeObj);
+
+ return;
+ }
+
+ //javadoc: javaDescriptorMatcher::match(queryDescriptors, trainDescriptors, matches)
+ public void match(Mat queryDescriptors, Mat trainDescriptors, MatOfDMatch matches)
+ {
+ Mat matches_mat = matches;
+ match_1(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void knnMatch(Mat queryDescriptors, Mat trainDescriptors, vector_vector_DMatch& matches, int k, Mat mask = Mat(), bool compactResult = false)
+ //
+
+ //javadoc: javaDescriptorMatcher::knnMatch(queryDescriptors, trainDescriptors, matches, k, mask, compactResult)
+ public void knnMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, int k, Mat mask, boolean compactResult)
+ {
+ Mat matches_mat = new Mat();
+ knnMatch_0(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, k, mask.nativeObj, compactResult);
+ Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
+ matches_mat.release();
+ return;
+ }
+
+ //javadoc: javaDescriptorMatcher::knnMatch(queryDescriptors, trainDescriptors, matches, k)
+ public void knnMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, int k)
+ {
+ Mat matches_mat = new Mat();
+ knnMatch_1(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, k);
+ Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
+ matches_mat.release();
+ return;
+ }
+
+
+ //
+ // C++: void radiusMatch(Mat queryDescriptors, Mat trainDescriptors, vector_vector_DMatch& matches, float maxDistance, Mat mask = Mat(), bool compactResult = false)
+ //
+
+ //javadoc: javaDescriptorMatcher::radiusMatch(queryDescriptors, trainDescriptors, matches, maxDistance, mask, compactResult)
+ public void radiusMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, float maxDistance, Mat mask, boolean compactResult)
+ {
+ Mat matches_mat = new Mat();
+ radiusMatch_0(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, maxDistance, mask.nativeObj, compactResult);
+ Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
+ matches_mat.release();
+ return;
+ }
+
+ //javadoc: javaDescriptorMatcher::radiusMatch(queryDescriptors, trainDescriptors, matches, maxDistance)
+ public void radiusMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, float maxDistance)
+ {
+ Mat matches_mat = new Mat();
+ radiusMatch_1(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, maxDistance);
+ Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
+ matches_mat.release();
+ return;
+ }
+
+
+ //
+ // C++: void match(Mat queryDescriptors, vector_DMatch& matches, vector_Mat masks = std::vector<Mat>())
+ //
+
+ //javadoc: javaDescriptorMatcher::match(queryDescriptors, matches, masks)
+ public void match(Mat queryDescriptors, MatOfDMatch matches, List<Mat> masks)
+ {
+ Mat matches_mat = matches;
+ Mat masks_mat = Converters.vector_Mat_to_Mat(masks);
+ match_2(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, masks_mat.nativeObj);
+
+ return;
+ }
+
+ //javadoc: javaDescriptorMatcher::match(queryDescriptors, matches)
+ public void match(Mat queryDescriptors, MatOfDMatch matches)
+ {
+ Mat matches_mat = matches;
+ match_3(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void knnMatch(Mat queryDescriptors, vector_vector_DMatch& matches, int k, vector_Mat masks = std::vector<Mat>(), bool compactResult = false)
+ //
+
+ //javadoc: javaDescriptorMatcher::knnMatch(queryDescriptors, matches, k, masks, compactResult)
+ public void knnMatch(Mat queryDescriptors, List<MatOfDMatch> matches, int k, List<Mat> masks, boolean compactResult)
+ {
+ Mat matches_mat = new Mat();
+ Mat masks_mat = Converters.vector_Mat_to_Mat(masks);
+ knnMatch_2(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, k, masks_mat.nativeObj, compactResult);
+ Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
+ matches_mat.release();
+ return;
+ }
+
+ //javadoc: javaDescriptorMatcher::knnMatch(queryDescriptors, matches, k)
+ public void knnMatch(Mat queryDescriptors, List<MatOfDMatch> matches, int k)
+ {
+ Mat matches_mat = new Mat();
+ knnMatch_3(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, k);
+ Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
+ matches_mat.release();
+ return;
+ }
+
+
+ //
+ // C++: void radiusMatch(Mat queryDescriptors, vector_vector_DMatch& matches, float maxDistance, vector_Mat masks = std::vector<Mat>(), bool compactResult = false)
+ //
+
+ //javadoc: javaDescriptorMatcher::radiusMatch(queryDescriptors, matches, maxDistance, masks, compactResult)
+ public void radiusMatch(Mat queryDescriptors, List<MatOfDMatch> matches, float maxDistance, List<Mat> masks, boolean compactResult)
+ {
+ Mat matches_mat = new Mat();
+ Mat masks_mat = Converters.vector_Mat_to_Mat(masks);
+ radiusMatch_2(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, maxDistance, masks_mat.nativeObj, compactResult);
+ Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
+ matches_mat.release();
+ return;
+ }
+
+ //javadoc: javaDescriptorMatcher::radiusMatch(queryDescriptors, matches, maxDistance)
+ public void radiusMatch(Mat queryDescriptors, List<MatOfDMatch> matches, float maxDistance)
+ {
+ Mat matches_mat = new Mat();
+ radiusMatch_3(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, maxDistance);
+ Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
+ matches_mat.release();
+ return;
+ }
+
+
+ //
+ // C++: javaDescriptorMatcher* jclone(bool emptyTrainData = false)
+ //
+
+ //javadoc: javaDescriptorMatcher::jclone(emptyTrainData)
+ public DescriptorMatcher clone(boolean emptyTrainData)
+ {
+
+ DescriptorMatcher retVal = new DescriptorMatcher(clone_0(nativeObj, emptyTrainData));
+
+ return retVal;
+ }
+
+ //javadoc: javaDescriptorMatcher::jclone()
+ public DescriptorMatcher clone()
+ {
+
+ DescriptorMatcher retVal = new DescriptorMatcher(clone_1(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static javaDescriptorMatcher* create(int matcherType)
+ //
+
+ //javadoc: javaDescriptorMatcher::create(matcherType)
+ public static DescriptorMatcher create(int matcherType)
+ {
+
+ DescriptorMatcher retVal = new DescriptorMatcher(create_0(matcherType));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void write(String fileName)
+ //
+
+ //javadoc: javaDescriptorMatcher::write(fileName)
+ public void write(String fileName)
+ {
+
+ write_0(nativeObj, fileName);
+
+ return;
+ }
+
+
+ //
+ // C++: void read(String fileName)
+ //
+
+ //javadoc: javaDescriptorMatcher::read(fileName)
+ public void read(String fileName)
+ {
+
+ read_0(nativeObj, fileName);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: bool isMaskSupported()
+ private static native boolean isMaskSupported_0(long nativeObj);
+
+ // C++: void add(vector_Mat descriptors)
+ private static native void add_0(long nativeObj, long descriptors_mat_nativeObj);
+
+ // C++: vector_Mat getTrainDescriptors()
+ private static native long getTrainDescriptors_0(long nativeObj);
+
+ // C++: void clear()
+ private static native void clear_0(long nativeObj);
+
+ // C++: bool empty()
+ private static native boolean empty_0(long nativeObj);
+
+ // C++: void train()
+ private static native void train_0(long nativeObj);
+
+ // C++: void match(Mat queryDescriptors, Mat trainDescriptors, vector_DMatch& matches, Mat mask = Mat())
+ private static native void match_0(long nativeObj, long queryDescriptors_nativeObj, long trainDescriptors_nativeObj, long matches_mat_nativeObj, long mask_nativeObj);
+ private static native void match_1(long nativeObj, long queryDescriptors_nativeObj, long trainDescriptors_nativeObj, long matches_mat_nativeObj);
+
+ // C++: void knnMatch(Mat queryDescriptors, Mat trainDescriptors, vector_vector_DMatch& matches, int k, Mat mask = Mat(), bool compactResult = false)
+ private static native void knnMatch_0(long nativeObj, long queryDescriptors_nativeObj, long trainDescriptors_nativeObj, long matches_mat_nativeObj, int k, long mask_nativeObj, boolean compactResult);
+ private static native void knnMatch_1(long nativeObj, long queryDescriptors_nativeObj, long trainDescriptors_nativeObj, long matches_mat_nativeObj, int k);
+
+ // C++: void radiusMatch(Mat queryDescriptors, Mat trainDescriptors, vector_vector_DMatch& matches, float maxDistance, Mat mask = Mat(), bool compactResult = false)
+ private static native void radiusMatch_0(long nativeObj, long queryDescriptors_nativeObj, long trainDescriptors_nativeObj, long matches_mat_nativeObj, float maxDistance, long mask_nativeObj, boolean compactResult);
+ private static native void radiusMatch_1(long nativeObj, long queryDescriptors_nativeObj, long trainDescriptors_nativeObj, long matches_mat_nativeObj, float maxDistance);
+
+ // C++: void match(Mat queryDescriptors, vector_DMatch& matches, vector_Mat masks = std::vector<Mat>())
+ private static native void match_2(long nativeObj, long queryDescriptors_nativeObj, long matches_mat_nativeObj, long masks_mat_nativeObj);
+ private static native void match_3(long nativeObj, long queryDescriptors_nativeObj, long matches_mat_nativeObj);
+
+ // C++: void knnMatch(Mat queryDescriptors, vector_vector_DMatch& matches, int k, vector_Mat masks = std::vector<Mat>(), bool compactResult = false)
+ private static native void knnMatch_2(long nativeObj, long queryDescriptors_nativeObj, long matches_mat_nativeObj, int k, long masks_mat_nativeObj, boolean compactResult);
+ private static native void knnMatch_3(long nativeObj, long queryDescriptors_nativeObj, long matches_mat_nativeObj, int k);
+
+ // C++: void radiusMatch(Mat queryDescriptors, vector_vector_DMatch& matches, float maxDistance, vector_Mat masks = std::vector<Mat>(), bool compactResult = false)
+ private static native void radiusMatch_2(long nativeObj, long queryDescriptors_nativeObj, long matches_mat_nativeObj, float maxDistance, long masks_mat_nativeObj, boolean compactResult);
+ private static native void radiusMatch_3(long nativeObj, long queryDescriptors_nativeObj, long matches_mat_nativeObj, float maxDistance);
+
+ // C++: javaDescriptorMatcher* jclone(bool emptyTrainData = false)
+ private static native long clone_0(long nativeObj, boolean emptyTrainData);
+ private static native long clone_1(long nativeObj);
+
+ // C++: static javaDescriptorMatcher* create(int matcherType)
+ private static native long create_0(int matcherType);
+
+ // C++: void write(String fileName)
+ private static native void write_0(long nativeObj, String fileName);
+
+ // C++: void read(String fileName)
+ private static native void read_0(long nativeObj, String fileName);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/features2d+FeatureDetector.java b/modules/java/src/features2d+FeatureDetector.java
new file mode 100644
index 0000000..25cdf33
--- /dev/null
+++ b/modules/java/src/features2d+FeatureDetector.java
@@ -0,0 +1,216 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import java.lang.String;
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfKeyPoint;
+import org.opencv.utils.Converters;
+
+// C++: class javaFeatureDetector
+//javadoc: javaFeatureDetector
+public class FeatureDetector {
+
+ protected final long nativeObj;
+ protected FeatureDetector(long addr) { nativeObj = addr; }
+
+
+ private static final int
+ GRIDDETECTOR = 1000,
+ PYRAMIDDETECTOR = 2000,
+ DYNAMICDETECTOR = 3000;
+
+
+ public static final int
+ FAST = 1,
+ STAR = 2,
+ SIFT = 3,
+ SURF = 4,
+ ORB = 5,
+ MSER = 6,
+ GFTT = 7,
+ HARRIS = 8,
+ SIMPLEBLOB = 9,
+ DENSE = 10,
+ BRISK = 11,
+ AKAZE = 12,
+ GRID_FAST = GRIDDETECTOR + FAST,
+ GRID_STAR = GRIDDETECTOR + STAR,
+ GRID_SIFT = GRIDDETECTOR + SIFT,
+ GRID_SURF = GRIDDETECTOR + SURF,
+ GRID_ORB = GRIDDETECTOR + ORB,
+ GRID_MSER = GRIDDETECTOR + MSER,
+ GRID_GFTT = GRIDDETECTOR + GFTT,
+ GRID_HARRIS = GRIDDETECTOR + HARRIS,
+ GRID_SIMPLEBLOB = GRIDDETECTOR + SIMPLEBLOB,
+ GRID_DENSE = GRIDDETECTOR + DENSE,
+ GRID_BRISK = GRIDDETECTOR + BRISK,
+ GRID_AKAZE = GRIDDETECTOR + AKAZE,
+ PYRAMID_FAST = PYRAMIDDETECTOR + FAST,
+ PYRAMID_STAR = PYRAMIDDETECTOR + STAR,
+ PYRAMID_SIFT = PYRAMIDDETECTOR + SIFT,
+ PYRAMID_SURF = PYRAMIDDETECTOR + SURF,
+ PYRAMID_ORB = PYRAMIDDETECTOR + ORB,
+ PYRAMID_MSER = PYRAMIDDETECTOR + MSER,
+ PYRAMID_GFTT = PYRAMIDDETECTOR + GFTT,
+ PYRAMID_HARRIS = PYRAMIDDETECTOR + HARRIS,
+ PYRAMID_SIMPLEBLOB = PYRAMIDDETECTOR + SIMPLEBLOB,
+ PYRAMID_DENSE = PYRAMIDDETECTOR + DENSE,
+ PYRAMID_BRISK = PYRAMIDDETECTOR + BRISK,
+ PYRAMID_AKAZE = PYRAMIDDETECTOR + AKAZE,
+ DYNAMIC_FAST = DYNAMICDETECTOR + FAST,
+ DYNAMIC_STAR = DYNAMICDETECTOR + STAR,
+ DYNAMIC_SIFT = DYNAMICDETECTOR + SIFT,
+ DYNAMIC_SURF = DYNAMICDETECTOR + SURF,
+ DYNAMIC_ORB = DYNAMICDETECTOR + ORB,
+ DYNAMIC_MSER = DYNAMICDETECTOR + MSER,
+ DYNAMIC_GFTT = DYNAMICDETECTOR + GFTT,
+ DYNAMIC_HARRIS = DYNAMICDETECTOR + HARRIS,
+ DYNAMIC_SIMPLEBLOB = DYNAMICDETECTOR + SIMPLEBLOB,
+ DYNAMIC_DENSE = DYNAMICDETECTOR + DENSE,
+ DYNAMIC_BRISK = DYNAMICDETECTOR + BRISK,
+ DYNAMIC_AKAZE = DYNAMICDETECTOR + AKAZE;
+
+
+ //
+ // C++: void detect(Mat image, vector_KeyPoint& keypoints, Mat mask = Mat())
+ //
+
+ //javadoc: javaFeatureDetector::detect(image, keypoints, mask)
+ public void detect(Mat image, MatOfKeyPoint keypoints, Mat mask)
+ {
+ Mat keypoints_mat = keypoints;
+ detect_0(nativeObj, image.nativeObj, keypoints_mat.nativeObj, mask.nativeObj);
+
+ return;
+ }
+
+ //javadoc: javaFeatureDetector::detect(image, keypoints)
+ public void detect(Mat image, MatOfKeyPoint keypoints)
+ {
+ Mat keypoints_mat = keypoints;
+ detect_1(nativeObj, image.nativeObj, keypoints_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void detect(vector_Mat images, vector_vector_KeyPoint& keypoints, vector_Mat masks = std::vector<Mat>())
+ //
+
+ //javadoc: javaFeatureDetector::detect(images, keypoints, masks)
+ public void detect(List<Mat> images, List<MatOfKeyPoint> keypoints, List<Mat> masks)
+ {
+ Mat images_mat = Converters.vector_Mat_to_Mat(images);
+ Mat keypoints_mat = new Mat();
+ Mat masks_mat = Converters.vector_Mat_to_Mat(masks);
+ detect_2(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj, masks_mat.nativeObj);
+ Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints);
+ keypoints_mat.release();
+ return;
+ }
+
+ //javadoc: javaFeatureDetector::detect(images, keypoints)
+ public void detect(List<Mat> images, List<MatOfKeyPoint> keypoints)
+ {
+ Mat images_mat = Converters.vector_Mat_to_Mat(images);
+ Mat keypoints_mat = new Mat();
+ detect_3(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj);
+ Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints);
+ keypoints_mat.release();
+ return;
+ }
+
+
+ //
+ // C++: bool empty()
+ //
+
+ //javadoc: javaFeatureDetector::empty()
+ public boolean empty()
+ {
+
+ boolean retVal = empty_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static javaFeatureDetector* create(int detectorType)
+ //
+
+ //javadoc: javaFeatureDetector::create(detectorType)
+ public static FeatureDetector create(int detectorType)
+ {
+
+ FeatureDetector retVal = new FeatureDetector(create_0(detectorType));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void write(String fileName)
+ //
+
+ //javadoc: javaFeatureDetector::write(fileName)
+ public void write(String fileName)
+ {
+
+ write_0(nativeObj, fileName);
+
+ return;
+ }
+
+
+ //
+ // C++: void read(String fileName)
+ //
+
+ //javadoc: javaFeatureDetector::read(fileName)
+ public void read(String fileName)
+ {
+
+ read_0(nativeObj, fileName);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void detect(Mat image, vector_KeyPoint& keypoints, Mat mask = Mat())
+ private static native void detect_0(long nativeObj, long image_nativeObj, long keypoints_mat_nativeObj, long mask_nativeObj);
+ private static native void detect_1(long nativeObj, long image_nativeObj, long keypoints_mat_nativeObj);
+
+ // C++: void detect(vector_Mat images, vector_vector_KeyPoint& keypoints, vector_Mat masks = std::vector<Mat>())
+ private static native void detect_2(long nativeObj, long images_mat_nativeObj, long keypoints_mat_nativeObj, long masks_mat_nativeObj);
+ private static native void detect_3(long nativeObj, long images_mat_nativeObj, long keypoints_mat_nativeObj);
+
+ // C++: bool empty()
+ private static native boolean empty_0(long nativeObj);
+
+ // C++: static javaFeatureDetector* create(int detectorType)
+ private static native long create_0(int detectorType);
+
+ // C++: void write(String fileName)
+ private static native void write_0(long nativeObj, String fileName);
+
+ // C++: void read(String fileName)
+ private static native void read_0(long nativeObj, String fileName);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/features2d+Features2d.java b/modules/java/src/features2d+Features2d.java
new file mode 100644
index 0000000..9260327
--- /dev/null
+++ b/modules/java/src/features2d+Features2d.java
@@ -0,0 +1,120 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfByte;
+import org.opencv.core.MatOfDMatch;
+import org.opencv.core.MatOfKeyPoint;
+import org.opencv.core.Scalar;
+import org.opencv.utils.Converters;
+
+public class Features2d {
+
+ public static final int
+ DRAW_OVER_OUTIMG = 1,
+ NOT_DRAW_SINGLE_POINTS = 2,
+ DRAW_RICH_KEYPOINTS = 4;
+
+
+ //
+ // C++: void drawKeypoints(Mat image, vector_KeyPoint keypoints, Mat outImage, Scalar color = Scalar::all(-1), int flags = 0)
+ //
+
+ //javadoc: drawKeypoints(image, keypoints, outImage, color, flags)
+ public static void drawKeypoints(Mat image, MatOfKeyPoint keypoints, Mat outImage, Scalar color, int flags)
+ {
+ Mat keypoints_mat = keypoints;
+ drawKeypoints_0(image.nativeObj, keypoints_mat.nativeObj, outImage.nativeObj, color.val[0], color.val[1], color.val[2], color.val[3], flags);
+
+ return;
+ }
+
+ //javadoc: drawKeypoints(image, keypoints, outImage)
+ public static void drawKeypoints(Mat image, MatOfKeyPoint keypoints, Mat outImage)
+ {
+ Mat keypoints_mat = keypoints;
+ drawKeypoints_1(image.nativeObj, keypoints_mat.nativeObj, outImage.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void drawMatches(Mat img1, vector_KeyPoint keypoints1, Mat img2, vector_KeyPoint keypoints2, vector_DMatch matches1to2, Mat outImg, Scalar matchColor = Scalar::all(-1), Scalar singlePointColor = Scalar::all(-1), vector_char matchesMask = std::vector<char>(), int flags = 0)
+ //
+
+ //javadoc: drawMatches(img1, keypoints1, img2, keypoints2, matches1to2, outImg, matchColor, singlePointColor, matchesMask, flags)
+ public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor, MatOfByte matchesMask, int flags)
+ {
+ Mat keypoints1_mat = keypoints1;
+ Mat keypoints2_mat = keypoints2;
+ Mat matches1to2_mat = matches1to2;
+ Mat matchesMask_mat = matchesMask;
+ drawMatches_0(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj, matchColor.val[0], matchColor.val[1], matchColor.val[2], matchColor.val[3], singlePointColor.val[0], singlePointColor.val[1], singlePointColor.val[2], singlePointColor.val[3], matchesMask_mat.nativeObj, flags);
+
+ return;
+ }
+
+ //javadoc: drawMatches(img1, keypoints1, img2, keypoints2, matches1to2, outImg)
+ public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg)
+ {
+ Mat keypoints1_mat = keypoints1;
+ Mat keypoints2_mat = keypoints2;
+ Mat matches1to2_mat = matches1to2;
+ drawMatches_1(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void drawMatches(Mat img1, vector_KeyPoint keypoints1, Mat img2, vector_KeyPoint keypoints2, vector_vector_DMatch matches1to2, Mat outImg, Scalar matchColor = Scalar::all(-1), Scalar singlePointColor = Scalar::all(-1), vector_vector_char matchesMask = std::vector<std::vector<char> >(), int flags = 0)
+ //
+
+ //javadoc: drawMatches(img1, keypoints1, img2, keypoints2, matches1to2, outImg, matchColor, singlePointColor, matchesMask, flags)
+ public static void drawMatches2(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List<MatOfDMatch> matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor, List<MatOfByte> matchesMask, int flags)
+ {
+ Mat keypoints1_mat = keypoints1;
+ Mat keypoints2_mat = keypoints2;
+ List<Mat> matches1to2_tmplm = new ArrayList<Mat>((matches1to2 != null) ? matches1to2.size() : 0);
+ Mat matches1to2_mat = Converters.vector_vector_DMatch_to_Mat(matches1to2, matches1to2_tmplm);
+ List<Mat> matchesMask_tmplm = new ArrayList<Mat>((matchesMask != null) ? matchesMask.size() : 0);
+ Mat matchesMask_mat = Converters.vector_vector_char_to_Mat(matchesMask, matchesMask_tmplm);
+ drawMatches2_0(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj, matchColor.val[0], matchColor.val[1], matchColor.val[2], matchColor.val[3], singlePointColor.val[0], singlePointColor.val[1], singlePointColor.val[2], singlePointColor.val[3], matchesMask_mat.nativeObj, flags);
+
+ return;
+ }
+
+ //javadoc: drawMatches(img1, keypoints1, img2, keypoints2, matches1to2, outImg)
+ public static void drawMatches2(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List<MatOfDMatch> matches1to2, Mat outImg)
+ {
+ Mat keypoints1_mat = keypoints1;
+ Mat keypoints2_mat = keypoints2;
+ List<Mat> matches1to2_tmplm = new ArrayList<Mat>((matches1to2 != null) ? matches1to2.size() : 0);
+ Mat matches1to2_mat = Converters.vector_vector_DMatch_to_Mat(matches1to2, matches1to2_tmplm);
+ drawMatches2_1(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj);
+
+ return;
+ }
+
+
+
+
+ // C++: void drawKeypoints(Mat image, vector_KeyPoint keypoints, Mat outImage, Scalar color = Scalar::all(-1), int flags = 0)
+ private static native void drawKeypoints_0(long image_nativeObj, long keypoints_mat_nativeObj, long outImage_nativeObj, double color_val0, double color_val1, double color_val2, double color_val3, int flags);
+ private static native void drawKeypoints_1(long image_nativeObj, long keypoints_mat_nativeObj, long outImage_nativeObj);
+
+ // C++: void drawMatches(Mat img1, vector_KeyPoint keypoints1, Mat img2, vector_KeyPoint keypoints2, vector_DMatch matches1to2, Mat outImg, Scalar matchColor = Scalar::all(-1), Scalar singlePointColor = Scalar::all(-1), vector_char matchesMask = std::vector<char>(), int flags = 0)
+ private static native void drawMatches_0(long img1_nativeObj, long keypoints1_mat_nativeObj, long img2_nativeObj, long keypoints2_mat_nativeObj, long matches1to2_mat_nativeObj, long outImg_nativeObj, double matchColor_val0, double matchColor_val1, double matchColor_val2, double matchColor_val3, double singlePointColor_val0, double singlePointColor_val1, double singlePointColor_val2, double singlePointColor_val3, long matchesMask_mat_nativeObj, int flags);
+ private static native void drawMatches_1(long img1_nativeObj, long keypoints1_mat_nativeObj, long img2_nativeObj, long keypoints2_mat_nativeObj, long matches1to2_mat_nativeObj, long outImg_nativeObj);
+
+ // C++: void drawMatches(Mat img1, vector_KeyPoint keypoints1, Mat img2, vector_KeyPoint keypoints2, vector_vector_DMatch matches1to2, Mat outImg, Scalar matchColor = Scalar::all(-1), Scalar singlePointColor = Scalar::all(-1), vector_vector_char matchesMask = std::vector<std::vector<char> >(), int flags = 0)
+ private static native void drawMatches2_0(long img1_nativeObj, long keypoints1_mat_nativeObj, long img2_nativeObj, long keypoints2_mat_nativeObj, long matches1to2_mat_nativeObj, long outImg_nativeObj, double matchColor_val0, double matchColor_val1, double matchColor_val2, double matchColor_val3, double singlePointColor_val0, double singlePointColor_val1, double singlePointColor_val2, double singlePointColor_val3, long matchesMask_mat_nativeObj, int flags);
+ private static native void drawMatches2_1(long img1_nativeObj, long keypoints1_mat_nativeObj, long img2_nativeObj, long keypoints2_mat_nativeObj, long matches1to2_mat_nativeObj, long outImg_nativeObj);
+
+}
diff --git a/modules/java/src/features2d.cpp b/modules/java/src/features2d.cpp
new file mode 100644
index 0000000..9f2085b
--- /dev/null
+++ b/modules/java/src/features2d.cpp
@@ -0,0 +1,1345 @@
+
+//
+// This file is auto-generated, please don't edit!
+//
+
+#define LOG_TAG "org.opencv.features2d"
+
+#include "common.h"
+
+#include "opencv2/opencv_modules.hpp"
+#ifdef HAVE_OPENCV_FEATURES2D
+
+#include <string>
+
+#include "opencv2/features2d.hpp"
+
+#include "../../features2d/misc/java/src/cpp/features2d_manual.hpp"
+
+using namespace cv;
+
+/// throw java exception
+static void throwJavaException(JNIEnv *env, const std::exception *e, const char *method) {
+ std::string what = "unknown exception";
+ jclass je = 0;
+
+ if(e) {
+ std::string exception_type = "std::exception";
+
+ if(dynamic_cast<const cv::Exception*>(e)) {
+ exception_type = "cv::Exception";
+ je = env->FindClass("org/opencv/core/CvException");
+ }
+
+ what = exception_type + ": " + e->what();
+ }
+
+ if(!je) je = env->FindClass("java/lang/Exception");
+ env->ThrowNew(je, what.c_str());
+
+ LOGE("%s caught %s", method, what.c_str());
+ (void)method; // avoid "unused" warning
+}
+
+
+extern "C" {
+
+
+//
+// void compute(Mat image, vector_KeyPoint& keypoints, Mat descriptors)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorExtractor_compute_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorExtractor_compute_10
+ (JNIEnv* env, jclass , jlong self, jlong image_nativeObj, jlong keypoints_mat_nativeObj, jlong descriptors_nativeObj)
+{
+ static const char method_name[] = "features2d::compute_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<KeyPoint> keypoints;
+ Mat& keypoints_mat = *((Mat*)keypoints_mat_nativeObj);
+ Mat_to_vector_KeyPoint( keypoints_mat, keypoints );
+ cv::javaDescriptorExtractor* me = (cv::javaDescriptorExtractor*) self; //TODO: check for NULL
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& descriptors = *((Mat*)descriptors_nativeObj);
+ me->compute( image, keypoints, descriptors );
+ vector_KeyPoint_to_Mat( keypoints, keypoints_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void compute(vector_Mat images, vector_vector_KeyPoint& keypoints, vector_Mat& descriptors)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorExtractor_compute_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorExtractor_compute_11
+ (JNIEnv* env, jclass , jlong self, jlong images_mat_nativeObj, jlong keypoints_mat_nativeObj, jlong descriptors_mat_nativeObj)
+{
+ static const char method_name[] = "features2d::compute_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> images;
+ Mat& images_mat = *((Mat*)images_mat_nativeObj);
+ Mat_to_vector_Mat( images_mat, images );
+ std::vector< std::vector<KeyPoint> > keypoints;
+ Mat& keypoints_mat = *((Mat*)keypoints_mat_nativeObj);
+ Mat_to_vector_vector_KeyPoint( keypoints_mat, keypoints );
+ std::vector<Mat> descriptors;
+ Mat& descriptors_mat = *((Mat*)descriptors_mat_nativeObj);
+ cv::javaDescriptorExtractor* me = (cv::javaDescriptorExtractor*) self; //TODO: check for NULL
+ me->compute( images, keypoints, descriptors );
+ vector_vector_KeyPoint_to_Mat( keypoints, keypoints_mat ); vector_Mat_to_Mat( descriptors, descriptors_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int descriptorSize()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_features2d_DescriptorExtractor_descriptorSize_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_features2d_DescriptorExtractor_descriptorSize_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "features2d::descriptorSize_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::javaDescriptorExtractor* me = (cv::javaDescriptorExtractor*) self; //TODO: check for NULL
+ int _retval_ = me->descriptorSize( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int descriptorType()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_features2d_DescriptorExtractor_descriptorType_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_features2d_DescriptorExtractor_descriptorType_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "features2d::descriptorType_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::javaDescriptorExtractor* me = (cv::javaDescriptorExtractor*) self; //TODO: check for NULL
+ int _retval_ = me->descriptorType( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool empty()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_features2d_DescriptorExtractor_empty_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_features2d_DescriptorExtractor_empty_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "features2d::empty_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::javaDescriptorExtractor* me = (cv::javaDescriptorExtractor*) self; //TODO: check for NULL
+ bool _retval_ = me->empty( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// static javaDescriptorExtractor* create(int extractorType)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_features2d_DescriptorExtractor_create_10 (JNIEnv*, jclass, jint);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_features2d_DescriptorExtractor_create_10
+ (JNIEnv* env, jclass , jint extractorType)
+{
+ static const char method_name[] = "features2d::create_10()";
+ try {
+ LOGD("%s", method_name);
+
+ javaDescriptorExtractor* _retval_ = cv::javaDescriptorExtractor::create( (int)extractorType );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void write(String fileName)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorExtractor_write_10 (JNIEnv*, jclass, jlong, jstring);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorExtractor_write_10
+ (JNIEnv* env, jclass , jlong self, jstring fileName)
+{
+ static const char method_name[] = "features2d::write_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::javaDescriptorExtractor* me = (cv::javaDescriptorExtractor*) self; //TODO: check for NULL
+ const char* utf_fileName = env->GetStringUTFChars(fileName, 0); String n_fileName( utf_fileName ? utf_fileName : "" ); env->ReleaseStringUTFChars(fileName, utf_fileName);
+ me->write( n_fileName );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void read(String fileName)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorExtractor_read_10 (JNIEnv*, jclass, jlong, jstring);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorExtractor_read_10
+ (JNIEnv* env, jclass , jlong self, jstring fileName)
+{
+ static const char method_name[] = "features2d::read_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::javaDescriptorExtractor* me = (cv::javaDescriptorExtractor*) self; //TODO: check for NULL
+ const char* utf_fileName = env->GetStringUTFChars(fileName, 0); String n_fileName( utf_fileName ? utf_fileName : "" ); env->ReleaseStringUTFChars(fileName, utf_fileName);
+ me->read( n_fileName );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void cv::javaDescriptorExtractor::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorExtractor_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorExtractor_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (cv::javaDescriptorExtractor*) self;
+}
+
+
+//
+// void drawKeypoints(Mat image, vector_KeyPoint keypoints, Mat outImage, Scalar color = Scalar::all(-1), int flags = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_Features2d_drawKeypoints_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_Features2d_drawKeypoints_10
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong keypoints_mat_nativeObj, jlong outImage_nativeObj, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint flags)
+{
+ static const char method_name[] = "features2d::drawKeypoints_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<KeyPoint> keypoints;
+ Mat& keypoints_mat = *((Mat*)keypoints_mat_nativeObj);
+ Mat_to_vector_KeyPoint( keypoints_mat, keypoints );
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& outImage = *((Mat*)outImage_nativeObj);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::drawKeypoints( image, keypoints, outImage, color, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_Features2d_drawKeypoints_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_Features2d_drawKeypoints_11
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong keypoints_mat_nativeObj, jlong outImage_nativeObj)
+{
+ static const char method_name[] = "features2d::drawKeypoints_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<KeyPoint> keypoints;
+ Mat& keypoints_mat = *((Mat*)keypoints_mat_nativeObj);
+ Mat_to_vector_KeyPoint( keypoints_mat, keypoints );
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& outImage = *((Mat*)outImage_nativeObj);
+ cv::drawKeypoints( image, keypoints, outImage );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void drawMatches(Mat img1, vector_KeyPoint keypoints1, Mat img2, vector_KeyPoint keypoints2, vector_DMatch matches1to2, Mat outImg, Scalar matchColor = Scalar::all(-1), Scalar singlePointColor = Scalar::all(-1), vector_char matchesMask = std::vector<char>(), int flags = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_Features2d_drawMatches_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_Features2d_drawMatches_10
+ (JNIEnv* env, jclass , jlong img1_nativeObj, jlong keypoints1_mat_nativeObj, jlong img2_nativeObj, jlong keypoints2_mat_nativeObj, jlong matches1to2_mat_nativeObj, jlong outImg_nativeObj, jdouble matchColor_val0, jdouble matchColor_val1, jdouble matchColor_val2, jdouble matchColor_val3, jdouble singlePointColor_val0, jdouble singlePointColor_val1, jdouble singlePointColor_val2, jdouble singlePointColor_val3, jlong matchesMask_mat_nativeObj, jint flags)
+{
+ static const char method_name[] = "features2d::drawMatches_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<KeyPoint> keypoints1;
+ Mat& keypoints1_mat = *((Mat*)keypoints1_mat_nativeObj);
+ Mat_to_vector_KeyPoint( keypoints1_mat, keypoints1 );
+ std::vector<KeyPoint> keypoints2;
+ Mat& keypoints2_mat = *((Mat*)keypoints2_mat_nativeObj);
+ Mat_to_vector_KeyPoint( keypoints2_mat, keypoints2 );
+ std::vector<DMatch> matches1to2;
+ Mat& matches1to2_mat = *((Mat*)matches1to2_mat_nativeObj);
+ Mat_to_vector_DMatch( matches1to2_mat, matches1to2 );
+ std::vector<char> matchesMask;
+ Mat& matchesMask_mat = *((Mat*)matchesMask_mat_nativeObj);
+ Mat_to_vector_char( matchesMask_mat, matchesMask );
+ Mat& img1 = *((Mat*)img1_nativeObj);
+ Mat& img2 = *((Mat*)img2_nativeObj);
+ Mat& outImg = *((Mat*)outImg_nativeObj);
+ Scalar matchColor(matchColor_val0, matchColor_val1, matchColor_val2, matchColor_val3);
+ Scalar singlePointColor(singlePointColor_val0, singlePointColor_val1, singlePointColor_val2, singlePointColor_val3);
+ cv::drawMatches( img1, keypoints1, img2, keypoints2, matches1to2, outImg, matchColor, singlePointColor, matchesMask, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_Features2d_drawMatches_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_Features2d_drawMatches_11
+ (JNIEnv* env, jclass , jlong img1_nativeObj, jlong keypoints1_mat_nativeObj, jlong img2_nativeObj, jlong keypoints2_mat_nativeObj, jlong matches1to2_mat_nativeObj, jlong outImg_nativeObj)
+{
+ static const char method_name[] = "features2d::drawMatches_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<KeyPoint> keypoints1;
+ Mat& keypoints1_mat = *((Mat*)keypoints1_mat_nativeObj);
+ Mat_to_vector_KeyPoint( keypoints1_mat, keypoints1 );
+ std::vector<KeyPoint> keypoints2;
+ Mat& keypoints2_mat = *((Mat*)keypoints2_mat_nativeObj);
+ Mat_to_vector_KeyPoint( keypoints2_mat, keypoints2 );
+ std::vector<DMatch> matches1to2;
+ Mat& matches1to2_mat = *((Mat*)matches1to2_mat_nativeObj);
+ Mat_to_vector_DMatch( matches1to2_mat, matches1to2 );
+ Mat& img1 = *((Mat*)img1_nativeObj);
+ Mat& img2 = *((Mat*)img2_nativeObj);
+ Mat& outImg = *((Mat*)outImg_nativeObj);
+ cv::drawMatches( img1, keypoints1, img2, keypoints2, matches1to2, outImg );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void drawMatches(Mat img1, vector_KeyPoint keypoints1, Mat img2, vector_KeyPoint keypoints2, vector_vector_DMatch matches1to2, Mat outImg, Scalar matchColor = Scalar::all(-1), Scalar singlePointColor = Scalar::all(-1), vector_vector_char matchesMask = std::vector<std::vector<char> >(), int flags = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_Features2d_drawMatches2_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_Features2d_drawMatches2_10
+ (JNIEnv* env, jclass , jlong img1_nativeObj, jlong keypoints1_mat_nativeObj, jlong img2_nativeObj, jlong keypoints2_mat_nativeObj, jlong matches1to2_mat_nativeObj, jlong outImg_nativeObj, jdouble matchColor_val0, jdouble matchColor_val1, jdouble matchColor_val2, jdouble matchColor_val3, jdouble singlePointColor_val0, jdouble singlePointColor_val1, jdouble singlePointColor_val2, jdouble singlePointColor_val3, jlong matchesMask_mat_nativeObj, jint flags)
+{
+ static const char method_name[] = "features2d::drawMatches2_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<KeyPoint> keypoints1;
+ Mat& keypoints1_mat = *((Mat*)keypoints1_mat_nativeObj);
+ Mat_to_vector_KeyPoint( keypoints1_mat, keypoints1 );
+ std::vector<KeyPoint> keypoints2;
+ Mat& keypoints2_mat = *((Mat*)keypoints2_mat_nativeObj);
+ Mat_to_vector_KeyPoint( keypoints2_mat, keypoints2 );
+ std::vector< std::vector<DMatch> > matches1to2;
+ Mat& matches1to2_mat = *((Mat*)matches1to2_mat_nativeObj);
+ Mat_to_vector_vector_DMatch( matches1to2_mat, matches1to2 );
+ std::vector< std::vector<char> > matchesMask;
+ Mat& matchesMask_mat = *((Mat*)matchesMask_mat_nativeObj);
+ Mat_to_vector_vector_char( matchesMask_mat, matchesMask );
+ Mat& img1 = *((Mat*)img1_nativeObj);
+ Mat& img2 = *((Mat*)img2_nativeObj);
+ Mat& outImg = *((Mat*)outImg_nativeObj);
+ Scalar matchColor(matchColor_val0, matchColor_val1, matchColor_val2, matchColor_val3);
+ Scalar singlePointColor(singlePointColor_val0, singlePointColor_val1, singlePointColor_val2, singlePointColor_val3);
+ cv::drawMatches( img1, keypoints1, img2, keypoints2, matches1to2, outImg, matchColor, singlePointColor, matchesMask, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_Features2d_drawMatches2_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_Features2d_drawMatches2_11
+ (JNIEnv* env, jclass , jlong img1_nativeObj, jlong keypoints1_mat_nativeObj, jlong img2_nativeObj, jlong keypoints2_mat_nativeObj, jlong matches1to2_mat_nativeObj, jlong outImg_nativeObj)
+{
+ static const char method_name[] = "features2d::drawMatches2_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<KeyPoint> keypoints1;
+ Mat& keypoints1_mat = *((Mat*)keypoints1_mat_nativeObj);
+ Mat_to_vector_KeyPoint( keypoints1_mat, keypoints1 );
+ std::vector<KeyPoint> keypoints2;
+ Mat& keypoints2_mat = *((Mat*)keypoints2_mat_nativeObj);
+ Mat_to_vector_KeyPoint( keypoints2_mat, keypoints2 );
+ std::vector< std::vector<DMatch> > matches1to2;
+ Mat& matches1to2_mat = *((Mat*)matches1to2_mat_nativeObj);
+ Mat_to_vector_vector_DMatch( matches1to2_mat, matches1to2 );
+ Mat& img1 = *((Mat*)img1_nativeObj);
+ Mat& img2 = *((Mat*)img2_nativeObj);
+ Mat& outImg = *((Mat*)outImg_nativeObj);
+ cv::drawMatches( img1, keypoints1, img2, keypoints2, matches1to2, outImg );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool isMaskSupported()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_features2d_DescriptorMatcher_isMaskSupported_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_features2d_DescriptorMatcher_isMaskSupported_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "features2d::isMaskSupported_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ bool _retval_ = me->isMaskSupported( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void add(vector_Mat descriptors)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_add_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_add_10
+ (JNIEnv* env, jclass , jlong self, jlong descriptors_mat_nativeObj)
+{
+ static const char method_name[] = "features2d::add_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> descriptors;
+ Mat& descriptors_mat = *((Mat*)descriptors_mat_nativeObj);
+ Mat_to_vector_Mat( descriptors_mat, descriptors );
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ me->add( descriptors );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// vector_Mat getTrainDescriptors()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_features2d_DescriptorMatcher_getTrainDescriptors_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_features2d_DescriptorMatcher_getTrainDescriptors_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "features2d::getTrainDescriptors_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ std::vector<Mat> _ret_val_vector_ = me->getTrainDescriptors( );
+ Mat* _retval_ = new Mat(); vector_Mat_to_Mat(_ret_val_vector_, *_retval_);
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void clear()
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_clear_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_clear_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "features2d::clear_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ me->clear( );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool empty()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_features2d_DescriptorMatcher_empty_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_features2d_DescriptorMatcher_empty_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "features2d::empty_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ bool _retval_ = me->empty( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void train()
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_train_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_train_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "features2d::train_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ me->train( );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void match(Mat queryDescriptors, Mat trainDescriptors, vector_DMatch& matches, Mat mask = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_match_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_match_10
+ (JNIEnv* env, jclass , jlong self, jlong queryDescriptors_nativeObj, jlong trainDescriptors_nativeObj, jlong matches_mat_nativeObj, jlong mask_nativeObj)
+{
+ static const char method_name[] = "features2d::match_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<DMatch> matches;
+ Mat& matches_mat = *((Mat*)matches_mat_nativeObj);
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ Mat& queryDescriptors = *((Mat*)queryDescriptors_nativeObj);
+ Mat& trainDescriptors = *((Mat*)trainDescriptors_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ me->match( queryDescriptors, trainDescriptors, matches, mask );
+ vector_DMatch_to_Mat( matches, matches_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_match_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_match_11
+ (JNIEnv* env, jclass , jlong self, jlong queryDescriptors_nativeObj, jlong trainDescriptors_nativeObj, jlong matches_mat_nativeObj)
+{
+ static const char method_name[] = "features2d::match_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<DMatch> matches;
+ Mat& matches_mat = *((Mat*)matches_mat_nativeObj);
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ Mat& queryDescriptors = *((Mat*)queryDescriptors_nativeObj);
+ Mat& trainDescriptors = *((Mat*)trainDescriptors_nativeObj);
+ me->match( queryDescriptors, trainDescriptors, matches );
+ vector_DMatch_to_Mat( matches, matches_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void knnMatch(Mat queryDescriptors, Mat trainDescriptors, vector_vector_DMatch& matches, int k, Mat mask = Mat(), bool compactResult = false)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_knnMatch_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jint, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_knnMatch_10
+ (JNIEnv* env, jclass , jlong self, jlong queryDescriptors_nativeObj, jlong trainDescriptors_nativeObj, jlong matches_mat_nativeObj, jint k, jlong mask_nativeObj, jboolean compactResult)
+{
+ static const char method_name[] = "features2d::knnMatch_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<DMatch> > matches;
+ Mat& matches_mat = *((Mat*)matches_mat_nativeObj);
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ Mat& queryDescriptors = *((Mat*)queryDescriptors_nativeObj);
+ Mat& trainDescriptors = *((Mat*)trainDescriptors_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ me->knnMatch( queryDescriptors, trainDescriptors, matches, (int)k, mask, (bool)compactResult );
+ vector_vector_DMatch_to_Mat( matches, matches_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_knnMatch_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_knnMatch_11
+ (JNIEnv* env, jclass , jlong self, jlong queryDescriptors_nativeObj, jlong trainDescriptors_nativeObj, jlong matches_mat_nativeObj, jint k)
+{
+ static const char method_name[] = "features2d::knnMatch_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<DMatch> > matches;
+ Mat& matches_mat = *((Mat*)matches_mat_nativeObj);
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ Mat& queryDescriptors = *((Mat*)queryDescriptors_nativeObj);
+ Mat& trainDescriptors = *((Mat*)trainDescriptors_nativeObj);
+ me->knnMatch( queryDescriptors, trainDescriptors, matches, (int)k );
+ vector_vector_DMatch_to_Mat( matches, matches_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void radiusMatch(Mat queryDescriptors, Mat trainDescriptors, vector_vector_DMatch& matches, float maxDistance, Mat mask = Mat(), bool compactResult = false)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_radiusMatch_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jfloat, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_radiusMatch_10
+ (JNIEnv* env, jclass , jlong self, jlong queryDescriptors_nativeObj, jlong trainDescriptors_nativeObj, jlong matches_mat_nativeObj, jfloat maxDistance, jlong mask_nativeObj, jboolean compactResult)
+{
+ static const char method_name[] = "features2d::radiusMatch_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<DMatch> > matches;
+ Mat& matches_mat = *((Mat*)matches_mat_nativeObj);
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ Mat& queryDescriptors = *((Mat*)queryDescriptors_nativeObj);
+ Mat& trainDescriptors = *((Mat*)trainDescriptors_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ me->radiusMatch( queryDescriptors, trainDescriptors, matches, (float)maxDistance, mask, (bool)compactResult );
+ vector_vector_DMatch_to_Mat( matches, matches_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_radiusMatch_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_radiusMatch_11
+ (JNIEnv* env, jclass , jlong self, jlong queryDescriptors_nativeObj, jlong trainDescriptors_nativeObj, jlong matches_mat_nativeObj, jfloat maxDistance)
+{
+ static const char method_name[] = "features2d::radiusMatch_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<DMatch> > matches;
+ Mat& matches_mat = *((Mat*)matches_mat_nativeObj);
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ Mat& queryDescriptors = *((Mat*)queryDescriptors_nativeObj);
+ Mat& trainDescriptors = *((Mat*)trainDescriptors_nativeObj);
+ me->radiusMatch( queryDescriptors, trainDescriptors, matches, (float)maxDistance );
+ vector_vector_DMatch_to_Mat( matches, matches_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void match(Mat queryDescriptors, vector_DMatch& matches, vector_Mat masks = std::vector<Mat>())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_match_12 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_match_12
+ (JNIEnv* env, jclass , jlong self, jlong queryDescriptors_nativeObj, jlong matches_mat_nativeObj, jlong masks_mat_nativeObj)
+{
+ static const char method_name[] = "features2d::match_12()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<DMatch> matches;
+ Mat& matches_mat = *((Mat*)matches_mat_nativeObj);
+ std::vector<Mat> masks;
+ Mat& masks_mat = *((Mat*)masks_mat_nativeObj);
+ Mat_to_vector_Mat( masks_mat, masks );
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ Mat& queryDescriptors = *((Mat*)queryDescriptors_nativeObj);
+ me->match( queryDescriptors, matches, masks );
+ vector_DMatch_to_Mat( matches, matches_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_match_13 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_match_13
+ (JNIEnv* env, jclass , jlong self, jlong queryDescriptors_nativeObj, jlong matches_mat_nativeObj)
+{
+ static const char method_name[] = "features2d::match_13()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<DMatch> matches;
+ Mat& matches_mat = *((Mat*)matches_mat_nativeObj);
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ Mat& queryDescriptors = *((Mat*)queryDescriptors_nativeObj);
+ me->match( queryDescriptors, matches );
+ vector_DMatch_to_Mat( matches, matches_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void knnMatch(Mat queryDescriptors, vector_vector_DMatch& matches, int k, vector_Mat masks = std::vector<Mat>(), bool compactResult = false)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_knnMatch_12 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_knnMatch_12
+ (JNIEnv* env, jclass , jlong self, jlong queryDescriptors_nativeObj, jlong matches_mat_nativeObj, jint k, jlong masks_mat_nativeObj, jboolean compactResult)
+{
+ static const char method_name[] = "features2d::knnMatch_12()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<DMatch> > matches;
+ Mat& matches_mat = *((Mat*)matches_mat_nativeObj);
+ std::vector<Mat> masks;
+ Mat& masks_mat = *((Mat*)masks_mat_nativeObj);
+ Mat_to_vector_Mat( masks_mat, masks );
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ Mat& queryDescriptors = *((Mat*)queryDescriptors_nativeObj);
+ me->knnMatch( queryDescriptors, matches, (int)k, masks, (bool)compactResult );
+ vector_vector_DMatch_to_Mat( matches, matches_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_knnMatch_13 (JNIEnv*, jclass, jlong, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_knnMatch_13
+ (JNIEnv* env, jclass , jlong self, jlong queryDescriptors_nativeObj, jlong matches_mat_nativeObj, jint k)
+{
+ static const char method_name[] = "features2d::knnMatch_13()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<DMatch> > matches;
+ Mat& matches_mat = *((Mat*)matches_mat_nativeObj);
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ Mat& queryDescriptors = *((Mat*)queryDescriptors_nativeObj);
+ me->knnMatch( queryDescriptors, matches, (int)k );
+ vector_vector_DMatch_to_Mat( matches, matches_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void radiusMatch(Mat queryDescriptors, vector_vector_DMatch& matches, float maxDistance, vector_Mat masks = std::vector<Mat>(), bool compactResult = false)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_radiusMatch_12 (JNIEnv*, jclass, jlong, jlong, jlong, jfloat, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_radiusMatch_12
+ (JNIEnv* env, jclass , jlong self, jlong queryDescriptors_nativeObj, jlong matches_mat_nativeObj, jfloat maxDistance, jlong masks_mat_nativeObj, jboolean compactResult)
+{
+ static const char method_name[] = "features2d::radiusMatch_12()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<DMatch> > matches;
+ Mat& matches_mat = *((Mat*)matches_mat_nativeObj);
+ std::vector<Mat> masks;
+ Mat& masks_mat = *((Mat*)masks_mat_nativeObj);
+ Mat_to_vector_Mat( masks_mat, masks );
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ Mat& queryDescriptors = *((Mat*)queryDescriptors_nativeObj);
+ me->radiusMatch( queryDescriptors, matches, (float)maxDistance, masks, (bool)compactResult );
+ vector_vector_DMatch_to_Mat( matches, matches_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_radiusMatch_13 (JNIEnv*, jclass, jlong, jlong, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_radiusMatch_13
+ (JNIEnv* env, jclass , jlong self, jlong queryDescriptors_nativeObj, jlong matches_mat_nativeObj, jfloat maxDistance)
+{
+ static const char method_name[] = "features2d::radiusMatch_13()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<DMatch> > matches;
+ Mat& matches_mat = *((Mat*)matches_mat_nativeObj);
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ Mat& queryDescriptors = *((Mat*)queryDescriptors_nativeObj);
+ me->radiusMatch( queryDescriptors, matches, (float)maxDistance );
+ vector_vector_DMatch_to_Mat( matches, matches_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// javaDescriptorMatcher* jclone(bool emptyTrainData = false)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_features2d_DescriptorMatcher_clone_10 (JNIEnv*, jclass, jlong, jboolean);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_features2d_DescriptorMatcher_clone_10
+ (JNIEnv* env, jclass , jlong self, jboolean emptyTrainData)
+{
+ static const char method_name[] = "features2d::clone_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ javaDescriptorMatcher* _retval_ = me->jclone( (bool)emptyTrainData );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_features2d_DescriptorMatcher_clone_11 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_features2d_DescriptorMatcher_clone_11
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "features2d::clone_11()";
+ try {
+ LOGD("%s", method_name);
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ javaDescriptorMatcher* _retval_ = me->jclone( );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// static javaDescriptorMatcher* create(int matcherType)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_features2d_DescriptorMatcher_create_10 (JNIEnv*, jclass, jint);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_features2d_DescriptorMatcher_create_10
+ (JNIEnv* env, jclass , jint matcherType)
+{
+ static const char method_name[] = "features2d::create_10()";
+ try {
+ LOGD("%s", method_name);
+
+ javaDescriptorMatcher* _retval_ = cv::javaDescriptorMatcher::create( (int)matcherType );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void write(String fileName)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_write_10 (JNIEnv*, jclass, jlong, jstring);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_write_10
+ (JNIEnv* env, jclass , jlong self, jstring fileName)
+{
+ static const char method_name[] = "features2d::write_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ const char* utf_fileName = env->GetStringUTFChars(fileName, 0); String n_fileName( utf_fileName ? utf_fileName : "" ); env->ReleaseStringUTFChars(fileName, utf_fileName);
+ me->write( n_fileName );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void read(String fileName)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_read_10 (JNIEnv*, jclass, jlong, jstring);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_read_10
+ (JNIEnv* env, jclass , jlong self, jstring fileName)
+{
+ static const char method_name[] = "features2d::read_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::javaDescriptorMatcher* me = (cv::javaDescriptorMatcher*) self; //TODO: check for NULL
+ const char* utf_fileName = env->GetStringUTFChars(fileName, 0); String n_fileName( utf_fileName ? utf_fileName : "" ); env->ReleaseStringUTFChars(fileName, utf_fileName);
+ me->read( n_fileName );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void cv::javaDescriptorMatcher::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_DescriptorMatcher_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (cv::javaDescriptorMatcher*) self;
+}
+
+
+//
+// void detect(Mat image, vector_KeyPoint& keypoints, Mat mask = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_FeatureDetector_detect_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_FeatureDetector_detect_10
+ (JNIEnv* env, jclass , jlong self, jlong image_nativeObj, jlong keypoints_mat_nativeObj, jlong mask_nativeObj)
+{
+ static const char method_name[] = "features2d::detect_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<KeyPoint> keypoints;
+ Mat& keypoints_mat = *((Mat*)keypoints_mat_nativeObj);
+ cv::javaFeatureDetector* me = (cv::javaFeatureDetector*) self; //TODO: check for NULL
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ me->detect( image, keypoints, mask );
+ vector_KeyPoint_to_Mat( keypoints, keypoints_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_FeatureDetector_detect_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_FeatureDetector_detect_11
+ (JNIEnv* env, jclass , jlong self, jlong image_nativeObj, jlong keypoints_mat_nativeObj)
+{
+ static const char method_name[] = "features2d::detect_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<KeyPoint> keypoints;
+ Mat& keypoints_mat = *((Mat*)keypoints_mat_nativeObj);
+ cv::javaFeatureDetector* me = (cv::javaFeatureDetector*) self; //TODO: check for NULL
+ Mat& image = *((Mat*)image_nativeObj);
+ me->detect( image, keypoints );
+ vector_KeyPoint_to_Mat( keypoints, keypoints_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void detect(vector_Mat images, vector_vector_KeyPoint& keypoints, vector_Mat masks = std::vector<Mat>())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_FeatureDetector_detect_12 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_FeatureDetector_detect_12
+ (JNIEnv* env, jclass , jlong self, jlong images_mat_nativeObj, jlong keypoints_mat_nativeObj, jlong masks_mat_nativeObj)
+{
+ static const char method_name[] = "features2d::detect_12()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> images;
+ Mat& images_mat = *((Mat*)images_mat_nativeObj);
+ Mat_to_vector_Mat( images_mat, images );
+ std::vector< std::vector<KeyPoint> > keypoints;
+ Mat& keypoints_mat = *((Mat*)keypoints_mat_nativeObj);
+ std::vector<Mat> masks;
+ Mat& masks_mat = *((Mat*)masks_mat_nativeObj);
+ Mat_to_vector_Mat( masks_mat, masks );
+ cv::javaFeatureDetector* me = (cv::javaFeatureDetector*) self; //TODO: check for NULL
+ me->detect( images, keypoints, masks );
+ vector_vector_KeyPoint_to_Mat( keypoints, keypoints_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_FeatureDetector_detect_13 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_FeatureDetector_detect_13
+ (JNIEnv* env, jclass , jlong self, jlong images_mat_nativeObj, jlong keypoints_mat_nativeObj)
+{
+ static const char method_name[] = "features2d::detect_13()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> images;
+ Mat& images_mat = *((Mat*)images_mat_nativeObj);
+ Mat_to_vector_Mat( images_mat, images );
+ std::vector< std::vector<KeyPoint> > keypoints;
+ Mat& keypoints_mat = *((Mat*)keypoints_mat_nativeObj);
+ cv::javaFeatureDetector* me = (cv::javaFeatureDetector*) self; //TODO: check for NULL
+ me->detect( images, keypoints );
+ vector_vector_KeyPoint_to_Mat( keypoints, keypoints_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool empty()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_features2d_FeatureDetector_empty_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_features2d_FeatureDetector_empty_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "features2d::empty_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::javaFeatureDetector* me = (cv::javaFeatureDetector*) self; //TODO: check for NULL
+ bool _retval_ = me->empty( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// static javaFeatureDetector* create(int detectorType)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_features2d_FeatureDetector_create_10 (JNIEnv*, jclass, jint);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_features2d_FeatureDetector_create_10
+ (JNIEnv* env, jclass , jint detectorType)
+{
+ static const char method_name[] = "features2d::create_10()";
+ try {
+ LOGD("%s", method_name);
+
+ javaFeatureDetector* _retval_ = cv::javaFeatureDetector::create( (int)detectorType );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void write(String fileName)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_FeatureDetector_write_10 (JNIEnv*, jclass, jlong, jstring);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_FeatureDetector_write_10
+ (JNIEnv* env, jclass , jlong self, jstring fileName)
+{
+ static const char method_name[] = "features2d::write_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::javaFeatureDetector* me = (cv::javaFeatureDetector*) self; //TODO: check for NULL
+ const char* utf_fileName = env->GetStringUTFChars(fileName, 0); String n_fileName( utf_fileName ? utf_fileName : "" ); env->ReleaseStringUTFChars(fileName, utf_fileName);
+ me->write( n_fileName );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void read(String fileName)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_FeatureDetector_read_10 (JNIEnv*, jclass, jlong, jstring);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_FeatureDetector_read_10
+ (JNIEnv* env, jclass , jlong self, jstring fileName)
+{
+ static const char method_name[] = "features2d::read_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::javaFeatureDetector* me = (cv::javaFeatureDetector*) self; //TODO: check for NULL
+ const char* utf_fileName = env->GetStringUTFChars(fileName, 0); String n_fileName( utf_fileName ? utf_fileName : "" ); env->ReleaseStringUTFChars(fileName, utf_fileName);
+ me->read( n_fileName );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void cv::javaFeatureDetector::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_features2d_FeatureDetector_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_features2d_FeatureDetector_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (cv::javaFeatureDetector*) self;
+}
+
+
+
+} // extern "C"
+
+#endif // HAVE_OPENCV_FEATURES2D
diff --git a/modules/java/src/imgcodecs+Imgcodecs.java b/modules/java/src/imgcodecs+Imgcodecs.java
new file mode 100644
index 0000000..d070710
--- /dev/null
+++ b/modules/java/src/imgcodecs+Imgcodecs.java
@@ -0,0 +1,193 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.imgcodecs;
+
+import java.lang.String;
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfByte;
+import org.opencv.core.MatOfInt;
+import org.opencv.utils.Converters;
+
+public class Imgcodecs {
+
+ public static final int
+ CV_LOAD_IMAGE_UNCHANGED = -1,
+ CV_LOAD_IMAGE_GRAYSCALE = 0,
+ CV_LOAD_IMAGE_COLOR = 1,
+ CV_LOAD_IMAGE_ANYDEPTH = 2,
+ CV_LOAD_IMAGE_ANYCOLOR = 4,
+ CV_IMWRITE_JPEG_QUALITY = 1,
+ CV_IMWRITE_JPEG_PROGRESSIVE = 2,
+ CV_IMWRITE_JPEG_OPTIMIZE = 3,
+ CV_IMWRITE_JPEG_RST_INTERVAL = 4,
+ CV_IMWRITE_JPEG_LUMA_QUALITY = 5,
+ CV_IMWRITE_JPEG_CHROMA_QUALITY = 6,
+ CV_IMWRITE_PNG_COMPRESSION = 16,
+ CV_IMWRITE_PNG_STRATEGY = 17,
+ CV_IMWRITE_PNG_BILEVEL = 18,
+ CV_IMWRITE_PNG_STRATEGY_DEFAULT = 0,
+ CV_IMWRITE_PNG_STRATEGY_FILTERED = 1,
+ CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY = 2,
+ CV_IMWRITE_PNG_STRATEGY_RLE = 3,
+ CV_IMWRITE_PNG_STRATEGY_FIXED = 4,
+ CV_IMWRITE_PXM_BINARY = 32,
+ CV_IMWRITE_WEBP_QUALITY = 64,
+ CV_CVTIMG_FLIP = 1,
+ CV_CVTIMG_SWAP_RB = 2,
+ IMREAD_UNCHANGED = -1,
+ IMREAD_GRAYSCALE = 0,
+ IMREAD_COLOR = 1,
+ IMREAD_ANYDEPTH = 2,
+ IMREAD_ANYCOLOR = 4,
+ IMREAD_LOAD_GDAL = 8,
+ IMWRITE_JPEG_QUALITY = 1,
+ IMWRITE_JPEG_PROGRESSIVE = 2,
+ IMWRITE_JPEG_OPTIMIZE = 3,
+ IMWRITE_JPEG_RST_INTERVAL = 4,
+ IMWRITE_JPEG_LUMA_QUALITY = 5,
+ IMWRITE_JPEG_CHROMA_QUALITY = 6,
+ IMWRITE_PNG_COMPRESSION = 16,
+ IMWRITE_PNG_STRATEGY = 17,
+ IMWRITE_PNG_BILEVEL = 18,
+ IMWRITE_PXM_BINARY = 32,
+ IMWRITE_WEBP_QUALITY = 64,
+ IMWRITE_PNG_STRATEGY_DEFAULT = 0,
+ IMWRITE_PNG_STRATEGY_FILTERED = 1,
+ IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY = 2,
+ IMWRITE_PNG_STRATEGY_RLE = 3,
+ IMWRITE_PNG_STRATEGY_FIXED = 4;
+
+
+ //
+ // C++: Mat imread(String filename, int flags = IMREAD_COLOR)
+ //
+
+ //javadoc: imread(filename, flags)
+ public static Mat imread(String filename, int flags)
+ {
+
+ Mat retVal = new Mat(imread_0(filename, flags));
+
+ return retVal;
+ }
+
+ //javadoc: imread(filename)
+ public static Mat imread(String filename)
+ {
+
+ Mat retVal = new Mat(imread_1(filename));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool imreadmulti(String filename, vector_Mat mats, int flags = IMREAD_ANYCOLOR)
+ //
+
+ //javadoc: imreadmulti(filename, mats, flags)
+ public static boolean imreadmulti(String filename, List<Mat> mats, int flags)
+ {
+ Mat mats_mat = Converters.vector_Mat_to_Mat(mats);
+ boolean retVal = imreadmulti_0(filename, mats_mat.nativeObj, flags);
+
+ return retVal;
+ }
+
+ //javadoc: imreadmulti(filename, mats)
+ public static boolean imreadmulti(String filename, List<Mat> mats)
+ {
+ Mat mats_mat = Converters.vector_Mat_to_Mat(mats);
+ boolean retVal = imreadmulti_1(filename, mats_mat.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool imwrite(String filename, Mat img, vector_int params = std::vector<int>())
+ //
+
+ //javadoc: imwrite(filename, img, params)
+ public static boolean imwrite(String filename, Mat img, MatOfInt params)
+ {
+ Mat params_mat = params;
+ boolean retVal = imwrite_0(filename, img.nativeObj, params_mat.nativeObj);
+
+ return retVal;
+ }
+
+ //javadoc: imwrite(filename, img)
+ public static boolean imwrite(String filename, Mat img)
+ {
+
+ boolean retVal = imwrite_1(filename, img.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat imdecode(Mat buf, int flags)
+ //
+
+ //javadoc: imdecode(buf, flags)
+ public static Mat imdecode(Mat buf, int flags)
+ {
+
+ Mat retVal = new Mat(imdecode_0(buf.nativeObj, flags));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool imencode(String ext, Mat img, vector_uchar& buf, vector_int params = std::vector<int>())
+ //
+
+ //javadoc: imencode(ext, img, buf, params)
+ public static boolean imencode(String ext, Mat img, MatOfByte buf, MatOfInt params)
+ {
+ Mat buf_mat = buf;
+ Mat params_mat = params;
+ boolean retVal = imencode_0(ext, img.nativeObj, buf_mat.nativeObj, params_mat.nativeObj);
+
+ return retVal;
+ }
+
+ //javadoc: imencode(ext, img, buf)
+ public static boolean imencode(String ext, Mat img, MatOfByte buf)
+ {
+ Mat buf_mat = buf;
+ boolean retVal = imencode_1(ext, img.nativeObj, buf_mat.nativeObj);
+
+ return retVal;
+ }
+
+
+
+
+ // C++: Mat imread(String filename, int flags = IMREAD_COLOR)
+ private static native long imread_0(String filename, int flags);
+ private static native long imread_1(String filename);
+
+ // C++: bool imreadmulti(String filename, vector_Mat mats, int flags = IMREAD_ANYCOLOR)
+ private static native boolean imreadmulti_0(String filename, long mats_mat_nativeObj, int flags);
+ private static native boolean imreadmulti_1(String filename, long mats_mat_nativeObj);
+
+ // C++: bool imwrite(String filename, Mat img, vector_int params = std::vector<int>())
+ private static native boolean imwrite_0(String filename, long img_nativeObj, long params_mat_nativeObj);
+ private static native boolean imwrite_1(String filename, long img_nativeObj);
+
+ // C++: Mat imdecode(Mat buf, int flags)
+ private static native long imdecode_0(long buf_nativeObj, int flags);
+
+ // C++: bool imencode(String ext, Mat img, vector_uchar& buf, vector_int params = std::vector<int>())
+ private static native boolean imencode_0(String ext, long img_nativeObj, long buf_mat_nativeObj, long params_mat_nativeObj);
+ private static native boolean imencode_1(String ext, long img_nativeObj, long buf_mat_nativeObj);
+
+}
diff --git a/modules/java/src/imgcodecs.cpp b/modules/java/src/imgcodecs.cpp
new file mode 100644
index 0000000..96691ba
--- /dev/null
+++ b/modules/java/src/imgcodecs.cpp
@@ -0,0 +1,283 @@
+
+//
+// This file is auto-generated, please don't edit!
+//
+
+#define LOG_TAG "org.opencv.imgcodecs"
+
+#include "common.h"
+
+#include "opencv2/opencv_modules.hpp"
+#ifdef HAVE_OPENCV_IMGCODECS
+
+#include <string>
+
+#include "opencv2/imgcodecs.hpp"
+
+#include "../../imgcodecs/include/opencv2/imgcodecs/imgcodecs_c.h"
+#include "../../imgcodecs/include/opencv2/imgcodecs.hpp"
+
+using namespace cv;
+
+/// throw java exception
+static void throwJavaException(JNIEnv *env, const std::exception *e, const char *method) {
+ std::string what = "unknown exception";
+ jclass je = 0;
+
+ if(e) {
+ std::string exception_type = "std::exception";
+
+ if(dynamic_cast<const cv::Exception*>(e)) {
+ exception_type = "cv::Exception";
+ je = env->FindClass("org/opencv/core/CvException");
+ }
+
+ what = exception_type + ": " + e->what();
+ }
+
+ if(!je) je = env->FindClass("java/lang/Exception");
+ env->ThrowNew(je, what.c_str());
+
+ LOGE("%s caught %s", method, what.c_str());
+ (void)method; // avoid "unused" warning
+}
+
+
+extern "C" {
+
+
+//
+// Mat imread(String filename, int flags = IMREAD_COLOR)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgcodecs_Imgcodecs_imread_10 (JNIEnv*, jclass, jstring, jint);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgcodecs_Imgcodecs_imread_10
+ (JNIEnv* env, jclass , jstring filename, jint flags)
+{
+ static const char method_name[] = "imgcodecs::imread_10()";
+ try {
+ LOGD("%s", method_name);
+ const char* utf_filename = env->GetStringUTFChars(filename, 0); String n_filename( utf_filename ? utf_filename : "" ); env->ReleaseStringUTFChars(filename, utf_filename);
+ ::Mat _retval_ = cv::imread( n_filename, (int)flags );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgcodecs_Imgcodecs_imread_11 (JNIEnv*, jclass, jstring);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgcodecs_Imgcodecs_imread_11
+ (JNIEnv* env, jclass , jstring filename)
+{
+ static const char method_name[] = "imgcodecs::imread_11()";
+ try {
+ LOGD("%s", method_name);
+ const char* utf_filename = env->GetStringUTFChars(filename, 0); String n_filename( utf_filename ? utf_filename : "" ); env->ReleaseStringUTFChars(filename, utf_filename);
+ ::Mat _retval_ = cv::imread( n_filename );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool imreadmulti(String filename, vector_Mat mats, int flags = IMREAD_ANYCOLOR)
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_imgcodecs_Imgcodecs_imreadmulti_10 (JNIEnv*, jclass, jstring, jlong, jint);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_imgcodecs_Imgcodecs_imreadmulti_10
+ (JNIEnv* env, jclass , jstring filename, jlong mats_mat_nativeObj, jint flags)
+{
+ static const char method_name[] = "imgcodecs::imreadmulti_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> mats;
+ Mat& mats_mat = *((Mat*)mats_mat_nativeObj);
+ Mat_to_vector_Mat( mats_mat, mats );
+ const char* utf_filename = env->GetStringUTFChars(filename, 0); String n_filename( utf_filename ? utf_filename : "" ); env->ReleaseStringUTFChars(filename, utf_filename);
+ bool _retval_ = cv::imreadmulti( n_filename, mats, (int)flags );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_imgcodecs_Imgcodecs_imreadmulti_11 (JNIEnv*, jclass, jstring, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_imgcodecs_Imgcodecs_imreadmulti_11
+ (JNIEnv* env, jclass , jstring filename, jlong mats_mat_nativeObj)
+{
+ static const char method_name[] = "imgcodecs::imreadmulti_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> mats;
+ Mat& mats_mat = *((Mat*)mats_mat_nativeObj);
+ Mat_to_vector_Mat( mats_mat, mats );
+ const char* utf_filename = env->GetStringUTFChars(filename, 0); String n_filename( utf_filename ? utf_filename : "" ); env->ReleaseStringUTFChars(filename, utf_filename);
+ bool _retval_ = cv::imreadmulti( n_filename, mats );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool imwrite(String filename, Mat img, vector_int params = std::vector<int>())
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_imgcodecs_Imgcodecs_imwrite_10 (JNIEnv*, jclass, jstring, jlong, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_imgcodecs_Imgcodecs_imwrite_10
+ (JNIEnv* env, jclass , jstring filename, jlong img_nativeObj, jlong params_mat_nativeObj)
+{
+ static const char method_name[] = "imgcodecs::imwrite_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<int> params;
+ Mat& params_mat = *((Mat*)params_mat_nativeObj);
+ Mat_to_vector_int( params_mat, params );
+ const char* utf_filename = env->GetStringUTFChars(filename, 0); String n_filename( utf_filename ? utf_filename : "" ); env->ReleaseStringUTFChars(filename, utf_filename);
+ Mat& img = *((Mat*)img_nativeObj);
+ bool _retval_ = cv::imwrite( n_filename, img, params );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_imgcodecs_Imgcodecs_imwrite_11 (JNIEnv*, jclass, jstring, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_imgcodecs_Imgcodecs_imwrite_11
+ (JNIEnv* env, jclass , jstring filename, jlong img_nativeObj)
+{
+ static const char method_name[] = "imgcodecs::imwrite_11()";
+ try {
+ LOGD("%s", method_name);
+ const char* utf_filename = env->GetStringUTFChars(filename, 0); String n_filename( utf_filename ? utf_filename : "" ); env->ReleaseStringUTFChars(filename, utf_filename);
+ Mat& img = *((Mat*)img_nativeObj);
+ bool _retval_ = cv::imwrite( n_filename, img );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat imdecode(Mat buf, int flags)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgcodecs_Imgcodecs_imdecode_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgcodecs_Imgcodecs_imdecode_10
+ (JNIEnv* env, jclass , jlong buf_nativeObj, jint flags)
+{
+ static const char method_name[] = "imgcodecs::imdecode_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& buf = *((Mat*)buf_nativeObj);
+ ::Mat _retval_ = cv::imdecode( buf, (int)flags );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool imencode(String ext, Mat img, vector_uchar& buf, vector_int params = std::vector<int>())
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_imgcodecs_Imgcodecs_imencode_10 (JNIEnv*, jclass, jstring, jlong, jlong, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_imgcodecs_Imgcodecs_imencode_10
+ (JNIEnv* env, jclass , jstring ext, jlong img_nativeObj, jlong buf_mat_nativeObj, jlong params_mat_nativeObj)
+{
+ static const char method_name[] = "imgcodecs::imencode_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<uchar> buf;
+ Mat& buf_mat = *((Mat*)buf_mat_nativeObj);
+ std::vector<int> params;
+ Mat& params_mat = *((Mat*)params_mat_nativeObj);
+ Mat_to_vector_int( params_mat, params );
+ const char* utf_ext = env->GetStringUTFChars(ext, 0); String n_ext( utf_ext ? utf_ext : "" ); env->ReleaseStringUTFChars(ext, utf_ext);
+ Mat& img = *((Mat*)img_nativeObj);
+ bool _retval_ = cv::imencode( n_ext, img, buf, params );
+ vector_uchar_to_Mat( buf, buf_mat );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_imgcodecs_Imgcodecs_imencode_11 (JNIEnv*, jclass, jstring, jlong, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_imgcodecs_Imgcodecs_imencode_11
+ (JNIEnv* env, jclass , jstring ext, jlong img_nativeObj, jlong buf_mat_nativeObj)
+{
+ static const char method_name[] = "imgcodecs::imencode_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<uchar> buf;
+ Mat& buf_mat = *((Mat*)buf_mat_nativeObj);
+ const char* utf_ext = env->GetStringUTFChars(ext, 0); String n_ext( utf_ext ? utf_ext : "" ); env->ReleaseStringUTFChars(ext, utf_ext);
+ Mat& img = *((Mat*)img_nativeObj);
+ bool _retval_ = cv::imencode( n_ext, img, buf );
+ vector_uchar_to_Mat( buf, buf_mat );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+
+} // extern "C"
+
+#endif // HAVE_OPENCV_IMGCODECS
diff --git a/modules/java/src/imgproc+CLAHE.java b/modules/java/src/imgproc+CLAHE.java
new file mode 100644
index 0000000..ffc18b1
--- /dev/null
+++ b/modules/java/src/imgproc+CLAHE.java
@@ -0,0 +1,130 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.imgproc;
+
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+import org.opencv.core.Size;
+
+// C++: class CLAHE
+//javadoc: CLAHE
+public class CLAHE extends Algorithm {
+
+ protected CLAHE(long addr) { super(addr); }
+
+
+ //
+ // C++: void apply(Mat src, Mat& dst)
+ //
+
+ //javadoc: CLAHE::apply(src, dst)
+ public void apply(Mat src, Mat dst)
+ {
+
+ apply_0(nativeObj, src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void setClipLimit(double clipLimit)
+ //
+
+ //javadoc: CLAHE::setClipLimit(clipLimit)
+ public void setClipLimit(double clipLimit)
+ {
+
+ setClipLimit_0(nativeObj, clipLimit);
+
+ return;
+ }
+
+
+ //
+ // C++: double getClipLimit()
+ //
+
+ //javadoc: CLAHE::getClipLimit()
+ public double getClipLimit()
+ {
+
+ double retVal = getClipLimit_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setTilesGridSize(Size tileGridSize)
+ //
+
+ //javadoc: CLAHE::setTilesGridSize(tileGridSize)
+ public void setTilesGridSize(Size tileGridSize)
+ {
+
+ setTilesGridSize_0(nativeObj, tileGridSize.width, tileGridSize.height);
+
+ return;
+ }
+
+
+ //
+ // C++: Size getTilesGridSize()
+ //
+
+ //javadoc: CLAHE::getTilesGridSize()
+ public Size getTilesGridSize()
+ {
+
+ Size retVal = new Size(getTilesGridSize_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void collectGarbage()
+ //
+
+ //javadoc: CLAHE::collectGarbage()
+ public void collectGarbage()
+ {
+
+ collectGarbage_0(nativeObj);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void apply(Mat src, Mat& dst)
+ private static native void apply_0(long nativeObj, long src_nativeObj, long dst_nativeObj);
+
+ // C++: void setClipLimit(double clipLimit)
+ private static native void setClipLimit_0(long nativeObj, double clipLimit);
+
+ // C++: double getClipLimit()
+ private static native double getClipLimit_0(long nativeObj);
+
+ // C++: void setTilesGridSize(Size tileGridSize)
+ private static native void setTilesGridSize_0(long nativeObj, double tileGridSize_width, double tileGridSize_height);
+
+ // C++: Size getTilesGridSize()
+ private static native double[] getTilesGridSize_0(long nativeObj);
+
+ // C++: void collectGarbage()
+ private static native void collectGarbage_0(long nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/imgproc+Imgproc.java b/modules/java/src/imgproc+Imgproc.java
new file mode 100644
index 0000000..85355a6
--- /dev/null
+++ b/modules/java/src/imgproc+Imgproc.java
@@ -0,0 +1,3290 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.imgproc;
+
+import java.lang.String;
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfFloat;
+import org.opencv.core.MatOfInt;
+import org.opencv.core.MatOfInt4;
+import org.opencv.core.MatOfPoint;
+import org.opencv.core.MatOfPoint2f;
+import org.opencv.core.Point;
+import org.opencv.core.Rect;
+import org.opencv.core.RotatedRect;
+import org.opencv.core.Scalar;
+import org.opencv.core.Size;
+import org.opencv.core.TermCriteria;
+import org.opencv.utils.Converters;
+
+public class Imgproc {
+
+ private static final int
+ IPL_BORDER_CONSTANT = 0,
+ IPL_BORDER_REPLICATE = 1,
+ IPL_BORDER_REFLECT = 2,
+ IPL_BORDER_WRAP = 3,
+ IPL_BORDER_REFLECT_101 = 4,
+ IPL_BORDER_TRANSPARENT = 5,
+ CV_INTER_NN = 0,
+ CV_INTER_LINEAR = 1,
+ CV_INTER_CUBIC = 2,
+ CV_INTER_AREA = 3,
+ CV_INTER_LANCZOS4 = 4,
+ CV_MOP_ERODE = 0,
+ CV_MOP_DILATE = 1,
+ CV_MOP_OPEN = 2,
+ CV_MOP_CLOSE = 3,
+ CV_MOP_GRADIENT = 4,
+ CV_MOP_TOPHAT = 5,
+ CV_MOP_BLACKHAT = 6,
+ CV_RETR_EXTERNAL = 0,
+ CV_RETR_LIST = 1,
+ CV_RETR_CCOMP = 2,
+ CV_RETR_TREE = 3,
+ CV_RETR_FLOODFILL = 4,
+ CV_CHAIN_APPROX_NONE = 1,
+ CV_CHAIN_APPROX_SIMPLE = 2,
+ CV_CHAIN_APPROX_TC89_L1 = 3,
+ CV_CHAIN_APPROX_TC89_KCOS = 4,
+ CV_THRESH_BINARY = 0,
+ CV_THRESH_BINARY_INV = 1,
+ CV_THRESH_TRUNC = 2,
+ CV_THRESH_TOZERO = 3,
+ CV_THRESH_TOZERO_INV = 4,
+ CV_THRESH_MASK = 7,
+ CV_THRESH_OTSU = 8,
+ CV_THRESH_TRIANGLE = 16;
+
+
+ public static final int
+ LINE_AA = 16,
+ LINE_8 = 8,
+ LINE_4 = 4,
+ CV_BLUR_NO_SCALE = 0,
+ CV_BLUR = 1,
+ CV_GAUSSIAN = 2,
+ CV_MEDIAN = 3,
+ CV_BILATERAL = 4,
+ CV_GAUSSIAN_5x5 = 7,
+ CV_SCHARR = -1,
+ CV_MAX_SOBEL_KSIZE = 7,
+ CV_RGBA2mRGBA = 125,
+ CV_mRGBA2RGBA = 126,
+ CV_WARP_FILL_OUTLIERS = 8,
+ CV_WARP_INVERSE_MAP = 16,
+ CV_SHAPE_RECT = 0,
+ CV_SHAPE_CROSS = 1,
+ CV_SHAPE_ELLIPSE = 2,
+ CV_SHAPE_CUSTOM = 100,
+ CV_CHAIN_CODE = 0,
+ CV_LINK_RUNS = 5,
+ CV_POLY_APPROX_DP = 0,
+ CV_CONTOURS_MATCH_I1 = 1,
+ CV_CONTOURS_MATCH_I2 = 2,
+ CV_CONTOURS_MATCH_I3 = 3,
+ CV_CLOCKWISE = 1,
+ CV_COUNTER_CLOCKWISE = 2,
+ CV_COMP_CORREL = 0,
+ CV_COMP_CHISQR = 1,
+ CV_COMP_INTERSECT = 2,
+ CV_COMP_BHATTACHARYYA = 3,
+ CV_COMP_HELLINGER = CV_COMP_BHATTACHARYYA,
+ CV_COMP_CHISQR_ALT = 4,
+ CV_COMP_KL_DIV = 5,
+ CV_DIST_MASK_3 = 3,
+ CV_DIST_MASK_5 = 5,
+ CV_DIST_MASK_PRECISE = 0,
+ CV_DIST_LABEL_CCOMP = 0,
+ CV_DIST_LABEL_PIXEL = 1,
+ CV_DIST_USER = -1,
+ CV_DIST_L1 = 1,
+ CV_DIST_L2 = 2,
+ CV_DIST_C = 3,
+ CV_DIST_L12 = 4,
+ CV_DIST_FAIR = 5,
+ CV_DIST_WELSCH = 6,
+ CV_DIST_HUBER = 7,
+ CV_CANNY_L2_GRADIENT = (1 << 31),
+ CV_HOUGH_STANDARD = 0,
+ CV_HOUGH_PROBABILISTIC = 1,
+ CV_HOUGH_MULTI_SCALE = 2,
+ CV_HOUGH_GRADIENT = 3,
+ MORPH_ERODE = 0,
+ MORPH_DILATE = 1,
+ MORPH_OPEN = 2,
+ MORPH_CLOSE = 3,
+ MORPH_GRADIENT = 4,
+ MORPH_TOPHAT = 5,
+ MORPH_BLACKHAT = 6,
+ MORPH_RECT = 0,
+ MORPH_CROSS = 1,
+ MORPH_ELLIPSE = 2,
+ INTER_NEAREST = 0,
+ INTER_LINEAR = 1,
+ INTER_CUBIC = 2,
+ INTER_AREA = 3,
+ INTER_LANCZOS4 = 4,
+ INTER_MAX = 7,
+ WARP_FILL_OUTLIERS = 8,
+ WARP_INVERSE_MAP = 16,
+ INTER_BITS = 5,
+ INTER_BITS2 = INTER_BITS * 2,
+ INTER_TAB_SIZE = 1 << INTER_BITS,
+ INTER_TAB_SIZE2 = INTER_TAB_SIZE * INTER_TAB_SIZE,
+ DIST_USER = -1,
+ DIST_L1 = 1,
+ DIST_L2 = 2,
+ DIST_C = 3,
+ DIST_L12 = 4,
+ DIST_FAIR = 5,
+ DIST_WELSCH = 6,
+ DIST_HUBER = 7,
+ DIST_MASK_3 = 3,
+ DIST_MASK_5 = 5,
+ DIST_MASK_PRECISE = 0,
+ THRESH_BINARY = 0,
+ THRESH_BINARY_INV = 1,
+ THRESH_TRUNC = 2,
+ THRESH_TOZERO = 3,
+ THRESH_TOZERO_INV = 4,
+ THRESH_MASK = 7,
+ THRESH_OTSU = 8,
+ THRESH_TRIANGLE = 16,
+ ADAPTIVE_THRESH_MEAN_C = 0,
+ ADAPTIVE_THRESH_GAUSSIAN_C = 1,
+ PROJ_SPHERICAL_ORTHO = 0,
+ PROJ_SPHERICAL_EQRECT = 1,
+ GC_BGD = 0,
+ GC_FGD = 1,
+ GC_PR_BGD = 2,
+ GC_PR_FGD = 3,
+ GC_INIT_WITH_RECT = 0,
+ GC_INIT_WITH_MASK = 1,
+ GC_EVAL = 2,
+ DIST_LABEL_CCOMP = 0,
+ DIST_LABEL_PIXEL = 1,
+ FLOODFILL_FIXED_RANGE = 1 << 16,
+ FLOODFILL_MASK_ONLY = 1 << 17,
+ CC_STAT_LEFT = 0,
+ CC_STAT_TOP = 1,
+ CC_STAT_WIDTH = 2,
+ CC_STAT_HEIGHT = 3,
+ CC_STAT_AREA = 4,
+ CC_STAT_MAX = 5,
+ RETR_EXTERNAL = 0,
+ RETR_LIST = 1,
+ RETR_CCOMP = 2,
+ RETR_TREE = 3,
+ RETR_FLOODFILL = 4,
+ CHAIN_APPROX_NONE = 1,
+ CHAIN_APPROX_SIMPLE = 2,
+ CHAIN_APPROX_TC89_L1 = 3,
+ CHAIN_APPROX_TC89_KCOS = 4,
+ HOUGH_STANDARD = 0,
+ HOUGH_PROBABILISTIC = 1,
+ HOUGH_MULTI_SCALE = 2,
+ HOUGH_GRADIENT = 3,
+ LSD_REFINE_NONE = 0,
+ LSD_REFINE_STD = 1,
+ LSD_REFINE_ADV = 2,
+ HISTCMP_CORREL = 0,
+ HISTCMP_CHISQR = 1,
+ HISTCMP_INTERSECT = 2,
+ HISTCMP_BHATTACHARYYA = 3,
+ HISTCMP_HELLINGER = HISTCMP_BHATTACHARYYA,
+ HISTCMP_CHISQR_ALT = 4,
+ HISTCMP_KL_DIV = 5,
+ COLOR_BGR2BGRA = 0,
+ COLOR_RGB2RGBA = COLOR_BGR2BGRA,
+ COLOR_BGRA2BGR = 1,
+ COLOR_RGBA2RGB = COLOR_BGRA2BGR,
+ COLOR_BGR2RGBA = 2,
+ COLOR_RGB2BGRA = COLOR_BGR2RGBA,
+ COLOR_RGBA2BGR = 3,
+ COLOR_BGRA2RGB = COLOR_RGBA2BGR,
+ COLOR_BGR2RGB = 4,
+ COLOR_RGB2BGR = COLOR_BGR2RGB,
+ COLOR_BGRA2RGBA = 5,
+ COLOR_RGBA2BGRA = COLOR_BGRA2RGBA,
+ COLOR_BGR2GRAY = 6,
+ COLOR_RGB2GRAY = 7,
+ COLOR_GRAY2BGR = 8,
+ COLOR_GRAY2RGB = COLOR_GRAY2BGR,
+ COLOR_GRAY2BGRA = 9,
+ COLOR_GRAY2RGBA = COLOR_GRAY2BGRA,
+ COLOR_BGRA2GRAY = 10,
+ COLOR_RGBA2GRAY = 11,
+ COLOR_BGR2BGR565 = 12,
+ COLOR_RGB2BGR565 = 13,
+ COLOR_BGR5652BGR = 14,
+ COLOR_BGR5652RGB = 15,
+ COLOR_BGRA2BGR565 = 16,
+ COLOR_RGBA2BGR565 = 17,
+ COLOR_BGR5652BGRA = 18,
+ COLOR_BGR5652RGBA = 19,
+ COLOR_GRAY2BGR565 = 20,
+ COLOR_BGR5652GRAY = 21,
+ COLOR_BGR2BGR555 = 22,
+ COLOR_RGB2BGR555 = 23,
+ COLOR_BGR5552BGR = 24,
+ COLOR_BGR5552RGB = 25,
+ COLOR_BGRA2BGR555 = 26,
+ COLOR_RGBA2BGR555 = 27,
+ COLOR_BGR5552BGRA = 28,
+ COLOR_BGR5552RGBA = 29,
+ COLOR_GRAY2BGR555 = 30,
+ COLOR_BGR5552GRAY = 31,
+ COLOR_BGR2XYZ = 32,
+ COLOR_RGB2XYZ = 33,
+ COLOR_XYZ2BGR = 34,
+ COLOR_XYZ2RGB = 35,
+ COLOR_BGR2YCrCb = 36,
+ COLOR_RGB2YCrCb = 37,
+ COLOR_YCrCb2BGR = 38,
+ COLOR_YCrCb2RGB = 39,
+ COLOR_BGR2HSV = 40,
+ COLOR_RGB2HSV = 41,
+ COLOR_BGR2Lab = 44,
+ COLOR_RGB2Lab = 45,
+ COLOR_BGR2Luv = 50,
+ COLOR_RGB2Luv = 51,
+ COLOR_BGR2HLS = 52,
+ COLOR_RGB2HLS = 53,
+ COLOR_HSV2BGR = 54,
+ COLOR_HSV2RGB = 55,
+ COLOR_Lab2BGR = 56,
+ COLOR_Lab2RGB = 57,
+ COLOR_Luv2BGR = 58,
+ COLOR_Luv2RGB = 59,
+ COLOR_HLS2BGR = 60,
+ COLOR_HLS2RGB = 61,
+ COLOR_BGR2HSV_FULL = 66,
+ COLOR_RGB2HSV_FULL = 67,
+ COLOR_BGR2HLS_FULL = 68,
+ COLOR_RGB2HLS_FULL = 69,
+ COLOR_HSV2BGR_FULL = 70,
+ COLOR_HSV2RGB_FULL = 71,
+ COLOR_HLS2BGR_FULL = 72,
+ COLOR_HLS2RGB_FULL = 73,
+ COLOR_LBGR2Lab = 74,
+ COLOR_LRGB2Lab = 75,
+ COLOR_LBGR2Luv = 76,
+ COLOR_LRGB2Luv = 77,
+ COLOR_Lab2LBGR = 78,
+ COLOR_Lab2LRGB = 79,
+ COLOR_Luv2LBGR = 80,
+ COLOR_Luv2LRGB = 81,
+ COLOR_BGR2YUV = 82,
+ COLOR_RGB2YUV = 83,
+ COLOR_YUV2BGR = 84,
+ COLOR_YUV2RGB = 85,
+ COLOR_YUV2RGB_NV12 = 90,
+ COLOR_YUV2BGR_NV12 = 91,
+ COLOR_YUV2RGB_NV21 = 92,
+ COLOR_YUV2BGR_NV21 = 93,
+ COLOR_YUV420sp2RGB = COLOR_YUV2RGB_NV21,
+ COLOR_YUV420sp2BGR = COLOR_YUV2BGR_NV21,
+ COLOR_YUV2RGBA_NV12 = 94,
+ COLOR_YUV2BGRA_NV12 = 95,
+ COLOR_YUV2RGBA_NV21 = 96,
+ COLOR_YUV2BGRA_NV21 = 97,
+ COLOR_YUV420sp2RGBA = COLOR_YUV2RGBA_NV21,
+ COLOR_YUV420sp2BGRA = COLOR_YUV2BGRA_NV21,
+ COLOR_YUV2RGB_YV12 = 98,
+ COLOR_YUV2BGR_YV12 = 99,
+ COLOR_YUV2RGB_IYUV = 100,
+ COLOR_YUV2BGR_IYUV = 101,
+ COLOR_YUV2RGB_I420 = COLOR_YUV2RGB_IYUV,
+ COLOR_YUV2BGR_I420 = COLOR_YUV2BGR_IYUV,
+ COLOR_YUV420p2RGB = COLOR_YUV2RGB_YV12,
+ COLOR_YUV420p2BGR = COLOR_YUV2BGR_YV12,
+ COLOR_YUV2RGBA_YV12 = 102,
+ COLOR_YUV2BGRA_YV12 = 103,
+ COLOR_YUV2RGBA_IYUV = 104,
+ COLOR_YUV2BGRA_IYUV = 105,
+ COLOR_YUV2RGBA_I420 = COLOR_YUV2RGBA_IYUV,
+ COLOR_YUV2BGRA_I420 = COLOR_YUV2BGRA_IYUV,
+ COLOR_YUV420p2RGBA = COLOR_YUV2RGBA_YV12,
+ COLOR_YUV420p2BGRA = COLOR_YUV2BGRA_YV12,
+ COLOR_YUV2GRAY_420 = 106,
+ COLOR_YUV2GRAY_NV21 = COLOR_YUV2GRAY_420,
+ COLOR_YUV2GRAY_NV12 = COLOR_YUV2GRAY_420,
+ COLOR_YUV2GRAY_YV12 = COLOR_YUV2GRAY_420,
+ COLOR_YUV2GRAY_IYUV = COLOR_YUV2GRAY_420,
+ COLOR_YUV2GRAY_I420 = COLOR_YUV2GRAY_420,
+ COLOR_YUV420sp2GRAY = COLOR_YUV2GRAY_420,
+ COLOR_YUV420p2GRAY = COLOR_YUV2GRAY_420,
+ COLOR_YUV2RGB_UYVY = 107,
+ COLOR_YUV2BGR_UYVY = 108,
+ COLOR_YUV2RGB_Y422 = COLOR_YUV2RGB_UYVY,
+ COLOR_YUV2BGR_Y422 = COLOR_YUV2BGR_UYVY,
+ COLOR_YUV2RGB_UYNV = COLOR_YUV2RGB_UYVY,
+ COLOR_YUV2BGR_UYNV = COLOR_YUV2BGR_UYVY,
+ COLOR_YUV2RGBA_UYVY = 111,
+ COLOR_YUV2BGRA_UYVY = 112,
+ COLOR_YUV2RGBA_Y422 = COLOR_YUV2RGBA_UYVY,
+ COLOR_YUV2BGRA_Y422 = COLOR_YUV2BGRA_UYVY,
+ COLOR_YUV2RGBA_UYNV = COLOR_YUV2RGBA_UYVY,
+ COLOR_YUV2BGRA_UYNV = COLOR_YUV2BGRA_UYVY,
+ COLOR_YUV2RGB_YUY2 = 115,
+ COLOR_YUV2BGR_YUY2 = 116,
+ COLOR_YUV2RGB_YVYU = 117,
+ COLOR_YUV2BGR_YVYU = 118,
+ COLOR_YUV2RGB_YUYV = COLOR_YUV2RGB_YUY2,
+ COLOR_YUV2BGR_YUYV = COLOR_YUV2BGR_YUY2,
+ COLOR_YUV2RGB_YUNV = COLOR_YUV2RGB_YUY2,
+ COLOR_YUV2BGR_YUNV = COLOR_YUV2BGR_YUY2,
+ COLOR_YUV2RGBA_YUY2 = 119,
+ COLOR_YUV2BGRA_YUY2 = 120,
+ COLOR_YUV2RGBA_YVYU = 121,
+ COLOR_YUV2BGRA_YVYU = 122,
+ COLOR_YUV2RGBA_YUYV = COLOR_YUV2RGBA_YUY2,
+ COLOR_YUV2BGRA_YUYV = COLOR_YUV2BGRA_YUY2,
+ COLOR_YUV2RGBA_YUNV = COLOR_YUV2RGBA_YUY2,
+ COLOR_YUV2BGRA_YUNV = COLOR_YUV2BGRA_YUY2,
+ COLOR_YUV2GRAY_UYVY = 123,
+ COLOR_YUV2GRAY_YUY2 = 124,
+ COLOR_YUV2GRAY_Y422 = COLOR_YUV2GRAY_UYVY,
+ COLOR_YUV2GRAY_UYNV = COLOR_YUV2GRAY_UYVY,
+ COLOR_YUV2GRAY_YVYU = COLOR_YUV2GRAY_YUY2,
+ COLOR_YUV2GRAY_YUYV = COLOR_YUV2GRAY_YUY2,
+ COLOR_YUV2GRAY_YUNV = COLOR_YUV2GRAY_YUY2,
+ COLOR_RGBA2mRGBA = 125,
+ COLOR_mRGBA2RGBA = 126,
+ COLOR_RGB2YUV_I420 = 127,
+ COLOR_BGR2YUV_I420 = 128,
+ COLOR_RGB2YUV_IYUV = COLOR_RGB2YUV_I420,
+ COLOR_BGR2YUV_IYUV = COLOR_BGR2YUV_I420,
+ COLOR_RGBA2YUV_I420 = 129,
+ COLOR_BGRA2YUV_I420 = 130,
+ COLOR_RGBA2YUV_IYUV = COLOR_RGBA2YUV_I420,
+ COLOR_BGRA2YUV_IYUV = COLOR_BGRA2YUV_I420,
+ COLOR_RGB2YUV_YV12 = 131,
+ COLOR_BGR2YUV_YV12 = 132,
+ COLOR_RGBA2YUV_YV12 = 133,
+ COLOR_BGRA2YUV_YV12 = 134,
+ COLOR_BayerBG2BGR = 46,
+ COLOR_BayerGB2BGR = 47,
+ COLOR_BayerRG2BGR = 48,
+ COLOR_BayerGR2BGR = 49,
+ COLOR_BayerBG2RGB = COLOR_BayerRG2BGR,
+ COLOR_BayerGB2RGB = COLOR_BayerGR2BGR,
+ COLOR_BayerRG2RGB = COLOR_BayerBG2BGR,
+ COLOR_BayerGR2RGB = COLOR_BayerGB2BGR,
+ COLOR_BayerBG2GRAY = 86,
+ COLOR_BayerGB2GRAY = 87,
+ COLOR_BayerRG2GRAY = 88,
+ COLOR_BayerGR2GRAY = 89,
+ COLOR_BayerBG2BGR_VNG = 62,
+ COLOR_BayerGB2BGR_VNG = 63,
+ COLOR_BayerRG2BGR_VNG = 64,
+ COLOR_BayerGR2BGR_VNG = 65,
+ COLOR_BayerBG2RGB_VNG = COLOR_BayerRG2BGR_VNG,
+ COLOR_BayerGB2RGB_VNG = COLOR_BayerGR2BGR_VNG,
+ COLOR_BayerRG2RGB_VNG = COLOR_BayerBG2BGR_VNG,
+ COLOR_BayerGR2RGB_VNG = COLOR_BayerGB2BGR_VNG,
+ COLOR_BayerBG2BGR_EA = 135,
+ COLOR_BayerGB2BGR_EA = 136,
+ COLOR_BayerRG2BGR_EA = 137,
+ COLOR_BayerGR2BGR_EA = 138,
+ COLOR_BayerBG2RGB_EA = COLOR_BayerRG2BGR_EA,
+ COLOR_BayerGB2RGB_EA = COLOR_BayerGR2BGR_EA,
+ COLOR_BayerRG2RGB_EA = COLOR_BayerBG2BGR_EA,
+ COLOR_BayerGR2RGB_EA = COLOR_BayerGB2BGR_EA,
+ COLOR_COLORCVT_MAX = 139,
+ INTERSECT_NONE = 0,
+ INTERSECT_PARTIAL = 1,
+ INTERSECT_FULL = 2,
+ TM_SQDIFF = 0,
+ TM_SQDIFF_NORMED = 1,
+ TM_CCORR = 2,
+ TM_CCORR_NORMED = 3,
+ TM_CCOEFF = 4,
+ TM_CCOEFF_NORMED = 5,
+ COLORMAP_AUTUMN = 0,
+ COLORMAP_BONE = 1,
+ COLORMAP_JET = 2,
+ COLORMAP_WINTER = 3,
+ COLORMAP_RAINBOW = 4,
+ COLORMAP_OCEAN = 5,
+ COLORMAP_SUMMER = 6,
+ COLORMAP_SPRING = 7,
+ COLORMAP_COOL = 8,
+ COLORMAP_HSV = 9,
+ COLORMAP_PINK = 10,
+ COLORMAP_HOT = 11,
+ COLORMAP_PARULA = 12;
+
+
+ //
+ // C++: void remap(Mat src, Mat& dst, Mat map1, Mat map2, int interpolation, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar())
+ //
+
+ //javadoc: remap(src, dst, map1, map2, interpolation, borderMode, borderValue)
+ public static void remap(Mat src, Mat dst, Mat map1, Mat map2, int interpolation, int borderMode, Scalar borderValue)
+ {
+
+ remap_0(src.nativeObj, dst.nativeObj, map1.nativeObj, map2.nativeObj, interpolation, borderMode, borderValue.val[0], borderValue.val[1], borderValue.val[2], borderValue.val[3]);
+
+ return;
+ }
+
+ //javadoc: remap(src, dst, map1, map2, interpolation)
+ public static void remap(Mat src, Mat dst, Mat map1, Mat map2, int interpolation)
+ {
+
+ remap_1(src.nativeObj, dst.nativeObj, map1.nativeObj, map2.nativeObj, interpolation);
+
+ return;
+ }
+
+
+ //
+ // C++: void convertMaps(Mat map1, Mat map2, Mat& dstmap1, Mat& dstmap2, int dstmap1type, bool nninterpolation = false)
+ //
+
+ //javadoc: convertMaps(map1, map2, dstmap1, dstmap2, dstmap1type, nninterpolation)
+ public static void convertMaps(Mat map1, Mat map2, Mat dstmap1, Mat dstmap2, int dstmap1type, boolean nninterpolation)
+ {
+
+ convertMaps_0(map1.nativeObj, map2.nativeObj, dstmap1.nativeObj, dstmap2.nativeObj, dstmap1type, nninterpolation);
+
+ return;
+ }
+
+ //javadoc: convertMaps(map1, map2, dstmap1, dstmap2, dstmap1type)
+ public static void convertMaps(Mat map1, Mat map2, Mat dstmap1, Mat dstmap2, int dstmap1type)
+ {
+
+ convertMaps_1(map1.nativeObj, map2.nativeObj, dstmap1.nativeObj, dstmap2.nativeObj, dstmap1type);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat getRotationMatrix2D(Point2f center, double angle, double scale)
+ //
+
+ //javadoc: getRotationMatrix2D(center, angle, scale)
+ public static Mat getRotationMatrix2D(Point center, double angle, double scale)
+ {
+
+ Mat retVal = new Mat(getRotationMatrix2D_0(center.x, center.y, angle, scale));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void invertAffineTransform(Mat M, Mat& iM)
+ //
+
+ //javadoc: invertAffineTransform(M, iM)
+ public static void invertAffineTransform(Mat M, Mat iM)
+ {
+
+ invertAffineTransform_0(M.nativeObj, iM.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat getPerspectiveTransform(Mat src, Mat dst)
+ //
+
+ //javadoc: getPerspectiveTransform(src, dst)
+ public static Mat getPerspectiveTransform(Mat src, Mat dst)
+ {
+
+ Mat retVal = new Mat(getPerspectiveTransform_0(src.nativeObj, dst.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getAffineTransform(vector_Point2f src, vector_Point2f dst)
+ //
+
+ //javadoc: getAffineTransform(src, dst)
+ public static Mat getAffineTransform(MatOfPoint2f src, MatOfPoint2f dst)
+ {
+ Mat src_mat = src;
+ Mat dst_mat = dst;
+ Mat retVal = new Mat(getAffineTransform_0(src_mat.nativeObj, dst_mat.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void getRectSubPix(Mat image, Size patchSize, Point2f center, Mat& patch, int patchType = -1)
+ //
+
+ //javadoc: getRectSubPix(image, patchSize, center, patch, patchType)
+ public static void getRectSubPix(Mat image, Size patchSize, Point center, Mat patch, int patchType)
+ {
+
+ getRectSubPix_0(image.nativeObj, patchSize.width, patchSize.height, center.x, center.y, patch.nativeObj, patchType);
+
+ return;
+ }
+
+ //javadoc: getRectSubPix(image, patchSize, center, patch)
+ public static void getRectSubPix(Mat image, Size patchSize, Point center, Mat patch)
+ {
+
+ getRectSubPix_1(image.nativeObj, patchSize.width, patchSize.height, center.x, center.y, patch.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void logPolar(Mat src, Mat& dst, Point2f center, double M, int flags)
+ //
+
+ //javadoc: logPolar(src, dst, center, M, flags)
+ public static void logPolar(Mat src, Mat dst, Point center, double M, int flags)
+ {
+
+ logPolar_0(src.nativeObj, dst.nativeObj, center.x, center.y, M, flags);
+
+ return;
+ }
+
+
+ //
+ // C++: void linearPolar(Mat src, Mat& dst, Point2f center, double maxRadius, int flags)
+ //
+
+ //javadoc: linearPolar(src, dst, center, maxRadius, flags)
+ public static void linearPolar(Mat src, Mat dst, Point center, double maxRadius, int flags)
+ {
+
+ linearPolar_0(src.nativeObj, dst.nativeObj, center.x, center.y, maxRadius, flags);
+
+ return;
+ }
+
+
+ //
+ // C++: void integral(Mat src, Mat& sum, int sdepth = -1)
+ //
+
+ //javadoc: integral(src, sum, sdepth)
+ public static void integral(Mat src, Mat sum, int sdepth)
+ {
+
+ integral_0(src.nativeObj, sum.nativeObj, sdepth);
+
+ return;
+ }
+
+ //javadoc: integral(src, sum)
+ public static void integral(Mat src, Mat sum)
+ {
+
+ integral_1(src.nativeObj, sum.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void filter2D(Mat src, Mat& dst, int ddepth, Mat kernel, Point anchor = Point(-1,-1), double delta = 0, int borderType = BORDER_DEFAULT)
+ //
+
+ //javadoc: filter2D(src, dst, ddepth, kernel, anchor, delta, borderType)
+ public static void filter2D(Mat src, Mat dst, int ddepth, Mat kernel, Point anchor, double delta, int borderType)
+ {
+
+ filter2D_0(src.nativeObj, dst.nativeObj, ddepth, kernel.nativeObj, anchor.x, anchor.y, delta, borderType);
+
+ return;
+ }
+
+ //javadoc: filter2D(src, dst, ddepth, kernel, anchor, delta)
+ public static void filter2D(Mat src, Mat dst, int ddepth, Mat kernel, Point anchor, double delta)
+ {
+
+ filter2D_1(src.nativeObj, dst.nativeObj, ddepth, kernel.nativeObj, anchor.x, anchor.y, delta);
+
+ return;
+ }
+
+ //javadoc: filter2D(src, dst, ddepth, kernel)
+ public static void filter2D(Mat src, Mat dst, int ddepth, Mat kernel)
+ {
+
+ filter2D_2(src.nativeObj, dst.nativeObj, ddepth, kernel.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void sepFilter2D(Mat src, Mat& dst, int ddepth, Mat kernelX, Mat kernelY, Point anchor = Point(-1,-1), double delta = 0, int borderType = BORDER_DEFAULT)
+ //
+
+ //javadoc: sepFilter2D(src, dst, ddepth, kernelX, kernelY, anchor, delta, borderType)
+ public static void sepFilter2D(Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY, Point anchor, double delta, int borderType)
+ {
+
+ sepFilter2D_0(src.nativeObj, dst.nativeObj, ddepth, kernelX.nativeObj, kernelY.nativeObj, anchor.x, anchor.y, delta, borderType);
+
+ return;
+ }
+
+ //javadoc: sepFilter2D(src, dst, ddepth, kernelX, kernelY, anchor, delta)
+ public static void sepFilter2D(Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY, Point anchor, double delta)
+ {
+
+ sepFilter2D_1(src.nativeObj, dst.nativeObj, ddepth, kernelX.nativeObj, kernelY.nativeObj, anchor.x, anchor.y, delta);
+
+ return;
+ }
+
+ //javadoc: sepFilter2D(src, dst, ddepth, kernelX, kernelY)
+ public static void sepFilter2D(Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY)
+ {
+
+ sepFilter2D_2(src.nativeObj, dst.nativeObj, ddepth, kernelX.nativeObj, kernelY.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void Sobel(Mat src, Mat& dst, int ddepth, int dx, int dy, int ksize = 3, double scale = 1, double delta = 0, int borderType = BORDER_DEFAULT)
+ //
+
+ //javadoc: Sobel(src, dst, ddepth, dx, dy, ksize, scale, delta, borderType)
+ public static void Sobel(Mat src, Mat dst, int ddepth, int dx, int dy, int ksize, double scale, double delta, int borderType)
+ {
+
+ Sobel_0(src.nativeObj, dst.nativeObj, ddepth, dx, dy, ksize, scale, delta, borderType);
+
+ return;
+ }
+
+ //javadoc: Sobel(src, dst, ddepth, dx, dy, ksize, scale, delta)
+ public static void Sobel(Mat src, Mat dst, int ddepth, int dx, int dy, int ksize, double scale, double delta)
+ {
+
+ Sobel_1(src.nativeObj, dst.nativeObj, ddepth, dx, dy, ksize, scale, delta);
+
+ return;
+ }
+
+ //javadoc: Sobel(src, dst, ddepth, dx, dy)
+ public static void Sobel(Mat src, Mat dst, int ddepth, int dx, int dy)
+ {
+
+ Sobel_2(src.nativeObj, dst.nativeObj, ddepth, dx, dy);
+
+ return;
+ }
+
+
+ //
+ // C++: void Scharr(Mat src, Mat& dst, int ddepth, int dx, int dy, double scale = 1, double delta = 0, int borderType = BORDER_DEFAULT)
+ //
+
+ //javadoc: Scharr(src, dst, ddepth, dx, dy, scale, delta, borderType)
+ public static void Scharr(Mat src, Mat dst, int ddepth, int dx, int dy, double scale, double delta, int borderType)
+ {
+
+ Scharr_0(src.nativeObj, dst.nativeObj, ddepth, dx, dy, scale, delta, borderType);
+
+ return;
+ }
+
+ //javadoc: Scharr(src, dst, ddepth, dx, dy, scale, delta)
+ public static void Scharr(Mat src, Mat dst, int ddepth, int dx, int dy, double scale, double delta)
+ {
+
+ Scharr_1(src.nativeObj, dst.nativeObj, ddepth, dx, dy, scale, delta);
+
+ return;
+ }
+
+ //javadoc: Scharr(src, dst, ddepth, dx, dy)
+ public static void Scharr(Mat src, Mat dst, int ddepth, int dx, int dy)
+ {
+
+ Scharr_2(src.nativeObj, dst.nativeObj, ddepth, dx, dy);
+
+ return;
+ }
+
+
+ //
+ // C++: void Laplacian(Mat src, Mat& dst, int ddepth, int ksize = 1, double scale = 1, double delta = 0, int borderType = BORDER_DEFAULT)
+ //
+
+ //javadoc: Laplacian(src, dst, ddepth, ksize, scale, delta, borderType)
+ public static void Laplacian(Mat src, Mat dst, int ddepth, int ksize, double scale, double delta, int borderType)
+ {
+
+ Laplacian_0(src.nativeObj, dst.nativeObj, ddepth, ksize, scale, delta, borderType);
+
+ return;
+ }
+
+ //javadoc: Laplacian(src, dst, ddepth, ksize, scale, delta)
+ public static void Laplacian(Mat src, Mat dst, int ddepth, int ksize, double scale, double delta)
+ {
+
+ Laplacian_1(src.nativeObj, dst.nativeObj, ddepth, ksize, scale, delta);
+
+ return;
+ }
+
+ //javadoc: Laplacian(src, dst, ddepth)
+ public static void Laplacian(Mat src, Mat dst, int ddepth)
+ {
+
+ Laplacian_2(src.nativeObj, dst.nativeObj, ddepth);
+
+ return;
+ }
+
+
+ //
+ // C++: void Canny(Mat image, Mat& edges, double threshold1, double threshold2, int apertureSize = 3, bool L2gradient = false)
+ //
+
+ //javadoc: Canny(image, edges, threshold1, threshold2, apertureSize, L2gradient)
+ public static void Canny(Mat image, Mat edges, double threshold1, double threshold2, int apertureSize, boolean L2gradient)
+ {
+
+ Canny_0(image.nativeObj, edges.nativeObj, threshold1, threshold2, apertureSize, L2gradient);
+
+ return;
+ }
+
+ //javadoc: Canny(image, edges, threshold1, threshold2)
+ public static void Canny(Mat image, Mat edges, double threshold1, double threshold2)
+ {
+
+ Canny_1(image.nativeObj, edges.nativeObj, threshold1, threshold2);
+
+ return;
+ }
+
+
+ //
+ // C++: void cornerMinEigenVal(Mat src, Mat& dst, int blockSize, int ksize = 3, int borderType = BORDER_DEFAULT)
+ //
+
+ //javadoc: cornerMinEigenVal(src, dst, blockSize, ksize, borderType)
+ public static void cornerMinEigenVal(Mat src, Mat dst, int blockSize, int ksize, int borderType)
+ {
+
+ cornerMinEigenVal_0(src.nativeObj, dst.nativeObj, blockSize, ksize, borderType);
+
+ return;
+ }
+
+ //javadoc: cornerMinEigenVal(src, dst, blockSize, ksize)
+ public static void cornerMinEigenVal(Mat src, Mat dst, int blockSize, int ksize)
+ {
+
+ cornerMinEigenVal_1(src.nativeObj, dst.nativeObj, blockSize, ksize);
+
+ return;
+ }
+
+ //javadoc: cornerMinEigenVal(src, dst, blockSize)
+ public static void cornerMinEigenVal(Mat src, Mat dst, int blockSize)
+ {
+
+ cornerMinEigenVal_2(src.nativeObj, dst.nativeObj, blockSize);
+
+ return;
+ }
+
+
+ //
+ // C++: Ptr_LineSegmentDetector createLineSegmentDetector(int _refine = LSD_REFINE_STD, double _scale = 0.8, double _sigma_scale = 0.6, double _quant = 2.0, double _ang_th = 22.5, double _log_eps = 0, double _density_th = 0.7, int _n_bins = 1024)
+ //
+
+ //javadoc: createLineSegmentDetector(_refine, _scale, _sigma_scale, _quant, _ang_th, _log_eps, _density_th, _n_bins)
+ public static LineSegmentDetector createLineSegmentDetector(int _refine, double _scale, double _sigma_scale, double _quant, double _ang_th, double _log_eps, double _density_th, int _n_bins)
+ {
+
+ LineSegmentDetector retVal = new LineSegmentDetector(createLineSegmentDetector_0(_refine, _scale, _sigma_scale, _quant, _ang_th, _log_eps, _density_th, _n_bins));
+
+ return retVal;
+ }
+
+ //javadoc: createLineSegmentDetector()
+ public static LineSegmentDetector createLineSegmentDetector()
+ {
+
+ LineSegmentDetector retVal = new LineSegmentDetector(createLineSegmentDetector_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getGaussianKernel(int ksize, double sigma, int ktype = CV_64F)
+ //
+
+ //javadoc: getGaussianKernel(ksize, sigma, ktype)
+ public static Mat getGaussianKernel(int ksize, double sigma, int ktype)
+ {
+
+ Mat retVal = new Mat(getGaussianKernel_0(ksize, sigma, ktype));
+
+ return retVal;
+ }
+
+ //javadoc: getGaussianKernel(ksize, sigma)
+ public static Mat getGaussianKernel(int ksize, double sigma)
+ {
+
+ Mat retVal = new Mat(getGaussianKernel_1(ksize, sigma));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void getDerivKernels(Mat& kx, Mat& ky, int dx, int dy, int ksize, bool normalize = false, int ktype = CV_32F)
+ //
+
+ //javadoc: getDerivKernels(kx, ky, dx, dy, ksize, normalize, ktype)
+ public static void getDerivKernels(Mat kx, Mat ky, int dx, int dy, int ksize, boolean normalize, int ktype)
+ {
+
+ getDerivKernels_0(kx.nativeObj, ky.nativeObj, dx, dy, ksize, normalize, ktype);
+
+ return;
+ }
+
+ //javadoc: getDerivKernels(kx, ky, dx, dy, ksize)
+ public static void getDerivKernels(Mat kx, Mat ky, int dx, int dy, int ksize)
+ {
+
+ getDerivKernels_1(kx.nativeObj, ky.nativeObj, dx, dy, ksize);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat getGaborKernel(Size ksize, double sigma, double theta, double lambd, double gamma, double psi = CV_PI*0.5, int ktype = CV_64F)
+ //
+
+ //javadoc: getGaborKernel(ksize, sigma, theta, lambd, gamma, psi, ktype)
+ public static Mat getGaborKernel(Size ksize, double sigma, double theta, double lambd, double gamma, double psi, int ktype)
+ {
+
+ Mat retVal = new Mat(getGaborKernel_0(ksize.width, ksize.height, sigma, theta, lambd, gamma, psi, ktype));
+
+ return retVal;
+ }
+
+ //javadoc: getGaborKernel(ksize, sigma, theta, lambd, gamma)
+ public static Mat getGaborKernel(Size ksize, double sigma, double theta, double lambd, double gamma)
+ {
+
+ Mat retVal = new Mat(getGaborKernel_1(ksize.width, ksize.height, sigma, theta, lambd, gamma));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getStructuringElement(int shape, Size ksize, Point anchor = Point(-1,-1))
+ //
+
+ //javadoc: getStructuringElement(shape, ksize, anchor)
+ public static Mat getStructuringElement(int shape, Size ksize, Point anchor)
+ {
+
+ Mat retVal = new Mat(getStructuringElement_0(shape, ksize.width, ksize.height, anchor.x, anchor.y));
+
+ return retVal;
+ }
+
+ //javadoc: getStructuringElement(shape, ksize)
+ public static Mat getStructuringElement(int shape, Size ksize)
+ {
+
+ Mat retVal = new Mat(getStructuringElement_1(shape, ksize.width, ksize.height));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void medianBlur(Mat src, Mat& dst, int ksize)
+ //
+
+ //javadoc: medianBlur(src, dst, ksize)
+ public static void medianBlur(Mat src, Mat dst, int ksize)
+ {
+
+ medianBlur_0(src.nativeObj, dst.nativeObj, ksize);
+
+ return;
+ }
+
+
+ //
+ // C++: void GaussianBlur(Mat src, Mat& dst, Size ksize, double sigmaX, double sigmaY = 0, int borderType = BORDER_DEFAULT)
+ //
+
+ //javadoc: GaussianBlur(src, dst, ksize, sigmaX, sigmaY, borderType)
+ public static void GaussianBlur(Mat src, Mat dst, Size ksize, double sigmaX, double sigmaY, int borderType)
+ {
+
+ GaussianBlur_0(src.nativeObj, dst.nativeObj, ksize.width, ksize.height, sigmaX, sigmaY, borderType);
+
+ return;
+ }
+
+ //javadoc: GaussianBlur(src, dst, ksize, sigmaX, sigmaY)
+ public static void GaussianBlur(Mat src, Mat dst, Size ksize, double sigmaX, double sigmaY)
+ {
+
+ GaussianBlur_1(src.nativeObj, dst.nativeObj, ksize.width, ksize.height, sigmaX, sigmaY);
+
+ return;
+ }
+
+ //javadoc: GaussianBlur(src, dst, ksize, sigmaX)
+ public static void GaussianBlur(Mat src, Mat dst, Size ksize, double sigmaX)
+ {
+
+ GaussianBlur_2(src.nativeObj, dst.nativeObj, ksize.width, ksize.height, sigmaX);
+
+ return;
+ }
+
+
+ //
+ // C++: void bilateralFilter(Mat src, Mat& dst, int d, double sigmaColor, double sigmaSpace, int borderType = BORDER_DEFAULT)
+ //
+
+ //javadoc: bilateralFilter(src, dst, d, sigmaColor, sigmaSpace, borderType)
+ public static void bilateralFilter(Mat src, Mat dst, int d, double sigmaColor, double sigmaSpace, int borderType)
+ {
+
+ bilateralFilter_0(src.nativeObj, dst.nativeObj, d, sigmaColor, sigmaSpace, borderType);
+
+ return;
+ }
+
+ //javadoc: bilateralFilter(src, dst, d, sigmaColor, sigmaSpace)
+ public static void bilateralFilter(Mat src, Mat dst, int d, double sigmaColor, double sigmaSpace)
+ {
+
+ bilateralFilter_1(src.nativeObj, dst.nativeObj, d, sigmaColor, sigmaSpace);
+
+ return;
+ }
+
+
+ //
+ // C++: void boxFilter(Mat src, Mat& dst, int ddepth, Size ksize, Point anchor = Point(-1,-1), bool normalize = true, int borderType = BORDER_DEFAULT)
+ //
+
+ //javadoc: boxFilter(src, dst, ddepth, ksize, anchor, normalize, borderType)
+ public static void boxFilter(Mat src, Mat dst, int ddepth, Size ksize, Point anchor, boolean normalize, int borderType)
+ {
+
+ boxFilter_0(src.nativeObj, dst.nativeObj, ddepth, ksize.width, ksize.height, anchor.x, anchor.y, normalize, borderType);
+
+ return;
+ }
+
+ //javadoc: boxFilter(src, dst, ddepth, ksize, anchor, normalize)
+ public static void boxFilter(Mat src, Mat dst, int ddepth, Size ksize, Point anchor, boolean normalize)
+ {
+
+ boxFilter_1(src.nativeObj, dst.nativeObj, ddepth, ksize.width, ksize.height, anchor.x, anchor.y, normalize);
+
+ return;
+ }
+
+ //javadoc: boxFilter(src, dst, ddepth, ksize)
+ public static void boxFilter(Mat src, Mat dst, int ddepth, Size ksize)
+ {
+
+ boxFilter_2(src.nativeObj, dst.nativeObj, ddepth, ksize.width, ksize.height);
+
+ return;
+ }
+
+
+ //
+ // C++: void sqrBoxFilter(Mat _src, Mat& _dst, int ddepth, Size ksize, Point anchor = Point(-1, -1), bool normalize = true, int borderType = BORDER_DEFAULT)
+ //
+
+ //javadoc: sqrBoxFilter(_src, _dst, ddepth, ksize, anchor, normalize, borderType)
+ public static void sqrBoxFilter(Mat _src, Mat _dst, int ddepth, Size ksize, Point anchor, boolean normalize, int borderType)
+ {
+
+ sqrBoxFilter_0(_src.nativeObj, _dst.nativeObj, ddepth, ksize.width, ksize.height, anchor.x, anchor.y, normalize, borderType);
+
+ return;
+ }
+
+ //javadoc: sqrBoxFilter(_src, _dst, ddepth, ksize, anchor, normalize)
+ public static void sqrBoxFilter(Mat _src, Mat _dst, int ddepth, Size ksize, Point anchor, boolean normalize)
+ {
+
+ sqrBoxFilter_1(_src.nativeObj, _dst.nativeObj, ddepth, ksize.width, ksize.height, anchor.x, anchor.y, normalize);
+
+ return;
+ }
+
+ //javadoc: sqrBoxFilter(_src, _dst, ddepth, ksize)
+ public static void sqrBoxFilter(Mat _src, Mat _dst, int ddepth, Size ksize)
+ {
+
+ sqrBoxFilter_2(_src.nativeObj, _dst.nativeObj, ddepth, ksize.width, ksize.height);
+
+ return;
+ }
+
+
+ //
+ // C++: void blur(Mat src, Mat& dst, Size ksize, Point anchor = Point(-1,-1), int borderType = BORDER_DEFAULT)
+ //
+
+ //javadoc: blur(src, dst, ksize, anchor, borderType)
+ public static void blur(Mat src, Mat dst, Size ksize, Point anchor, int borderType)
+ {
+
+ blur_0(src.nativeObj, dst.nativeObj, ksize.width, ksize.height, anchor.x, anchor.y, borderType);
+
+ return;
+ }
+
+ //javadoc: blur(src, dst, ksize, anchor)
+ public static void blur(Mat src, Mat dst, Size ksize, Point anchor)
+ {
+
+ blur_1(src.nativeObj, dst.nativeObj, ksize.width, ksize.height, anchor.x, anchor.y);
+
+ return;
+ }
+
+ //javadoc: blur(src, dst, ksize)
+ public static void blur(Mat src, Mat dst, Size ksize)
+ {
+
+ blur_2(src.nativeObj, dst.nativeObj, ksize.width, ksize.height);
+
+ return;
+ }
+
+
+ //
+ // C++: void cornerHarris(Mat src, Mat& dst, int blockSize, int ksize, double k, int borderType = BORDER_DEFAULT)
+ //
+
+ //javadoc: cornerHarris(src, dst, blockSize, ksize, k, borderType)
+ public static void cornerHarris(Mat src, Mat dst, int blockSize, int ksize, double k, int borderType)
+ {
+
+ cornerHarris_0(src.nativeObj, dst.nativeObj, blockSize, ksize, k, borderType);
+
+ return;
+ }
+
+ //javadoc: cornerHarris(src, dst, blockSize, ksize, k)
+ public static void cornerHarris(Mat src, Mat dst, int blockSize, int ksize, double k)
+ {
+
+ cornerHarris_1(src.nativeObj, dst.nativeObj, blockSize, ksize, k);
+
+ return;
+ }
+
+
+ //
+ // C++: void cornerEigenValsAndVecs(Mat src, Mat& dst, int blockSize, int ksize, int borderType = BORDER_DEFAULT)
+ //
+
+ //javadoc: cornerEigenValsAndVecs(src, dst, blockSize, ksize, borderType)
+ public static void cornerEigenValsAndVecs(Mat src, Mat dst, int blockSize, int ksize, int borderType)
+ {
+
+ cornerEigenValsAndVecs_0(src.nativeObj, dst.nativeObj, blockSize, ksize, borderType);
+
+ return;
+ }
+
+ //javadoc: cornerEigenValsAndVecs(src, dst, blockSize, ksize)
+ public static void cornerEigenValsAndVecs(Mat src, Mat dst, int blockSize, int ksize)
+ {
+
+ cornerEigenValsAndVecs_1(src.nativeObj, dst.nativeObj, blockSize, ksize);
+
+ return;
+ }
+
+
+ //
+ // C++: void preCornerDetect(Mat src, Mat& dst, int ksize, int borderType = BORDER_DEFAULT)
+ //
+
+ //javadoc: preCornerDetect(src, dst, ksize, borderType)
+ public static void preCornerDetect(Mat src, Mat dst, int ksize, int borderType)
+ {
+
+ preCornerDetect_0(src.nativeObj, dst.nativeObj, ksize, borderType);
+
+ return;
+ }
+
+ //javadoc: preCornerDetect(src, dst, ksize)
+ public static void preCornerDetect(Mat src, Mat dst, int ksize)
+ {
+
+ preCornerDetect_1(src.nativeObj, dst.nativeObj, ksize);
+
+ return;
+ }
+
+
+ //
+ // C++: void cornerSubPix(Mat image, vector_Point2f& corners, Size winSize, Size zeroZone, TermCriteria criteria)
+ //
+
+ //javadoc: cornerSubPix(image, corners, winSize, zeroZone, criteria)
+ public static void cornerSubPix(Mat image, MatOfPoint2f corners, Size winSize, Size zeroZone, TermCriteria criteria)
+ {
+ Mat corners_mat = corners;
+ cornerSubPix_0(image.nativeObj, corners_mat.nativeObj, winSize.width, winSize.height, zeroZone.width, zeroZone.height, criteria.type, criteria.maxCount, criteria.epsilon);
+
+ return;
+ }
+
+
+ //
+ // C++: void goodFeaturesToTrack(Mat image, vector_Point& corners, int maxCorners, double qualityLevel, double minDistance, Mat mask = Mat(), int blockSize = 3, bool useHarrisDetector = false, double k = 0.04)
+ //
+
+ //javadoc: goodFeaturesToTrack(image, corners, maxCorners, qualityLevel, minDistance, mask, blockSize, useHarrisDetector, k)
+ public static void goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, boolean useHarrisDetector, double k)
+ {
+ Mat corners_mat = corners;
+ goodFeaturesToTrack_0(image.nativeObj, corners_mat.nativeObj, maxCorners, qualityLevel, minDistance, mask.nativeObj, blockSize, useHarrisDetector, k);
+
+ return;
+ }
+
+ //javadoc: goodFeaturesToTrack(image, corners, maxCorners, qualityLevel, minDistance)
+ public static void goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance)
+ {
+ Mat corners_mat = corners;
+ goodFeaturesToTrack_1(image.nativeObj, corners_mat.nativeObj, maxCorners, qualityLevel, minDistance);
+
+ return;
+ }
+
+
+ //
+ // C++: void HoughLines(Mat image, Mat& lines, double rho, double theta, int threshold, double srn = 0, double stn = 0, double min_theta = 0, double max_theta = CV_PI)
+ //
+
+ //javadoc: HoughLines(image, lines, rho, theta, threshold, srn, stn, min_theta, max_theta)
+ public static void HoughLines(Mat image, Mat lines, double rho, double theta, int threshold, double srn, double stn, double min_theta, double max_theta)
+ {
+
+ HoughLines_0(image.nativeObj, lines.nativeObj, rho, theta, threshold, srn, stn, min_theta, max_theta);
+
+ return;
+ }
+
+ //javadoc: HoughLines(image, lines, rho, theta, threshold)
+ public static void HoughLines(Mat image, Mat lines, double rho, double theta, int threshold)
+ {
+
+ HoughLines_1(image.nativeObj, lines.nativeObj, rho, theta, threshold);
+
+ return;
+ }
+
+
+ //
+ // C++: void HoughLinesP(Mat image, Mat& lines, double rho, double theta, int threshold, double minLineLength = 0, double maxLineGap = 0)
+ //
+
+ //javadoc: HoughLinesP(image, lines, rho, theta, threshold, minLineLength, maxLineGap)
+ public static void HoughLinesP(Mat image, Mat lines, double rho, double theta, int threshold, double minLineLength, double maxLineGap)
+ {
+
+ HoughLinesP_0(image.nativeObj, lines.nativeObj, rho, theta, threshold, minLineLength, maxLineGap);
+
+ return;
+ }
+
+ //javadoc: HoughLinesP(image, lines, rho, theta, threshold)
+ public static void HoughLinesP(Mat image, Mat lines, double rho, double theta, int threshold)
+ {
+
+ HoughLinesP_1(image.nativeObj, lines.nativeObj, rho, theta, threshold);
+
+ return;
+ }
+
+
+ //
+ // C++: void HoughCircles(Mat image, Mat& circles, int method, double dp, double minDist, double param1 = 100, double param2 = 100, int minRadius = 0, int maxRadius = 0)
+ //
+
+ //javadoc: HoughCircles(image, circles, method, dp, minDist, param1, param2, minRadius, maxRadius)
+ public static void HoughCircles(Mat image, Mat circles, int method, double dp, double minDist, double param1, double param2, int minRadius, int maxRadius)
+ {
+
+ HoughCircles_0(image.nativeObj, circles.nativeObj, method, dp, minDist, param1, param2, minRadius, maxRadius);
+
+ return;
+ }
+
+ //javadoc: HoughCircles(image, circles, method, dp, minDist)
+ public static void HoughCircles(Mat image, Mat circles, int method, double dp, double minDist)
+ {
+
+ HoughCircles_1(image.nativeObj, circles.nativeObj, method, dp, minDist);
+
+ return;
+ }
+
+
+ //
+ // C++: void erode(Mat src, Mat& dst, Mat kernel, Point anchor = Point(-1,-1), int iterations = 1, int borderType = BORDER_CONSTANT, Scalar borderValue = morphologyDefaultBorderValue())
+ //
+
+ //javadoc: erode(src, dst, kernel, anchor, iterations, borderType, borderValue)
+ public static void erode(Mat src, Mat dst, Mat kernel, Point anchor, int iterations, int borderType, Scalar borderValue)
+ {
+
+ erode_0(src.nativeObj, dst.nativeObj, kernel.nativeObj, anchor.x, anchor.y, iterations, borderType, borderValue.val[0], borderValue.val[1], borderValue.val[2], borderValue.val[3]);
+
+ return;
+ }
+
+ //javadoc: erode(src, dst, kernel, anchor, iterations)
+ public static void erode(Mat src, Mat dst, Mat kernel, Point anchor, int iterations)
+ {
+
+ erode_1(src.nativeObj, dst.nativeObj, kernel.nativeObj, anchor.x, anchor.y, iterations);
+
+ return;
+ }
+
+ //javadoc: erode(src, dst, kernel)
+ public static void erode(Mat src, Mat dst, Mat kernel)
+ {
+
+ erode_2(src.nativeObj, dst.nativeObj, kernel.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void dilate(Mat src, Mat& dst, Mat kernel, Point anchor = Point(-1,-1), int iterations = 1, int borderType = BORDER_CONSTANT, Scalar borderValue = morphologyDefaultBorderValue())
+ //
+
+ //javadoc: dilate(src, dst, kernel, anchor, iterations, borderType, borderValue)
+ public static void dilate(Mat src, Mat dst, Mat kernel, Point anchor, int iterations, int borderType, Scalar borderValue)
+ {
+
+ dilate_0(src.nativeObj, dst.nativeObj, kernel.nativeObj, anchor.x, anchor.y, iterations, borderType, borderValue.val[0], borderValue.val[1], borderValue.val[2], borderValue.val[3]);
+
+ return;
+ }
+
+ //javadoc: dilate(src, dst, kernel, anchor, iterations)
+ public static void dilate(Mat src, Mat dst, Mat kernel, Point anchor, int iterations)
+ {
+
+ dilate_1(src.nativeObj, dst.nativeObj, kernel.nativeObj, anchor.x, anchor.y, iterations);
+
+ return;
+ }
+
+ //javadoc: dilate(src, dst, kernel)
+ public static void dilate(Mat src, Mat dst, Mat kernel)
+ {
+
+ dilate_2(src.nativeObj, dst.nativeObj, kernel.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void morphologyEx(Mat src, Mat& dst, int op, Mat kernel, Point anchor = Point(-1,-1), int iterations = 1, int borderType = BORDER_CONSTANT, Scalar borderValue = morphologyDefaultBorderValue())
+ //
+
+ //javadoc: morphologyEx(src, dst, op, kernel, anchor, iterations, borderType, borderValue)
+ public static void morphologyEx(Mat src, Mat dst, int op, Mat kernel, Point anchor, int iterations, int borderType, Scalar borderValue)
+ {
+
+ morphologyEx_0(src.nativeObj, dst.nativeObj, op, kernel.nativeObj, anchor.x, anchor.y, iterations, borderType, borderValue.val[0], borderValue.val[1], borderValue.val[2], borderValue.val[3]);
+
+ return;
+ }
+
+ //javadoc: morphologyEx(src, dst, op, kernel, anchor, iterations)
+ public static void morphologyEx(Mat src, Mat dst, int op, Mat kernel, Point anchor, int iterations)
+ {
+
+ morphologyEx_1(src.nativeObj, dst.nativeObj, op, kernel.nativeObj, anchor.x, anchor.y, iterations);
+
+ return;
+ }
+
+ //javadoc: morphologyEx(src, dst, op, kernel)
+ public static void morphologyEx(Mat src, Mat dst, int op, Mat kernel)
+ {
+
+ morphologyEx_2(src.nativeObj, dst.nativeObj, op, kernel.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void resize(Mat src, Mat& dst, Size dsize, double fx = 0, double fy = 0, int interpolation = INTER_LINEAR)
+ //
+
+ //javadoc: resize(src, dst, dsize, fx, fy, interpolation)
+ public static void resize(Mat src, Mat dst, Size dsize, double fx, double fy, int interpolation)
+ {
+
+ resize_0(src.nativeObj, dst.nativeObj, dsize.width, dsize.height, fx, fy, interpolation);
+
+ return;
+ }
+
+ //javadoc: resize(src, dst, dsize)
+ public static void resize(Mat src, Mat dst, Size dsize)
+ {
+
+ resize_1(src.nativeObj, dst.nativeObj, dsize.width, dsize.height);
+
+ return;
+ }
+
+
+ //
+ // C++: void warpAffine(Mat src, Mat& dst, Mat M, Size dsize, int flags = INTER_LINEAR, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar())
+ //
+
+ //javadoc: warpAffine(src, dst, M, dsize, flags, borderMode, borderValue)
+ public static void warpAffine(Mat src, Mat dst, Mat M, Size dsize, int flags, int borderMode, Scalar borderValue)
+ {
+
+ warpAffine_0(src.nativeObj, dst.nativeObj, M.nativeObj, dsize.width, dsize.height, flags, borderMode, borderValue.val[0], borderValue.val[1], borderValue.val[2], borderValue.val[3]);
+
+ return;
+ }
+
+ //javadoc: warpAffine(src, dst, M, dsize, flags)
+ public static void warpAffine(Mat src, Mat dst, Mat M, Size dsize, int flags)
+ {
+
+ warpAffine_1(src.nativeObj, dst.nativeObj, M.nativeObj, dsize.width, dsize.height, flags);
+
+ return;
+ }
+
+ //javadoc: warpAffine(src, dst, M, dsize)
+ public static void warpAffine(Mat src, Mat dst, Mat M, Size dsize)
+ {
+
+ warpAffine_2(src.nativeObj, dst.nativeObj, M.nativeObj, dsize.width, dsize.height);
+
+ return;
+ }
+
+
+ //
+ // C++: void warpPerspective(Mat src, Mat& dst, Mat M, Size dsize, int flags = INTER_LINEAR, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar())
+ //
+
+ //javadoc: warpPerspective(src, dst, M, dsize, flags, borderMode, borderValue)
+ public static void warpPerspective(Mat src, Mat dst, Mat M, Size dsize, int flags, int borderMode, Scalar borderValue)
+ {
+
+ warpPerspective_0(src.nativeObj, dst.nativeObj, M.nativeObj, dsize.width, dsize.height, flags, borderMode, borderValue.val[0], borderValue.val[1], borderValue.val[2], borderValue.val[3]);
+
+ return;
+ }
+
+ //javadoc: warpPerspective(src, dst, M, dsize, flags)
+ public static void warpPerspective(Mat src, Mat dst, Mat M, Size dsize, int flags)
+ {
+
+ warpPerspective_1(src.nativeObj, dst.nativeObj, M.nativeObj, dsize.width, dsize.height, flags);
+
+ return;
+ }
+
+ //javadoc: warpPerspective(src, dst, M, dsize)
+ public static void warpPerspective(Mat src, Mat dst, Mat M, Size dsize)
+ {
+
+ warpPerspective_2(src.nativeObj, dst.nativeObj, M.nativeObj, dsize.width, dsize.height);
+
+ return;
+ }
+
+
+ //
+ // C++: void integral(Mat src, Mat& sum, Mat& sqsum, int sdepth = -1, int sqdepth = -1)
+ //
+
+ //javadoc: integral(src, sum, sqsum, sdepth, sqdepth)
+ public static void integral2(Mat src, Mat sum, Mat sqsum, int sdepth, int sqdepth)
+ {
+
+ integral2_0(src.nativeObj, sum.nativeObj, sqsum.nativeObj, sdepth, sqdepth);
+
+ return;
+ }
+
+ //javadoc: integral(src, sum, sqsum)
+ public static void integral2(Mat src, Mat sum, Mat sqsum)
+ {
+
+ integral2_1(src.nativeObj, sum.nativeObj, sqsum.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void integral(Mat src, Mat& sum, Mat& sqsum, Mat& tilted, int sdepth = -1, int sqdepth = -1)
+ //
+
+ //javadoc: integral(src, sum, sqsum, tilted, sdepth, sqdepth)
+ public static void integral3(Mat src, Mat sum, Mat sqsum, Mat tilted, int sdepth, int sqdepth)
+ {
+
+ integral3_0(src.nativeObj, sum.nativeObj, sqsum.nativeObj, tilted.nativeObj, sdepth, sqdepth);
+
+ return;
+ }
+
+ //javadoc: integral(src, sum, sqsum, tilted)
+ public static void integral3(Mat src, Mat sum, Mat sqsum, Mat tilted)
+ {
+
+ integral3_1(src.nativeObj, sum.nativeObj, sqsum.nativeObj, tilted.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void accumulate(Mat src, Mat& dst, Mat mask = Mat())
+ //
+
+ //javadoc: accumulate(src, dst, mask)
+ public static void accumulate(Mat src, Mat dst, Mat mask)
+ {
+
+ accumulate_0(src.nativeObj, dst.nativeObj, mask.nativeObj);
+
+ return;
+ }
+
+ //javadoc: accumulate(src, dst)
+ public static void accumulate(Mat src, Mat dst)
+ {
+
+ accumulate_1(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void accumulateSquare(Mat src, Mat& dst, Mat mask = Mat())
+ //
+
+ //javadoc: accumulateSquare(src, dst, mask)
+ public static void accumulateSquare(Mat src, Mat dst, Mat mask)
+ {
+
+ accumulateSquare_0(src.nativeObj, dst.nativeObj, mask.nativeObj);
+
+ return;
+ }
+
+ //javadoc: accumulateSquare(src, dst)
+ public static void accumulateSquare(Mat src, Mat dst)
+ {
+
+ accumulateSquare_1(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void accumulateProduct(Mat src1, Mat src2, Mat& dst, Mat mask = Mat())
+ //
+
+ //javadoc: accumulateProduct(src1, src2, dst, mask)
+ public static void accumulateProduct(Mat src1, Mat src2, Mat dst, Mat mask)
+ {
+
+ accumulateProduct_0(src1.nativeObj, src2.nativeObj, dst.nativeObj, mask.nativeObj);
+
+ return;
+ }
+
+ //javadoc: accumulateProduct(src1, src2, dst)
+ public static void accumulateProduct(Mat src1, Mat src2, Mat dst)
+ {
+
+ accumulateProduct_1(src1.nativeObj, src2.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void accumulateWeighted(Mat src, Mat& dst, double alpha, Mat mask = Mat())
+ //
+
+ //javadoc: accumulateWeighted(src, dst, alpha, mask)
+ public static void accumulateWeighted(Mat src, Mat dst, double alpha, Mat mask)
+ {
+
+ accumulateWeighted_0(src.nativeObj, dst.nativeObj, alpha, mask.nativeObj);
+
+ return;
+ }
+
+ //javadoc: accumulateWeighted(src, dst, alpha)
+ public static void accumulateWeighted(Mat src, Mat dst, double alpha)
+ {
+
+ accumulateWeighted_1(src.nativeObj, dst.nativeObj, alpha);
+
+ return;
+ }
+
+
+ //
+ // C++: Point2d phaseCorrelate(Mat src1, Mat src2, Mat window = Mat(), double* response = 0)
+ //
+
+ //javadoc: phaseCorrelate(src1, src2, window, response)
+ public static Point phaseCorrelate(Mat src1, Mat src2, Mat window, double[] response)
+ {
+ double[] response_out = new double[1];
+ Point retVal = new Point(phaseCorrelate_0(src1.nativeObj, src2.nativeObj, window.nativeObj, response_out));
+ if(response!=null) response[0] = (double)response_out[0];
+ return retVal;
+ }
+
+ //javadoc: phaseCorrelate(src1, src2)
+ public static Point phaseCorrelate(Mat src1, Mat src2)
+ {
+
+ Point retVal = new Point(phaseCorrelate_1(src1.nativeObj, src2.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void createHanningWindow(Mat& dst, Size winSize, int type)
+ //
+
+ //javadoc: createHanningWindow(dst, winSize, type)
+ public static void createHanningWindow(Mat dst, Size winSize, int type)
+ {
+
+ createHanningWindow_0(dst.nativeObj, winSize.width, winSize.height, type);
+
+ return;
+ }
+
+
+ //
+ // C++: double threshold(Mat src, Mat& dst, double thresh, double maxval, int type)
+ //
+
+ //javadoc: threshold(src, dst, thresh, maxval, type)
+ public static double threshold(Mat src, Mat dst, double thresh, double maxval, int type)
+ {
+
+ double retVal = threshold_0(src.nativeObj, dst.nativeObj, thresh, maxval, type);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void adaptiveThreshold(Mat src, Mat& dst, double maxValue, int adaptiveMethod, int thresholdType, int blockSize, double C)
+ //
+
+ //javadoc: adaptiveThreshold(src, dst, maxValue, adaptiveMethod, thresholdType, blockSize, C)
+ public static void adaptiveThreshold(Mat src, Mat dst, double maxValue, int adaptiveMethod, int thresholdType, int blockSize, double C)
+ {
+
+ adaptiveThreshold_0(src.nativeObj, dst.nativeObj, maxValue, adaptiveMethod, thresholdType, blockSize, C);
+
+ return;
+ }
+
+
+ //
+ // C++: void pyrDown(Mat src, Mat& dst, Size dstsize = Size(), int borderType = BORDER_DEFAULT)
+ //
+
+ //javadoc: pyrDown(src, dst, dstsize, borderType)
+ public static void pyrDown(Mat src, Mat dst, Size dstsize, int borderType)
+ {
+
+ pyrDown_0(src.nativeObj, dst.nativeObj, dstsize.width, dstsize.height, borderType);
+
+ return;
+ }
+
+ //javadoc: pyrDown(src, dst, dstsize)
+ public static void pyrDown(Mat src, Mat dst, Size dstsize)
+ {
+
+ pyrDown_1(src.nativeObj, dst.nativeObj, dstsize.width, dstsize.height);
+
+ return;
+ }
+
+ //javadoc: pyrDown(src, dst)
+ public static void pyrDown(Mat src, Mat dst)
+ {
+
+ pyrDown_2(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void pyrUp(Mat src, Mat& dst, Size dstsize = Size(), int borderType = BORDER_DEFAULT)
+ //
+
+ //javadoc: pyrUp(src, dst, dstsize, borderType)
+ public static void pyrUp(Mat src, Mat dst, Size dstsize, int borderType)
+ {
+
+ pyrUp_0(src.nativeObj, dst.nativeObj, dstsize.width, dstsize.height, borderType);
+
+ return;
+ }
+
+ //javadoc: pyrUp(src, dst, dstsize)
+ public static void pyrUp(Mat src, Mat dst, Size dstsize)
+ {
+
+ pyrUp_1(src.nativeObj, dst.nativeObj, dstsize.width, dstsize.height);
+
+ return;
+ }
+
+ //javadoc: pyrUp(src, dst)
+ public static void pyrUp(Mat src, Mat dst)
+ {
+
+ pyrUp_2(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void undistort(Mat src, Mat& dst, Mat cameraMatrix, Mat distCoeffs, Mat newCameraMatrix = Mat())
+ //
+
+ //javadoc: undistort(src, dst, cameraMatrix, distCoeffs, newCameraMatrix)
+ public static void undistort(Mat src, Mat dst, Mat cameraMatrix, Mat distCoeffs, Mat newCameraMatrix)
+ {
+
+ undistort_0(src.nativeObj, dst.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, newCameraMatrix.nativeObj);
+
+ return;
+ }
+
+ //javadoc: undistort(src, dst, cameraMatrix, distCoeffs)
+ public static void undistort(Mat src, Mat dst, Mat cameraMatrix, Mat distCoeffs)
+ {
+
+ undistort_1(src.nativeObj, dst.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void initUndistortRectifyMap(Mat cameraMatrix, Mat distCoeffs, Mat R, Mat newCameraMatrix, Size size, int m1type, Mat& map1, Mat& map2)
+ //
+
+ //javadoc: initUndistortRectifyMap(cameraMatrix, distCoeffs, R, newCameraMatrix, size, m1type, map1, map2)
+ public static void initUndistortRectifyMap(Mat cameraMatrix, Mat distCoeffs, Mat R, Mat newCameraMatrix, Size size, int m1type, Mat map1, Mat map2)
+ {
+
+ initUndistortRectifyMap_0(cameraMatrix.nativeObj, distCoeffs.nativeObj, R.nativeObj, newCameraMatrix.nativeObj, size.width, size.height, m1type, map1.nativeObj, map2.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: float initWideAngleProjMap(Mat cameraMatrix, Mat distCoeffs, Size imageSize, int destImageWidth, int m1type, Mat& map1, Mat& map2, int projType = PROJ_SPHERICAL_EQRECT, double alpha = 0)
+ //
+
+ //javadoc: initWideAngleProjMap(cameraMatrix, distCoeffs, imageSize, destImageWidth, m1type, map1, map2, projType, alpha)
+ public static float initWideAngleProjMap(Mat cameraMatrix, Mat distCoeffs, Size imageSize, int destImageWidth, int m1type, Mat map1, Mat map2, int projType, double alpha)
+ {
+
+ float retVal = initWideAngleProjMap_0(cameraMatrix.nativeObj, distCoeffs.nativeObj, imageSize.width, imageSize.height, destImageWidth, m1type, map1.nativeObj, map2.nativeObj, projType, alpha);
+
+ return retVal;
+ }
+
+ //javadoc: initWideAngleProjMap(cameraMatrix, distCoeffs, imageSize, destImageWidth, m1type, map1, map2)
+ public static float initWideAngleProjMap(Mat cameraMatrix, Mat distCoeffs, Size imageSize, int destImageWidth, int m1type, Mat map1, Mat map2)
+ {
+
+ float retVal = initWideAngleProjMap_1(cameraMatrix.nativeObj, distCoeffs.nativeObj, imageSize.width, imageSize.height, destImageWidth, m1type, map1.nativeObj, map2.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getDefaultNewCameraMatrix(Mat cameraMatrix, Size imgsize = Size(), bool centerPrincipalPoint = false)
+ //
+
+ //javadoc: getDefaultNewCameraMatrix(cameraMatrix, imgsize, centerPrincipalPoint)
+ public static Mat getDefaultNewCameraMatrix(Mat cameraMatrix, Size imgsize, boolean centerPrincipalPoint)
+ {
+
+ Mat retVal = new Mat(getDefaultNewCameraMatrix_0(cameraMatrix.nativeObj, imgsize.width, imgsize.height, centerPrincipalPoint));
+
+ return retVal;
+ }
+
+ //javadoc: getDefaultNewCameraMatrix(cameraMatrix)
+ public static Mat getDefaultNewCameraMatrix(Mat cameraMatrix)
+ {
+
+ Mat retVal = new Mat(getDefaultNewCameraMatrix_1(cameraMatrix.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void undistortPoints(vector_Point2f src, vector_Point2f& dst, Mat cameraMatrix, Mat distCoeffs, Mat R = Mat(), Mat P = Mat())
+ //
+
+ //javadoc: undistortPoints(src, dst, cameraMatrix, distCoeffs, R, P)
+ public static void undistortPoints(MatOfPoint2f src, MatOfPoint2f dst, Mat cameraMatrix, Mat distCoeffs, Mat R, Mat P)
+ {
+ Mat src_mat = src;
+ Mat dst_mat = dst;
+ undistortPoints_0(src_mat.nativeObj, dst_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, R.nativeObj, P.nativeObj);
+
+ return;
+ }
+
+ //javadoc: undistortPoints(src, dst, cameraMatrix, distCoeffs)
+ public static void undistortPoints(MatOfPoint2f src, MatOfPoint2f dst, Mat cameraMatrix, Mat distCoeffs)
+ {
+ Mat src_mat = src;
+ Mat dst_mat = dst;
+ undistortPoints_1(src_mat.nativeObj, dst_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void calcHist(vector_Mat images, vector_int channels, Mat mask, Mat& hist, vector_int histSize, vector_float ranges, bool accumulate = false)
+ //
+
+ //javadoc: calcHist(images, channels, mask, hist, histSize, ranges, accumulate)
+ public static void calcHist(List<Mat> images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges, boolean accumulate)
+ {
+ Mat images_mat = Converters.vector_Mat_to_Mat(images);
+ Mat channels_mat = channels;
+ Mat histSize_mat = histSize;
+ Mat ranges_mat = ranges;
+ calcHist_0(images_mat.nativeObj, channels_mat.nativeObj, mask.nativeObj, hist.nativeObj, histSize_mat.nativeObj, ranges_mat.nativeObj, accumulate);
+
+ return;
+ }
+
+ //javadoc: calcHist(images, channels, mask, hist, histSize, ranges)
+ public static void calcHist(List<Mat> images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges)
+ {
+ Mat images_mat = Converters.vector_Mat_to_Mat(images);
+ Mat channels_mat = channels;
+ Mat histSize_mat = histSize;
+ Mat ranges_mat = ranges;
+ calcHist_1(images_mat.nativeObj, channels_mat.nativeObj, mask.nativeObj, hist.nativeObj, histSize_mat.nativeObj, ranges_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void calcBackProject(vector_Mat images, vector_int channels, Mat hist, Mat& dst, vector_float ranges, double scale)
+ //
+
+ //javadoc: calcBackProject(images, channels, hist, dst, ranges, scale)
+ public static void calcBackProject(List<Mat> images, MatOfInt channels, Mat hist, Mat dst, MatOfFloat ranges, double scale)
+ {
+ Mat images_mat = Converters.vector_Mat_to_Mat(images);
+ Mat channels_mat = channels;
+ Mat ranges_mat = ranges;
+ calcBackProject_0(images_mat.nativeObj, channels_mat.nativeObj, hist.nativeObj, dst.nativeObj, ranges_mat.nativeObj, scale);
+
+ return;
+ }
+
+
+ //
+ // C++: double compareHist(Mat H1, Mat H2, int method)
+ //
+
+ //javadoc: compareHist(H1, H2, method)
+ public static double compareHist(Mat H1, Mat H2, int method)
+ {
+
+ double retVal = compareHist_0(H1.nativeObj, H2.nativeObj, method);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void equalizeHist(Mat src, Mat& dst)
+ //
+
+ //javadoc: equalizeHist(src, dst)
+ public static void equalizeHist(Mat src, Mat dst)
+ {
+
+ equalizeHist_0(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void watershed(Mat image, Mat& markers)
+ //
+
+ //javadoc: watershed(image, markers)
+ public static void watershed(Mat image, Mat markers)
+ {
+
+ watershed_0(image.nativeObj, markers.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void pyrMeanShiftFiltering(Mat src, Mat& dst, double sp, double sr, int maxLevel = 1, TermCriteria termcrit = TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,1))
+ //
+
+ //javadoc: pyrMeanShiftFiltering(src, dst, sp, sr, maxLevel, termcrit)
+ public static void pyrMeanShiftFiltering(Mat src, Mat dst, double sp, double sr, int maxLevel, TermCriteria termcrit)
+ {
+
+ pyrMeanShiftFiltering_0(src.nativeObj, dst.nativeObj, sp, sr, maxLevel, termcrit.type, termcrit.maxCount, termcrit.epsilon);
+
+ return;
+ }
+
+ //javadoc: pyrMeanShiftFiltering(src, dst, sp, sr)
+ public static void pyrMeanShiftFiltering(Mat src, Mat dst, double sp, double sr)
+ {
+
+ pyrMeanShiftFiltering_1(src.nativeObj, dst.nativeObj, sp, sr);
+
+ return;
+ }
+
+
+ //
+ // C++: void grabCut(Mat img, Mat& mask, Rect rect, Mat& bgdModel, Mat& fgdModel, int iterCount, int mode = GC_EVAL)
+ //
+
+ //javadoc: grabCut(img, mask, rect, bgdModel, fgdModel, iterCount, mode)
+ public static void grabCut(Mat img, Mat mask, Rect rect, Mat bgdModel, Mat fgdModel, int iterCount, int mode)
+ {
+
+ grabCut_0(img.nativeObj, mask.nativeObj, rect.x, rect.y, rect.width, rect.height, bgdModel.nativeObj, fgdModel.nativeObj, iterCount, mode);
+
+ return;
+ }
+
+ //javadoc: grabCut(img, mask, rect, bgdModel, fgdModel, iterCount)
+ public static void grabCut(Mat img, Mat mask, Rect rect, Mat bgdModel, Mat fgdModel, int iterCount)
+ {
+
+ grabCut_1(img.nativeObj, mask.nativeObj, rect.x, rect.y, rect.width, rect.height, bgdModel.nativeObj, fgdModel.nativeObj, iterCount);
+
+ return;
+ }
+
+
+ //
+ // C++: void distanceTransform(Mat src, Mat& dst, Mat& labels, int distanceType, int maskSize, int labelType = DIST_LABEL_CCOMP)
+ //
+
+ //javadoc: distanceTransform(src, dst, labels, distanceType, maskSize, labelType)
+ public static void distanceTransformWithLabels(Mat src, Mat dst, Mat labels, int distanceType, int maskSize, int labelType)
+ {
+
+ distanceTransformWithLabels_0(src.nativeObj, dst.nativeObj, labels.nativeObj, distanceType, maskSize, labelType);
+
+ return;
+ }
+
+ //javadoc: distanceTransform(src, dst, labels, distanceType, maskSize)
+ public static void distanceTransformWithLabels(Mat src, Mat dst, Mat labels, int distanceType, int maskSize)
+ {
+
+ distanceTransformWithLabels_1(src.nativeObj, dst.nativeObj, labels.nativeObj, distanceType, maskSize);
+
+ return;
+ }
+
+
+ //
+ // C++: void distanceTransform(Mat src, Mat& dst, int distanceType, int maskSize, int dstType = CV_32F)
+ //
+
+ //javadoc: distanceTransform(src, dst, distanceType, maskSize, dstType)
+ public static void distanceTransform(Mat src, Mat dst, int distanceType, int maskSize, int dstType)
+ {
+
+ distanceTransform_0(src.nativeObj, dst.nativeObj, distanceType, maskSize, dstType);
+
+ return;
+ }
+
+ //javadoc: distanceTransform(src, dst, distanceType, maskSize)
+ public static void distanceTransform(Mat src, Mat dst, int distanceType, int maskSize)
+ {
+
+ distanceTransform_1(src.nativeObj, dst.nativeObj, distanceType, maskSize);
+
+ return;
+ }
+
+
+ //
+ // C++: int floodFill(Mat& image, Mat& mask, Point seedPoint, Scalar newVal, Rect* rect = 0, Scalar loDiff = Scalar(), Scalar upDiff = Scalar(), int flags = 4)
+ //
+
+ //javadoc: floodFill(image, mask, seedPoint, newVal, rect, loDiff, upDiff, flags)
+ public static int floodFill(Mat image, Mat mask, Point seedPoint, Scalar newVal, Rect rect, Scalar loDiff, Scalar upDiff, int flags)
+ {
+ double[] rect_out = new double[4];
+ int retVal = floodFill_0(image.nativeObj, mask.nativeObj, seedPoint.x, seedPoint.y, newVal.val[0], newVal.val[1], newVal.val[2], newVal.val[3], rect_out, loDiff.val[0], loDiff.val[1], loDiff.val[2], loDiff.val[3], upDiff.val[0], upDiff.val[1], upDiff.val[2], upDiff.val[3], flags);
+ if(rect!=null){ rect.x = (int)rect_out[0]; rect.y = (int)rect_out[1]; rect.width = (int)rect_out[2]; rect.height = (int)rect_out[3]; }
+ return retVal;
+ }
+
+ //javadoc: floodFill(image, mask, seedPoint, newVal)
+ public static int floodFill(Mat image, Mat mask, Point seedPoint, Scalar newVal)
+ {
+
+ int retVal = floodFill_1(image.nativeObj, mask.nativeObj, seedPoint.x, seedPoint.y, newVal.val[0], newVal.val[1], newVal.val[2], newVal.val[3]);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void cvtColor(Mat src, Mat& dst, int code, int dstCn = 0)
+ //
+
+ //javadoc: cvtColor(src, dst, code, dstCn)
+ public static void cvtColor(Mat src, Mat dst, int code, int dstCn)
+ {
+
+ cvtColor_0(src.nativeObj, dst.nativeObj, code, dstCn);
+
+ return;
+ }
+
+ //javadoc: cvtColor(src, dst, code)
+ public static void cvtColor(Mat src, Mat dst, int code)
+ {
+
+ cvtColor_1(src.nativeObj, dst.nativeObj, code);
+
+ return;
+ }
+
+
+ //
+ // C++: void demosaicing(Mat _src, Mat& _dst, int code, int dcn = 0)
+ //
+
+ //javadoc: demosaicing(_src, _dst, code, dcn)
+ public static void demosaicing(Mat _src, Mat _dst, int code, int dcn)
+ {
+
+ demosaicing_0(_src.nativeObj, _dst.nativeObj, code, dcn);
+
+ return;
+ }
+
+ //javadoc: demosaicing(_src, _dst, code)
+ public static void demosaicing(Mat _src, Mat _dst, int code)
+ {
+
+ demosaicing_1(_src.nativeObj, _dst.nativeObj, code);
+
+ return;
+ }
+
+
+ //
+ // C++: Moments moments(Mat array, bool binaryImage = false)
+ //
+
+ // Return type 'Moments' is not supported, skipping the function
+
+
+ //
+ // C++: void HuMoments(Moments m, Mat& hu)
+ //
+
+ // Unknown type 'Moments' (I), skipping the function
+
+
+ //
+ // C++: void matchTemplate(Mat image, Mat templ, Mat& result, int method, Mat mask = Mat())
+ //
+
+ //javadoc: matchTemplate(image, templ, result, method, mask)
+ public static void matchTemplate(Mat image, Mat templ, Mat result, int method, Mat mask)
+ {
+
+ matchTemplate_0(image.nativeObj, templ.nativeObj, result.nativeObj, method, mask.nativeObj);
+
+ return;
+ }
+
+ //javadoc: matchTemplate(image, templ, result, method)
+ public static void matchTemplate(Mat image, Mat templ, Mat result, int method)
+ {
+
+ matchTemplate_1(image.nativeObj, templ.nativeObj, result.nativeObj, method);
+
+ return;
+ }
+
+
+ //
+ // C++: int connectedComponents(Mat image, Mat& labels, int connectivity = 8, int ltype = CV_32S)
+ //
+
+ //javadoc: connectedComponents(image, labels, connectivity, ltype)
+ public static int connectedComponents(Mat image, Mat labels, int connectivity, int ltype)
+ {
+
+ int retVal = connectedComponents_0(image.nativeObj, labels.nativeObj, connectivity, ltype);
+
+ return retVal;
+ }
+
+ //javadoc: connectedComponents(image, labels)
+ public static int connectedComponents(Mat image, Mat labels)
+ {
+
+ int retVal = connectedComponents_1(image.nativeObj, labels.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int connectedComponentsWithStats(Mat image, Mat& labels, Mat& stats, Mat& centroids, int connectivity = 8, int ltype = CV_32S)
+ //
+
+ //javadoc: connectedComponentsWithStats(image, labels, stats, centroids, connectivity, ltype)
+ public static int connectedComponentsWithStats(Mat image, Mat labels, Mat stats, Mat centroids, int connectivity, int ltype)
+ {
+
+ int retVal = connectedComponentsWithStats_0(image.nativeObj, labels.nativeObj, stats.nativeObj, centroids.nativeObj, connectivity, ltype);
+
+ return retVal;
+ }
+
+ //javadoc: connectedComponentsWithStats(image, labels, stats, centroids)
+ public static int connectedComponentsWithStats(Mat image, Mat labels, Mat stats, Mat centroids)
+ {
+
+ int retVal = connectedComponentsWithStats_1(image.nativeObj, labels.nativeObj, stats.nativeObj, centroids.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void findContours(Mat& image, vector_vector_Point& contours, Mat& hierarchy, int mode, int method, Point offset = Point())
+ //
+
+ //javadoc: findContours(image, contours, hierarchy, mode, method, offset)
+ public static void findContours(Mat image, List<MatOfPoint> contours, Mat hierarchy, int mode, int method, Point offset)
+ {
+ Mat contours_mat = new Mat();
+ findContours_0(image.nativeObj, contours_mat.nativeObj, hierarchy.nativeObj, mode, method, offset.x, offset.y);
+ Converters.Mat_to_vector_vector_Point(contours_mat, contours);
+ contours_mat.release();
+ return;
+ }
+
+ //javadoc: findContours(image, contours, hierarchy, mode, method)
+ public static void findContours(Mat image, List<MatOfPoint> contours, Mat hierarchy, int mode, int method)
+ {
+ Mat contours_mat = new Mat();
+ findContours_1(image.nativeObj, contours_mat.nativeObj, hierarchy.nativeObj, mode, method);
+ Converters.Mat_to_vector_vector_Point(contours_mat, contours);
+ contours_mat.release();
+ return;
+ }
+
+
+ //
+ // C++: void approxPolyDP(vector_Point2f curve, vector_Point2f& approxCurve, double epsilon, bool closed)
+ //
+
+ //javadoc: approxPolyDP(curve, approxCurve, epsilon, closed)
+ public static void approxPolyDP(MatOfPoint2f curve, MatOfPoint2f approxCurve, double epsilon, boolean closed)
+ {
+ Mat curve_mat = curve;
+ Mat approxCurve_mat = approxCurve;
+ approxPolyDP_0(curve_mat.nativeObj, approxCurve_mat.nativeObj, epsilon, closed);
+
+ return;
+ }
+
+
+ //
+ // C++: double arcLength(vector_Point2f curve, bool closed)
+ //
+
+ //javadoc: arcLength(curve, closed)
+ public static double arcLength(MatOfPoint2f curve, boolean closed)
+ {
+ Mat curve_mat = curve;
+ double retVal = arcLength_0(curve_mat.nativeObj, closed);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Rect boundingRect(vector_Point points)
+ //
+
+ //javadoc: boundingRect(points)
+ public static Rect boundingRect(MatOfPoint points)
+ {
+ Mat points_mat = points;
+ Rect retVal = new Rect(boundingRect_0(points_mat.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double contourArea(Mat contour, bool oriented = false)
+ //
+
+ //javadoc: contourArea(contour, oriented)
+ public static double contourArea(Mat contour, boolean oriented)
+ {
+
+ double retVal = contourArea_0(contour.nativeObj, oriented);
+
+ return retVal;
+ }
+
+ //javadoc: contourArea(contour)
+ public static double contourArea(Mat contour)
+ {
+
+ double retVal = contourArea_1(contour.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: RotatedRect minAreaRect(vector_Point2f points)
+ //
+
+ //javadoc: minAreaRect(points)
+ public static RotatedRect minAreaRect(MatOfPoint2f points)
+ {
+ Mat points_mat = points;
+ RotatedRect retVal = new RotatedRect(minAreaRect_0(points_mat.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void boxPoints(RotatedRect box, Mat& points)
+ //
+
+ //javadoc: boxPoints(box, points)
+ public static void boxPoints(RotatedRect box, Mat points)
+ {
+
+ boxPoints_0(box.center.x, box.center.y, box.size.width, box.size.height, box.angle, points.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void minEnclosingCircle(vector_Point2f points, Point2f& center, float& radius)
+ //
+
+ //javadoc: minEnclosingCircle(points, center, radius)
+ public static void minEnclosingCircle(MatOfPoint2f points, Point center, float[] radius)
+ {
+ Mat points_mat = points;
+ double[] center_out = new double[2];
+ double[] radius_out = new double[1];
+ minEnclosingCircle_0(points_mat.nativeObj, center_out, radius_out);
+ if(center!=null){ center.x = center_out[0]; center.y = center_out[1]; }
+ if(radius!=null) radius[0] = (float)radius_out[0];
+ return;
+ }
+
+
+ //
+ // C++: double minEnclosingTriangle(Mat points, Mat& triangle)
+ //
+
+ //javadoc: minEnclosingTriangle(points, triangle)
+ public static double minEnclosingTriangle(Mat points, Mat triangle)
+ {
+
+ double retVal = minEnclosingTriangle_0(points.nativeObj, triangle.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double matchShapes(Mat contour1, Mat contour2, int method, double parameter)
+ //
+
+ //javadoc: matchShapes(contour1, contour2, method, parameter)
+ public static double matchShapes(Mat contour1, Mat contour2, int method, double parameter)
+ {
+
+ double retVal = matchShapes_0(contour1.nativeObj, contour2.nativeObj, method, parameter);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void convexHull(vector_Point points, vector_int& hull, bool clockwise = false, _hidden_ returnPoints = true)
+ //
+
+ //javadoc: convexHull(points, hull, clockwise)
+ public static void convexHull(MatOfPoint points, MatOfInt hull, boolean clockwise)
+ {
+ Mat points_mat = points;
+ Mat hull_mat = hull;
+ convexHull_0(points_mat.nativeObj, hull_mat.nativeObj, clockwise);
+
+ return;
+ }
+
+ //javadoc: convexHull(points, hull)
+ public static void convexHull(MatOfPoint points, MatOfInt hull)
+ {
+ Mat points_mat = points;
+ Mat hull_mat = hull;
+ convexHull_1(points_mat.nativeObj, hull_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void convexityDefects(vector_Point contour, vector_int convexhull, vector_Vec4i& convexityDefects)
+ //
+
+ //javadoc: convexityDefects(contour, convexhull, convexityDefects)
+ public static void convexityDefects(MatOfPoint contour, MatOfInt convexhull, MatOfInt4 convexityDefects)
+ {
+ Mat contour_mat = contour;
+ Mat convexhull_mat = convexhull;
+ Mat convexityDefects_mat = convexityDefects;
+ convexityDefects_0(contour_mat.nativeObj, convexhull_mat.nativeObj, convexityDefects_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: bool isContourConvex(vector_Point contour)
+ //
+
+ //javadoc: isContourConvex(contour)
+ public static boolean isContourConvex(MatOfPoint contour)
+ {
+ Mat contour_mat = contour;
+ boolean retVal = isContourConvex_0(contour_mat.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: float intersectConvexConvex(Mat _p1, Mat _p2, Mat& _p12, bool handleNested = true)
+ //
+
+ //javadoc: intersectConvexConvex(_p1, _p2, _p12, handleNested)
+ public static float intersectConvexConvex(Mat _p1, Mat _p2, Mat _p12, boolean handleNested)
+ {
+
+ float retVal = intersectConvexConvex_0(_p1.nativeObj, _p2.nativeObj, _p12.nativeObj, handleNested);
+
+ return retVal;
+ }
+
+ //javadoc: intersectConvexConvex(_p1, _p2, _p12)
+ public static float intersectConvexConvex(Mat _p1, Mat _p2, Mat _p12)
+ {
+
+ float retVal = intersectConvexConvex_1(_p1.nativeObj, _p2.nativeObj, _p12.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: RotatedRect fitEllipse(vector_Point2f points)
+ //
+
+ //javadoc: fitEllipse(points)
+ public static RotatedRect fitEllipse(MatOfPoint2f points)
+ {
+ Mat points_mat = points;
+ RotatedRect retVal = new RotatedRect(fitEllipse_0(points_mat.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void fitLine(Mat points, Mat& line, int distType, double param, double reps, double aeps)
+ //
+
+ //javadoc: fitLine(points, line, distType, param, reps, aeps)
+ public static void fitLine(Mat points, Mat line, int distType, double param, double reps, double aeps)
+ {
+
+ fitLine_0(points.nativeObj, line.nativeObj, distType, param, reps, aeps);
+
+ return;
+ }
+
+
+ //
+ // C++: double pointPolygonTest(vector_Point2f contour, Point2f pt, bool measureDist)
+ //
+
+ //javadoc: pointPolygonTest(contour, pt, measureDist)
+ public static double pointPolygonTest(MatOfPoint2f contour, Point pt, boolean measureDist)
+ {
+ Mat contour_mat = contour;
+ double retVal = pointPolygonTest_0(contour_mat.nativeObj, pt.x, pt.y, measureDist);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int rotatedRectangleIntersection(RotatedRect rect1, RotatedRect rect2, Mat& intersectingRegion)
+ //
+
+ //javadoc: rotatedRectangleIntersection(rect1, rect2, intersectingRegion)
+ public static int rotatedRectangleIntersection(RotatedRect rect1, RotatedRect rect2, Mat intersectingRegion)
+ {
+
+ int retVal = rotatedRectangleIntersection_0(rect1.center.x, rect1.center.y, rect1.size.width, rect1.size.height, rect1.angle, rect2.center.x, rect2.center.y, rect2.size.width, rect2.size.height, rect2.angle, intersectingRegion.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Ptr_CLAHE createCLAHE(double clipLimit = 40.0, Size tileGridSize = Size(8, 8))
+ //
+
+ //javadoc: createCLAHE(clipLimit, tileGridSize)
+ public static CLAHE createCLAHE(double clipLimit, Size tileGridSize)
+ {
+
+ CLAHE retVal = new CLAHE(createCLAHE_0(clipLimit, tileGridSize.width, tileGridSize.height));
+
+ return retVal;
+ }
+
+ //javadoc: createCLAHE()
+ public static CLAHE createCLAHE()
+ {
+
+ CLAHE retVal = new CLAHE(createCLAHE_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void applyColorMap(Mat src, Mat& dst, int colormap)
+ //
+
+ //javadoc: applyColorMap(src, dst, colormap)
+ public static void applyColorMap(Mat src, Mat dst, int colormap)
+ {
+
+ applyColorMap_0(src.nativeObj, dst.nativeObj, colormap);
+
+ return;
+ }
+
+
+ //
+ // C++: void line(Mat& img, Point pt1, Point pt2, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+ //
+
+ //javadoc: line(img, pt1, pt2, color, thickness, lineType, shift)
+ public static void line(Mat img, Point pt1, Point pt2, Scalar color, int thickness, int lineType, int shift)
+ {
+
+ line_0(img.nativeObj, pt1.x, pt1.y, pt2.x, pt2.y, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, shift);
+
+ return;
+ }
+
+ //javadoc: line(img, pt1, pt2, color, thickness)
+ public static void line(Mat img, Point pt1, Point pt2, Scalar color, int thickness)
+ {
+
+ line_1(img.nativeObj, pt1.x, pt1.y, pt2.x, pt2.y, color.val[0], color.val[1], color.val[2], color.val[3], thickness);
+
+ return;
+ }
+
+ //javadoc: line(img, pt1, pt2, color)
+ public static void line(Mat img, Point pt1, Point pt2, Scalar color)
+ {
+
+ line_2(img.nativeObj, pt1.x, pt1.y, pt2.x, pt2.y, color.val[0], color.val[1], color.val[2], color.val[3]);
+
+ return;
+ }
+
+
+ //
+ // C++: void arrowedLine(Mat& img, Point pt1, Point pt2, Scalar color, int thickness = 1, int line_type = 8, int shift = 0, double tipLength = 0.1)
+ //
+
+ //javadoc: arrowedLine(img, pt1, pt2, color, thickness, line_type, shift, tipLength)
+ public static void arrowedLine(Mat img, Point pt1, Point pt2, Scalar color, int thickness, int line_type, int shift, double tipLength)
+ {
+
+ arrowedLine_0(img.nativeObj, pt1.x, pt1.y, pt2.x, pt2.y, color.val[0], color.val[1], color.val[2], color.val[3], thickness, line_type, shift, tipLength);
+
+ return;
+ }
+
+ //javadoc: arrowedLine(img, pt1, pt2, color)
+ public static void arrowedLine(Mat img, Point pt1, Point pt2, Scalar color)
+ {
+
+ arrowedLine_1(img.nativeObj, pt1.x, pt1.y, pt2.x, pt2.y, color.val[0], color.val[1], color.val[2], color.val[3]);
+
+ return;
+ }
+
+
+ //
+ // C++: void rectangle(Mat& img, Point pt1, Point pt2, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+ //
+
+ //javadoc: rectangle(img, pt1, pt2, color, thickness, lineType, shift)
+ public static void rectangle(Mat img, Point pt1, Point pt2, Scalar color, int thickness, int lineType, int shift)
+ {
+
+ rectangle_0(img.nativeObj, pt1.x, pt1.y, pt2.x, pt2.y, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, shift);
+
+ return;
+ }
+
+ //javadoc: rectangle(img, pt1, pt2, color, thickness)
+ public static void rectangle(Mat img, Point pt1, Point pt2, Scalar color, int thickness)
+ {
+
+ rectangle_1(img.nativeObj, pt1.x, pt1.y, pt2.x, pt2.y, color.val[0], color.val[1], color.val[2], color.val[3], thickness);
+
+ return;
+ }
+
+ //javadoc: rectangle(img, pt1, pt2, color)
+ public static void rectangle(Mat img, Point pt1, Point pt2, Scalar color)
+ {
+
+ rectangle_2(img.nativeObj, pt1.x, pt1.y, pt2.x, pt2.y, color.val[0], color.val[1], color.val[2], color.val[3]);
+
+ return;
+ }
+
+
+ //
+ // C++: void circle(Mat& img, Point center, int radius, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+ //
+
+ //javadoc: circle(img, center, radius, color, thickness, lineType, shift)
+ public static void circle(Mat img, Point center, int radius, Scalar color, int thickness, int lineType, int shift)
+ {
+
+ circle_0(img.nativeObj, center.x, center.y, radius, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, shift);
+
+ return;
+ }
+
+ //javadoc: circle(img, center, radius, color, thickness)
+ public static void circle(Mat img, Point center, int radius, Scalar color, int thickness)
+ {
+
+ circle_1(img.nativeObj, center.x, center.y, radius, color.val[0], color.val[1], color.val[2], color.val[3], thickness);
+
+ return;
+ }
+
+ //javadoc: circle(img, center, radius, color)
+ public static void circle(Mat img, Point center, int radius, Scalar color)
+ {
+
+ circle_2(img.nativeObj, center.x, center.y, radius, color.val[0], color.val[1], color.val[2], color.val[3]);
+
+ return;
+ }
+
+
+ //
+ // C++: void ellipse(Mat& img, Point center, Size axes, double angle, double startAngle, double endAngle, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+ //
+
+ //javadoc: ellipse(img, center, axes, angle, startAngle, endAngle, color, thickness, lineType, shift)
+ public static void ellipse(Mat img, Point center, Size axes, double angle, double startAngle, double endAngle, Scalar color, int thickness, int lineType, int shift)
+ {
+
+ ellipse_0(img.nativeObj, center.x, center.y, axes.width, axes.height, angle, startAngle, endAngle, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, shift);
+
+ return;
+ }
+
+ //javadoc: ellipse(img, center, axes, angle, startAngle, endAngle, color, thickness)
+ public static void ellipse(Mat img, Point center, Size axes, double angle, double startAngle, double endAngle, Scalar color, int thickness)
+ {
+
+ ellipse_1(img.nativeObj, center.x, center.y, axes.width, axes.height, angle, startAngle, endAngle, color.val[0], color.val[1], color.val[2], color.val[3], thickness);
+
+ return;
+ }
+
+ //javadoc: ellipse(img, center, axes, angle, startAngle, endAngle, color)
+ public static void ellipse(Mat img, Point center, Size axes, double angle, double startAngle, double endAngle, Scalar color)
+ {
+
+ ellipse_2(img.nativeObj, center.x, center.y, axes.width, axes.height, angle, startAngle, endAngle, color.val[0], color.val[1], color.val[2], color.val[3]);
+
+ return;
+ }
+
+
+ //
+ // C++: void ellipse(Mat& img, RotatedRect box, Scalar color, int thickness = 1, int lineType = LINE_8)
+ //
+
+ //javadoc: ellipse(img, box, color, thickness, lineType)
+ public static void ellipse(Mat img, RotatedRect box, Scalar color, int thickness, int lineType)
+ {
+
+ ellipse_3(img.nativeObj, box.center.x, box.center.y, box.size.width, box.size.height, box.angle, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType);
+
+ return;
+ }
+
+ //javadoc: ellipse(img, box, color, thickness)
+ public static void ellipse(Mat img, RotatedRect box, Scalar color, int thickness)
+ {
+
+ ellipse_4(img.nativeObj, box.center.x, box.center.y, box.size.width, box.size.height, box.angle, color.val[0], color.val[1], color.val[2], color.val[3], thickness);
+
+ return;
+ }
+
+ //javadoc: ellipse(img, box, color)
+ public static void ellipse(Mat img, RotatedRect box, Scalar color)
+ {
+
+ ellipse_5(img.nativeObj, box.center.x, box.center.y, box.size.width, box.size.height, box.angle, color.val[0], color.val[1], color.val[2], color.val[3]);
+
+ return;
+ }
+
+
+ //
+ // C++: void fillConvexPoly(Mat& img, vector_Point points, Scalar color, int lineType = LINE_8, int shift = 0)
+ //
+
+ //javadoc: fillConvexPoly(img, points, color, lineType, shift)
+ public static void fillConvexPoly(Mat img, MatOfPoint points, Scalar color, int lineType, int shift)
+ {
+ Mat points_mat = points;
+ fillConvexPoly_0(img.nativeObj, points_mat.nativeObj, color.val[0], color.val[1], color.val[2], color.val[3], lineType, shift);
+
+ return;
+ }
+
+ //javadoc: fillConvexPoly(img, points, color)
+ public static void fillConvexPoly(Mat img, MatOfPoint points, Scalar color)
+ {
+ Mat points_mat = points;
+ fillConvexPoly_1(img.nativeObj, points_mat.nativeObj, color.val[0], color.val[1], color.val[2], color.val[3]);
+
+ return;
+ }
+
+
+ //
+ // C++: void fillPoly(Mat& img, vector_vector_Point pts, Scalar color, int lineType = LINE_8, int shift = 0, Point offset = Point())
+ //
+
+ //javadoc: fillPoly(img, pts, color, lineType, shift, offset)
+ public static void fillPoly(Mat img, List<MatOfPoint> pts, Scalar color, int lineType, int shift, Point offset)
+ {
+ List<Mat> pts_tmplm = new ArrayList<Mat>((pts != null) ? pts.size() : 0);
+ Mat pts_mat = Converters.vector_vector_Point_to_Mat(pts, pts_tmplm);
+ fillPoly_0(img.nativeObj, pts_mat.nativeObj, color.val[0], color.val[1], color.val[2], color.val[3], lineType, shift, offset.x, offset.y);
+
+ return;
+ }
+
+ //javadoc: fillPoly(img, pts, color)
+ public static void fillPoly(Mat img, List<MatOfPoint> pts, Scalar color)
+ {
+ List<Mat> pts_tmplm = new ArrayList<Mat>((pts != null) ? pts.size() : 0);
+ Mat pts_mat = Converters.vector_vector_Point_to_Mat(pts, pts_tmplm);
+ fillPoly_1(img.nativeObj, pts_mat.nativeObj, color.val[0], color.val[1], color.val[2], color.val[3]);
+
+ return;
+ }
+
+
+ //
+ // C++: void polylines(Mat& img, vector_vector_Point pts, bool isClosed, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+ //
+
+ //javadoc: polylines(img, pts, isClosed, color, thickness, lineType, shift)
+ public static void polylines(Mat img, List<MatOfPoint> pts, boolean isClosed, Scalar color, int thickness, int lineType, int shift)
+ {
+ List<Mat> pts_tmplm = new ArrayList<Mat>((pts != null) ? pts.size() : 0);
+ Mat pts_mat = Converters.vector_vector_Point_to_Mat(pts, pts_tmplm);
+ polylines_0(img.nativeObj, pts_mat.nativeObj, isClosed, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, shift);
+
+ return;
+ }
+
+ //javadoc: polylines(img, pts, isClosed, color, thickness)
+ public static void polylines(Mat img, List<MatOfPoint> pts, boolean isClosed, Scalar color, int thickness)
+ {
+ List<Mat> pts_tmplm = new ArrayList<Mat>((pts != null) ? pts.size() : 0);
+ Mat pts_mat = Converters.vector_vector_Point_to_Mat(pts, pts_tmplm);
+ polylines_1(img.nativeObj, pts_mat.nativeObj, isClosed, color.val[0], color.val[1], color.val[2], color.val[3], thickness);
+
+ return;
+ }
+
+ //javadoc: polylines(img, pts, isClosed, color)
+ public static void polylines(Mat img, List<MatOfPoint> pts, boolean isClosed, Scalar color)
+ {
+ List<Mat> pts_tmplm = new ArrayList<Mat>((pts != null) ? pts.size() : 0);
+ Mat pts_mat = Converters.vector_vector_Point_to_Mat(pts, pts_tmplm);
+ polylines_2(img.nativeObj, pts_mat.nativeObj, isClosed, color.val[0], color.val[1], color.val[2], color.val[3]);
+
+ return;
+ }
+
+
+ //
+ // C++: void drawContours(Mat& image, vector_vector_Point contours, int contourIdx, Scalar color, int thickness = 1, int lineType = LINE_8, Mat hierarchy = Mat(), int maxLevel = INT_MAX, Point offset = Point())
+ //
+
+ //javadoc: drawContours(image, contours, contourIdx, color, thickness, lineType, hierarchy, maxLevel, offset)
+ public static void drawContours(Mat image, List<MatOfPoint> contours, int contourIdx, Scalar color, int thickness, int lineType, Mat hierarchy, int maxLevel, Point offset)
+ {
+ List<Mat> contours_tmplm = new ArrayList<Mat>((contours != null) ? contours.size() : 0);
+ Mat contours_mat = Converters.vector_vector_Point_to_Mat(contours, contours_tmplm);
+ drawContours_0(image.nativeObj, contours_mat.nativeObj, contourIdx, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, hierarchy.nativeObj, maxLevel, offset.x, offset.y);
+
+ return;
+ }
+
+ //javadoc: drawContours(image, contours, contourIdx, color, thickness)
+ public static void drawContours(Mat image, List<MatOfPoint> contours, int contourIdx, Scalar color, int thickness)
+ {
+ List<Mat> contours_tmplm = new ArrayList<Mat>((contours != null) ? contours.size() : 0);
+ Mat contours_mat = Converters.vector_vector_Point_to_Mat(contours, contours_tmplm);
+ drawContours_1(image.nativeObj, contours_mat.nativeObj, contourIdx, color.val[0], color.val[1], color.val[2], color.val[3], thickness);
+
+ return;
+ }
+
+ //javadoc: drawContours(image, contours, contourIdx, color)
+ public static void drawContours(Mat image, List<MatOfPoint> contours, int contourIdx, Scalar color)
+ {
+ List<Mat> contours_tmplm = new ArrayList<Mat>((contours != null) ? contours.size() : 0);
+ Mat contours_mat = Converters.vector_vector_Point_to_Mat(contours, contours_tmplm);
+ drawContours_2(image.nativeObj, contours_mat.nativeObj, contourIdx, color.val[0], color.val[1], color.val[2], color.val[3]);
+
+ return;
+ }
+
+
+ //
+ // C++: bool clipLine(Rect imgRect, Point& pt1, Point& pt2)
+ //
+
+ //javadoc: clipLine(imgRect, pt1, pt2)
+ public static boolean clipLine(Rect imgRect, Point pt1, Point pt2)
+ {
+ double[] pt1_out = new double[2];
+ double[] pt2_out = new double[2];
+ boolean retVal = clipLine_0(imgRect.x, imgRect.y, imgRect.width, imgRect.height, pt1.x, pt1.y, pt1_out, pt2.x, pt2.y, pt2_out);
+ if(pt1!=null){ pt1.x = pt1_out[0]; pt1.y = pt1_out[1]; }
+ if(pt2!=null){ pt2.x = pt2_out[0]; pt2.y = pt2_out[1]; }
+ return retVal;
+ }
+
+
+ //
+ // C++: void ellipse2Poly(Point center, Size axes, int angle, int arcStart, int arcEnd, int delta, vector_Point& pts)
+ //
+
+ //javadoc: ellipse2Poly(center, axes, angle, arcStart, arcEnd, delta, pts)
+ public static void ellipse2Poly(Point center, Size axes, int angle, int arcStart, int arcEnd, int delta, MatOfPoint pts)
+ {
+ Mat pts_mat = pts;
+ ellipse2Poly_0(center.x, center.y, axes.width, axes.height, angle, arcStart, arcEnd, delta, pts_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void putText(Mat& img, String text, Point org, int fontFace, double fontScale, Scalar color, int thickness = 1, int lineType = LINE_8, bool bottomLeftOrigin = false)
+ //
+
+ //javadoc: putText(img, text, org, fontFace, fontScale, color, thickness, lineType, bottomLeftOrigin)
+ public static void putText(Mat img, String text, Point org, int fontFace, double fontScale, Scalar color, int thickness, int lineType, boolean bottomLeftOrigin)
+ {
+
+ putText_0(img.nativeObj, text, org.x, org.y, fontFace, fontScale, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, bottomLeftOrigin);
+
+ return;
+ }
+
+ //javadoc: putText(img, text, org, fontFace, fontScale, color, thickness)
+ public static void putText(Mat img, String text, Point org, int fontFace, double fontScale, Scalar color, int thickness)
+ {
+
+ putText_1(img.nativeObj, text, org.x, org.y, fontFace, fontScale, color.val[0], color.val[1], color.val[2], color.val[3], thickness);
+
+ return;
+ }
+
+ //javadoc: putText(img, text, org, fontFace, fontScale, color)
+ public static void putText(Mat img, String text, Point org, int fontFace, double fontScale, Scalar color)
+ {
+
+ putText_2(img.nativeObj, text, org.x, org.y, fontFace, fontScale, color.val[0], color.val[1], color.val[2], color.val[3]);
+
+ return;
+ }
+
+
+ // C++: Size getTextSize(const String& text, int fontFace, double fontScale, int thickness, int* baseLine);
+ //javadoc:getTextSize(text, fontFace, fontScale, thickness, baseLine)
+ public static Size getTextSize(String text, int fontFace, double fontScale, int thickness, int[] baseLine) {
+ if(baseLine != null && baseLine.length != 1)
+ throw new java.lang.IllegalArgumentException("'baseLine' must be 'int[1]' or 'null'.");
+ Size retVal = new Size(n_getTextSize(text, fontFace, fontScale, thickness, baseLine));
+ return retVal;
+ }
+
+
+
+ // C++: void remap(Mat src, Mat& dst, Mat map1, Mat map2, int interpolation, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar())
+ private static native void remap_0(long src_nativeObj, long dst_nativeObj, long map1_nativeObj, long map2_nativeObj, int interpolation, int borderMode, double borderValue_val0, double borderValue_val1, double borderValue_val2, double borderValue_val3);
+ private static native void remap_1(long src_nativeObj, long dst_nativeObj, long map1_nativeObj, long map2_nativeObj, int interpolation);
+
+ // C++: void convertMaps(Mat map1, Mat map2, Mat& dstmap1, Mat& dstmap2, int dstmap1type, bool nninterpolation = false)
+ private static native void convertMaps_0(long map1_nativeObj, long map2_nativeObj, long dstmap1_nativeObj, long dstmap2_nativeObj, int dstmap1type, boolean nninterpolation);
+ private static native void convertMaps_1(long map1_nativeObj, long map2_nativeObj, long dstmap1_nativeObj, long dstmap2_nativeObj, int dstmap1type);
+
+ // C++: Mat getRotationMatrix2D(Point2f center, double angle, double scale)
+ private static native long getRotationMatrix2D_0(double center_x, double center_y, double angle, double scale);
+
+ // C++: void invertAffineTransform(Mat M, Mat& iM)
+ private static native void invertAffineTransform_0(long M_nativeObj, long iM_nativeObj);
+
+ // C++: Mat getPerspectiveTransform(Mat src, Mat dst)
+ private static native long getPerspectiveTransform_0(long src_nativeObj, long dst_nativeObj);
+
+ // C++: Mat getAffineTransform(vector_Point2f src, vector_Point2f dst)
+ private static native long getAffineTransform_0(long src_mat_nativeObj, long dst_mat_nativeObj);
+
+ // C++: void getRectSubPix(Mat image, Size patchSize, Point2f center, Mat& patch, int patchType = -1)
+ private static native void getRectSubPix_0(long image_nativeObj, double patchSize_width, double patchSize_height, double center_x, double center_y, long patch_nativeObj, int patchType);
+ private static native void getRectSubPix_1(long image_nativeObj, double patchSize_width, double patchSize_height, double center_x, double center_y, long patch_nativeObj);
+
+ // C++: void logPolar(Mat src, Mat& dst, Point2f center, double M, int flags)
+ private static native void logPolar_0(long src_nativeObj, long dst_nativeObj, double center_x, double center_y, double M, int flags);
+
+ // C++: void linearPolar(Mat src, Mat& dst, Point2f center, double maxRadius, int flags)
+ private static native void linearPolar_0(long src_nativeObj, long dst_nativeObj, double center_x, double center_y, double maxRadius, int flags);
+
+ // C++: void integral(Mat src, Mat& sum, int sdepth = -1)
+ private static native void integral_0(long src_nativeObj, long sum_nativeObj, int sdepth);
+ private static native void integral_1(long src_nativeObj, long sum_nativeObj);
+
+ // C++: void filter2D(Mat src, Mat& dst, int ddepth, Mat kernel, Point anchor = Point(-1,-1), double delta = 0, int borderType = BORDER_DEFAULT)
+ private static native void filter2D_0(long src_nativeObj, long dst_nativeObj, int ddepth, long kernel_nativeObj, double anchor_x, double anchor_y, double delta, int borderType);
+ private static native void filter2D_1(long src_nativeObj, long dst_nativeObj, int ddepth, long kernel_nativeObj, double anchor_x, double anchor_y, double delta);
+ private static native void filter2D_2(long src_nativeObj, long dst_nativeObj, int ddepth, long kernel_nativeObj);
+
+ // C++: void sepFilter2D(Mat src, Mat& dst, int ddepth, Mat kernelX, Mat kernelY, Point anchor = Point(-1,-1), double delta = 0, int borderType = BORDER_DEFAULT)
+ private static native void sepFilter2D_0(long src_nativeObj, long dst_nativeObj, int ddepth, long kernelX_nativeObj, long kernelY_nativeObj, double anchor_x, double anchor_y, double delta, int borderType);
+ private static native void sepFilter2D_1(long src_nativeObj, long dst_nativeObj, int ddepth, long kernelX_nativeObj, long kernelY_nativeObj, double anchor_x, double anchor_y, double delta);
+ private static native void sepFilter2D_2(long src_nativeObj, long dst_nativeObj, int ddepth, long kernelX_nativeObj, long kernelY_nativeObj);
+
+ // C++: void Sobel(Mat src, Mat& dst, int ddepth, int dx, int dy, int ksize = 3, double scale = 1, double delta = 0, int borderType = BORDER_DEFAULT)
+ private static native void Sobel_0(long src_nativeObj, long dst_nativeObj, int ddepth, int dx, int dy, int ksize, double scale, double delta, int borderType);
+ private static native void Sobel_1(long src_nativeObj, long dst_nativeObj, int ddepth, int dx, int dy, int ksize, double scale, double delta);
+ private static native void Sobel_2(long src_nativeObj, long dst_nativeObj, int ddepth, int dx, int dy);
+
+ // C++: void Scharr(Mat src, Mat& dst, int ddepth, int dx, int dy, double scale = 1, double delta = 0, int borderType = BORDER_DEFAULT)
+ private static native void Scharr_0(long src_nativeObj, long dst_nativeObj, int ddepth, int dx, int dy, double scale, double delta, int borderType);
+ private static native void Scharr_1(long src_nativeObj, long dst_nativeObj, int ddepth, int dx, int dy, double scale, double delta);
+ private static native void Scharr_2(long src_nativeObj, long dst_nativeObj, int ddepth, int dx, int dy);
+
+ // C++: void Laplacian(Mat src, Mat& dst, int ddepth, int ksize = 1, double scale = 1, double delta = 0, int borderType = BORDER_DEFAULT)
+ private static native void Laplacian_0(long src_nativeObj, long dst_nativeObj, int ddepth, int ksize, double scale, double delta, int borderType);
+ private static native void Laplacian_1(long src_nativeObj, long dst_nativeObj, int ddepth, int ksize, double scale, double delta);
+ private static native void Laplacian_2(long src_nativeObj, long dst_nativeObj, int ddepth);
+
+ // C++: void Canny(Mat image, Mat& edges, double threshold1, double threshold2, int apertureSize = 3, bool L2gradient = false)
+ private static native void Canny_0(long image_nativeObj, long edges_nativeObj, double threshold1, double threshold2, int apertureSize, boolean L2gradient);
+ private static native void Canny_1(long image_nativeObj, long edges_nativeObj, double threshold1, double threshold2);
+
+ // C++: void cornerMinEigenVal(Mat src, Mat& dst, int blockSize, int ksize = 3, int borderType = BORDER_DEFAULT)
+ private static native void cornerMinEigenVal_0(long src_nativeObj, long dst_nativeObj, int blockSize, int ksize, int borderType);
+ private static native void cornerMinEigenVal_1(long src_nativeObj, long dst_nativeObj, int blockSize, int ksize);
+ private static native void cornerMinEigenVal_2(long src_nativeObj, long dst_nativeObj, int blockSize);
+
+ // C++: Ptr_LineSegmentDetector createLineSegmentDetector(int _refine = LSD_REFINE_STD, double _scale = 0.8, double _sigma_scale = 0.6, double _quant = 2.0, double _ang_th = 22.5, double _log_eps = 0, double _density_th = 0.7, int _n_bins = 1024)
+ private static native long createLineSegmentDetector_0(int _refine, double _scale, double _sigma_scale, double _quant, double _ang_th, double _log_eps, double _density_th, int _n_bins);
+ private static native long createLineSegmentDetector_1();
+
+ // C++: Mat getGaussianKernel(int ksize, double sigma, int ktype = CV_64F)
+ private static native long getGaussianKernel_0(int ksize, double sigma, int ktype);
+ private static native long getGaussianKernel_1(int ksize, double sigma);
+
+ // C++: void getDerivKernels(Mat& kx, Mat& ky, int dx, int dy, int ksize, bool normalize = false, int ktype = CV_32F)
+ private static native void getDerivKernels_0(long kx_nativeObj, long ky_nativeObj, int dx, int dy, int ksize, boolean normalize, int ktype);
+ private static native void getDerivKernels_1(long kx_nativeObj, long ky_nativeObj, int dx, int dy, int ksize);
+
+ // C++: Mat getGaborKernel(Size ksize, double sigma, double theta, double lambd, double gamma, double psi = CV_PI*0.5, int ktype = CV_64F)
+ private static native long getGaborKernel_0(double ksize_width, double ksize_height, double sigma, double theta, double lambd, double gamma, double psi, int ktype);
+ private static native long getGaborKernel_1(double ksize_width, double ksize_height, double sigma, double theta, double lambd, double gamma);
+
+ // C++: Mat getStructuringElement(int shape, Size ksize, Point anchor = Point(-1,-1))
+ private static native long getStructuringElement_0(int shape, double ksize_width, double ksize_height, double anchor_x, double anchor_y);
+ private static native long getStructuringElement_1(int shape, double ksize_width, double ksize_height);
+
+ // C++: void medianBlur(Mat src, Mat& dst, int ksize)
+ private static native void medianBlur_0(long src_nativeObj, long dst_nativeObj, int ksize);
+
+ // C++: void GaussianBlur(Mat src, Mat& dst, Size ksize, double sigmaX, double sigmaY = 0, int borderType = BORDER_DEFAULT)
+ private static native void GaussianBlur_0(long src_nativeObj, long dst_nativeObj, double ksize_width, double ksize_height, double sigmaX, double sigmaY, int borderType);
+ private static native void GaussianBlur_1(long src_nativeObj, long dst_nativeObj, double ksize_width, double ksize_height, double sigmaX, double sigmaY);
+ private static native void GaussianBlur_2(long src_nativeObj, long dst_nativeObj, double ksize_width, double ksize_height, double sigmaX);
+
+ // C++: void bilateralFilter(Mat src, Mat& dst, int d, double sigmaColor, double sigmaSpace, int borderType = BORDER_DEFAULT)
+ private static native void bilateralFilter_0(long src_nativeObj, long dst_nativeObj, int d, double sigmaColor, double sigmaSpace, int borderType);
+ private static native void bilateralFilter_1(long src_nativeObj, long dst_nativeObj, int d, double sigmaColor, double sigmaSpace);
+
+ // C++: void boxFilter(Mat src, Mat& dst, int ddepth, Size ksize, Point anchor = Point(-1,-1), bool normalize = true, int borderType = BORDER_DEFAULT)
+ private static native void boxFilter_0(long src_nativeObj, long dst_nativeObj, int ddepth, double ksize_width, double ksize_height, double anchor_x, double anchor_y, boolean normalize, int borderType);
+ private static native void boxFilter_1(long src_nativeObj, long dst_nativeObj, int ddepth, double ksize_width, double ksize_height, double anchor_x, double anchor_y, boolean normalize);
+ private static native void boxFilter_2(long src_nativeObj, long dst_nativeObj, int ddepth, double ksize_width, double ksize_height);
+
+ // C++: void sqrBoxFilter(Mat _src, Mat& _dst, int ddepth, Size ksize, Point anchor = Point(-1, -1), bool normalize = true, int borderType = BORDER_DEFAULT)
+ private static native void sqrBoxFilter_0(long _src_nativeObj, long _dst_nativeObj, int ddepth, double ksize_width, double ksize_height, double anchor_x, double anchor_y, boolean normalize, int borderType);
+ private static native void sqrBoxFilter_1(long _src_nativeObj, long _dst_nativeObj, int ddepth, double ksize_width, double ksize_height, double anchor_x, double anchor_y, boolean normalize);
+ private static native void sqrBoxFilter_2(long _src_nativeObj, long _dst_nativeObj, int ddepth, double ksize_width, double ksize_height);
+
+ // C++: void blur(Mat src, Mat& dst, Size ksize, Point anchor = Point(-1,-1), int borderType = BORDER_DEFAULT)
+ private static native void blur_0(long src_nativeObj, long dst_nativeObj, double ksize_width, double ksize_height, double anchor_x, double anchor_y, int borderType);
+ private static native void blur_1(long src_nativeObj, long dst_nativeObj, double ksize_width, double ksize_height, double anchor_x, double anchor_y);
+ private static native void blur_2(long src_nativeObj, long dst_nativeObj, double ksize_width, double ksize_height);
+
+ // C++: void cornerHarris(Mat src, Mat& dst, int blockSize, int ksize, double k, int borderType = BORDER_DEFAULT)
+ private static native void cornerHarris_0(long src_nativeObj, long dst_nativeObj, int blockSize, int ksize, double k, int borderType);
+ private static native void cornerHarris_1(long src_nativeObj, long dst_nativeObj, int blockSize, int ksize, double k);
+
+ // C++: void cornerEigenValsAndVecs(Mat src, Mat& dst, int blockSize, int ksize, int borderType = BORDER_DEFAULT)
+ private static native void cornerEigenValsAndVecs_0(long src_nativeObj, long dst_nativeObj, int blockSize, int ksize, int borderType);
+ private static native void cornerEigenValsAndVecs_1(long src_nativeObj, long dst_nativeObj, int blockSize, int ksize);
+
+ // C++: void preCornerDetect(Mat src, Mat& dst, int ksize, int borderType = BORDER_DEFAULT)
+ private static native void preCornerDetect_0(long src_nativeObj, long dst_nativeObj, int ksize, int borderType);
+ private static native void preCornerDetect_1(long src_nativeObj, long dst_nativeObj, int ksize);
+
+ // C++: void cornerSubPix(Mat image, vector_Point2f& corners, Size winSize, Size zeroZone, TermCriteria criteria)
+ private static native void cornerSubPix_0(long image_nativeObj, long corners_mat_nativeObj, double winSize_width, double winSize_height, double zeroZone_width, double zeroZone_height, int criteria_type, int criteria_maxCount, double criteria_epsilon);
+
+ // C++: void goodFeaturesToTrack(Mat image, vector_Point& corners, int maxCorners, double qualityLevel, double minDistance, Mat mask = Mat(), int blockSize = 3, bool useHarrisDetector = false, double k = 0.04)
+ private static native void goodFeaturesToTrack_0(long image_nativeObj, long corners_mat_nativeObj, int maxCorners, double qualityLevel, double minDistance, long mask_nativeObj, int blockSize, boolean useHarrisDetector, double k);
+ private static native void goodFeaturesToTrack_1(long image_nativeObj, long corners_mat_nativeObj, int maxCorners, double qualityLevel, double minDistance);
+
+ // C++: void HoughLines(Mat image, Mat& lines, double rho, double theta, int threshold, double srn = 0, double stn = 0, double min_theta = 0, double max_theta = CV_PI)
+ private static native void HoughLines_0(long image_nativeObj, long lines_nativeObj, double rho, double theta, int threshold, double srn, double stn, double min_theta, double max_theta);
+ private static native void HoughLines_1(long image_nativeObj, long lines_nativeObj, double rho, double theta, int threshold);
+
+ // C++: void HoughLinesP(Mat image, Mat& lines, double rho, double theta, int threshold, double minLineLength = 0, double maxLineGap = 0)
+ private static native void HoughLinesP_0(long image_nativeObj, long lines_nativeObj, double rho, double theta, int threshold, double minLineLength, double maxLineGap);
+ private static native void HoughLinesP_1(long image_nativeObj, long lines_nativeObj, double rho, double theta, int threshold);
+
+ // C++: void HoughCircles(Mat image, Mat& circles, int method, double dp, double minDist, double param1 = 100, double param2 = 100, int minRadius = 0, int maxRadius = 0)
+ private static native void HoughCircles_0(long image_nativeObj, long circles_nativeObj, int method, double dp, double minDist, double param1, double param2, int minRadius, int maxRadius);
+ private static native void HoughCircles_1(long image_nativeObj, long circles_nativeObj, int method, double dp, double minDist);
+
+ // C++: void erode(Mat src, Mat& dst, Mat kernel, Point anchor = Point(-1,-1), int iterations = 1, int borderType = BORDER_CONSTANT, Scalar borderValue = morphologyDefaultBorderValue())
+ private static native void erode_0(long src_nativeObj, long dst_nativeObj, long kernel_nativeObj, double anchor_x, double anchor_y, int iterations, int borderType, double borderValue_val0, double borderValue_val1, double borderValue_val2, double borderValue_val3);
+ private static native void erode_1(long src_nativeObj, long dst_nativeObj, long kernel_nativeObj, double anchor_x, double anchor_y, int iterations);
+ private static native void erode_2(long src_nativeObj, long dst_nativeObj, long kernel_nativeObj);
+
+ // C++: void dilate(Mat src, Mat& dst, Mat kernel, Point anchor = Point(-1,-1), int iterations = 1, int borderType = BORDER_CONSTANT, Scalar borderValue = morphologyDefaultBorderValue())
+ private static native void dilate_0(long src_nativeObj, long dst_nativeObj, long kernel_nativeObj, double anchor_x, double anchor_y, int iterations, int borderType, double borderValue_val0, double borderValue_val1, double borderValue_val2, double borderValue_val3);
+ private static native void dilate_1(long src_nativeObj, long dst_nativeObj, long kernel_nativeObj, double anchor_x, double anchor_y, int iterations);
+ private static native void dilate_2(long src_nativeObj, long dst_nativeObj, long kernel_nativeObj);
+
+ // C++: void morphologyEx(Mat src, Mat& dst, int op, Mat kernel, Point anchor = Point(-1,-1), int iterations = 1, int borderType = BORDER_CONSTANT, Scalar borderValue = morphologyDefaultBorderValue())
+ private static native void morphologyEx_0(long src_nativeObj, long dst_nativeObj, int op, long kernel_nativeObj, double anchor_x, double anchor_y, int iterations, int borderType, double borderValue_val0, double borderValue_val1, double borderValue_val2, double borderValue_val3);
+ private static native void morphologyEx_1(long src_nativeObj, long dst_nativeObj, int op, long kernel_nativeObj, double anchor_x, double anchor_y, int iterations);
+ private static native void morphologyEx_2(long src_nativeObj, long dst_nativeObj, int op, long kernel_nativeObj);
+
+ // C++: void resize(Mat src, Mat& dst, Size dsize, double fx = 0, double fy = 0, int interpolation = INTER_LINEAR)
+ private static native void resize_0(long src_nativeObj, long dst_nativeObj, double dsize_width, double dsize_height, double fx, double fy, int interpolation);
+ private static native void resize_1(long src_nativeObj, long dst_nativeObj, double dsize_width, double dsize_height);
+
+ // C++: void warpAffine(Mat src, Mat& dst, Mat M, Size dsize, int flags = INTER_LINEAR, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar())
+ private static native void warpAffine_0(long src_nativeObj, long dst_nativeObj, long M_nativeObj, double dsize_width, double dsize_height, int flags, int borderMode, double borderValue_val0, double borderValue_val1, double borderValue_val2, double borderValue_val3);
+ private static native void warpAffine_1(long src_nativeObj, long dst_nativeObj, long M_nativeObj, double dsize_width, double dsize_height, int flags);
+ private static native void warpAffine_2(long src_nativeObj, long dst_nativeObj, long M_nativeObj, double dsize_width, double dsize_height);
+
+ // C++: void warpPerspective(Mat src, Mat& dst, Mat M, Size dsize, int flags = INTER_LINEAR, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar())
+ private static native void warpPerspective_0(long src_nativeObj, long dst_nativeObj, long M_nativeObj, double dsize_width, double dsize_height, int flags, int borderMode, double borderValue_val0, double borderValue_val1, double borderValue_val2, double borderValue_val3);
+ private static native void warpPerspective_1(long src_nativeObj, long dst_nativeObj, long M_nativeObj, double dsize_width, double dsize_height, int flags);
+ private static native void warpPerspective_2(long src_nativeObj, long dst_nativeObj, long M_nativeObj, double dsize_width, double dsize_height);
+
+ // C++: void integral(Mat src, Mat& sum, Mat& sqsum, int sdepth = -1, int sqdepth = -1)
+ private static native void integral2_0(long src_nativeObj, long sum_nativeObj, long sqsum_nativeObj, int sdepth, int sqdepth);
+ private static native void integral2_1(long src_nativeObj, long sum_nativeObj, long sqsum_nativeObj);
+
+ // C++: void integral(Mat src, Mat& sum, Mat& sqsum, Mat& tilted, int sdepth = -1, int sqdepth = -1)
+ private static native void integral3_0(long src_nativeObj, long sum_nativeObj, long sqsum_nativeObj, long tilted_nativeObj, int sdepth, int sqdepth);
+ private static native void integral3_1(long src_nativeObj, long sum_nativeObj, long sqsum_nativeObj, long tilted_nativeObj);
+
+ // C++: void accumulate(Mat src, Mat& dst, Mat mask = Mat())
+ private static native void accumulate_0(long src_nativeObj, long dst_nativeObj, long mask_nativeObj);
+ private static native void accumulate_1(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void accumulateSquare(Mat src, Mat& dst, Mat mask = Mat())
+ private static native void accumulateSquare_0(long src_nativeObj, long dst_nativeObj, long mask_nativeObj);
+ private static native void accumulateSquare_1(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void accumulateProduct(Mat src1, Mat src2, Mat& dst, Mat mask = Mat())
+ private static native void accumulateProduct_0(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj, long mask_nativeObj);
+ private static native void accumulateProduct_1(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+ // C++: void accumulateWeighted(Mat src, Mat& dst, double alpha, Mat mask = Mat())
+ private static native void accumulateWeighted_0(long src_nativeObj, long dst_nativeObj, double alpha, long mask_nativeObj);
+ private static native void accumulateWeighted_1(long src_nativeObj, long dst_nativeObj, double alpha);
+
+ // C++: Point2d phaseCorrelate(Mat src1, Mat src2, Mat window = Mat(), double* response = 0)
+ private static native double[] phaseCorrelate_0(long src1_nativeObj, long src2_nativeObj, long window_nativeObj, double[] response_out);
+ private static native double[] phaseCorrelate_1(long src1_nativeObj, long src2_nativeObj);
+
+ // C++: void createHanningWindow(Mat& dst, Size winSize, int type)
+ private static native void createHanningWindow_0(long dst_nativeObj, double winSize_width, double winSize_height, int type);
+
+ // C++: double threshold(Mat src, Mat& dst, double thresh, double maxval, int type)
+ private static native double threshold_0(long src_nativeObj, long dst_nativeObj, double thresh, double maxval, int type);
+
+ // C++: void adaptiveThreshold(Mat src, Mat& dst, double maxValue, int adaptiveMethod, int thresholdType, int blockSize, double C)
+ private static native void adaptiveThreshold_0(long src_nativeObj, long dst_nativeObj, double maxValue, int adaptiveMethod, int thresholdType, int blockSize, double C);
+
+ // C++: void pyrDown(Mat src, Mat& dst, Size dstsize = Size(), int borderType = BORDER_DEFAULT)
+ private static native void pyrDown_0(long src_nativeObj, long dst_nativeObj, double dstsize_width, double dstsize_height, int borderType);
+ private static native void pyrDown_1(long src_nativeObj, long dst_nativeObj, double dstsize_width, double dstsize_height);
+ private static native void pyrDown_2(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void pyrUp(Mat src, Mat& dst, Size dstsize = Size(), int borderType = BORDER_DEFAULT)
+ private static native void pyrUp_0(long src_nativeObj, long dst_nativeObj, double dstsize_width, double dstsize_height, int borderType);
+ private static native void pyrUp_1(long src_nativeObj, long dst_nativeObj, double dstsize_width, double dstsize_height);
+ private static native void pyrUp_2(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void undistort(Mat src, Mat& dst, Mat cameraMatrix, Mat distCoeffs, Mat newCameraMatrix = Mat())
+ private static native void undistort_0(long src_nativeObj, long dst_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long newCameraMatrix_nativeObj);
+ private static native void undistort_1(long src_nativeObj, long dst_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_nativeObj);
+
+ // C++: void initUndistortRectifyMap(Mat cameraMatrix, Mat distCoeffs, Mat R, Mat newCameraMatrix, Size size, int m1type, Mat& map1, Mat& map2)
+ private static native void initUndistortRectifyMap_0(long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long R_nativeObj, long newCameraMatrix_nativeObj, double size_width, double size_height, int m1type, long map1_nativeObj, long map2_nativeObj);
+
+ // C++: float initWideAngleProjMap(Mat cameraMatrix, Mat distCoeffs, Size imageSize, int destImageWidth, int m1type, Mat& map1, Mat& map2, int projType = PROJ_SPHERICAL_EQRECT, double alpha = 0)
+ private static native float initWideAngleProjMap_0(long cameraMatrix_nativeObj, long distCoeffs_nativeObj, double imageSize_width, double imageSize_height, int destImageWidth, int m1type, long map1_nativeObj, long map2_nativeObj, int projType, double alpha);
+ private static native float initWideAngleProjMap_1(long cameraMatrix_nativeObj, long distCoeffs_nativeObj, double imageSize_width, double imageSize_height, int destImageWidth, int m1type, long map1_nativeObj, long map2_nativeObj);
+
+ // C++: Mat getDefaultNewCameraMatrix(Mat cameraMatrix, Size imgsize = Size(), bool centerPrincipalPoint = false)
+ private static native long getDefaultNewCameraMatrix_0(long cameraMatrix_nativeObj, double imgsize_width, double imgsize_height, boolean centerPrincipalPoint);
+ private static native long getDefaultNewCameraMatrix_1(long cameraMatrix_nativeObj);
+
+ // C++: void undistortPoints(vector_Point2f src, vector_Point2f& dst, Mat cameraMatrix, Mat distCoeffs, Mat R = Mat(), Mat P = Mat())
+ private static native void undistortPoints_0(long src_mat_nativeObj, long dst_mat_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long R_nativeObj, long P_nativeObj);
+ private static native void undistortPoints_1(long src_mat_nativeObj, long dst_mat_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_nativeObj);
+
+ // C++: void calcHist(vector_Mat images, vector_int channels, Mat mask, Mat& hist, vector_int histSize, vector_float ranges, bool accumulate = false)
+ private static native void calcHist_0(long images_mat_nativeObj, long channels_mat_nativeObj, long mask_nativeObj, long hist_nativeObj, long histSize_mat_nativeObj, long ranges_mat_nativeObj, boolean accumulate);
+ private static native void calcHist_1(long images_mat_nativeObj, long channels_mat_nativeObj, long mask_nativeObj, long hist_nativeObj, long histSize_mat_nativeObj, long ranges_mat_nativeObj);
+
+ // C++: void calcBackProject(vector_Mat images, vector_int channels, Mat hist, Mat& dst, vector_float ranges, double scale)
+ private static native void calcBackProject_0(long images_mat_nativeObj, long channels_mat_nativeObj, long hist_nativeObj, long dst_nativeObj, long ranges_mat_nativeObj, double scale);
+
+ // C++: double compareHist(Mat H1, Mat H2, int method)
+ private static native double compareHist_0(long H1_nativeObj, long H2_nativeObj, int method);
+
+ // C++: void equalizeHist(Mat src, Mat& dst)
+ private static native void equalizeHist_0(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void watershed(Mat image, Mat& markers)
+ private static native void watershed_0(long image_nativeObj, long markers_nativeObj);
+
+ // C++: void pyrMeanShiftFiltering(Mat src, Mat& dst, double sp, double sr, int maxLevel = 1, TermCriteria termcrit = TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,1))
+ private static native void pyrMeanShiftFiltering_0(long src_nativeObj, long dst_nativeObj, double sp, double sr, int maxLevel, int termcrit_type, int termcrit_maxCount, double termcrit_epsilon);
+ private static native void pyrMeanShiftFiltering_1(long src_nativeObj, long dst_nativeObj, double sp, double sr);
+
+ // C++: void grabCut(Mat img, Mat& mask, Rect rect, Mat& bgdModel, Mat& fgdModel, int iterCount, int mode = GC_EVAL)
+ private static native void grabCut_0(long img_nativeObj, long mask_nativeObj, int rect_x, int rect_y, int rect_width, int rect_height, long bgdModel_nativeObj, long fgdModel_nativeObj, int iterCount, int mode);
+ private static native void grabCut_1(long img_nativeObj, long mask_nativeObj, int rect_x, int rect_y, int rect_width, int rect_height, long bgdModel_nativeObj, long fgdModel_nativeObj, int iterCount);
+
+ // C++: void distanceTransform(Mat src, Mat& dst, Mat& labels, int distanceType, int maskSize, int labelType = DIST_LABEL_CCOMP)
+ private static native void distanceTransformWithLabels_0(long src_nativeObj, long dst_nativeObj, long labels_nativeObj, int distanceType, int maskSize, int labelType);
+ private static native void distanceTransformWithLabels_1(long src_nativeObj, long dst_nativeObj, long labels_nativeObj, int distanceType, int maskSize);
+
+ // C++: void distanceTransform(Mat src, Mat& dst, int distanceType, int maskSize, int dstType = CV_32F)
+ private static native void distanceTransform_0(long src_nativeObj, long dst_nativeObj, int distanceType, int maskSize, int dstType);
+ private static native void distanceTransform_1(long src_nativeObj, long dst_nativeObj, int distanceType, int maskSize);
+
+ // C++: int floodFill(Mat& image, Mat& mask, Point seedPoint, Scalar newVal, Rect* rect = 0, Scalar loDiff = Scalar(), Scalar upDiff = Scalar(), int flags = 4)
+ private static native int floodFill_0(long image_nativeObj, long mask_nativeObj, double seedPoint_x, double seedPoint_y, double newVal_val0, double newVal_val1, double newVal_val2, double newVal_val3, double[] rect_out, double loDiff_val0, double loDiff_val1, double loDiff_val2, double loDiff_val3, double upDiff_val0, double upDiff_val1, double upDiff_val2, double upDiff_val3, int flags);
+ private static native int floodFill_1(long image_nativeObj, long mask_nativeObj, double seedPoint_x, double seedPoint_y, double newVal_val0, double newVal_val1, double newVal_val2, double newVal_val3);
+
+ // C++: void cvtColor(Mat src, Mat& dst, int code, int dstCn = 0)
+ private static native void cvtColor_0(long src_nativeObj, long dst_nativeObj, int code, int dstCn);
+ private static native void cvtColor_1(long src_nativeObj, long dst_nativeObj, int code);
+
+ // C++: void demosaicing(Mat _src, Mat& _dst, int code, int dcn = 0)
+ private static native void demosaicing_0(long _src_nativeObj, long _dst_nativeObj, int code, int dcn);
+ private static native void demosaicing_1(long _src_nativeObj, long _dst_nativeObj, int code);
+
+ // C++: void matchTemplate(Mat image, Mat templ, Mat& result, int method, Mat mask = Mat())
+ private static native void matchTemplate_0(long image_nativeObj, long templ_nativeObj, long result_nativeObj, int method, long mask_nativeObj);
+ private static native void matchTemplate_1(long image_nativeObj, long templ_nativeObj, long result_nativeObj, int method);
+
+ // C++: int connectedComponents(Mat image, Mat& labels, int connectivity = 8, int ltype = CV_32S)
+ private static native int connectedComponents_0(long image_nativeObj, long labels_nativeObj, int connectivity, int ltype);
+ private static native int connectedComponents_1(long image_nativeObj, long labels_nativeObj);
+
+ // C++: int connectedComponentsWithStats(Mat image, Mat& labels, Mat& stats, Mat& centroids, int connectivity = 8, int ltype = CV_32S)
+ private static native int connectedComponentsWithStats_0(long image_nativeObj, long labels_nativeObj, long stats_nativeObj, long centroids_nativeObj, int connectivity, int ltype);
+ private static native int connectedComponentsWithStats_1(long image_nativeObj, long labels_nativeObj, long stats_nativeObj, long centroids_nativeObj);
+
+ // C++: void findContours(Mat& image, vector_vector_Point& contours, Mat& hierarchy, int mode, int method, Point offset = Point())
+ private static native void findContours_0(long image_nativeObj, long contours_mat_nativeObj, long hierarchy_nativeObj, int mode, int method, double offset_x, double offset_y);
+ private static native void findContours_1(long image_nativeObj, long contours_mat_nativeObj, long hierarchy_nativeObj, int mode, int method);
+
+ // C++: void approxPolyDP(vector_Point2f curve, vector_Point2f& approxCurve, double epsilon, bool closed)
+ private static native void approxPolyDP_0(long curve_mat_nativeObj, long approxCurve_mat_nativeObj, double epsilon, boolean closed);
+
+ // C++: double arcLength(vector_Point2f curve, bool closed)
+ private static native double arcLength_0(long curve_mat_nativeObj, boolean closed);
+
+ // C++: Rect boundingRect(vector_Point points)
+ private static native double[] boundingRect_0(long points_mat_nativeObj);
+
+ // C++: double contourArea(Mat contour, bool oriented = false)
+ private static native double contourArea_0(long contour_nativeObj, boolean oriented);
+ private static native double contourArea_1(long contour_nativeObj);
+
+ // C++: RotatedRect minAreaRect(vector_Point2f points)
+ private static native double[] minAreaRect_0(long points_mat_nativeObj);
+
+ // C++: void boxPoints(RotatedRect box, Mat& points)
+ private static native void boxPoints_0(double box_center_x, double box_center_y, double box_size_width, double box_size_height, double box_angle, long points_nativeObj);
+
+ // C++: void minEnclosingCircle(vector_Point2f points, Point2f& center, float& radius)
+ private static native void minEnclosingCircle_0(long points_mat_nativeObj, double[] center_out, double[] radius_out);
+
+ // C++: double minEnclosingTriangle(Mat points, Mat& triangle)
+ private static native double minEnclosingTriangle_0(long points_nativeObj, long triangle_nativeObj);
+
+ // C++: double matchShapes(Mat contour1, Mat contour2, int method, double parameter)
+ private static native double matchShapes_0(long contour1_nativeObj, long contour2_nativeObj, int method, double parameter);
+
+ // C++: void convexHull(vector_Point points, vector_int& hull, bool clockwise = false, _hidden_ returnPoints = true)
+ private static native void convexHull_0(long points_mat_nativeObj, long hull_mat_nativeObj, boolean clockwise);
+ private static native void convexHull_1(long points_mat_nativeObj, long hull_mat_nativeObj);
+
+ // C++: void convexityDefects(vector_Point contour, vector_int convexhull, vector_Vec4i& convexityDefects)
+ private static native void convexityDefects_0(long contour_mat_nativeObj, long convexhull_mat_nativeObj, long convexityDefects_mat_nativeObj);
+
+ // C++: bool isContourConvex(vector_Point contour)
+ private static native boolean isContourConvex_0(long contour_mat_nativeObj);
+
+ // C++: float intersectConvexConvex(Mat _p1, Mat _p2, Mat& _p12, bool handleNested = true)
+ private static native float intersectConvexConvex_0(long _p1_nativeObj, long _p2_nativeObj, long _p12_nativeObj, boolean handleNested);
+ private static native float intersectConvexConvex_1(long _p1_nativeObj, long _p2_nativeObj, long _p12_nativeObj);
+
+ // C++: RotatedRect fitEllipse(vector_Point2f points)
+ private static native double[] fitEllipse_0(long points_mat_nativeObj);
+
+ // C++: void fitLine(Mat points, Mat& line, int distType, double param, double reps, double aeps)
+ private static native void fitLine_0(long points_nativeObj, long line_nativeObj, int distType, double param, double reps, double aeps);
+
+ // C++: double pointPolygonTest(vector_Point2f contour, Point2f pt, bool measureDist)
+ private static native double pointPolygonTest_0(long contour_mat_nativeObj, double pt_x, double pt_y, boolean measureDist);
+
+ // C++: int rotatedRectangleIntersection(RotatedRect rect1, RotatedRect rect2, Mat& intersectingRegion)
+ private static native int rotatedRectangleIntersection_0(double rect1_center_x, double rect1_center_y, double rect1_size_width, double rect1_size_height, double rect1_angle, double rect2_center_x, double rect2_center_y, double rect2_size_width, double rect2_size_height, double rect2_angle, long intersectingRegion_nativeObj);
+
+ // C++: Ptr_CLAHE createCLAHE(double clipLimit = 40.0, Size tileGridSize = Size(8, 8))
+ private static native long createCLAHE_0(double clipLimit, double tileGridSize_width, double tileGridSize_height);
+ private static native long createCLAHE_1();
+
+ // C++: void applyColorMap(Mat src, Mat& dst, int colormap)
+ private static native void applyColorMap_0(long src_nativeObj, long dst_nativeObj, int colormap);
+
+ // C++: void line(Mat& img, Point pt1, Point pt2, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+ private static native void line_0(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType, int shift);
+ private static native void line_1(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3, int thickness);
+ private static native void line_2(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3);
+
+ // C++: void arrowedLine(Mat& img, Point pt1, Point pt2, Scalar color, int thickness = 1, int line_type = 8, int shift = 0, double tipLength = 0.1)
+ private static native void arrowedLine_0(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int line_type, int shift, double tipLength);
+ private static native void arrowedLine_1(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3);
+
+ // C++: void rectangle(Mat& img, Point pt1, Point pt2, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+ private static native void rectangle_0(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType, int shift);
+ private static native void rectangle_1(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3, int thickness);
+ private static native void rectangle_2(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3);
+
+ // C++: void circle(Mat& img, Point center, int radius, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+ private static native void circle_0(long img_nativeObj, double center_x, double center_y, int radius, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType, int shift);
+ private static native void circle_1(long img_nativeObj, double center_x, double center_y, int radius, double color_val0, double color_val1, double color_val2, double color_val3, int thickness);
+ private static native void circle_2(long img_nativeObj, double center_x, double center_y, int radius, double color_val0, double color_val1, double color_val2, double color_val3);
+
+ // C++: void ellipse(Mat& img, Point center, Size axes, double angle, double startAngle, double endAngle, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+ private static native void ellipse_0(long img_nativeObj, double center_x, double center_y, double axes_width, double axes_height, double angle, double startAngle, double endAngle, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType, int shift);
+ private static native void ellipse_1(long img_nativeObj, double center_x, double center_y, double axes_width, double axes_height, double angle, double startAngle, double endAngle, double color_val0, double color_val1, double color_val2, double color_val3, int thickness);
+ private static native void ellipse_2(long img_nativeObj, double center_x, double center_y, double axes_width, double axes_height, double angle, double startAngle, double endAngle, double color_val0, double color_val1, double color_val2, double color_val3);
+
+ // C++: void ellipse(Mat& img, RotatedRect box, Scalar color, int thickness = 1, int lineType = LINE_8)
+ private static native void ellipse_3(long img_nativeObj, double box_center_x, double box_center_y, double box_size_width, double box_size_height, double box_angle, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType);
+ private static native void ellipse_4(long img_nativeObj, double box_center_x, double box_center_y, double box_size_width, double box_size_height, double box_angle, double color_val0, double color_val1, double color_val2, double color_val3, int thickness);
+ private static native void ellipse_5(long img_nativeObj, double box_center_x, double box_center_y, double box_size_width, double box_size_height, double box_angle, double color_val0, double color_val1, double color_val2, double color_val3);
+
+ // C++: void fillConvexPoly(Mat& img, vector_Point points, Scalar color, int lineType = LINE_8, int shift = 0)
+ private static native void fillConvexPoly_0(long img_nativeObj, long points_mat_nativeObj, double color_val0, double color_val1, double color_val2, double color_val3, int lineType, int shift);
+ private static native void fillConvexPoly_1(long img_nativeObj, long points_mat_nativeObj, double color_val0, double color_val1, double color_val2, double color_val3);
+
+ // C++: void fillPoly(Mat& img, vector_vector_Point pts, Scalar color, int lineType = LINE_8, int shift = 0, Point offset = Point())
+ private static native void fillPoly_0(long img_nativeObj, long pts_mat_nativeObj, double color_val0, double color_val1, double color_val2, double color_val3, int lineType, int shift, double offset_x, double offset_y);
+ private static native void fillPoly_1(long img_nativeObj, long pts_mat_nativeObj, double color_val0, double color_val1, double color_val2, double color_val3);
+
+ // C++: void polylines(Mat& img, vector_vector_Point pts, bool isClosed, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+ private static native void polylines_0(long img_nativeObj, long pts_mat_nativeObj, boolean isClosed, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType, int shift);
+ private static native void polylines_1(long img_nativeObj, long pts_mat_nativeObj, boolean isClosed, double color_val0, double color_val1, double color_val2, double color_val3, int thickness);
+ private static native void polylines_2(long img_nativeObj, long pts_mat_nativeObj, boolean isClosed, double color_val0, double color_val1, double color_val2, double color_val3);
+
+ // C++: void drawContours(Mat& image, vector_vector_Point contours, int contourIdx, Scalar color, int thickness = 1, int lineType = LINE_8, Mat hierarchy = Mat(), int maxLevel = INT_MAX, Point offset = Point())
+ private static native void drawContours_0(long image_nativeObj, long contours_mat_nativeObj, int contourIdx, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType, long hierarchy_nativeObj, int maxLevel, double offset_x, double offset_y);
+ private static native void drawContours_1(long image_nativeObj, long contours_mat_nativeObj, int contourIdx, double color_val0, double color_val1, double color_val2, double color_val3, int thickness);
+ private static native void drawContours_2(long image_nativeObj, long contours_mat_nativeObj, int contourIdx, double color_val0, double color_val1, double color_val2, double color_val3);
+
+ // C++: bool clipLine(Rect imgRect, Point& pt1, Point& pt2)
+ private static native boolean clipLine_0(int imgRect_x, int imgRect_y, int imgRect_width, int imgRect_height, double pt1_x, double pt1_y, double[] pt1_out, double pt2_x, double pt2_y, double[] pt2_out);
+
+ // C++: void ellipse2Poly(Point center, Size axes, int angle, int arcStart, int arcEnd, int delta, vector_Point& pts)
+ private static native void ellipse2Poly_0(double center_x, double center_y, double axes_width, double axes_height, int angle, int arcStart, int arcEnd, int delta, long pts_mat_nativeObj);
+
+ // C++: void putText(Mat& img, String text, Point org, int fontFace, double fontScale, Scalar color, int thickness = 1, int lineType = LINE_8, bool bottomLeftOrigin = false)
+ private static native void putText_0(long img_nativeObj, String text, double org_x, double org_y, int fontFace, double fontScale, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType, boolean bottomLeftOrigin);
+ private static native void putText_1(long img_nativeObj, String text, double org_x, double org_y, int fontFace, double fontScale, double color_val0, double color_val1, double color_val2, double color_val3, int thickness);
+ private static native void putText_2(long img_nativeObj, String text, double org_x, double org_y, int fontFace, double fontScale, double color_val0, double color_val1, double color_val2, double color_val3);
+ private static native double[] n_getTextSize(String text, int fontFace, double fontScale, int thickness, int[] baseLine);
+
+}
diff --git a/modules/java/src/imgproc+LineSegmentDetector.java b/modules/java/src/imgproc+LineSegmentDetector.java
new file mode 100644
index 0000000..689164e
--- /dev/null
+++ b/modules/java/src/imgproc+LineSegmentDetector.java
@@ -0,0 +1,99 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.imgproc;
+
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+import org.opencv.core.Size;
+
+// C++: class LineSegmentDetector
+//javadoc: LineSegmentDetector
+public class LineSegmentDetector extends Algorithm {
+
+ protected LineSegmentDetector(long addr) { super(addr); }
+
+
+ //
+ // C++: void detect(Mat _image, Mat& _lines, Mat& width = Mat(), Mat& prec = Mat(), Mat& nfa = Mat())
+ //
+
+ //javadoc: LineSegmentDetector::detect(_image, _lines, width, prec, nfa)
+ public void detect(Mat _image, Mat _lines, Mat width, Mat prec, Mat nfa)
+ {
+
+ detect_0(nativeObj, _image.nativeObj, _lines.nativeObj, width.nativeObj, prec.nativeObj, nfa.nativeObj);
+
+ return;
+ }
+
+ //javadoc: LineSegmentDetector::detect(_image, _lines)
+ public void detect(Mat _image, Mat _lines)
+ {
+
+ detect_1(nativeObj, _image.nativeObj, _lines.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void drawSegments(Mat& _image, Mat lines)
+ //
+
+ //javadoc: LineSegmentDetector::drawSegments(_image, lines)
+ public void drawSegments(Mat _image, Mat lines)
+ {
+
+ drawSegments_0(nativeObj, _image.nativeObj, lines.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: int compareSegments(Size size, Mat lines1, Mat lines2, Mat& _image = Mat())
+ //
+
+ //javadoc: LineSegmentDetector::compareSegments(size, lines1, lines2, _image)
+ public int compareSegments(Size size, Mat lines1, Mat lines2, Mat _image)
+ {
+
+ int retVal = compareSegments_0(nativeObj, size.width, size.height, lines1.nativeObj, lines2.nativeObj, _image.nativeObj);
+
+ return retVal;
+ }
+
+ //javadoc: LineSegmentDetector::compareSegments(size, lines1, lines2)
+ public int compareSegments(Size size, Mat lines1, Mat lines2)
+ {
+
+ int retVal = compareSegments_1(nativeObj, size.width, size.height, lines1.nativeObj, lines2.nativeObj);
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void detect(Mat _image, Mat& _lines, Mat& width = Mat(), Mat& prec = Mat(), Mat& nfa = Mat())
+ private static native void detect_0(long nativeObj, long _image_nativeObj, long _lines_nativeObj, long width_nativeObj, long prec_nativeObj, long nfa_nativeObj);
+ private static native void detect_1(long nativeObj, long _image_nativeObj, long _lines_nativeObj);
+
+ // C++: void drawSegments(Mat& _image, Mat lines)
+ private static native void drawSegments_0(long nativeObj, long _image_nativeObj, long lines_nativeObj);
+
+ // C++: int compareSegments(Size size, Mat lines1, Mat lines2, Mat& _image = Mat())
+ private static native int compareSegments_0(long nativeObj, double size_width, double size_height, long lines1_nativeObj, long lines2_nativeObj, long _image_nativeObj);
+ private static native int compareSegments_1(long nativeObj, double size_width, double size_height, long lines1_nativeObj, long lines2_nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/imgproc+Subdiv2D.java b/modules/java/src/imgproc+Subdiv2D.java
new file mode 100644
index 0000000..4bddb2a
--- /dev/null
+++ b/modules/java/src/imgproc+Subdiv2D.java
@@ -0,0 +1,386 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.imgproc;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfFloat4;
+import org.opencv.core.MatOfFloat6;
+import org.opencv.core.MatOfInt;
+import org.opencv.core.MatOfPoint2f;
+import org.opencv.core.Point;
+import org.opencv.core.Rect;
+import org.opencv.utils.Converters;
+
+// C++: class Subdiv2D
+//javadoc: Subdiv2D
+public class Subdiv2D {
+
+ protected final long nativeObj;
+ protected Subdiv2D(long addr) { nativeObj = addr; }
+
+
+ public static final int
+ PTLOC_ERROR = -2,
+ PTLOC_OUTSIDE_RECT = -1,
+ PTLOC_INSIDE = 0,
+ PTLOC_VERTEX = 1,
+ PTLOC_ON_EDGE = 2,
+ NEXT_AROUND_ORG = 0x00,
+ NEXT_AROUND_DST = 0x22,
+ PREV_AROUND_ORG = 0x11,
+ PREV_AROUND_DST = 0x33,
+ NEXT_AROUND_LEFT = 0x13,
+ NEXT_AROUND_RIGHT = 0x31,
+ PREV_AROUND_LEFT = 0x20,
+ PREV_AROUND_RIGHT = 0x02;
+
+
+ //
+ // C++: Subdiv2D()
+ //
+
+ //javadoc: Subdiv2D::Subdiv2D()
+ public Subdiv2D()
+ {
+
+ nativeObj = Subdiv2D_0();
+
+ return;
+ }
+
+
+ //
+ // C++: Subdiv2D(Rect rect)
+ //
+
+ //javadoc: Subdiv2D::Subdiv2D(rect)
+ public Subdiv2D(Rect rect)
+ {
+
+ nativeObj = Subdiv2D_1(rect.x, rect.y, rect.width, rect.height);
+
+ return;
+ }
+
+
+ //
+ // C++: void getTriangleList(vector_Vec6f& triangleList)
+ //
+
+ //javadoc: Subdiv2D::getTriangleList(triangleList)
+ public void getTriangleList(MatOfFloat6 triangleList)
+ {
+ Mat triangleList_mat = triangleList;
+ getTriangleList_0(nativeObj, triangleList_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void getVoronoiFacetList(vector_int idx, vector_vector_Point2f& facetList, vector_Point2f& facetCenters)
+ //
+
+ //javadoc: Subdiv2D::getVoronoiFacetList(idx, facetList, facetCenters)
+ public void getVoronoiFacetList(MatOfInt idx, List<MatOfPoint2f> facetList, MatOfPoint2f facetCenters)
+ {
+ Mat idx_mat = idx;
+ Mat facetList_mat = new Mat();
+ Mat facetCenters_mat = facetCenters;
+ getVoronoiFacetList_0(nativeObj, idx_mat.nativeObj, facetList_mat.nativeObj, facetCenters_mat.nativeObj);
+ Converters.Mat_to_vector_vector_Point2f(facetList_mat, facetList);
+ facetList_mat.release();
+ return;
+ }
+
+
+ //
+ // C++: Point2f getVertex(int vertex, int* firstEdge = 0)
+ //
+
+ //javadoc: Subdiv2D::getVertex(vertex, firstEdge)
+ public Point getVertex(int vertex, int[] firstEdge)
+ {
+ double[] firstEdge_out = new double[1];
+ Point retVal = new Point(getVertex_0(nativeObj, vertex, firstEdge_out));
+ if(firstEdge!=null) firstEdge[0] = (int)firstEdge_out[0];
+ return retVal;
+ }
+
+ //javadoc: Subdiv2D::getVertex(vertex)
+ public Point getVertex(int vertex)
+ {
+
+ Point retVal = new Point(getVertex_1(nativeObj, vertex));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getEdge(int edge, int nextEdgeType)
+ //
+
+ //javadoc: Subdiv2D::getEdge(edge, nextEdgeType)
+ public int getEdge(int edge, int nextEdgeType)
+ {
+
+ int retVal = getEdge_0(nativeObj, edge, nextEdgeType);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int nextEdge(int edge)
+ //
+
+ //javadoc: Subdiv2D::nextEdge(edge)
+ public int nextEdge(int edge)
+ {
+
+ int retVal = nextEdge_0(nativeObj, edge);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int rotateEdge(int edge, int rotate)
+ //
+
+ //javadoc: Subdiv2D::rotateEdge(edge, rotate)
+ public int rotateEdge(int edge, int rotate)
+ {
+
+ int retVal = rotateEdge_0(nativeObj, edge, rotate);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int symEdge(int edge)
+ //
+
+ //javadoc: Subdiv2D::symEdge(edge)
+ public int symEdge(int edge)
+ {
+
+ int retVal = symEdge_0(nativeObj, edge);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int edgeOrg(int edge, Point2f* orgpt = 0)
+ //
+
+ //javadoc: Subdiv2D::edgeOrg(edge, orgpt)
+ public int edgeOrg(int edge, Point orgpt)
+ {
+ double[] orgpt_out = new double[2];
+ int retVal = edgeOrg_0(nativeObj, edge, orgpt_out);
+ if(orgpt!=null){ orgpt.x = orgpt_out[0]; orgpt.y = orgpt_out[1]; }
+ return retVal;
+ }
+
+ //javadoc: Subdiv2D::edgeOrg(edge)
+ public int edgeOrg(int edge)
+ {
+
+ int retVal = edgeOrg_1(nativeObj, edge);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int edgeDst(int edge, Point2f* dstpt = 0)
+ //
+
+ //javadoc: Subdiv2D::edgeDst(edge, dstpt)
+ public int edgeDst(int edge, Point dstpt)
+ {
+ double[] dstpt_out = new double[2];
+ int retVal = edgeDst_0(nativeObj, edge, dstpt_out);
+ if(dstpt!=null){ dstpt.x = dstpt_out[0]; dstpt.y = dstpt_out[1]; }
+ return retVal;
+ }
+
+ //javadoc: Subdiv2D::edgeDst(edge)
+ public int edgeDst(int edge)
+ {
+
+ int retVal = edgeDst_1(nativeObj, edge);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void initDelaunay(Rect rect)
+ //
+
+ //javadoc: Subdiv2D::initDelaunay(rect)
+ public void initDelaunay(Rect rect)
+ {
+
+ initDelaunay_0(nativeObj, rect.x, rect.y, rect.width, rect.height);
+
+ return;
+ }
+
+
+ //
+ // C++: int insert(Point2f pt)
+ //
+
+ //javadoc: Subdiv2D::insert(pt)
+ public int insert(Point pt)
+ {
+
+ int retVal = insert_0(nativeObj, pt.x, pt.y);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void insert(vector_Point2f ptvec)
+ //
+
+ //javadoc: Subdiv2D::insert(ptvec)
+ public void insert(MatOfPoint2f ptvec)
+ {
+ Mat ptvec_mat = ptvec;
+ insert_1(nativeObj, ptvec_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: int locate(Point2f pt, int& edge, int& vertex)
+ //
+
+ //javadoc: Subdiv2D::locate(pt, edge, vertex)
+ public int locate(Point pt, int[] edge, int[] vertex)
+ {
+ double[] edge_out = new double[1];
+ double[] vertex_out = new double[1];
+ int retVal = locate_0(nativeObj, pt.x, pt.y, edge_out, vertex_out);
+ if(edge!=null) edge[0] = (int)edge_out[0];
+ if(vertex!=null) vertex[0] = (int)vertex_out[0];
+ return retVal;
+ }
+
+
+ //
+ // C++: int findNearest(Point2f pt, Point2f* nearestPt = 0)
+ //
+
+ //javadoc: Subdiv2D::findNearest(pt, nearestPt)
+ public int findNearest(Point pt, Point nearestPt)
+ {
+ double[] nearestPt_out = new double[2];
+ int retVal = findNearest_0(nativeObj, pt.x, pt.y, nearestPt_out);
+ if(nearestPt!=null){ nearestPt.x = nearestPt_out[0]; nearestPt.y = nearestPt_out[1]; }
+ return retVal;
+ }
+
+ //javadoc: Subdiv2D::findNearest(pt)
+ public int findNearest(Point pt)
+ {
+
+ int retVal = findNearest_1(nativeObj, pt.x, pt.y);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void getEdgeList(vector_Vec4f& edgeList)
+ //
+
+ //javadoc: Subdiv2D::getEdgeList(edgeList)
+ public void getEdgeList(MatOfFloat4 edgeList)
+ {
+ Mat edgeList_mat = edgeList;
+ getEdgeList_0(nativeObj, edgeList_mat.nativeObj);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: Subdiv2D()
+ private static native long Subdiv2D_0();
+
+ // C++: Subdiv2D(Rect rect)
+ private static native long Subdiv2D_1(int rect_x, int rect_y, int rect_width, int rect_height);
+
+ // C++: void getTriangleList(vector_Vec6f& triangleList)
+ private static native void getTriangleList_0(long nativeObj, long triangleList_mat_nativeObj);
+
+ // C++: void getVoronoiFacetList(vector_int idx, vector_vector_Point2f& facetList, vector_Point2f& facetCenters)
+ private static native void getVoronoiFacetList_0(long nativeObj, long idx_mat_nativeObj, long facetList_mat_nativeObj, long facetCenters_mat_nativeObj);
+
+ // C++: Point2f getVertex(int vertex, int* firstEdge = 0)
+ private static native double[] getVertex_0(long nativeObj, int vertex, double[] firstEdge_out);
+ private static native double[] getVertex_1(long nativeObj, int vertex);
+
+ // C++: int getEdge(int edge, int nextEdgeType)
+ private static native int getEdge_0(long nativeObj, int edge, int nextEdgeType);
+
+ // C++: int nextEdge(int edge)
+ private static native int nextEdge_0(long nativeObj, int edge);
+
+ // C++: int rotateEdge(int edge, int rotate)
+ private static native int rotateEdge_0(long nativeObj, int edge, int rotate);
+
+ // C++: int symEdge(int edge)
+ private static native int symEdge_0(long nativeObj, int edge);
+
+ // C++: int edgeOrg(int edge, Point2f* orgpt = 0)
+ private static native int edgeOrg_0(long nativeObj, int edge, double[] orgpt_out);
+ private static native int edgeOrg_1(long nativeObj, int edge);
+
+ // C++: int edgeDst(int edge, Point2f* dstpt = 0)
+ private static native int edgeDst_0(long nativeObj, int edge, double[] dstpt_out);
+ private static native int edgeDst_1(long nativeObj, int edge);
+
+ // C++: void initDelaunay(Rect rect)
+ private static native void initDelaunay_0(long nativeObj, int rect_x, int rect_y, int rect_width, int rect_height);
+
+ // C++: int insert(Point2f pt)
+ private static native int insert_0(long nativeObj, double pt_x, double pt_y);
+
+ // C++: void insert(vector_Point2f ptvec)
+ private static native void insert_1(long nativeObj, long ptvec_mat_nativeObj);
+
+ // C++: int locate(Point2f pt, int& edge, int& vertex)
+ private static native int locate_0(long nativeObj, double pt_x, double pt_y, double[] edge_out, double[] vertex_out);
+
+ // C++: int findNearest(Point2f pt, Point2f* nearestPt = 0)
+ private static native int findNearest_0(long nativeObj, double pt_x, double pt_y, double[] nearestPt_out);
+ private static native int findNearest_1(long nativeObj, double pt_x, double pt_y);
+
+ // C++: void getEdgeList(vector_Vec4f& edgeList)
+ private static native void getEdgeList_0(long nativeObj, long edgeList_mat_nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/imgproc.cpp b/modules/java/src/imgproc.cpp
new file mode 100644
index 0000000..5f6954d
--- /dev/null
+++ b/modules/java/src/imgproc.cpp
@@ -0,0 +1,6239 @@
+
+//
+// This file is auto-generated, please don't edit!
+//
+
+#define LOG_TAG "org.opencv.imgproc"
+
+#include "common.h"
+
+#include "opencv2/opencv_modules.hpp"
+#ifdef HAVE_OPENCV_IMGPROC
+
+#include <string>
+
+#include "opencv2/imgproc.hpp"
+
+#include "../../imgproc/include/opencv2/imgproc/types_c.h"
+#include "../../imgproc/include/opencv2/imgproc.hpp"
+
+using namespace cv;
+
+/// throw java exception
+static void throwJavaException(JNIEnv *env, const std::exception *e, const char *method) {
+ std::string what = "unknown exception";
+ jclass je = 0;
+
+ if(e) {
+ std::string exception_type = "std::exception";
+
+ if(dynamic_cast<const cv::Exception*>(e)) {
+ exception_type = "cv::Exception";
+ je = env->FindClass("org/opencv/core/CvException");
+ }
+
+ what = exception_type + ": " + e->what();
+ }
+
+ if(!je) je = env->FindClass("java/lang/Exception");
+ env->ThrowNew(je, what.c_str());
+
+ LOGE("%s caught %s", method, what.c_str());
+ (void)method; // avoid "unused" warning
+}
+
+
+extern "C" {
+
+
+//
+// void detect(Mat _image, Mat& _lines, Mat& width = Mat(), Mat& prec = Mat(), Mat& nfa = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_LineSegmentDetector_detect_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_LineSegmentDetector_detect_10
+ (JNIEnv* env, jclass , jlong self, jlong _image_nativeObj, jlong _lines_nativeObj, jlong width_nativeObj, jlong prec_nativeObj, jlong nfa_nativeObj)
+{
+ static const char method_name[] = "imgproc::detect_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::LineSegmentDetector>* me = (Ptr<cv::LineSegmentDetector>*) self; //TODO: check for NULL
+ Mat& _image = *((Mat*)_image_nativeObj);
+ Mat& _lines = *((Mat*)_lines_nativeObj);
+ Mat& width = *((Mat*)width_nativeObj);
+ Mat& prec = *((Mat*)prec_nativeObj);
+ Mat& nfa = *((Mat*)nfa_nativeObj);
+ (*me)->detect( _image, _lines, width, prec, nfa );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_LineSegmentDetector_detect_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_LineSegmentDetector_detect_11
+ (JNIEnv* env, jclass , jlong self, jlong _image_nativeObj, jlong _lines_nativeObj)
+{
+ static const char method_name[] = "imgproc::detect_11()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::LineSegmentDetector>* me = (Ptr<cv::LineSegmentDetector>*) self; //TODO: check for NULL
+ Mat& _image = *((Mat*)_image_nativeObj);
+ Mat& _lines = *((Mat*)_lines_nativeObj);
+ (*me)->detect( _image, _lines );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void drawSegments(Mat& _image, Mat lines)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_LineSegmentDetector_drawSegments_10 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_LineSegmentDetector_drawSegments_10
+ (JNIEnv* env, jclass , jlong self, jlong _image_nativeObj, jlong lines_nativeObj)
+{
+ static const char method_name[] = "imgproc::drawSegments_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::LineSegmentDetector>* me = (Ptr<cv::LineSegmentDetector>*) self; //TODO: check for NULL
+ Mat& _image = *((Mat*)_image_nativeObj);
+ Mat& lines = *((Mat*)lines_nativeObj);
+ (*me)->drawSegments( _image, lines );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int compareSegments(Size size, Mat lines1, Mat lines2, Mat& _image = Mat())
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_LineSegmentDetector_compareSegments_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jlong, jlong, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_LineSegmentDetector_compareSegments_10
+ (JNIEnv* env, jclass , jlong self, jdouble size_width, jdouble size_height, jlong lines1_nativeObj, jlong lines2_nativeObj, jlong _image_nativeObj)
+{
+ static const char method_name[] = "imgproc::compareSegments_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::LineSegmentDetector>* me = (Ptr<cv::LineSegmentDetector>*) self; //TODO: check for NULL
+ Size size((int)size_width, (int)size_height);
+ Mat& lines1 = *((Mat*)lines1_nativeObj);
+ Mat& lines2 = *((Mat*)lines2_nativeObj);
+ Mat& _image = *((Mat*)_image_nativeObj);
+ int _retval_ = (*me)->compareSegments( size, lines1, lines2, _image );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_LineSegmentDetector_compareSegments_11 (JNIEnv*, jclass, jlong, jdouble, jdouble, jlong, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_LineSegmentDetector_compareSegments_11
+ (JNIEnv* env, jclass , jlong self, jdouble size_width, jdouble size_height, jlong lines1_nativeObj, jlong lines2_nativeObj)
+{
+ static const char method_name[] = "imgproc::compareSegments_11()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::LineSegmentDetector>* me = (Ptr<cv::LineSegmentDetector>*) self; //TODO: check for NULL
+ Size size((int)size_width, (int)size_height);
+ Mat& lines1 = *((Mat*)lines1_nativeObj);
+ Mat& lines2 = *((Mat*)lines2_nativeObj);
+ int _retval_ = (*me)->compareSegments( size, lines1, lines2 );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::LineSegmentDetector>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_LineSegmentDetector_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_LineSegmentDetector_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::LineSegmentDetector>*) self;
+}
+
+
+//
+// Subdiv2D()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Subdiv2D_Subdiv2D_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Subdiv2D_Subdiv2D_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "imgproc::Subdiv2D_10()";
+ try {
+ LOGD("%s", method_name);
+
+ cv::Subdiv2D* _retval_ = new cv::Subdiv2D( );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Subdiv2D(Rect rect)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Subdiv2D_Subdiv2D_11 (JNIEnv*, jclass, jint, jint, jint, jint);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Subdiv2D_Subdiv2D_11
+ (JNIEnv* env, jclass , jint rect_x, jint rect_y, jint rect_width, jint rect_height)
+{
+ static const char method_name[] = "imgproc::Subdiv2D_11()";
+ try {
+ LOGD("%s", method_name);
+ Rect rect(rect_x, rect_y, rect_width, rect_height);
+ cv::Subdiv2D* _retval_ = new cv::Subdiv2D( rect );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void getTriangleList(vector_Vec6f& triangleList)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Subdiv2D_getTriangleList_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Subdiv2D_getTriangleList_10
+ (JNIEnv* env, jclass , jlong self, jlong triangleList_mat_nativeObj)
+{
+ static const char method_name[] = "imgproc::getTriangleList_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Vec6f> triangleList;
+ Mat& triangleList_mat = *((Mat*)triangleList_mat_nativeObj);
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ me->getTriangleList( triangleList );
+ vector_Vec6f_to_Mat( triangleList, triangleList_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void getVoronoiFacetList(vector_int idx, vector_vector_Point2f& facetList, vector_Point2f& facetCenters)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Subdiv2D_getVoronoiFacetList_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Subdiv2D_getVoronoiFacetList_10
+ (JNIEnv* env, jclass , jlong self, jlong idx_mat_nativeObj, jlong facetList_mat_nativeObj, jlong facetCenters_mat_nativeObj)
+{
+ static const char method_name[] = "imgproc::getVoronoiFacetList_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<int> idx;
+ Mat& idx_mat = *((Mat*)idx_mat_nativeObj);
+ Mat_to_vector_int( idx_mat, idx );
+ std::vector< std::vector<Point2f> > facetList;
+ Mat& facetList_mat = *((Mat*)facetList_mat_nativeObj);
+ std::vector<Point2f> facetCenters;
+ Mat& facetCenters_mat = *((Mat*)facetCenters_mat_nativeObj);
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ me->getVoronoiFacetList( idx, facetList, facetCenters );
+ vector_vector_Point2f_to_Mat( facetList, facetList_mat ); vector_Point2f_to_Mat( facetCenters, facetCenters_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Point2f getVertex(int vertex, int* firstEdge = 0)
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Subdiv2D_getVertex_10 (JNIEnv*, jclass, jlong, jint, jdoubleArray);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Subdiv2D_getVertex_10
+ (JNIEnv* env, jclass , jlong self, jint vertex, jdoubleArray firstEdge_out)
+{
+ static const char method_name[] = "imgproc::getVertex_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ int firstEdge;
+ Point2f _retval_ = me->getVertex( (int)vertex, &firstEdge );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(2); jdouble _tmp_retval_[2] = {_retval_.x, _retval_.y}; env->SetDoubleArrayRegion(_da_retval_, 0, 2, _tmp_retval_); jdouble tmp_firstEdge[1] = {firstEdge}; env->SetDoubleArrayRegion(firstEdge_out, 0, 1, tmp_firstEdge);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Subdiv2D_getVertex_11 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Subdiv2D_getVertex_11
+ (JNIEnv* env, jclass , jlong self, jint vertex)
+{
+ static const char method_name[] = "imgproc::getVertex_11()";
+ try {
+ LOGD("%s", method_name);
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ Point2f _retval_ = me->getVertex( (int)vertex );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(2); jdouble _tmp_retval_[2] = {_retval_.x, _retval_.y}; env->SetDoubleArrayRegion(_da_retval_, 0, 2, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int getEdge(int edge, int nextEdgeType)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_getEdge_10 (JNIEnv*, jclass, jlong, jint, jint);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_getEdge_10
+ (JNIEnv* env, jclass , jlong self, jint edge, jint nextEdgeType)
+{
+ static const char method_name[] = "imgproc::getEdge_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ int _retval_ = me->getEdge( (int)edge, (int)nextEdgeType );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int nextEdge(int edge)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_nextEdge_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_nextEdge_10
+ (JNIEnv* env, jclass , jlong self, jint edge)
+{
+ static const char method_name[] = "imgproc::nextEdge_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ int _retval_ = me->nextEdge( (int)edge );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int rotateEdge(int edge, int rotate)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_rotateEdge_10 (JNIEnv*, jclass, jlong, jint, jint);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_rotateEdge_10
+ (JNIEnv* env, jclass , jlong self, jint edge, jint rotate)
+{
+ static const char method_name[] = "imgproc::rotateEdge_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ int _retval_ = me->rotateEdge( (int)edge, (int)rotate );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int symEdge(int edge)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_symEdge_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_symEdge_10
+ (JNIEnv* env, jclass , jlong self, jint edge)
+{
+ static const char method_name[] = "imgproc::symEdge_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ int _retval_ = me->symEdge( (int)edge );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int edgeOrg(int edge, Point2f* orgpt = 0)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_edgeOrg_10 (JNIEnv*, jclass, jlong, jint, jdoubleArray);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_edgeOrg_10
+ (JNIEnv* env, jclass , jlong self, jint edge, jdoubleArray orgpt_out)
+{
+ static const char method_name[] = "imgproc::edgeOrg_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ Point2f orgpt;
+ int _retval_ = me->edgeOrg( (int)edge, &orgpt );
+ jdouble tmp_orgpt[2] = {orgpt.x, orgpt.y}; env->SetDoubleArrayRegion(orgpt_out, 0, 2, tmp_orgpt);
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_edgeOrg_11 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_edgeOrg_11
+ (JNIEnv* env, jclass , jlong self, jint edge)
+{
+ static const char method_name[] = "imgproc::edgeOrg_11()";
+ try {
+ LOGD("%s", method_name);
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ int _retval_ = me->edgeOrg( (int)edge );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int edgeDst(int edge, Point2f* dstpt = 0)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_edgeDst_10 (JNIEnv*, jclass, jlong, jint, jdoubleArray);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_edgeDst_10
+ (JNIEnv* env, jclass , jlong self, jint edge, jdoubleArray dstpt_out)
+{
+ static const char method_name[] = "imgproc::edgeDst_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ Point2f dstpt;
+ int _retval_ = me->edgeDst( (int)edge, &dstpt );
+ jdouble tmp_dstpt[2] = {dstpt.x, dstpt.y}; env->SetDoubleArrayRegion(dstpt_out, 0, 2, tmp_dstpt);
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_edgeDst_11 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_edgeDst_11
+ (JNIEnv* env, jclass , jlong self, jint edge)
+{
+ static const char method_name[] = "imgproc::edgeDst_11()";
+ try {
+ LOGD("%s", method_name);
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ int _retval_ = me->edgeDst( (int)edge );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void initDelaunay(Rect rect)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Subdiv2D_initDelaunay_10 (JNIEnv*, jclass, jlong, jint, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Subdiv2D_initDelaunay_10
+ (JNIEnv* env, jclass , jlong self, jint rect_x, jint rect_y, jint rect_width, jint rect_height)
+{
+ static const char method_name[] = "imgproc::initDelaunay_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ Rect rect(rect_x, rect_y, rect_width, rect_height);
+ me->initDelaunay( rect );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int insert(Point2f pt)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_insert_10 (JNIEnv*, jclass, jlong, jdouble, jdouble);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_insert_10
+ (JNIEnv* env, jclass , jlong self, jdouble pt_x, jdouble pt_y)
+{
+ static const char method_name[] = "imgproc::insert_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ Point2f pt((float)pt_x, (float)pt_y);
+ int _retval_ = me->insert( pt );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void insert(vector_Point2f ptvec)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Subdiv2D_insert_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Subdiv2D_insert_11
+ (JNIEnv* env, jclass , jlong self, jlong ptvec_mat_nativeObj)
+{
+ static const char method_name[] = "imgproc::insert_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> ptvec;
+ Mat& ptvec_mat = *((Mat*)ptvec_mat_nativeObj);
+ Mat_to_vector_Point2f( ptvec_mat, ptvec );
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ me->insert( ptvec );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int locate(Point2f pt, int& edge, int& vertex)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_locate_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdoubleArray, jdoubleArray);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_locate_10
+ (JNIEnv* env, jclass , jlong self, jdouble pt_x, jdouble pt_y, jdoubleArray edge_out, jdoubleArray vertex_out)
+{
+ static const char method_name[] = "imgproc::locate_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ Point2f pt((float)pt_x, (float)pt_y);
+ int edge;
+ int vertex;
+ int _retval_ = me->locate( pt, edge, vertex );
+ jdouble tmp_edge[1] = {edge}; env->SetDoubleArrayRegion(edge_out, 0, 1, tmp_edge); jdouble tmp_vertex[1] = {vertex}; env->SetDoubleArrayRegion(vertex_out, 0, 1, tmp_vertex);
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int findNearest(Point2f pt, Point2f* nearestPt = 0)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_findNearest_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdoubleArray);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_findNearest_10
+ (JNIEnv* env, jclass , jlong self, jdouble pt_x, jdouble pt_y, jdoubleArray nearestPt_out)
+{
+ static const char method_name[] = "imgproc::findNearest_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ Point2f pt((float)pt_x, (float)pt_y);
+ Point2f nearestPt;
+ int _retval_ = me->findNearest( pt, &nearestPt );
+ jdouble tmp_nearestPt[2] = {nearestPt.x, nearestPt.y}; env->SetDoubleArrayRegion(nearestPt_out, 0, 2, tmp_nearestPt);
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_findNearest_11 (JNIEnv*, jclass, jlong, jdouble, jdouble);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Subdiv2D_findNearest_11
+ (JNIEnv* env, jclass , jlong self, jdouble pt_x, jdouble pt_y)
+{
+ static const char method_name[] = "imgproc::findNearest_11()";
+ try {
+ LOGD("%s", method_name);
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ Point2f pt((float)pt_x, (float)pt_y);
+ int _retval_ = me->findNearest( pt );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void getEdgeList(vector_Vec4f& edgeList)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Subdiv2D_getEdgeList_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Subdiv2D_getEdgeList_10
+ (JNIEnv* env, jclass , jlong self, jlong edgeList_mat_nativeObj)
+{
+ static const char method_name[] = "imgproc::getEdgeList_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Vec4f> edgeList;
+ Mat& edgeList_mat = *((Mat*)edgeList_mat_nativeObj);
+ cv::Subdiv2D* me = (cv::Subdiv2D*) self; //TODO: check for NULL
+ me->getEdgeList( edgeList );
+ vector_Vec4f_to_Mat( edgeList, edgeList_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void cv::Subdiv2D::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Subdiv2D_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Subdiv2D_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (cv::Subdiv2D*) self;
+}
+
+
+//
+// void remap(Mat src, Mat& dst, Mat map1, Mat map2, int interpolation, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_remap_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jint, jint, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_remap_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong map1_nativeObj, jlong map2_nativeObj, jint interpolation, jint borderMode, jdouble borderValue_val0, jdouble borderValue_val1, jdouble borderValue_val2, jdouble borderValue_val3)
+{
+ static const char method_name[] = "imgproc::remap_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& map1 = *((Mat*)map1_nativeObj);
+ Mat& map2 = *((Mat*)map2_nativeObj);
+ Scalar borderValue(borderValue_val0, borderValue_val1, borderValue_val2, borderValue_val3);
+ cv::remap( src, dst, map1, map2, (int)interpolation, (int)borderMode, borderValue );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_remap_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_remap_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong map1_nativeObj, jlong map2_nativeObj, jint interpolation)
+{
+ static const char method_name[] = "imgproc::remap_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& map1 = *((Mat*)map1_nativeObj);
+ Mat& map2 = *((Mat*)map2_nativeObj);
+ cv::remap( src, dst, map1, map2, (int)interpolation );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void convertMaps(Mat map1, Mat map2, Mat& dstmap1, Mat& dstmap2, int dstmap1type, bool nninterpolation = false)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_convertMaps_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jint, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_convertMaps_10
+ (JNIEnv* env, jclass , jlong map1_nativeObj, jlong map2_nativeObj, jlong dstmap1_nativeObj, jlong dstmap2_nativeObj, jint dstmap1type, jboolean nninterpolation)
+{
+ static const char method_name[] = "imgproc::convertMaps_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& map1 = *((Mat*)map1_nativeObj);
+ Mat& map2 = *((Mat*)map2_nativeObj);
+ Mat& dstmap1 = *((Mat*)dstmap1_nativeObj);
+ Mat& dstmap2 = *((Mat*)dstmap2_nativeObj);
+ cv::convertMaps( map1, map2, dstmap1, dstmap2, (int)dstmap1type, (bool)nninterpolation );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_convertMaps_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_convertMaps_11
+ (JNIEnv* env, jclass , jlong map1_nativeObj, jlong map2_nativeObj, jlong dstmap1_nativeObj, jlong dstmap2_nativeObj, jint dstmap1type)
+{
+ static const char method_name[] = "imgproc::convertMaps_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& map1 = *((Mat*)map1_nativeObj);
+ Mat& map2 = *((Mat*)map2_nativeObj);
+ Mat& dstmap1 = *((Mat*)dstmap1_nativeObj);
+ Mat& dstmap2 = *((Mat*)dstmap2_nativeObj);
+ cv::convertMaps( map1, map2, dstmap1, dstmap2, (int)dstmap1type );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat getRotationMatrix2D(Point2f center, double angle, double scale)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getRotationMatrix2D_10 (JNIEnv*, jclass, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getRotationMatrix2D_10
+ (JNIEnv* env, jclass , jdouble center_x, jdouble center_y, jdouble angle, jdouble scale)
+{
+ static const char method_name[] = "imgproc::getRotationMatrix2D_10()";
+ try {
+ LOGD("%s", method_name);
+ Point2f center((float)center_x, (float)center_y);
+ ::Mat _retval_ = cv::getRotationMatrix2D( center, (double)angle, (double)scale );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void invertAffineTransform(Mat M, Mat& iM)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_invertAffineTransform_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_invertAffineTransform_10
+ (JNIEnv* env, jclass , jlong M_nativeObj, jlong iM_nativeObj)
+{
+ static const char method_name[] = "imgproc::invertAffineTransform_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& M = *((Mat*)M_nativeObj);
+ Mat& iM = *((Mat*)iM_nativeObj);
+ cv::invertAffineTransform( M, iM );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat getPerspectiveTransform(Mat src, Mat dst)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getPerspectiveTransform_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getPerspectiveTransform_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "imgproc::getPerspectiveTransform_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ ::Mat _retval_ = cv::getPerspectiveTransform( src, dst );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getAffineTransform(vector_Point2f src, vector_Point2f dst)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getAffineTransform_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getAffineTransform_10
+ (JNIEnv* env, jclass , jlong src_mat_nativeObj, jlong dst_mat_nativeObj)
+{
+ static const char method_name[] = "imgproc::getAffineTransform_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> src;
+ Mat& src_mat = *((Mat*)src_mat_nativeObj);
+ Mat_to_vector_Point2f( src_mat, src );
+ std::vector<Point2f> dst;
+ Mat& dst_mat = *((Mat*)dst_mat_nativeObj);
+ Mat_to_vector_Point2f( dst_mat, dst );
+ ::Mat _retval_ = cv::getAffineTransform( src, dst );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void getRectSubPix(Mat image, Size patchSize, Point2f center, Mat& patch, int patchType = -1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_getRectSubPix_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_getRectSubPix_10
+ (JNIEnv* env, jclass , jlong image_nativeObj, jdouble patchSize_width, jdouble patchSize_height, jdouble center_x, jdouble center_y, jlong patch_nativeObj, jint patchType)
+{
+ static const char method_name[] = "imgproc::getRectSubPix_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Size patchSize((int)patchSize_width, (int)patchSize_height);
+ Point2f center((float)center_x, (float)center_y);
+ Mat& patch = *((Mat*)patch_nativeObj);
+ cv::getRectSubPix( image, patchSize, center, patch, (int)patchType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_getRectSubPix_11 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_getRectSubPix_11
+ (JNIEnv* env, jclass , jlong image_nativeObj, jdouble patchSize_width, jdouble patchSize_height, jdouble center_x, jdouble center_y, jlong patch_nativeObj)
+{
+ static const char method_name[] = "imgproc::getRectSubPix_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Size patchSize((int)patchSize_width, (int)patchSize_height);
+ Point2f center((float)center_x, (float)center_y);
+ Mat& patch = *((Mat*)patch_nativeObj);
+ cv::getRectSubPix( image, patchSize, center, patch );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void logPolar(Mat src, Mat& dst, Point2f center, double M, int flags)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_logPolar_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_logPolar_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble center_x, jdouble center_y, jdouble M, jint flags)
+{
+ static const char method_name[] = "imgproc::logPolar_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Point2f center((float)center_x, (float)center_y);
+ cv::logPolar( src, dst, center, (double)M, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void linearPolar(Mat src, Mat& dst, Point2f center, double maxRadius, int flags)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_linearPolar_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_linearPolar_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble center_x, jdouble center_y, jdouble maxRadius, jint flags)
+{
+ static const char method_name[] = "imgproc::linearPolar_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Point2f center((float)center_x, (float)center_y);
+ cv::linearPolar( src, dst, center, (double)maxRadius, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void integral(Mat src, Mat& sum, int sdepth = -1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_integral_10 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_integral_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong sum_nativeObj, jint sdepth)
+{
+ static const char method_name[] = "imgproc::integral_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& sum = *((Mat*)sum_nativeObj);
+ cv::integral( src, sum, (int)sdepth );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_integral_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_integral_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong sum_nativeObj)
+{
+ static const char method_name[] = "imgproc::integral_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& sum = *((Mat*)sum_nativeObj);
+ cv::integral( src, sum );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void filter2D(Mat src, Mat& dst, int ddepth, Mat kernel, Point anchor = Point(-1,-1), double delta = 0, int borderType = BORDER_DEFAULT)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_filter2D_10 (JNIEnv*, jclass, jlong, jlong, jint, jlong, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_filter2D_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ddepth, jlong kernel_nativeObj, jdouble anchor_x, jdouble anchor_y, jdouble delta, jint borderType)
+{
+ static const char method_name[] = "imgproc::filter2D_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& kernel = *((Mat*)kernel_nativeObj);
+ Point anchor((int)anchor_x, (int)anchor_y);
+ cv::filter2D( src, dst, (int)ddepth, kernel, anchor, (double)delta, (int)borderType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_filter2D_11 (JNIEnv*, jclass, jlong, jlong, jint, jlong, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_filter2D_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ddepth, jlong kernel_nativeObj, jdouble anchor_x, jdouble anchor_y, jdouble delta)
+{
+ static const char method_name[] = "imgproc::filter2D_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& kernel = *((Mat*)kernel_nativeObj);
+ Point anchor((int)anchor_x, (int)anchor_y);
+ cv::filter2D( src, dst, (int)ddepth, kernel, anchor, (double)delta );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_filter2D_12 (JNIEnv*, jclass, jlong, jlong, jint, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_filter2D_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ddepth, jlong kernel_nativeObj)
+{
+ static const char method_name[] = "imgproc::filter2D_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& kernel = *((Mat*)kernel_nativeObj);
+ cv::filter2D( src, dst, (int)ddepth, kernel );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void sepFilter2D(Mat src, Mat& dst, int ddepth, Mat kernelX, Mat kernelY, Point anchor = Point(-1,-1), double delta = 0, int borderType = BORDER_DEFAULT)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_sepFilter2D_10 (JNIEnv*, jclass, jlong, jlong, jint, jlong, jlong, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_sepFilter2D_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ddepth, jlong kernelX_nativeObj, jlong kernelY_nativeObj, jdouble anchor_x, jdouble anchor_y, jdouble delta, jint borderType)
+{
+ static const char method_name[] = "imgproc::sepFilter2D_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& kernelX = *((Mat*)kernelX_nativeObj);
+ Mat& kernelY = *((Mat*)kernelY_nativeObj);
+ Point anchor((int)anchor_x, (int)anchor_y);
+ cv::sepFilter2D( src, dst, (int)ddepth, kernelX, kernelY, anchor, (double)delta, (int)borderType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_sepFilter2D_11 (JNIEnv*, jclass, jlong, jlong, jint, jlong, jlong, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_sepFilter2D_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ddepth, jlong kernelX_nativeObj, jlong kernelY_nativeObj, jdouble anchor_x, jdouble anchor_y, jdouble delta)
+{
+ static const char method_name[] = "imgproc::sepFilter2D_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& kernelX = *((Mat*)kernelX_nativeObj);
+ Mat& kernelY = *((Mat*)kernelY_nativeObj);
+ Point anchor((int)anchor_x, (int)anchor_y);
+ cv::sepFilter2D( src, dst, (int)ddepth, kernelX, kernelY, anchor, (double)delta );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_sepFilter2D_12 (JNIEnv*, jclass, jlong, jlong, jint, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_sepFilter2D_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ddepth, jlong kernelX_nativeObj, jlong kernelY_nativeObj)
+{
+ static const char method_name[] = "imgproc::sepFilter2D_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& kernelX = *((Mat*)kernelX_nativeObj);
+ Mat& kernelY = *((Mat*)kernelY_nativeObj);
+ cv::sepFilter2D( src, dst, (int)ddepth, kernelX, kernelY );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void Sobel(Mat src, Mat& dst, int ddepth, int dx, int dy, int ksize = 3, double scale = 1, double delta = 0, int borderType = BORDER_DEFAULT)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Sobel_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint, jint, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Sobel_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ddepth, jint dx, jint dy, jint ksize, jdouble scale, jdouble delta, jint borderType)
+{
+ static const char method_name[] = "imgproc::Sobel_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::Sobel( src, dst, (int)ddepth, (int)dx, (int)dy, (int)ksize, (double)scale, (double)delta, (int)borderType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Sobel_11 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint, jint, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Sobel_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ddepth, jint dx, jint dy, jint ksize, jdouble scale, jdouble delta)
+{
+ static const char method_name[] = "imgproc::Sobel_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::Sobel( src, dst, (int)ddepth, (int)dx, (int)dy, (int)ksize, (double)scale, (double)delta );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Sobel_12 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Sobel_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ddepth, jint dx, jint dy)
+{
+ static const char method_name[] = "imgproc::Sobel_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::Sobel( src, dst, (int)ddepth, (int)dx, (int)dy );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void Scharr(Mat src, Mat& dst, int ddepth, int dx, int dy, double scale = 1, double delta = 0, int borderType = BORDER_DEFAULT)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Scharr_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Scharr_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ddepth, jint dx, jint dy, jdouble scale, jdouble delta, jint borderType)
+{
+ static const char method_name[] = "imgproc::Scharr_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::Scharr( src, dst, (int)ddepth, (int)dx, (int)dy, (double)scale, (double)delta, (int)borderType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Scharr_11 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Scharr_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ddepth, jint dx, jint dy, jdouble scale, jdouble delta)
+{
+ static const char method_name[] = "imgproc::Scharr_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::Scharr( src, dst, (int)ddepth, (int)dx, (int)dy, (double)scale, (double)delta );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Scharr_12 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Scharr_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ddepth, jint dx, jint dy)
+{
+ static const char method_name[] = "imgproc::Scharr_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::Scharr( src, dst, (int)ddepth, (int)dx, (int)dy );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void Laplacian(Mat src, Mat& dst, int ddepth, int ksize = 1, double scale = 1, double delta = 0, int borderType = BORDER_DEFAULT)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Laplacian_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Laplacian_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ddepth, jint ksize, jdouble scale, jdouble delta, jint borderType)
+{
+ static const char method_name[] = "imgproc::Laplacian_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::Laplacian( src, dst, (int)ddepth, (int)ksize, (double)scale, (double)delta, (int)borderType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Laplacian_11 (JNIEnv*, jclass, jlong, jlong, jint, jint, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Laplacian_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ddepth, jint ksize, jdouble scale, jdouble delta)
+{
+ static const char method_name[] = "imgproc::Laplacian_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::Laplacian( src, dst, (int)ddepth, (int)ksize, (double)scale, (double)delta );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Laplacian_12 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Laplacian_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ddepth)
+{
+ static const char method_name[] = "imgproc::Laplacian_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::Laplacian( src, dst, (int)ddepth );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void Canny(Mat image, Mat& edges, double threshold1, double threshold2, int apertureSize = 3, bool L2gradient = false)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Canny_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Canny_10
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong edges_nativeObj, jdouble threshold1, jdouble threshold2, jint apertureSize, jboolean L2gradient)
+{
+ static const char method_name[] = "imgproc::Canny_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& edges = *((Mat*)edges_nativeObj);
+ cv::Canny( image, edges, (double)threshold1, (double)threshold2, (int)apertureSize, (bool)L2gradient );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Canny_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_Canny_11
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong edges_nativeObj, jdouble threshold1, jdouble threshold2)
+{
+ static const char method_name[] = "imgproc::Canny_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& edges = *((Mat*)edges_nativeObj);
+ cv::Canny( image, edges, (double)threshold1, (double)threshold2 );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void cornerMinEigenVal(Mat src, Mat& dst, int blockSize, int ksize = 3, int borderType = BORDER_DEFAULT)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cornerMinEigenVal_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cornerMinEigenVal_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint blockSize, jint ksize, jint borderType)
+{
+ static const char method_name[] = "imgproc::cornerMinEigenVal_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::cornerMinEigenVal( src, dst, (int)blockSize, (int)ksize, (int)borderType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cornerMinEigenVal_11 (JNIEnv*, jclass, jlong, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cornerMinEigenVal_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint blockSize, jint ksize)
+{
+ static const char method_name[] = "imgproc::cornerMinEigenVal_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::cornerMinEigenVal( src, dst, (int)blockSize, (int)ksize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cornerMinEigenVal_12 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cornerMinEigenVal_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint blockSize)
+{
+ static const char method_name[] = "imgproc::cornerMinEigenVal_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::cornerMinEigenVal( src, dst, (int)blockSize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Ptr_LineSegmentDetector createLineSegmentDetector(int _refine = LSD_REFINE_STD, double _scale = 0.8, double _sigma_scale = 0.6, double _quant = 2.0, double _ang_th = 22.5, double _log_eps = 0, double _density_th = 0.7, int _n_bins = 1024)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_createLineSegmentDetector_10 (JNIEnv*, jclass, jint, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_createLineSegmentDetector_10
+ (JNIEnv* env, jclass , jint _refine, jdouble _scale, jdouble _sigma_scale, jdouble _quant, jdouble _ang_th, jdouble _log_eps, jdouble _density_th, jint _n_bins)
+{
+ static const char method_name[] = "imgproc::createLineSegmentDetector_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::LineSegmentDetector> Ptr_LineSegmentDetector;
+ Ptr_LineSegmentDetector _retval_ = cv::createLineSegmentDetector( (int)_refine, (double)_scale, (double)_sigma_scale, (double)_quant, (double)_ang_th, (double)_log_eps, (double)_density_th, (int)_n_bins );
+ return (jlong)(new Ptr_LineSegmentDetector(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_createLineSegmentDetector_11 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_createLineSegmentDetector_11
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "imgproc::createLineSegmentDetector_11()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::LineSegmentDetector> Ptr_LineSegmentDetector;
+ Ptr_LineSegmentDetector _retval_ = cv::createLineSegmentDetector( );
+ return (jlong)(new Ptr_LineSegmentDetector(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getGaussianKernel(int ksize, double sigma, int ktype = CV_64F)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getGaussianKernel_10 (JNIEnv*, jclass, jint, jdouble, jint);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getGaussianKernel_10
+ (JNIEnv* env, jclass , jint ksize, jdouble sigma, jint ktype)
+{
+ static const char method_name[] = "imgproc::getGaussianKernel_10()";
+ try {
+ LOGD("%s", method_name);
+
+ ::Mat _retval_ = cv::getGaussianKernel( (int)ksize, (double)sigma, (int)ktype );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getGaussianKernel_11 (JNIEnv*, jclass, jint, jdouble);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getGaussianKernel_11
+ (JNIEnv* env, jclass , jint ksize, jdouble sigma)
+{
+ static const char method_name[] = "imgproc::getGaussianKernel_11()";
+ try {
+ LOGD("%s", method_name);
+
+ ::Mat _retval_ = cv::getGaussianKernel( (int)ksize, (double)sigma );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void getDerivKernels(Mat& kx, Mat& ky, int dx, int dy, int ksize, bool normalize = false, int ktype = CV_32F)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_getDerivKernels_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint, jboolean, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_getDerivKernels_10
+ (JNIEnv* env, jclass , jlong kx_nativeObj, jlong ky_nativeObj, jint dx, jint dy, jint ksize, jboolean normalize, jint ktype)
+{
+ static const char method_name[] = "imgproc::getDerivKernels_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& kx = *((Mat*)kx_nativeObj);
+ Mat& ky = *((Mat*)ky_nativeObj);
+ cv::getDerivKernels( kx, ky, (int)dx, (int)dy, (int)ksize, (bool)normalize, (int)ktype );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_getDerivKernels_11 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_getDerivKernels_11
+ (JNIEnv* env, jclass , jlong kx_nativeObj, jlong ky_nativeObj, jint dx, jint dy, jint ksize)
+{
+ static const char method_name[] = "imgproc::getDerivKernels_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& kx = *((Mat*)kx_nativeObj);
+ Mat& ky = *((Mat*)ky_nativeObj);
+ cv::getDerivKernels( kx, ky, (int)dx, (int)dy, (int)ksize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat getGaborKernel(Size ksize, double sigma, double theta, double lambd, double gamma, double psi = CV_PI*0.5, int ktype = CV_64F)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getGaborKernel_10 (JNIEnv*, jclass, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getGaborKernel_10
+ (JNIEnv* env, jclass , jdouble ksize_width, jdouble ksize_height, jdouble sigma, jdouble theta, jdouble lambd, jdouble gamma, jdouble psi, jint ktype)
+{
+ static const char method_name[] = "imgproc::getGaborKernel_10()";
+ try {
+ LOGD("%s", method_name);
+ Size ksize((int)ksize_width, (int)ksize_height);
+ ::Mat _retval_ = cv::getGaborKernel( ksize, (double)sigma, (double)theta, (double)lambd, (double)gamma, (double)psi, (int)ktype );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getGaborKernel_11 (JNIEnv*, jclass, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getGaborKernel_11
+ (JNIEnv* env, jclass , jdouble ksize_width, jdouble ksize_height, jdouble sigma, jdouble theta, jdouble lambd, jdouble gamma)
+{
+ static const char method_name[] = "imgproc::getGaborKernel_11()";
+ try {
+ LOGD("%s", method_name);
+ Size ksize((int)ksize_width, (int)ksize_height);
+ ::Mat _retval_ = cv::getGaborKernel( ksize, (double)sigma, (double)theta, (double)lambd, (double)gamma );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getStructuringElement(int shape, Size ksize, Point anchor = Point(-1,-1))
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getStructuringElement_10 (JNIEnv*, jclass, jint, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getStructuringElement_10
+ (JNIEnv* env, jclass , jint shape, jdouble ksize_width, jdouble ksize_height, jdouble anchor_x, jdouble anchor_y)
+{
+ static const char method_name[] = "imgproc::getStructuringElement_10()";
+ try {
+ LOGD("%s", method_name);
+ Size ksize((int)ksize_width, (int)ksize_height);
+ Point anchor((int)anchor_x, (int)anchor_y);
+ ::Mat _retval_ = cv::getStructuringElement( (int)shape, ksize, anchor );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getStructuringElement_11 (JNIEnv*, jclass, jint, jdouble, jdouble);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getStructuringElement_11
+ (JNIEnv* env, jclass , jint shape, jdouble ksize_width, jdouble ksize_height)
+{
+ static const char method_name[] = "imgproc::getStructuringElement_11()";
+ try {
+ LOGD("%s", method_name);
+ Size ksize((int)ksize_width, (int)ksize_height);
+ ::Mat _retval_ = cv::getStructuringElement( (int)shape, ksize );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void medianBlur(Mat src, Mat& dst, int ksize)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_medianBlur_10 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_medianBlur_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ksize)
+{
+ static const char method_name[] = "imgproc::medianBlur_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::medianBlur( src, dst, (int)ksize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void GaussianBlur(Mat src, Mat& dst, Size ksize, double sigmaX, double sigmaY = 0, int borderType = BORDER_DEFAULT)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_GaussianBlur_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_GaussianBlur_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble ksize_width, jdouble ksize_height, jdouble sigmaX, jdouble sigmaY, jint borderType)
+{
+ static const char method_name[] = "imgproc::GaussianBlur_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Size ksize((int)ksize_width, (int)ksize_height);
+ cv::GaussianBlur( src, dst, ksize, (double)sigmaX, (double)sigmaY, (int)borderType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_GaussianBlur_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_GaussianBlur_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble ksize_width, jdouble ksize_height, jdouble sigmaX, jdouble sigmaY)
+{
+ static const char method_name[] = "imgproc::GaussianBlur_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Size ksize((int)ksize_width, (int)ksize_height);
+ cv::GaussianBlur( src, dst, ksize, (double)sigmaX, (double)sigmaY );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_GaussianBlur_12 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_GaussianBlur_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble ksize_width, jdouble ksize_height, jdouble sigmaX)
+{
+ static const char method_name[] = "imgproc::GaussianBlur_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Size ksize((int)ksize_width, (int)ksize_height);
+ cv::GaussianBlur( src, dst, ksize, (double)sigmaX );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void bilateralFilter(Mat src, Mat& dst, int d, double sigmaColor, double sigmaSpace, int borderType = BORDER_DEFAULT)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_bilateralFilter_10 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_bilateralFilter_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint d, jdouble sigmaColor, jdouble sigmaSpace, jint borderType)
+{
+ static const char method_name[] = "imgproc::bilateralFilter_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::bilateralFilter( src, dst, (int)d, (double)sigmaColor, (double)sigmaSpace, (int)borderType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_bilateralFilter_11 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_bilateralFilter_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint d, jdouble sigmaColor, jdouble sigmaSpace)
+{
+ static const char method_name[] = "imgproc::bilateralFilter_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::bilateralFilter( src, dst, (int)d, (double)sigmaColor, (double)sigmaSpace );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void boxFilter(Mat src, Mat& dst, int ddepth, Size ksize, Point anchor = Point(-1,-1), bool normalize = true, int borderType = BORDER_DEFAULT)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_boxFilter_10 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jdouble, jdouble, jdouble, jboolean, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_boxFilter_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ddepth, jdouble ksize_width, jdouble ksize_height, jdouble anchor_x, jdouble anchor_y, jboolean normalize, jint borderType)
+{
+ static const char method_name[] = "imgproc::boxFilter_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Size ksize((int)ksize_width, (int)ksize_height);
+ Point anchor((int)anchor_x, (int)anchor_y);
+ cv::boxFilter( src, dst, (int)ddepth, ksize, anchor, (bool)normalize, (int)borderType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_boxFilter_11 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jdouble, jdouble, jdouble, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_boxFilter_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ddepth, jdouble ksize_width, jdouble ksize_height, jdouble anchor_x, jdouble anchor_y, jboolean normalize)
+{
+ static const char method_name[] = "imgproc::boxFilter_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Size ksize((int)ksize_width, (int)ksize_height);
+ Point anchor((int)anchor_x, (int)anchor_y);
+ cv::boxFilter( src, dst, (int)ddepth, ksize, anchor, (bool)normalize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_boxFilter_12 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_boxFilter_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ddepth, jdouble ksize_width, jdouble ksize_height)
+{
+ static const char method_name[] = "imgproc::boxFilter_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Size ksize((int)ksize_width, (int)ksize_height);
+ cv::boxFilter( src, dst, (int)ddepth, ksize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void sqrBoxFilter(Mat _src, Mat& _dst, int ddepth, Size ksize, Point anchor = Point(-1, -1), bool normalize = true, int borderType = BORDER_DEFAULT)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_sqrBoxFilter_10 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jdouble, jdouble, jdouble, jboolean, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_sqrBoxFilter_10
+ (JNIEnv* env, jclass , jlong _src_nativeObj, jlong _dst_nativeObj, jint ddepth, jdouble ksize_width, jdouble ksize_height, jdouble anchor_x, jdouble anchor_y, jboolean normalize, jint borderType)
+{
+ static const char method_name[] = "imgproc::sqrBoxFilter_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& _src = *((Mat*)_src_nativeObj);
+ Mat& _dst = *((Mat*)_dst_nativeObj);
+ Size ksize((int)ksize_width, (int)ksize_height);
+ Point anchor((int)anchor_x, (int)anchor_y);
+ cv::sqrBoxFilter( _src, _dst, (int)ddepth, ksize, anchor, (bool)normalize, (int)borderType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_sqrBoxFilter_11 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jdouble, jdouble, jdouble, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_sqrBoxFilter_11
+ (JNIEnv* env, jclass , jlong _src_nativeObj, jlong _dst_nativeObj, jint ddepth, jdouble ksize_width, jdouble ksize_height, jdouble anchor_x, jdouble anchor_y, jboolean normalize)
+{
+ static const char method_name[] = "imgproc::sqrBoxFilter_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& _src = *((Mat*)_src_nativeObj);
+ Mat& _dst = *((Mat*)_dst_nativeObj);
+ Size ksize((int)ksize_width, (int)ksize_height);
+ Point anchor((int)anchor_x, (int)anchor_y);
+ cv::sqrBoxFilter( _src, _dst, (int)ddepth, ksize, anchor, (bool)normalize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_sqrBoxFilter_12 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_sqrBoxFilter_12
+ (JNIEnv* env, jclass , jlong _src_nativeObj, jlong _dst_nativeObj, jint ddepth, jdouble ksize_width, jdouble ksize_height)
+{
+ static const char method_name[] = "imgproc::sqrBoxFilter_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& _src = *((Mat*)_src_nativeObj);
+ Mat& _dst = *((Mat*)_dst_nativeObj);
+ Size ksize((int)ksize_width, (int)ksize_height);
+ cv::sqrBoxFilter( _src, _dst, (int)ddepth, ksize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void blur(Mat src, Mat& dst, Size ksize, Point anchor = Point(-1,-1), int borderType = BORDER_DEFAULT)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_blur_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_blur_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble ksize_width, jdouble ksize_height, jdouble anchor_x, jdouble anchor_y, jint borderType)
+{
+ static const char method_name[] = "imgproc::blur_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Size ksize((int)ksize_width, (int)ksize_height);
+ Point anchor((int)anchor_x, (int)anchor_y);
+ cv::blur( src, dst, ksize, anchor, (int)borderType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_blur_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_blur_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble ksize_width, jdouble ksize_height, jdouble anchor_x, jdouble anchor_y)
+{
+ static const char method_name[] = "imgproc::blur_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Size ksize((int)ksize_width, (int)ksize_height);
+ Point anchor((int)anchor_x, (int)anchor_y);
+ cv::blur( src, dst, ksize, anchor );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_blur_12 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_blur_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble ksize_width, jdouble ksize_height)
+{
+ static const char method_name[] = "imgproc::blur_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Size ksize((int)ksize_width, (int)ksize_height);
+ cv::blur( src, dst, ksize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void cornerHarris(Mat src, Mat& dst, int blockSize, int ksize, double k, int borderType = BORDER_DEFAULT)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cornerHarris_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cornerHarris_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint blockSize, jint ksize, jdouble k, jint borderType)
+{
+ static const char method_name[] = "imgproc::cornerHarris_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::cornerHarris( src, dst, (int)blockSize, (int)ksize, (double)k, (int)borderType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cornerHarris_11 (JNIEnv*, jclass, jlong, jlong, jint, jint, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cornerHarris_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint blockSize, jint ksize, jdouble k)
+{
+ static const char method_name[] = "imgproc::cornerHarris_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::cornerHarris( src, dst, (int)blockSize, (int)ksize, (double)k );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void cornerEigenValsAndVecs(Mat src, Mat& dst, int blockSize, int ksize, int borderType = BORDER_DEFAULT)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cornerEigenValsAndVecs_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cornerEigenValsAndVecs_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint blockSize, jint ksize, jint borderType)
+{
+ static const char method_name[] = "imgproc::cornerEigenValsAndVecs_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::cornerEigenValsAndVecs( src, dst, (int)blockSize, (int)ksize, (int)borderType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cornerEigenValsAndVecs_11 (JNIEnv*, jclass, jlong, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cornerEigenValsAndVecs_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint blockSize, jint ksize)
+{
+ static const char method_name[] = "imgproc::cornerEigenValsAndVecs_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::cornerEigenValsAndVecs( src, dst, (int)blockSize, (int)ksize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void preCornerDetect(Mat src, Mat& dst, int ksize, int borderType = BORDER_DEFAULT)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_preCornerDetect_10 (JNIEnv*, jclass, jlong, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_preCornerDetect_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ksize, jint borderType)
+{
+ static const char method_name[] = "imgproc::preCornerDetect_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::preCornerDetect( src, dst, (int)ksize, (int)borderType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_preCornerDetect_11 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_preCornerDetect_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint ksize)
+{
+ static const char method_name[] = "imgproc::preCornerDetect_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::preCornerDetect( src, dst, (int)ksize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void cornerSubPix(Mat image, vector_Point2f& corners, Size winSize, Size zeroZone, TermCriteria criteria)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cornerSubPix_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble, jdouble, jint, jint, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cornerSubPix_10
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong corners_mat_nativeObj, jdouble winSize_width, jdouble winSize_height, jdouble zeroZone_width, jdouble zeroZone_height, jint criteria_type, jint criteria_maxCount, jdouble criteria_epsilon)
+{
+ static const char method_name[] = "imgproc::cornerSubPix_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> corners;
+ Mat& corners_mat = *((Mat*)corners_mat_nativeObj);
+ Mat_to_vector_Point2f( corners_mat, corners );
+ Mat& image = *((Mat*)image_nativeObj);
+ Size winSize((int)winSize_width, (int)winSize_height);
+ Size zeroZone((int)zeroZone_width, (int)zeroZone_height);
+ TermCriteria criteria(criteria_type, criteria_maxCount, criteria_epsilon);
+ cv::cornerSubPix( image, corners, winSize, zeroZone, criteria );
+ vector_Point2f_to_Mat( corners, corners_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void goodFeaturesToTrack(Mat image, vector_Point& corners, int maxCorners, double qualityLevel, double minDistance, Mat mask = Mat(), int blockSize = 3, bool useHarrisDetector = false, double k = 0.04)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_goodFeaturesToTrack_10 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jdouble, jlong, jint, jboolean, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_goodFeaturesToTrack_10
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong corners_mat_nativeObj, jint maxCorners, jdouble qualityLevel, jdouble minDistance, jlong mask_nativeObj, jint blockSize, jboolean useHarrisDetector, jdouble k)
+{
+ static const char method_name[] = "imgproc::goodFeaturesToTrack_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point> corners;
+ Mat& corners_mat = *((Mat*)corners_mat_nativeObj);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::goodFeaturesToTrack( image, corners, (int)maxCorners, (double)qualityLevel, (double)minDistance, mask, (int)blockSize, (bool)useHarrisDetector, (double)k );
+ vector_Point_to_Mat( corners, corners_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_goodFeaturesToTrack_11 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_goodFeaturesToTrack_11
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong corners_mat_nativeObj, jint maxCorners, jdouble qualityLevel, jdouble minDistance)
+{
+ static const char method_name[] = "imgproc::goodFeaturesToTrack_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point> corners;
+ Mat& corners_mat = *((Mat*)corners_mat_nativeObj);
+ Mat& image = *((Mat*)image_nativeObj);
+ cv::goodFeaturesToTrack( image, corners, (int)maxCorners, (double)qualityLevel, (double)minDistance );
+ vector_Point_to_Mat( corners, corners_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void HoughLines(Mat image, Mat& lines, double rho, double theta, int threshold, double srn = 0, double stn = 0, double min_theta = 0, double max_theta = CV_PI)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_HoughLines_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_HoughLines_10
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong lines_nativeObj, jdouble rho, jdouble theta, jint threshold, jdouble srn, jdouble stn, jdouble min_theta, jdouble max_theta)
+{
+ static const char method_name[] = "imgproc::HoughLines_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& lines = *((Mat*)lines_nativeObj);
+ cv::HoughLines( image, lines, (double)rho, (double)theta, (int)threshold, (double)srn, (double)stn, (double)min_theta, (double)max_theta );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_HoughLines_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_HoughLines_11
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong lines_nativeObj, jdouble rho, jdouble theta, jint threshold)
+{
+ static const char method_name[] = "imgproc::HoughLines_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& lines = *((Mat*)lines_nativeObj);
+ cv::HoughLines( image, lines, (double)rho, (double)theta, (int)threshold );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void HoughLinesP(Mat image, Mat& lines, double rho, double theta, int threshold, double minLineLength = 0, double maxLineGap = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_HoughLinesP_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_HoughLinesP_10
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong lines_nativeObj, jdouble rho, jdouble theta, jint threshold, jdouble minLineLength, jdouble maxLineGap)
+{
+ static const char method_name[] = "imgproc::HoughLinesP_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& lines = *((Mat*)lines_nativeObj);
+ cv::HoughLinesP( image, lines, (double)rho, (double)theta, (int)threshold, (double)minLineLength, (double)maxLineGap );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_HoughLinesP_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_HoughLinesP_11
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong lines_nativeObj, jdouble rho, jdouble theta, jint threshold)
+{
+ static const char method_name[] = "imgproc::HoughLinesP_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& lines = *((Mat*)lines_nativeObj);
+ cv::HoughLinesP( image, lines, (double)rho, (double)theta, (int)threshold );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void HoughCircles(Mat image, Mat& circles, int method, double dp, double minDist, double param1 = 100, double param2 = 100, int minRadius = 0, int maxRadius = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_HoughCircles_10 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jdouble, jdouble, jdouble, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_HoughCircles_10
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong circles_nativeObj, jint method, jdouble dp, jdouble minDist, jdouble param1, jdouble param2, jint minRadius, jint maxRadius)
+{
+ static const char method_name[] = "imgproc::HoughCircles_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& circles = *((Mat*)circles_nativeObj);
+ cv::HoughCircles( image, circles, (int)method, (double)dp, (double)minDist, (double)param1, (double)param2, (int)minRadius, (int)maxRadius );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_HoughCircles_11 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_HoughCircles_11
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong circles_nativeObj, jint method, jdouble dp, jdouble minDist)
+{
+ static const char method_name[] = "imgproc::HoughCircles_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& circles = *((Mat*)circles_nativeObj);
+ cv::HoughCircles( image, circles, (int)method, (double)dp, (double)minDist );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void erode(Mat src, Mat& dst, Mat kernel, Point anchor = Point(-1,-1), int iterations = 1, int borderType = BORDER_CONSTANT, Scalar borderValue = morphologyDefaultBorderValue())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_erode_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jdouble, jint, jint, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_erode_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong kernel_nativeObj, jdouble anchor_x, jdouble anchor_y, jint iterations, jint borderType, jdouble borderValue_val0, jdouble borderValue_val1, jdouble borderValue_val2, jdouble borderValue_val3)
+{
+ static const char method_name[] = "imgproc::erode_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& kernel = *((Mat*)kernel_nativeObj);
+ Point anchor((int)anchor_x, (int)anchor_y);
+ Scalar borderValue(borderValue_val0, borderValue_val1, borderValue_val2, borderValue_val3);
+ cv::erode( src, dst, kernel, anchor, (int)iterations, (int)borderType, borderValue );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_erode_11 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_erode_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong kernel_nativeObj, jdouble anchor_x, jdouble anchor_y, jint iterations)
+{
+ static const char method_name[] = "imgproc::erode_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& kernel = *((Mat*)kernel_nativeObj);
+ Point anchor((int)anchor_x, (int)anchor_y);
+ cv::erode( src, dst, kernel, anchor, (int)iterations );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_erode_12 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_erode_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong kernel_nativeObj)
+{
+ static const char method_name[] = "imgproc::erode_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& kernel = *((Mat*)kernel_nativeObj);
+ cv::erode( src, dst, kernel );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void dilate(Mat src, Mat& dst, Mat kernel, Point anchor = Point(-1,-1), int iterations = 1, int borderType = BORDER_CONSTANT, Scalar borderValue = morphologyDefaultBorderValue())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_dilate_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jdouble, jint, jint, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_dilate_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong kernel_nativeObj, jdouble anchor_x, jdouble anchor_y, jint iterations, jint borderType, jdouble borderValue_val0, jdouble borderValue_val1, jdouble borderValue_val2, jdouble borderValue_val3)
+{
+ static const char method_name[] = "imgproc::dilate_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& kernel = *((Mat*)kernel_nativeObj);
+ Point anchor((int)anchor_x, (int)anchor_y);
+ Scalar borderValue(borderValue_val0, borderValue_val1, borderValue_val2, borderValue_val3);
+ cv::dilate( src, dst, kernel, anchor, (int)iterations, (int)borderType, borderValue );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_dilate_11 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_dilate_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong kernel_nativeObj, jdouble anchor_x, jdouble anchor_y, jint iterations)
+{
+ static const char method_name[] = "imgproc::dilate_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& kernel = *((Mat*)kernel_nativeObj);
+ Point anchor((int)anchor_x, (int)anchor_y);
+ cv::dilate( src, dst, kernel, anchor, (int)iterations );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_dilate_12 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_dilate_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong kernel_nativeObj)
+{
+ static const char method_name[] = "imgproc::dilate_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& kernel = *((Mat*)kernel_nativeObj);
+ cv::dilate( src, dst, kernel );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void morphologyEx(Mat src, Mat& dst, int op, Mat kernel, Point anchor = Point(-1,-1), int iterations = 1, int borderType = BORDER_CONSTANT, Scalar borderValue = morphologyDefaultBorderValue())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_morphologyEx_10 (JNIEnv*, jclass, jlong, jlong, jint, jlong, jdouble, jdouble, jint, jint, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_morphologyEx_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint op, jlong kernel_nativeObj, jdouble anchor_x, jdouble anchor_y, jint iterations, jint borderType, jdouble borderValue_val0, jdouble borderValue_val1, jdouble borderValue_val2, jdouble borderValue_val3)
+{
+ static const char method_name[] = "imgproc::morphologyEx_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& kernel = *((Mat*)kernel_nativeObj);
+ Point anchor((int)anchor_x, (int)anchor_y);
+ Scalar borderValue(borderValue_val0, borderValue_val1, borderValue_val2, borderValue_val3);
+ cv::morphologyEx( src, dst, (int)op, kernel, anchor, (int)iterations, (int)borderType, borderValue );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_morphologyEx_11 (JNIEnv*, jclass, jlong, jlong, jint, jlong, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_morphologyEx_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint op, jlong kernel_nativeObj, jdouble anchor_x, jdouble anchor_y, jint iterations)
+{
+ static const char method_name[] = "imgproc::morphologyEx_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& kernel = *((Mat*)kernel_nativeObj);
+ Point anchor((int)anchor_x, (int)anchor_y);
+ cv::morphologyEx( src, dst, (int)op, kernel, anchor, (int)iterations );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_morphologyEx_12 (JNIEnv*, jclass, jlong, jlong, jint, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_morphologyEx_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint op, jlong kernel_nativeObj)
+{
+ static const char method_name[] = "imgproc::morphologyEx_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& kernel = *((Mat*)kernel_nativeObj);
+ cv::morphologyEx( src, dst, (int)op, kernel );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void resize(Mat src, Mat& dst, Size dsize, double fx = 0, double fy = 0, int interpolation = INTER_LINEAR)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_resize_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_resize_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble dsize_width, jdouble dsize_height, jdouble fx, jdouble fy, jint interpolation)
+{
+ static const char method_name[] = "imgproc::resize_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Size dsize((int)dsize_width, (int)dsize_height);
+ cv::resize( src, dst, dsize, (double)fx, (double)fy, (int)interpolation );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_resize_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_resize_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble dsize_width, jdouble dsize_height)
+{
+ static const char method_name[] = "imgproc::resize_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Size dsize((int)dsize_width, (int)dsize_height);
+ cv::resize( src, dst, dsize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void warpAffine(Mat src, Mat& dst, Mat M, Size dsize, int flags = INTER_LINEAR, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_warpAffine_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jdouble, jint, jint, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_warpAffine_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong M_nativeObj, jdouble dsize_width, jdouble dsize_height, jint flags, jint borderMode, jdouble borderValue_val0, jdouble borderValue_val1, jdouble borderValue_val2, jdouble borderValue_val3)
+{
+ static const char method_name[] = "imgproc::warpAffine_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& M = *((Mat*)M_nativeObj);
+ Size dsize((int)dsize_width, (int)dsize_height);
+ Scalar borderValue(borderValue_val0, borderValue_val1, borderValue_val2, borderValue_val3);
+ cv::warpAffine( src, dst, M, dsize, (int)flags, (int)borderMode, borderValue );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_warpAffine_11 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_warpAffine_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong M_nativeObj, jdouble dsize_width, jdouble dsize_height, jint flags)
+{
+ static const char method_name[] = "imgproc::warpAffine_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& M = *((Mat*)M_nativeObj);
+ Size dsize((int)dsize_width, (int)dsize_height);
+ cv::warpAffine( src, dst, M, dsize, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_warpAffine_12 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_warpAffine_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong M_nativeObj, jdouble dsize_width, jdouble dsize_height)
+{
+ static const char method_name[] = "imgproc::warpAffine_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& M = *((Mat*)M_nativeObj);
+ Size dsize((int)dsize_width, (int)dsize_height);
+ cv::warpAffine( src, dst, M, dsize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void warpPerspective(Mat src, Mat& dst, Mat M, Size dsize, int flags = INTER_LINEAR, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_warpPerspective_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jdouble, jint, jint, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_warpPerspective_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong M_nativeObj, jdouble dsize_width, jdouble dsize_height, jint flags, jint borderMode, jdouble borderValue_val0, jdouble borderValue_val1, jdouble borderValue_val2, jdouble borderValue_val3)
+{
+ static const char method_name[] = "imgproc::warpPerspective_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& M = *((Mat*)M_nativeObj);
+ Size dsize((int)dsize_width, (int)dsize_height);
+ Scalar borderValue(borderValue_val0, borderValue_val1, borderValue_val2, borderValue_val3);
+ cv::warpPerspective( src, dst, M, dsize, (int)flags, (int)borderMode, borderValue );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_warpPerspective_11 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_warpPerspective_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong M_nativeObj, jdouble dsize_width, jdouble dsize_height, jint flags)
+{
+ static const char method_name[] = "imgproc::warpPerspective_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& M = *((Mat*)M_nativeObj);
+ Size dsize((int)dsize_width, (int)dsize_height);
+ cv::warpPerspective( src, dst, M, dsize, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_warpPerspective_12 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_warpPerspective_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong M_nativeObj, jdouble dsize_width, jdouble dsize_height)
+{
+ static const char method_name[] = "imgproc::warpPerspective_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& M = *((Mat*)M_nativeObj);
+ Size dsize((int)dsize_width, (int)dsize_height);
+ cv::warpPerspective( src, dst, M, dsize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void integral(Mat src, Mat& sum, Mat& sqsum, int sdepth = -1, int sqdepth = -1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_integral2_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_integral2_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong sum_nativeObj, jlong sqsum_nativeObj, jint sdepth, jint sqdepth)
+{
+ static const char method_name[] = "imgproc::integral2_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& sum = *((Mat*)sum_nativeObj);
+ Mat& sqsum = *((Mat*)sqsum_nativeObj);
+ cv::integral( src, sum, sqsum, (int)sdepth, (int)sqdepth );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_integral2_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_integral2_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong sum_nativeObj, jlong sqsum_nativeObj)
+{
+ static const char method_name[] = "imgproc::integral2_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& sum = *((Mat*)sum_nativeObj);
+ Mat& sqsum = *((Mat*)sqsum_nativeObj);
+ cv::integral( src, sum, sqsum );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void integral(Mat src, Mat& sum, Mat& sqsum, Mat& tilted, int sdepth = -1, int sqdepth = -1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_integral3_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_integral3_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong sum_nativeObj, jlong sqsum_nativeObj, jlong tilted_nativeObj, jint sdepth, jint sqdepth)
+{
+ static const char method_name[] = "imgproc::integral3_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& sum = *((Mat*)sum_nativeObj);
+ Mat& sqsum = *((Mat*)sqsum_nativeObj);
+ Mat& tilted = *((Mat*)tilted_nativeObj);
+ cv::integral( src, sum, sqsum, tilted, (int)sdepth, (int)sqdepth );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_integral3_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_integral3_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong sum_nativeObj, jlong sqsum_nativeObj, jlong tilted_nativeObj)
+{
+ static const char method_name[] = "imgproc::integral3_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& sum = *((Mat*)sum_nativeObj);
+ Mat& sqsum = *((Mat*)sqsum_nativeObj);
+ Mat& tilted = *((Mat*)tilted_nativeObj);
+ cv::integral( src, sum, sqsum, tilted );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void accumulate(Mat src, Mat& dst, Mat mask = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_accumulate_10 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_accumulate_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj)
+{
+ static const char method_name[] = "imgproc::accumulate_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::accumulate( src, dst, mask );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_accumulate_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_accumulate_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "imgproc::accumulate_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::accumulate( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void accumulateSquare(Mat src, Mat& dst, Mat mask = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_accumulateSquare_10 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_accumulateSquare_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj)
+{
+ static const char method_name[] = "imgproc::accumulateSquare_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::accumulateSquare( src, dst, mask );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_accumulateSquare_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_accumulateSquare_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "imgproc::accumulateSquare_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::accumulateSquare( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void accumulateProduct(Mat src1, Mat src2, Mat& dst, Mat mask = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_accumulateProduct_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_accumulateProduct_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj)
+{
+ static const char method_name[] = "imgproc::accumulateProduct_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::accumulateProduct( src1, src2, dst, mask );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_accumulateProduct_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_accumulateProduct_11
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "imgproc::accumulateProduct_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::accumulateProduct( src1, src2, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void accumulateWeighted(Mat src, Mat& dst, double alpha, Mat mask = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_accumulateWeighted_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_accumulateWeighted_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble alpha, jlong mask_nativeObj)
+{
+ static const char method_name[] = "imgproc::accumulateWeighted_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::accumulateWeighted( src, dst, (double)alpha, mask );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_accumulateWeighted_11 (JNIEnv*, jclass, jlong, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_accumulateWeighted_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble alpha)
+{
+ static const char method_name[] = "imgproc::accumulateWeighted_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::accumulateWeighted( src, dst, (double)alpha );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Point2d phaseCorrelate(Mat src1, Mat src2, Mat window = Mat(), double* response = 0)
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Imgproc_phaseCorrelate_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdoubleArray);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Imgproc_phaseCorrelate_10
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj, jlong window_nativeObj, jdoubleArray response_out)
+{
+ static const char method_name[] = "imgproc::phaseCorrelate_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Mat& window = *((Mat*)window_nativeObj);
+ double response;
+ Point2d _retval_ = cv::phaseCorrelate( src1, src2, window, &response );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(2); jdouble _tmp_retval_[2] = {_retval_.x, _retval_.y}; env->SetDoubleArrayRegion(_da_retval_, 0, 2, _tmp_retval_); jdouble tmp_response[1] = {response}; env->SetDoubleArrayRegion(response_out, 0, 1, tmp_response);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Imgproc_phaseCorrelate_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Imgproc_phaseCorrelate_11
+ (JNIEnv* env, jclass , jlong src1_nativeObj, jlong src2_nativeObj)
+{
+ static const char method_name[] = "imgproc::phaseCorrelate_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src1 = *((Mat*)src1_nativeObj);
+ Mat& src2 = *((Mat*)src2_nativeObj);
+ Point2d _retval_ = cv::phaseCorrelate( src1, src2 );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(2); jdouble _tmp_retval_[2] = {_retval_.x, _retval_.y}; env->SetDoubleArrayRegion(_da_retval_, 0, 2, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void createHanningWindow(Mat& dst, Size winSize, int type)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_createHanningWindow_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_createHanningWindow_10
+ (JNIEnv* env, jclass , jlong dst_nativeObj, jdouble winSize_width, jdouble winSize_height, jint type)
+{
+ static const char method_name[] = "imgproc::createHanningWindow_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Size winSize((int)winSize_width, (int)winSize_height);
+ cv::createHanningWindow( dst, winSize, (int)type );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double threshold(Mat src, Mat& dst, double thresh, double maxval, int type)
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_imgproc_Imgproc_threshold_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_imgproc_Imgproc_threshold_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble thresh, jdouble maxval, jint type)
+{
+ static const char method_name[] = "imgproc::threshold_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ double _retval_ = cv::threshold( src, dst, (double)thresh, (double)maxval, (int)type );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void adaptiveThreshold(Mat src, Mat& dst, double maxValue, int adaptiveMethod, int thresholdType, int blockSize, double C)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_adaptiveThreshold_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jint, jint, jint, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_adaptiveThreshold_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble maxValue, jint adaptiveMethod, jint thresholdType, jint blockSize, jdouble C)
+{
+ static const char method_name[] = "imgproc::adaptiveThreshold_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::adaptiveThreshold( src, dst, (double)maxValue, (int)adaptiveMethod, (int)thresholdType, (int)blockSize, (double)C );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void pyrDown(Mat src, Mat& dst, Size dstsize = Size(), int borderType = BORDER_DEFAULT)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_pyrDown_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_pyrDown_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble dstsize_width, jdouble dstsize_height, jint borderType)
+{
+ static const char method_name[] = "imgproc::pyrDown_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Size dstsize((int)dstsize_width, (int)dstsize_height);
+ cv::pyrDown( src, dst, dstsize, (int)borderType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_pyrDown_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_pyrDown_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble dstsize_width, jdouble dstsize_height)
+{
+ static const char method_name[] = "imgproc::pyrDown_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Size dstsize((int)dstsize_width, (int)dstsize_height);
+ cv::pyrDown( src, dst, dstsize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_pyrDown_12 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_pyrDown_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "imgproc::pyrDown_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::pyrDown( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void pyrUp(Mat src, Mat& dst, Size dstsize = Size(), int borderType = BORDER_DEFAULT)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_pyrUp_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_pyrUp_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble dstsize_width, jdouble dstsize_height, jint borderType)
+{
+ static const char method_name[] = "imgproc::pyrUp_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Size dstsize((int)dstsize_width, (int)dstsize_height);
+ cv::pyrUp( src, dst, dstsize, (int)borderType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_pyrUp_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_pyrUp_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble dstsize_width, jdouble dstsize_height)
+{
+ static const char method_name[] = "imgproc::pyrUp_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Size dstsize((int)dstsize_width, (int)dstsize_height);
+ cv::pyrUp( src, dst, dstsize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_pyrUp_12 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_pyrUp_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "imgproc::pyrUp_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::pyrUp( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void undistort(Mat src, Mat& dst, Mat cameraMatrix, Mat distCoeffs, Mat newCameraMatrix = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_undistort_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_undistort_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong cameraMatrix_nativeObj, jlong distCoeffs_nativeObj, jlong newCameraMatrix_nativeObj)
+{
+ static const char method_name[] = "imgproc::undistort_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& distCoeffs = *((Mat*)distCoeffs_nativeObj);
+ Mat& newCameraMatrix = *((Mat*)newCameraMatrix_nativeObj);
+ cv::undistort( src, dst, cameraMatrix, distCoeffs, newCameraMatrix );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_undistort_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_undistort_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong cameraMatrix_nativeObj, jlong distCoeffs_nativeObj)
+{
+ static const char method_name[] = "imgproc::undistort_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& distCoeffs = *((Mat*)distCoeffs_nativeObj);
+ cv::undistort( src, dst, cameraMatrix, distCoeffs );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void initUndistortRectifyMap(Mat cameraMatrix, Mat distCoeffs, Mat R, Mat newCameraMatrix, Size size, int m1type, Mat& map1, Mat& map2)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_initUndistortRectifyMap_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jdouble, jdouble, jint, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_initUndistortRectifyMap_10
+ (JNIEnv* env, jclass , jlong cameraMatrix_nativeObj, jlong distCoeffs_nativeObj, jlong R_nativeObj, jlong newCameraMatrix_nativeObj, jdouble size_width, jdouble size_height, jint m1type, jlong map1_nativeObj, jlong map2_nativeObj)
+{
+ static const char method_name[] = "imgproc::initUndistortRectifyMap_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& distCoeffs = *((Mat*)distCoeffs_nativeObj);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& newCameraMatrix = *((Mat*)newCameraMatrix_nativeObj);
+ Size size((int)size_width, (int)size_height);
+ Mat& map1 = *((Mat*)map1_nativeObj);
+ Mat& map2 = *((Mat*)map2_nativeObj);
+ cv::initUndistortRectifyMap( cameraMatrix, distCoeffs, R, newCameraMatrix, size, (int)m1type, map1, map2 );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// float initWideAngleProjMap(Mat cameraMatrix, Mat distCoeffs, Size imageSize, int destImageWidth, int m1type, Mat& map1, Mat& map2, int projType = PROJ_SPHERICAL_EQRECT, double alpha = 0)
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_imgproc_Imgproc_initWideAngleProjMap_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint, jint, jlong, jlong, jint, jdouble);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_imgproc_Imgproc_initWideAngleProjMap_10
+ (JNIEnv* env, jclass , jlong cameraMatrix_nativeObj, jlong distCoeffs_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jint destImageWidth, jint m1type, jlong map1_nativeObj, jlong map2_nativeObj, jint projType, jdouble alpha)
+{
+ static const char method_name[] = "imgproc::initWideAngleProjMap_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& distCoeffs = *((Mat*)distCoeffs_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ Mat& map1 = *((Mat*)map1_nativeObj);
+ Mat& map2 = *((Mat*)map2_nativeObj);
+ float _retval_ = cv::initWideAngleProjMap( cameraMatrix, distCoeffs, imageSize, (int)destImageWidth, (int)m1type, map1, map2, (int)projType, (double)alpha );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_imgproc_Imgproc_initWideAngleProjMap_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint, jint, jlong, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_imgproc_Imgproc_initWideAngleProjMap_11
+ (JNIEnv* env, jclass , jlong cameraMatrix_nativeObj, jlong distCoeffs_nativeObj, jdouble imageSize_width, jdouble imageSize_height, jint destImageWidth, jint m1type, jlong map1_nativeObj, jlong map2_nativeObj)
+{
+ static const char method_name[] = "imgproc::initWideAngleProjMap_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& distCoeffs = *((Mat*)distCoeffs_nativeObj);
+ Size imageSize((int)imageSize_width, (int)imageSize_height);
+ Mat& map1 = *((Mat*)map1_nativeObj);
+ Mat& map2 = *((Mat*)map2_nativeObj);
+ float _retval_ = cv::initWideAngleProjMap( cameraMatrix, distCoeffs, imageSize, (int)destImageWidth, (int)m1type, map1, map2 );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getDefaultNewCameraMatrix(Mat cameraMatrix, Size imgsize = Size(), bool centerPrincipalPoint = false)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getDefaultNewCameraMatrix_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jboolean);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getDefaultNewCameraMatrix_10
+ (JNIEnv* env, jclass , jlong cameraMatrix_nativeObj, jdouble imgsize_width, jdouble imgsize_height, jboolean centerPrincipalPoint)
+{
+ static const char method_name[] = "imgproc::getDefaultNewCameraMatrix_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Size imgsize((int)imgsize_width, (int)imgsize_height);
+ ::Mat _retval_ = cv::getDefaultNewCameraMatrix( cameraMatrix, imgsize, (bool)centerPrincipalPoint );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getDefaultNewCameraMatrix_11 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_getDefaultNewCameraMatrix_11
+ (JNIEnv* env, jclass , jlong cameraMatrix_nativeObj)
+{
+ static const char method_name[] = "imgproc::getDefaultNewCameraMatrix_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ ::Mat _retval_ = cv::getDefaultNewCameraMatrix( cameraMatrix );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void undistortPoints(vector_Point2f src, vector_Point2f& dst, Mat cameraMatrix, Mat distCoeffs, Mat R = Mat(), Mat P = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_undistortPoints_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_undistortPoints_10
+ (JNIEnv* env, jclass , jlong src_mat_nativeObj, jlong dst_mat_nativeObj, jlong cameraMatrix_nativeObj, jlong distCoeffs_nativeObj, jlong R_nativeObj, jlong P_nativeObj)
+{
+ static const char method_name[] = "imgproc::undistortPoints_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> src;
+ Mat& src_mat = *((Mat*)src_mat_nativeObj);
+ Mat_to_vector_Point2f( src_mat, src );
+ std::vector<Point2f> dst;
+ Mat& dst_mat = *((Mat*)dst_mat_nativeObj);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& distCoeffs = *((Mat*)distCoeffs_nativeObj);
+ Mat& R = *((Mat*)R_nativeObj);
+ Mat& P = *((Mat*)P_nativeObj);
+ cv::undistortPoints( src, dst, cameraMatrix, distCoeffs, R, P );
+ vector_Point2f_to_Mat( dst, dst_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_undistortPoints_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_undistortPoints_11
+ (JNIEnv* env, jclass , jlong src_mat_nativeObj, jlong dst_mat_nativeObj, jlong cameraMatrix_nativeObj, jlong distCoeffs_nativeObj)
+{
+ static const char method_name[] = "imgproc::undistortPoints_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> src;
+ Mat& src_mat = *((Mat*)src_mat_nativeObj);
+ Mat_to_vector_Point2f( src_mat, src );
+ std::vector<Point2f> dst;
+ Mat& dst_mat = *((Mat*)dst_mat_nativeObj);
+ Mat& cameraMatrix = *((Mat*)cameraMatrix_nativeObj);
+ Mat& distCoeffs = *((Mat*)distCoeffs_nativeObj);
+ cv::undistortPoints( src, dst, cameraMatrix, distCoeffs );
+ vector_Point2f_to_Mat( dst, dst_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void calcHist(vector_Mat images, vector_int channels, Mat mask, Mat& hist, vector_int histSize, vector_float ranges, bool accumulate = false)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_calcHist_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_calcHist_10
+ (JNIEnv* env, jclass , jlong images_mat_nativeObj, jlong channels_mat_nativeObj, jlong mask_nativeObj, jlong hist_nativeObj, jlong histSize_mat_nativeObj, jlong ranges_mat_nativeObj, jboolean accumulate)
+{
+ static const char method_name[] = "imgproc::calcHist_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> images;
+ Mat& images_mat = *((Mat*)images_mat_nativeObj);
+ Mat_to_vector_Mat( images_mat, images );
+ std::vector<int> channels;
+ Mat& channels_mat = *((Mat*)channels_mat_nativeObj);
+ Mat_to_vector_int( channels_mat, channels );
+ std::vector<int> histSize;
+ Mat& histSize_mat = *((Mat*)histSize_mat_nativeObj);
+ Mat_to_vector_int( histSize_mat, histSize );
+ std::vector<float> ranges;
+ Mat& ranges_mat = *((Mat*)ranges_mat_nativeObj);
+ Mat_to_vector_float( ranges_mat, ranges );
+ Mat& mask = *((Mat*)mask_nativeObj);
+ Mat& hist = *((Mat*)hist_nativeObj);
+ cv::calcHist( images, channels, mask, hist, histSize, ranges, (bool)accumulate );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_calcHist_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_calcHist_11
+ (JNIEnv* env, jclass , jlong images_mat_nativeObj, jlong channels_mat_nativeObj, jlong mask_nativeObj, jlong hist_nativeObj, jlong histSize_mat_nativeObj, jlong ranges_mat_nativeObj)
+{
+ static const char method_name[] = "imgproc::calcHist_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> images;
+ Mat& images_mat = *((Mat*)images_mat_nativeObj);
+ Mat_to_vector_Mat( images_mat, images );
+ std::vector<int> channels;
+ Mat& channels_mat = *((Mat*)channels_mat_nativeObj);
+ Mat_to_vector_int( channels_mat, channels );
+ std::vector<int> histSize;
+ Mat& histSize_mat = *((Mat*)histSize_mat_nativeObj);
+ Mat_to_vector_int( histSize_mat, histSize );
+ std::vector<float> ranges;
+ Mat& ranges_mat = *((Mat*)ranges_mat_nativeObj);
+ Mat_to_vector_float( ranges_mat, ranges );
+ Mat& mask = *((Mat*)mask_nativeObj);
+ Mat& hist = *((Mat*)hist_nativeObj);
+ cv::calcHist( images, channels, mask, hist, histSize, ranges );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void calcBackProject(vector_Mat images, vector_int channels, Mat hist, Mat& dst, vector_float ranges, double scale)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_calcBackProject_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_calcBackProject_10
+ (JNIEnv* env, jclass , jlong images_mat_nativeObj, jlong channels_mat_nativeObj, jlong hist_nativeObj, jlong dst_nativeObj, jlong ranges_mat_nativeObj, jdouble scale)
+{
+ static const char method_name[] = "imgproc::calcBackProject_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> images;
+ Mat& images_mat = *((Mat*)images_mat_nativeObj);
+ Mat_to_vector_Mat( images_mat, images );
+ std::vector<int> channels;
+ Mat& channels_mat = *((Mat*)channels_mat_nativeObj);
+ Mat_to_vector_int( channels_mat, channels );
+ std::vector<float> ranges;
+ Mat& ranges_mat = *((Mat*)ranges_mat_nativeObj);
+ Mat_to_vector_float( ranges_mat, ranges );
+ Mat& hist = *((Mat*)hist_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::calcBackProject( images, channels, hist, dst, ranges, (double)scale );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double compareHist(Mat H1, Mat H2, int method)
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_imgproc_Imgproc_compareHist_10 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_imgproc_Imgproc_compareHist_10
+ (JNIEnv* env, jclass , jlong H1_nativeObj, jlong H2_nativeObj, jint method)
+{
+ static const char method_name[] = "imgproc::compareHist_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& H1 = *((Mat*)H1_nativeObj);
+ Mat& H2 = *((Mat*)H2_nativeObj);
+ double _retval_ = cv::compareHist( H1, H2, (int)method );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void equalizeHist(Mat src, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_equalizeHist_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_equalizeHist_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "imgproc::equalizeHist_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::equalizeHist( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void watershed(Mat image, Mat& markers)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_watershed_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_watershed_10
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong markers_nativeObj)
+{
+ static const char method_name[] = "imgproc::watershed_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& markers = *((Mat*)markers_nativeObj);
+ cv::watershed( image, markers );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void pyrMeanShiftFiltering(Mat src, Mat& dst, double sp, double sr, int maxLevel = 1, TermCriteria termcrit = TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,1))
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_pyrMeanShiftFiltering_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint, jint, jint, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_pyrMeanShiftFiltering_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble sp, jdouble sr, jint maxLevel, jint termcrit_type, jint termcrit_maxCount, jdouble termcrit_epsilon)
+{
+ static const char method_name[] = "imgproc::pyrMeanShiftFiltering_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ TermCriteria termcrit(termcrit_type, termcrit_maxCount, termcrit_epsilon);
+ cv::pyrMeanShiftFiltering( src, dst, (double)sp, (double)sr, (int)maxLevel, termcrit );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_pyrMeanShiftFiltering_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_pyrMeanShiftFiltering_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jdouble sp, jdouble sr)
+{
+ static const char method_name[] = "imgproc::pyrMeanShiftFiltering_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::pyrMeanShiftFiltering( src, dst, (double)sp, (double)sr );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void grabCut(Mat img, Mat& mask, Rect rect, Mat& bgdModel, Mat& fgdModel, int iterCount, int mode = GC_EVAL)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_grabCut_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint, jint, jlong, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_grabCut_10
+ (JNIEnv* env, jclass , jlong img_nativeObj, jlong mask_nativeObj, jint rect_x, jint rect_y, jint rect_width, jint rect_height, jlong bgdModel_nativeObj, jlong fgdModel_nativeObj, jint iterCount, jint mode)
+{
+ static const char method_name[] = "imgproc::grabCut_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ Rect rect(rect_x, rect_y, rect_width, rect_height);
+ Mat& bgdModel = *((Mat*)bgdModel_nativeObj);
+ Mat& fgdModel = *((Mat*)fgdModel_nativeObj);
+ cv::grabCut( img, mask, rect, bgdModel, fgdModel, (int)iterCount, (int)mode );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_grabCut_11 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint, jint, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_grabCut_11
+ (JNIEnv* env, jclass , jlong img_nativeObj, jlong mask_nativeObj, jint rect_x, jint rect_y, jint rect_width, jint rect_height, jlong bgdModel_nativeObj, jlong fgdModel_nativeObj, jint iterCount)
+{
+ static const char method_name[] = "imgproc::grabCut_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ Rect rect(rect_x, rect_y, rect_width, rect_height);
+ Mat& bgdModel = *((Mat*)bgdModel_nativeObj);
+ Mat& fgdModel = *((Mat*)fgdModel_nativeObj);
+ cv::grabCut( img, mask, rect, bgdModel, fgdModel, (int)iterCount );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void distanceTransform(Mat src, Mat& dst, Mat& labels, int distanceType, int maskSize, int labelType = DIST_LABEL_CCOMP)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_distanceTransformWithLabels_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_distanceTransformWithLabels_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong labels_nativeObj, jint distanceType, jint maskSize, jint labelType)
+{
+ static const char method_name[] = "imgproc::distanceTransformWithLabels_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& labels = *((Mat*)labels_nativeObj);
+ cv::distanceTransform( src, dst, labels, (int)distanceType, (int)maskSize, (int)labelType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_distanceTransformWithLabels_11 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_distanceTransformWithLabels_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong labels_nativeObj, jint distanceType, jint maskSize)
+{
+ static const char method_name[] = "imgproc::distanceTransformWithLabels_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& labels = *((Mat*)labels_nativeObj);
+ cv::distanceTransform( src, dst, labels, (int)distanceType, (int)maskSize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void distanceTransform(Mat src, Mat& dst, int distanceType, int maskSize, int dstType = CV_32F)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_distanceTransform_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_distanceTransform_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint distanceType, jint maskSize, jint dstType)
+{
+ static const char method_name[] = "imgproc::distanceTransform_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::distanceTransform( src, dst, (int)distanceType, (int)maskSize, (int)dstType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_distanceTransform_11 (JNIEnv*, jclass, jlong, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_distanceTransform_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint distanceType, jint maskSize)
+{
+ static const char method_name[] = "imgproc::distanceTransform_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::distanceTransform( src, dst, (int)distanceType, (int)maskSize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int floodFill(Mat& image, Mat& mask, Point seedPoint, Scalar newVal, Rect* rect = 0, Scalar loDiff = Scalar(), Scalar upDiff = Scalar(), int flags = 4)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Imgproc_floodFill_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdoubleArray, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Imgproc_floodFill_10
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong mask_nativeObj, jdouble seedPoint_x, jdouble seedPoint_y, jdouble newVal_val0, jdouble newVal_val1, jdouble newVal_val2, jdouble newVal_val3, jdoubleArray rect_out, jdouble loDiff_val0, jdouble loDiff_val1, jdouble loDiff_val2, jdouble loDiff_val3, jdouble upDiff_val0, jdouble upDiff_val1, jdouble upDiff_val2, jdouble upDiff_val3, jint flags)
+{
+ static const char method_name[] = "imgproc::floodFill_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ Point seedPoint((int)seedPoint_x, (int)seedPoint_y);
+ Scalar newVal(newVal_val0, newVal_val1, newVal_val2, newVal_val3);
+ Rect rect;
+ Scalar loDiff(loDiff_val0, loDiff_val1, loDiff_val2, loDiff_val3);
+ Scalar upDiff(upDiff_val0, upDiff_val1, upDiff_val2, upDiff_val3);
+ int _retval_ = cv::floodFill( image, mask, seedPoint, newVal, &rect, loDiff, upDiff, (int)flags );
+ jdouble tmp_rect[4] = {rect.x, rect.y, rect.width, rect.height}; env->SetDoubleArrayRegion(rect_out, 0, 4, tmp_rect);
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Imgproc_floodFill_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Imgproc_floodFill_11
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong mask_nativeObj, jdouble seedPoint_x, jdouble seedPoint_y, jdouble newVal_val0, jdouble newVal_val1, jdouble newVal_val2, jdouble newVal_val3)
+{
+ static const char method_name[] = "imgproc::floodFill_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ Point seedPoint((int)seedPoint_x, (int)seedPoint_y);
+ Scalar newVal(newVal_val0, newVal_val1, newVal_val2, newVal_val3);
+ int _retval_ = cv::floodFill( image, mask, seedPoint, newVal );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void cvtColor(Mat src, Mat& dst, int code, int dstCn = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cvtColor_10 (JNIEnv*, jclass, jlong, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cvtColor_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint code, jint dstCn)
+{
+ static const char method_name[] = "imgproc::cvtColor_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::cvtColor( src, dst, (int)code, (int)dstCn );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cvtColor_11 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_cvtColor_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint code)
+{
+ static const char method_name[] = "imgproc::cvtColor_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::cvtColor( src, dst, (int)code );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void demosaicing(Mat _src, Mat& _dst, int code, int dcn = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_demosaicing_10 (JNIEnv*, jclass, jlong, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_demosaicing_10
+ (JNIEnv* env, jclass , jlong _src_nativeObj, jlong _dst_nativeObj, jint code, jint dcn)
+{
+ static const char method_name[] = "imgproc::demosaicing_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& _src = *((Mat*)_src_nativeObj);
+ Mat& _dst = *((Mat*)_dst_nativeObj);
+ cv::demosaicing( _src, _dst, (int)code, (int)dcn );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_demosaicing_11 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_demosaicing_11
+ (JNIEnv* env, jclass , jlong _src_nativeObj, jlong _dst_nativeObj, jint code)
+{
+ static const char method_name[] = "imgproc::demosaicing_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& _src = *((Mat*)_src_nativeObj);
+ Mat& _dst = *((Mat*)_dst_nativeObj);
+ cv::demosaicing( _src, _dst, (int)code );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void matchTemplate(Mat image, Mat templ, Mat& result, int method, Mat mask = Mat())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_matchTemplate_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_matchTemplate_10
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong templ_nativeObj, jlong result_nativeObj, jint method, jlong mask_nativeObj)
+{
+ static const char method_name[] = "imgproc::matchTemplate_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& templ = *((Mat*)templ_nativeObj);
+ Mat& result = *((Mat*)result_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ cv::matchTemplate( image, templ, result, (int)method, mask );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_matchTemplate_11 (JNIEnv*, jclass, jlong, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_matchTemplate_11
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong templ_nativeObj, jlong result_nativeObj, jint method)
+{
+ static const char method_name[] = "imgproc::matchTemplate_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& templ = *((Mat*)templ_nativeObj);
+ Mat& result = *((Mat*)result_nativeObj);
+ cv::matchTemplate( image, templ, result, (int)method );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int connectedComponents(Mat image, Mat& labels, int connectivity = 8, int ltype = CV_32S)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Imgproc_connectedComponents_10 (JNIEnv*, jclass, jlong, jlong, jint, jint);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Imgproc_connectedComponents_10
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong labels_nativeObj, jint connectivity, jint ltype)
+{
+ static const char method_name[] = "imgproc::connectedComponents_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& labels = *((Mat*)labels_nativeObj);
+ int _retval_ = cv::connectedComponents( image, labels, (int)connectivity, (int)ltype );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Imgproc_connectedComponents_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Imgproc_connectedComponents_11
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong labels_nativeObj)
+{
+ static const char method_name[] = "imgproc::connectedComponents_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& labels = *((Mat*)labels_nativeObj);
+ int _retval_ = cv::connectedComponents( image, labels );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int connectedComponentsWithStats(Mat image, Mat& labels, Mat& stats, Mat& centroids, int connectivity = 8, int ltype = CV_32S)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Imgproc_connectedComponentsWithStats_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jint, jint);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Imgproc_connectedComponentsWithStats_10
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong labels_nativeObj, jlong stats_nativeObj, jlong centroids_nativeObj, jint connectivity, jint ltype)
+{
+ static const char method_name[] = "imgproc::connectedComponentsWithStats_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& labels = *((Mat*)labels_nativeObj);
+ Mat& stats = *((Mat*)stats_nativeObj);
+ Mat& centroids = *((Mat*)centroids_nativeObj);
+ int _retval_ = cv::connectedComponentsWithStats( image, labels, stats, centroids, (int)connectivity, (int)ltype );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Imgproc_connectedComponentsWithStats_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Imgproc_connectedComponentsWithStats_11
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong labels_nativeObj, jlong stats_nativeObj, jlong centroids_nativeObj)
+{
+ static const char method_name[] = "imgproc::connectedComponentsWithStats_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& labels = *((Mat*)labels_nativeObj);
+ Mat& stats = *((Mat*)stats_nativeObj);
+ Mat& centroids = *((Mat*)centroids_nativeObj);
+ int _retval_ = cv::connectedComponentsWithStats( image, labels, stats, centroids );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void findContours(Mat& image, vector_vector_Point& contours, Mat& hierarchy, int mode, int method, Point offset = Point())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_findContours_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jint, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_findContours_10
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong contours_mat_nativeObj, jlong hierarchy_nativeObj, jint mode, jint method, jdouble offset_x, jdouble offset_y)
+{
+ static const char method_name[] = "imgproc::findContours_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<Point> > contours;
+ Mat& contours_mat = *((Mat*)contours_mat_nativeObj);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& hierarchy = *((Mat*)hierarchy_nativeObj);
+ Point offset((int)offset_x, (int)offset_y);
+ cv::findContours( image, contours, hierarchy, (int)mode, (int)method, offset );
+ vector_vector_Point_to_Mat( contours, contours_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_findContours_11 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_findContours_11
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong contours_mat_nativeObj, jlong hierarchy_nativeObj, jint mode, jint method)
+{
+ static const char method_name[] = "imgproc::findContours_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<Point> > contours;
+ Mat& contours_mat = *((Mat*)contours_mat_nativeObj);
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& hierarchy = *((Mat*)hierarchy_nativeObj);
+ cv::findContours( image, contours, hierarchy, (int)mode, (int)method );
+ vector_vector_Point_to_Mat( contours, contours_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void approxPolyDP(vector_Point2f curve, vector_Point2f& approxCurve, double epsilon, bool closed)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_approxPolyDP_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_approxPolyDP_10
+ (JNIEnv* env, jclass , jlong curve_mat_nativeObj, jlong approxCurve_mat_nativeObj, jdouble epsilon, jboolean closed)
+{
+ static const char method_name[] = "imgproc::approxPolyDP_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> curve;
+ Mat& curve_mat = *((Mat*)curve_mat_nativeObj);
+ Mat_to_vector_Point2f( curve_mat, curve );
+ std::vector<Point2f> approxCurve;
+ Mat& approxCurve_mat = *((Mat*)approxCurve_mat_nativeObj);
+ cv::approxPolyDP( curve, approxCurve, (double)epsilon, (bool)closed );
+ vector_Point2f_to_Mat( approxCurve, approxCurve_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double arcLength(vector_Point2f curve, bool closed)
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_imgproc_Imgproc_arcLength_10 (JNIEnv*, jclass, jlong, jboolean);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_imgproc_Imgproc_arcLength_10
+ (JNIEnv* env, jclass , jlong curve_mat_nativeObj, jboolean closed)
+{
+ static const char method_name[] = "imgproc::arcLength_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> curve;
+ Mat& curve_mat = *((Mat*)curve_mat_nativeObj);
+ Mat_to_vector_Point2f( curve_mat, curve );
+ double _retval_ = cv::arcLength( curve, (bool)closed );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Rect boundingRect(vector_Point points)
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Imgproc_boundingRect_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Imgproc_boundingRect_10
+ (JNIEnv* env, jclass , jlong points_mat_nativeObj)
+{
+ static const char method_name[] = "imgproc::boundingRect_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point> points;
+ Mat& points_mat = *((Mat*)points_mat_nativeObj);
+ Mat_to_vector_Point( points_mat, points );
+ Rect _retval_ = cv::boundingRect( points );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(4); jdouble _tmp_retval_[4] = {_retval_.x, _retval_.y, _retval_.width, _retval_.height}; env->SetDoubleArrayRegion(_da_retval_, 0, 4, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// double contourArea(Mat contour, bool oriented = false)
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_imgproc_Imgproc_contourArea_10 (JNIEnv*, jclass, jlong, jboolean);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_imgproc_Imgproc_contourArea_10
+ (JNIEnv* env, jclass , jlong contour_nativeObj, jboolean oriented)
+{
+ static const char method_name[] = "imgproc::contourArea_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& contour = *((Mat*)contour_nativeObj);
+ double _retval_ = cv::contourArea( contour, (bool)oriented );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_imgproc_Imgproc_contourArea_11 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_imgproc_Imgproc_contourArea_11
+ (JNIEnv* env, jclass , jlong contour_nativeObj)
+{
+ static const char method_name[] = "imgproc::contourArea_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& contour = *((Mat*)contour_nativeObj);
+ double _retval_ = cv::contourArea( contour );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// RotatedRect minAreaRect(vector_Point2f points)
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Imgproc_minAreaRect_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Imgproc_minAreaRect_10
+ (JNIEnv* env, jclass , jlong points_mat_nativeObj)
+{
+ static const char method_name[] = "imgproc::minAreaRect_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> points;
+ Mat& points_mat = *((Mat*)points_mat_nativeObj);
+ Mat_to_vector_Point2f( points_mat, points );
+ RotatedRect _retval_ = cv::minAreaRect( points );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(5); jdouble _tmp_retval_[5] = {_retval_.center.x, _retval_.center.y, _retval_.size.width, _retval_.size.height, _retval_.angle}; env->SetDoubleArrayRegion(_da_retval_, 0, 5, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void boxPoints(RotatedRect box, Mat& points)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_boxPoints_10 (JNIEnv*, jclass, jdouble, jdouble, jdouble, jdouble, jdouble, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_boxPoints_10
+ (JNIEnv* env, jclass , jdouble box_center_x, jdouble box_center_y, jdouble box_size_width, jdouble box_size_height, jdouble box_angle, jlong points_nativeObj)
+{
+ static const char method_name[] = "imgproc::boxPoints_10()";
+ try {
+ LOGD("%s", method_name);
+ RotatedRect box(cv::Point2f(box_center_x, box_center_y), cv::Size2f(box_size_width, box_size_height), box_angle);
+ Mat& points = *((Mat*)points_nativeObj);
+ cv::boxPoints( box, points );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void minEnclosingCircle(vector_Point2f points, Point2f& center, float& radius)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_minEnclosingCircle_10 (JNIEnv*, jclass, jlong, jdoubleArray, jdoubleArray);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_minEnclosingCircle_10
+ (JNIEnv* env, jclass , jlong points_mat_nativeObj, jdoubleArray center_out, jdoubleArray radius_out)
+{
+ static const char method_name[] = "imgproc::minEnclosingCircle_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> points;
+ Mat& points_mat = *((Mat*)points_mat_nativeObj);
+ Mat_to_vector_Point2f( points_mat, points );
+ Point2f center;
+ float radius;
+ cv::minEnclosingCircle( points, center, radius );
+ jdouble tmp_center[2] = {center.x, center.y}; env->SetDoubleArrayRegion(center_out, 0, 2, tmp_center); jdouble tmp_radius[1] = {radius}; env->SetDoubleArrayRegion(radius_out, 0, 1, tmp_radius);
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double minEnclosingTriangle(Mat points, Mat& triangle)
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_imgproc_Imgproc_minEnclosingTriangle_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_imgproc_Imgproc_minEnclosingTriangle_10
+ (JNIEnv* env, jclass , jlong points_nativeObj, jlong triangle_nativeObj)
+{
+ static const char method_name[] = "imgproc::minEnclosingTriangle_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& points = *((Mat*)points_nativeObj);
+ Mat& triangle = *((Mat*)triangle_nativeObj);
+ double _retval_ = cv::minEnclosingTriangle( points, triangle );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// double matchShapes(Mat contour1, Mat contour2, int method, double parameter)
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_imgproc_Imgproc_matchShapes_10 (JNIEnv*, jclass, jlong, jlong, jint, jdouble);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_imgproc_Imgproc_matchShapes_10
+ (JNIEnv* env, jclass , jlong contour1_nativeObj, jlong contour2_nativeObj, jint method, jdouble parameter)
+{
+ static const char method_name[] = "imgproc::matchShapes_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& contour1 = *((Mat*)contour1_nativeObj);
+ Mat& contour2 = *((Mat*)contour2_nativeObj);
+ double _retval_ = cv::matchShapes( contour1, contour2, (int)method, (double)parameter );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void convexHull(vector_Point points, vector_int& hull, bool clockwise = false, _hidden_ returnPoints = true)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_convexHull_10 (JNIEnv*, jclass, jlong, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_convexHull_10
+ (JNIEnv* env, jclass , jlong points_mat_nativeObj, jlong hull_mat_nativeObj, jboolean clockwise)
+{
+ static const char method_name[] = "imgproc::convexHull_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point> points;
+ Mat& points_mat = *((Mat*)points_mat_nativeObj);
+ Mat_to_vector_Point( points_mat, points );
+ std::vector<int> hull;
+ Mat& hull_mat = *((Mat*)hull_mat_nativeObj);
+ cv::convexHull( points, hull, (bool)clockwise, true );
+ vector_int_to_Mat( hull, hull_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_convexHull_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_convexHull_11
+ (JNIEnv* env, jclass , jlong points_mat_nativeObj, jlong hull_mat_nativeObj)
+{
+ static const char method_name[] = "imgproc::convexHull_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point> points;
+ Mat& points_mat = *((Mat*)points_mat_nativeObj);
+ Mat_to_vector_Point( points_mat, points );
+ std::vector<int> hull;
+ Mat& hull_mat = *((Mat*)hull_mat_nativeObj);
+ cv::convexHull( points, hull );
+ vector_int_to_Mat( hull, hull_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void convexityDefects(vector_Point contour, vector_int convexhull, vector_Vec4i& convexityDefects)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_convexityDefects_10 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_convexityDefects_10
+ (JNIEnv* env, jclass , jlong contour_mat_nativeObj, jlong convexhull_mat_nativeObj, jlong convexityDefects_mat_nativeObj)
+{
+ static const char method_name[] = "imgproc::convexityDefects_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point> contour;
+ Mat& contour_mat = *((Mat*)contour_mat_nativeObj);
+ Mat_to_vector_Point( contour_mat, contour );
+ std::vector<int> convexhull;
+ Mat& convexhull_mat = *((Mat*)convexhull_mat_nativeObj);
+ Mat_to_vector_int( convexhull_mat, convexhull );
+ std::vector<Vec4i> convexityDefects;
+ Mat& convexityDefects_mat = *((Mat*)convexityDefects_mat_nativeObj);
+ cv::convexityDefects( contour, convexhull, convexityDefects );
+ vector_Vec4i_to_Mat( convexityDefects, convexityDefects_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool isContourConvex(vector_Point contour)
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_imgproc_Imgproc_isContourConvex_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_imgproc_Imgproc_isContourConvex_10
+ (JNIEnv* env, jclass , jlong contour_mat_nativeObj)
+{
+ static const char method_name[] = "imgproc::isContourConvex_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point> contour;
+ Mat& contour_mat = *((Mat*)contour_mat_nativeObj);
+ Mat_to_vector_Point( contour_mat, contour );
+ bool _retval_ = cv::isContourConvex( contour );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// float intersectConvexConvex(Mat _p1, Mat _p2, Mat& _p12, bool handleNested = true)
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_imgproc_Imgproc_intersectConvexConvex_10 (JNIEnv*, jclass, jlong, jlong, jlong, jboolean);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_imgproc_Imgproc_intersectConvexConvex_10
+ (JNIEnv* env, jclass , jlong _p1_nativeObj, jlong _p2_nativeObj, jlong _p12_nativeObj, jboolean handleNested)
+{
+ static const char method_name[] = "imgproc::intersectConvexConvex_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& _p1 = *((Mat*)_p1_nativeObj);
+ Mat& _p2 = *((Mat*)_p2_nativeObj);
+ Mat& _p12 = *((Mat*)_p12_nativeObj);
+ float _retval_ = cv::intersectConvexConvex( _p1, _p2, _p12, (bool)handleNested );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_imgproc_Imgproc_intersectConvexConvex_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_imgproc_Imgproc_intersectConvexConvex_11
+ (JNIEnv* env, jclass , jlong _p1_nativeObj, jlong _p2_nativeObj, jlong _p12_nativeObj)
+{
+ static const char method_name[] = "imgproc::intersectConvexConvex_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& _p1 = *((Mat*)_p1_nativeObj);
+ Mat& _p2 = *((Mat*)_p2_nativeObj);
+ Mat& _p12 = *((Mat*)_p12_nativeObj);
+ float _retval_ = cv::intersectConvexConvex( _p1, _p2, _p12 );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// RotatedRect fitEllipse(vector_Point2f points)
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Imgproc_fitEllipse_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Imgproc_fitEllipse_10
+ (JNIEnv* env, jclass , jlong points_mat_nativeObj)
+{
+ static const char method_name[] = "imgproc::fitEllipse_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> points;
+ Mat& points_mat = *((Mat*)points_mat_nativeObj);
+ Mat_to_vector_Point2f( points_mat, points );
+ RotatedRect _retval_ = cv::fitEllipse( points );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(5); jdouble _tmp_retval_[5] = {_retval_.center.x, _retval_.center.y, _retval_.size.width, _retval_.size.height, _retval_.angle}; env->SetDoubleArrayRegion(_da_retval_, 0, 5, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void fitLine(Mat points, Mat& line, int distType, double param, double reps, double aeps)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_fitLine_10 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_fitLine_10
+ (JNIEnv* env, jclass , jlong points_nativeObj, jlong line_nativeObj, jint distType, jdouble param, jdouble reps, jdouble aeps)
+{
+ static const char method_name[] = "imgproc::fitLine_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& points = *((Mat*)points_nativeObj);
+ Mat& line = *((Mat*)line_nativeObj);
+ cv::fitLine( points, line, (int)distType, (double)param, (double)reps, (double)aeps );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double pointPolygonTest(vector_Point2f contour, Point2f pt, bool measureDist)
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_imgproc_Imgproc_pointPolygonTest_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jboolean);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_imgproc_Imgproc_pointPolygonTest_10
+ (JNIEnv* env, jclass , jlong contour_mat_nativeObj, jdouble pt_x, jdouble pt_y, jboolean measureDist)
+{
+ static const char method_name[] = "imgproc::pointPolygonTest_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> contour;
+ Mat& contour_mat = *((Mat*)contour_mat_nativeObj);
+ Mat_to_vector_Point2f( contour_mat, contour );
+ Point2f pt((float)pt_x, (float)pt_y);
+ double _retval_ = cv::pointPolygonTest( contour, pt, (bool)measureDist );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int rotatedRectangleIntersection(RotatedRect rect1, RotatedRect rect2, Mat& intersectingRegion)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Imgproc_rotatedRectangleIntersection_10 (JNIEnv*, jclass, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_imgproc_Imgproc_rotatedRectangleIntersection_10
+ (JNIEnv* env, jclass , jdouble rect1_center_x, jdouble rect1_center_y, jdouble rect1_size_width, jdouble rect1_size_height, jdouble rect1_angle, jdouble rect2_center_x, jdouble rect2_center_y, jdouble rect2_size_width, jdouble rect2_size_height, jdouble rect2_angle, jlong intersectingRegion_nativeObj)
+{
+ static const char method_name[] = "imgproc::rotatedRectangleIntersection_10()";
+ try {
+ LOGD("%s", method_name);
+ RotatedRect rect1(cv::Point2f(rect1_center_x, rect1_center_y), cv::Size2f(rect1_size_width, rect1_size_height), rect1_angle);
+ RotatedRect rect2(cv::Point2f(rect2_center_x, rect2_center_y), cv::Size2f(rect2_size_width, rect2_size_height), rect2_angle);
+ Mat& intersectingRegion = *((Mat*)intersectingRegion_nativeObj);
+ int _retval_ = cv::rotatedRectangleIntersection( rect1, rect2, intersectingRegion );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Ptr_CLAHE createCLAHE(double clipLimit = 40.0, Size tileGridSize = Size(8, 8))
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_createCLAHE_10 (JNIEnv*, jclass, jdouble, jdouble, jdouble);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_createCLAHE_10
+ (JNIEnv* env, jclass , jdouble clipLimit, jdouble tileGridSize_width, jdouble tileGridSize_height)
+{
+ static const char method_name[] = "imgproc::createCLAHE_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::CLAHE> Ptr_CLAHE;
+ Size tileGridSize((int)tileGridSize_width, (int)tileGridSize_height);
+ Ptr_CLAHE _retval_ = cv::createCLAHE( (double)clipLimit, tileGridSize );
+ return (jlong)(new Ptr_CLAHE(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_createCLAHE_11 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_imgproc_Imgproc_createCLAHE_11
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "imgproc::createCLAHE_11()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::CLAHE> Ptr_CLAHE;
+ Ptr_CLAHE _retval_ = cv::createCLAHE( );
+ return (jlong)(new Ptr_CLAHE(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void applyColorMap(Mat src, Mat& dst, int colormap)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_applyColorMap_10 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_applyColorMap_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint colormap)
+{
+ static const char method_name[] = "imgproc::applyColorMap_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::applyColorMap( src, dst, (int)colormap );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void line(Mat& img, Point pt1, Point pt2, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_line_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_line_10
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble pt1_x, jdouble pt1_y, jdouble pt2_x, jdouble pt2_y, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint thickness, jint lineType, jint shift)
+{
+ static const char method_name[] = "imgproc::line_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ Point pt1((int)pt1_x, (int)pt1_y);
+ Point pt2((int)pt2_x, (int)pt2_y);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::line( img, pt1, pt2, color, (int)thickness, (int)lineType, (int)shift );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_line_11 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_line_11
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble pt1_x, jdouble pt1_y, jdouble pt2_x, jdouble pt2_y, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint thickness)
+{
+ static const char method_name[] = "imgproc::line_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ Point pt1((int)pt1_x, (int)pt1_y);
+ Point pt2((int)pt2_x, (int)pt2_y);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::line( img, pt1, pt2, color, (int)thickness );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_line_12 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_line_12
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble pt1_x, jdouble pt1_y, jdouble pt2_x, jdouble pt2_y, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3)
+{
+ static const char method_name[] = "imgproc::line_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ Point pt1((int)pt1_x, (int)pt1_y);
+ Point pt2((int)pt2_x, (int)pt2_y);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::line( img, pt1, pt2, color );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void arrowedLine(Mat& img, Point pt1, Point pt2, Scalar color, int thickness = 1, int line_type = 8, int shift = 0, double tipLength = 0.1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_arrowedLine_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jint, jint, jint, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_arrowedLine_10
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble pt1_x, jdouble pt1_y, jdouble pt2_x, jdouble pt2_y, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint thickness, jint line_type, jint shift, jdouble tipLength)
+{
+ static const char method_name[] = "imgproc::arrowedLine_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ Point pt1((int)pt1_x, (int)pt1_y);
+ Point pt2((int)pt2_x, (int)pt2_y);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::arrowedLine( img, pt1, pt2, color, (int)thickness, (int)line_type, (int)shift, (double)tipLength );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_arrowedLine_11 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_arrowedLine_11
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble pt1_x, jdouble pt1_y, jdouble pt2_x, jdouble pt2_y, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3)
+{
+ static const char method_name[] = "imgproc::arrowedLine_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ Point pt1((int)pt1_x, (int)pt1_y);
+ Point pt2((int)pt2_x, (int)pt2_y);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::arrowedLine( img, pt1, pt2, color );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void rectangle(Mat& img, Point pt1, Point pt2, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_rectangle_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_rectangle_10
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble pt1_x, jdouble pt1_y, jdouble pt2_x, jdouble pt2_y, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint thickness, jint lineType, jint shift)
+{
+ static const char method_name[] = "imgproc::rectangle_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ Point pt1((int)pt1_x, (int)pt1_y);
+ Point pt2((int)pt2_x, (int)pt2_y);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::rectangle( img, pt1, pt2, color, (int)thickness, (int)lineType, (int)shift );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_rectangle_11 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_rectangle_11
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble pt1_x, jdouble pt1_y, jdouble pt2_x, jdouble pt2_y, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint thickness)
+{
+ static const char method_name[] = "imgproc::rectangle_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ Point pt1((int)pt1_x, (int)pt1_y);
+ Point pt2((int)pt2_x, (int)pt2_y);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::rectangle( img, pt1, pt2, color, (int)thickness );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_rectangle_12 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_rectangle_12
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble pt1_x, jdouble pt1_y, jdouble pt2_x, jdouble pt2_y, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3)
+{
+ static const char method_name[] = "imgproc::rectangle_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ Point pt1((int)pt1_x, (int)pt1_y);
+ Point pt2((int)pt2_x, (int)pt2_y);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::rectangle( img, pt1, pt2, color );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void circle(Mat& img, Point center, int radius, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_circle_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jint, jdouble, jdouble, jdouble, jdouble, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_circle_10
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble center_x, jdouble center_y, jint radius, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint thickness, jint lineType, jint shift)
+{
+ static const char method_name[] = "imgproc::circle_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ Point center((int)center_x, (int)center_y);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::circle( img, center, (int)radius, color, (int)thickness, (int)lineType, (int)shift );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_circle_11 (JNIEnv*, jclass, jlong, jdouble, jdouble, jint, jdouble, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_circle_11
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble center_x, jdouble center_y, jint radius, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint thickness)
+{
+ static const char method_name[] = "imgproc::circle_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ Point center((int)center_x, (int)center_y);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::circle( img, center, (int)radius, color, (int)thickness );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_circle_12 (JNIEnv*, jclass, jlong, jdouble, jdouble, jint, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_circle_12
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble center_x, jdouble center_y, jint radius, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3)
+{
+ static const char method_name[] = "imgproc::circle_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ Point center((int)center_x, (int)center_y);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::circle( img, center, (int)radius, color );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void ellipse(Mat& img, Point center, Size axes, double angle, double startAngle, double endAngle, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_ellipse_10 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_ellipse_10
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble center_x, jdouble center_y, jdouble axes_width, jdouble axes_height, jdouble angle, jdouble startAngle, jdouble endAngle, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint thickness, jint lineType, jint shift)
+{
+ static const char method_name[] = "imgproc::ellipse_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ Point center((int)center_x, (int)center_y);
+ Size axes((int)axes_width, (int)axes_height);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::ellipse( img, center, axes, (double)angle, (double)startAngle, (double)endAngle, color, (int)thickness, (int)lineType, (int)shift );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_ellipse_11 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_ellipse_11
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble center_x, jdouble center_y, jdouble axes_width, jdouble axes_height, jdouble angle, jdouble startAngle, jdouble endAngle, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint thickness)
+{
+ static const char method_name[] = "imgproc::ellipse_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ Point center((int)center_x, (int)center_y);
+ Size axes((int)axes_width, (int)axes_height);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::ellipse( img, center, axes, (double)angle, (double)startAngle, (double)endAngle, color, (int)thickness );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_ellipse_12 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_ellipse_12
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble center_x, jdouble center_y, jdouble axes_width, jdouble axes_height, jdouble angle, jdouble startAngle, jdouble endAngle, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3)
+{
+ static const char method_name[] = "imgproc::ellipse_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ Point center((int)center_x, (int)center_y);
+ Size axes((int)axes_width, (int)axes_height);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::ellipse( img, center, axes, (double)angle, (double)startAngle, (double)endAngle, color );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void ellipse(Mat& img, RotatedRect box, Scalar color, int thickness = 1, int lineType = LINE_8)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_ellipse_13 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_ellipse_13
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble box_center_x, jdouble box_center_y, jdouble box_size_width, jdouble box_size_height, jdouble box_angle, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint thickness, jint lineType)
+{
+ static const char method_name[] = "imgproc::ellipse_13()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ RotatedRect box(cv::Point2f(box_center_x, box_center_y), cv::Size2f(box_size_width, box_size_height), box_angle);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::ellipse( img, box, color, (int)thickness, (int)lineType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_ellipse_14 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_ellipse_14
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble box_center_x, jdouble box_center_y, jdouble box_size_width, jdouble box_size_height, jdouble box_angle, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint thickness)
+{
+ static const char method_name[] = "imgproc::ellipse_14()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ RotatedRect box(cv::Point2f(box_center_x, box_center_y), cv::Size2f(box_size_width, box_size_height), box_angle);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::ellipse( img, box, color, (int)thickness );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_ellipse_15 (JNIEnv*, jclass, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_ellipse_15
+ (JNIEnv* env, jclass , jlong img_nativeObj, jdouble box_center_x, jdouble box_center_y, jdouble box_size_width, jdouble box_size_height, jdouble box_angle, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3)
+{
+ static const char method_name[] = "imgproc::ellipse_15()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ RotatedRect box(cv::Point2f(box_center_x, box_center_y), cv::Size2f(box_size_width, box_size_height), box_angle);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::ellipse( img, box, color );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void fillConvexPoly(Mat& img, vector_Point points, Scalar color, int lineType = LINE_8, int shift = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_fillConvexPoly_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble, jdouble, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_fillConvexPoly_10
+ (JNIEnv* env, jclass , jlong img_nativeObj, jlong points_mat_nativeObj, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint lineType, jint shift)
+{
+ static const char method_name[] = "imgproc::fillConvexPoly_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point> points;
+ Mat& points_mat = *((Mat*)points_mat_nativeObj);
+ Mat_to_vector_Point( points_mat, points );
+ Mat& img = *((Mat*)img_nativeObj);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::fillConvexPoly( img, points, color, (int)lineType, (int)shift );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_fillConvexPoly_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_fillConvexPoly_11
+ (JNIEnv* env, jclass , jlong img_nativeObj, jlong points_mat_nativeObj, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3)
+{
+ static const char method_name[] = "imgproc::fillConvexPoly_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point> points;
+ Mat& points_mat = *((Mat*)points_mat_nativeObj);
+ Mat_to_vector_Point( points_mat, points );
+ Mat& img = *((Mat*)img_nativeObj);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::fillConvexPoly( img, points, color );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void fillPoly(Mat& img, vector_vector_Point pts, Scalar color, int lineType = LINE_8, int shift = 0, Point offset = Point())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_fillPoly_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble, jdouble, jint, jint, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_fillPoly_10
+ (JNIEnv* env, jclass , jlong img_nativeObj, jlong pts_mat_nativeObj, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint lineType, jint shift, jdouble offset_x, jdouble offset_y)
+{
+ static const char method_name[] = "imgproc::fillPoly_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<Point> > pts;
+ Mat& pts_mat = *((Mat*)pts_mat_nativeObj);
+ Mat_to_vector_vector_Point( pts_mat, pts );
+ Mat& img = *((Mat*)img_nativeObj);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ Point offset((int)offset_x, (int)offset_y);
+ cv::fillPoly( img, pts, color, (int)lineType, (int)shift, offset );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_fillPoly_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_fillPoly_11
+ (JNIEnv* env, jclass , jlong img_nativeObj, jlong pts_mat_nativeObj, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3)
+{
+ static const char method_name[] = "imgproc::fillPoly_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<Point> > pts;
+ Mat& pts_mat = *((Mat*)pts_mat_nativeObj);
+ Mat_to_vector_vector_Point( pts_mat, pts );
+ Mat& img = *((Mat*)img_nativeObj);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::fillPoly( img, pts, color );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void polylines(Mat& img, vector_vector_Point pts, bool isClosed, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_polylines_10 (JNIEnv*, jclass, jlong, jlong, jboolean, jdouble, jdouble, jdouble, jdouble, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_polylines_10
+ (JNIEnv* env, jclass , jlong img_nativeObj, jlong pts_mat_nativeObj, jboolean isClosed, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint thickness, jint lineType, jint shift)
+{
+ static const char method_name[] = "imgproc::polylines_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<Point> > pts;
+ Mat& pts_mat = *((Mat*)pts_mat_nativeObj);
+ Mat_to_vector_vector_Point( pts_mat, pts );
+ Mat& img = *((Mat*)img_nativeObj);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::polylines( img, pts, (bool)isClosed, color, (int)thickness, (int)lineType, (int)shift );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_polylines_11 (JNIEnv*, jclass, jlong, jlong, jboolean, jdouble, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_polylines_11
+ (JNIEnv* env, jclass , jlong img_nativeObj, jlong pts_mat_nativeObj, jboolean isClosed, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint thickness)
+{
+ static const char method_name[] = "imgproc::polylines_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<Point> > pts;
+ Mat& pts_mat = *((Mat*)pts_mat_nativeObj);
+ Mat_to_vector_vector_Point( pts_mat, pts );
+ Mat& img = *((Mat*)img_nativeObj);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::polylines( img, pts, (bool)isClosed, color, (int)thickness );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_polylines_12 (JNIEnv*, jclass, jlong, jlong, jboolean, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_polylines_12
+ (JNIEnv* env, jclass , jlong img_nativeObj, jlong pts_mat_nativeObj, jboolean isClosed, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3)
+{
+ static const char method_name[] = "imgproc::polylines_12()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<Point> > pts;
+ Mat& pts_mat = *((Mat*)pts_mat_nativeObj);
+ Mat_to_vector_vector_Point( pts_mat, pts );
+ Mat& img = *((Mat*)img_nativeObj);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::polylines( img, pts, (bool)isClosed, color );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void drawContours(Mat& image, vector_vector_Point contours, int contourIdx, Scalar color, int thickness = 1, int lineType = LINE_8, Mat hierarchy = Mat(), int maxLevel = INT_MAX, Point offset = Point())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_drawContours_10 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jdouble, jdouble, jdouble, jint, jint, jlong, jint, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_drawContours_10
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong contours_mat_nativeObj, jint contourIdx, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint thickness, jint lineType, jlong hierarchy_nativeObj, jint maxLevel, jdouble offset_x, jdouble offset_y)
+{
+ static const char method_name[] = "imgproc::drawContours_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<Point> > contours;
+ Mat& contours_mat = *((Mat*)contours_mat_nativeObj);
+ Mat_to_vector_vector_Point( contours_mat, contours );
+ Mat& image = *((Mat*)image_nativeObj);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ Mat& hierarchy = *((Mat*)hierarchy_nativeObj);
+ Point offset((int)offset_x, (int)offset_y);
+ cv::drawContours( image, contours, (int)contourIdx, color, (int)thickness, (int)lineType, hierarchy, (int)maxLevel, offset );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_drawContours_11 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_drawContours_11
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong contours_mat_nativeObj, jint contourIdx, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint thickness)
+{
+ static const char method_name[] = "imgproc::drawContours_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<Point> > contours;
+ Mat& contours_mat = *((Mat*)contours_mat_nativeObj);
+ Mat_to_vector_vector_Point( contours_mat, contours );
+ Mat& image = *((Mat*)image_nativeObj);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::drawContours( image, contours, (int)contourIdx, color, (int)thickness );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_drawContours_12 (JNIEnv*, jclass, jlong, jlong, jint, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_drawContours_12
+ (JNIEnv* env, jclass , jlong image_nativeObj, jlong contours_mat_nativeObj, jint contourIdx, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3)
+{
+ static const char method_name[] = "imgproc::drawContours_12()";
+ try {
+ LOGD("%s", method_name);
+ std::vector< std::vector<Point> > contours;
+ Mat& contours_mat = *((Mat*)contours_mat_nativeObj);
+ Mat_to_vector_vector_Point( contours_mat, contours );
+ Mat& image = *((Mat*)image_nativeObj);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::drawContours( image, contours, (int)contourIdx, color );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool clipLine(Rect imgRect, Point& pt1, Point& pt2)
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_imgproc_Imgproc_clipLine_10 (JNIEnv*, jclass, jint, jint, jint, jint, jdouble, jdouble, jdoubleArray, jdouble, jdouble, jdoubleArray);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_imgproc_Imgproc_clipLine_10
+ (JNIEnv* env, jclass , jint imgRect_x, jint imgRect_y, jint imgRect_width, jint imgRect_height, jdouble pt1_x, jdouble pt1_y, jdoubleArray pt1_out, jdouble pt2_x, jdouble pt2_y, jdoubleArray pt2_out)
+{
+ static const char method_name[] = "imgproc::clipLine_10()";
+ try {
+ LOGD("%s", method_name);
+ Rect imgRect(imgRect_x, imgRect_y, imgRect_width, imgRect_height);
+ Point pt1((int)pt1_x, (int)pt1_y);
+ Point pt2((int)pt2_x, (int)pt2_y);
+ bool _retval_ = cv::clipLine( imgRect, pt1, pt2 );
+ jdouble tmp_pt1[2] = {pt1.x, pt1.y}; env->SetDoubleArrayRegion(pt1_out, 0, 2, tmp_pt1); jdouble tmp_pt2[2] = {pt2.x, pt2.y}; env->SetDoubleArrayRegion(pt2_out, 0, 2, tmp_pt2);
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void ellipse2Poly(Point center, Size axes, int angle, int arcStart, int arcEnd, int delta, vector_Point& pts)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_ellipse2Poly_10 (JNIEnv*, jclass, jdouble, jdouble, jdouble, jdouble, jint, jint, jint, jint, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_ellipse2Poly_10
+ (JNIEnv* env, jclass , jdouble center_x, jdouble center_y, jdouble axes_width, jdouble axes_height, jint angle, jint arcStart, jint arcEnd, jint delta, jlong pts_mat_nativeObj)
+{
+ static const char method_name[] = "imgproc::ellipse2Poly_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point> pts;
+ Mat& pts_mat = *((Mat*)pts_mat_nativeObj);
+ Point center((int)center_x, (int)center_y);
+ Size axes((int)axes_width, (int)axes_height);
+ cv::ellipse2Poly( center, axes, (int)angle, (int)arcStart, (int)arcEnd, (int)delta, pts );
+ vector_Point_to_Mat( pts, pts_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void putText(Mat& img, String text, Point org, int fontFace, double fontScale, Scalar color, int thickness = 1, int lineType = LINE_8, bool bottomLeftOrigin = false)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_putText_10 (JNIEnv*, jclass, jlong, jstring, jdouble, jdouble, jint, jdouble, jdouble, jdouble, jdouble, jdouble, jint, jint, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_putText_10
+ (JNIEnv* env, jclass , jlong img_nativeObj, jstring text, jdouble org_x, jdouble org_y, jint fontFace, jdouble fontScale, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint thickness, jint lineType, jboolean bottomLeftOrigin)
+{
+ static const char method_name[] = "imgproc::putText_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ const char* utf_text = env->GetStringUTFChars(text, 0); String n_text( utf_text ? utf_text : "" ); env->ReleaseStringUTFChars(text, utf_text);
+ Point org((int)org_x, (int)org_y);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::putText( img, n_text, org, (int)fontFace, (double)fontScale, color, (int)thickness, (int)lineType, (bool)bottomLeftOrigin );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_putText_11 (JNIEnv*, jclass, jlong, jstring, jdouble, jdouble, jint, jdouble, jdouble, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_putText_11
+ (JNIEnv* env, jclass , jlong img_nativeObj, jstring text, jdouble org_x, jdouble org_y, jint fontFace, jdouble fontScale, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3, jint thickness)
+{
+ static const char method_name[] = "imgproc::putText_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ const char* utf_text = env->GetStringUTFChars(text, 0); String n_text( utf_text ? utf_text : "" ); env->ReleaseStringUTFChars(text, utf_text);
+ Point org((int)org_x, (int)org_y);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::putText( img, n_text, org, (int)fontFace, (double)fontScale, color, (int)thickness );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_putText_12 (JNIEnv*, jclass, jlong, jstring, jdouble, jdouble, jint, jdouble, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_Imgproc_putText_12
+ (JNIEnv* env, jclass , jlong img_nativeObj, jstring text, jdouble org_x, jdouble org_y, jint fontFace, jdouble fontScale, jdouble color_val0, jdouble color_val1, jdouble color_val2, jdouble color_val3)
+{
+ static const char method_name[] = "imgproc::putText_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& img = *((Mat*)img_nativeObj);
+ const char* utf_text = env->GetStringUTFChars(text, 0); String n_text( utf_text ? utf_text : "" ); env->ReleaseStringUTFChars(text, utf_text);
+ Point org((int)org_x, (int)org_y);
+ Scalar color(color_val0, color_val1, color_val2, color_val3);
+ cv::putText( img, n_text, org, (int)fontFace, (double)fontScale, color );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+ // C++: Size getTextSize(const String& text, int fontFace, double fontScale, int thickness, int* baseLine);
+ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Imgproc_n_1getTextSize (JNIEnv*, jclass, jstring, jint, jdouble, jint, jintArray);
+
+ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Imgproc_n_1getTextSize
+ (JNIEnv* env, jclass, jstring text, jint fontFace, jdouble fontScale, jint thickness, jintArray baseLine)
+ {
+ try {
+ LOGD("Core::n_1getTextSize()");
+ jdoubleArray result;
+ result = env->NewDoubleArray(2);
+ if (result == NULL) {
+ return NULL; /* out of memory error thrown */
+ }
+
+ const char* utf_text = env->GetStringUTFChars(text, 0);
+ String n_text( utf_text ? utf_text : "" );
+ env->ReleaseStringUTFChars(text, utf_text);
+
+ int _baseLine;
+ int* pbaseLine = 0;
+
+ if (baseLine != NULL)
+ pbaseLine = &_baseLine;
+
+ cv::Size rsize = cv::getTextSize(n_text, (int)fontFace, (double)fontScale, (int)thickness, pbaseLine);
+
+ jdouble fill[2];
+ fill[0]=rsize.width;
+ fill[1]=rsize.height;
+
+ env->SetDoubleArrayRegion(result, 0, 2, fill);
+
+ if (baseLine != NULL) {
+ jint jbaseLine = (jint)(*pbaseLine);
+ env->SetIntArrayRegion(baseLine, 0, 1, &jbaseLine);
+ }
+
+ return result;
+
+ } catch(const cv::Exception& e) {
+ LOGD("Imgproc::n_1getTextSize() 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 NULL;
+ } catch (...) {
+ LOGD("Imgproc::n_1getTextSize() catched unknown exception (...)");
+ jclass je = env->FindClass("java/lang/Exception");
+ env->ThrowNew(je, "Unknown exception in JNI code {core::getTextSize()}");
+ return NULL;
+ }
+ }
+
+//
+// void apply(Mat src, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_CLAHE_apply_10 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_CLAHE_apply_10
+ (JNIEnv* env, jclass , jlong self, jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "imgproc::apply_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::CLAHE>* me = (Ptr<cv::CLAHE>*) self; //TODO: check for NULL
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ (*me)->apply( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void setClipLimit(double clipLimit)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_CLAHE_setClipLimit_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_CLAHE_setClipLimit_10
+ (JNIEnv* env, jclass , jlong self, jdouble clipLimit)
+{
+ static const char method_name[] = "imgproc::setClipLimit_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::CLAHE>* me = (Ptr<cv::CLAHE>*) self; //TODO: check for NULL
+ (*me)->setClipLimit( (double)clipLimit );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getClipLimit()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_imgproc_CLAHE_getClipLimit_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_imgproc_CLAHE_getClipLimit_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "imgproc::getClipLimit_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::CLAHE>* me = (Ptr<cv::CLAHE>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getClipLimit( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setTilesGridSize(Size tileGridSize)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_CLAHE_setTilesGridSize_10 (JNIEnv*, jclass, jlong, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_CLAHE_setTilesGridSize_10
+ (JNIEnv* env, jclass , jlong self, jdouble tileGridSize_width, jdouble tileGridSize_height)
+{
+ static const char method_name[] = "imgproc::setTilesGridSize_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::CLAHE>* me = (Ptr<cv::CLAHE>*) self; //TODO: check for NULL
+ Size tileGridSize((int)tileGridSize_width, (int)tileGridSize_height);
+ (*me)->setTilesGridSize( tileGridSize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Size getTilesGridSize()
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_CLAHE_getTilesGridSize_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_CLAHE_getTilesGridSize_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "imgproc::getTilesGridSize_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::CLAHE>* me = (Ptr<cv::CLAHE>*) self; //TODO: check for NULL
+ Size _retval_ = (*me)->getTilesGridSize( );
+ 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(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void collectGarbage()
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_CLAHE_collectGarbage_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_CLAHE_collectGarbage_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "imgproc::collectGarbage_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::CLAHE>* me = (Ptr<cv::CLAHE>*) self; //TODO: check for NULL
+ (*me)->collectGarbage( );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::CLAHE>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_CLAHE_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_imgproc_CLAHE_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::CLAHE>*) self;
+}
+
+
+
+} // extern "C"
+
+#endif // HAVE_OPENCV_IMGPROC
diff --git a/modules/java/src/ml+ANN_MLP.java b/modules/java/src/ml+ANN_MLP.java
new file mode 100644
index 0000000..35a916b
--- /dev/null
+++ b/modules/java/src/ml+ANN_MLP.java
@@ -0,0 +1,449 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import org.opencv.core.Mat;
+import org.opencv.core.TermCriteria;
+
+// C++: class ANN_MLP
+//javadoc: ANN_MLP
+public class ANN_MLP extends StatModel {
+
+ protected ANN_MLP(long addr) { super(addr); }
+
+
+ public static final int
+ BACKPROP = 0,
+ RPROP = 1,
+ IDENTITY = 0,
+ SIGMOID_SYM = 1,
+ GAUSSIAN = 2,
+ UPDATE_WEIGHTS = 1,
+ NO_INPUT_SCALE = 2,
+ NO_OUTPUT_SCALE = 4;
+
+
+ //
+ // C++: void setTrainMethod(int method, double param1 = 0, double param2 = 0)
+ //
+
+ //javadoc: ANN_MLP::setTrainMethod(method, param1, param2)
+ public void setTrainMethod(int method, double param1, double param2)
+ {
+
+ setTrainMethod_0(nativeObj, method, param1, param2);
+
+ return;
+ }
+
+ //javadoc: ANN_MLP::setTrainMethod(method)
+ public void setTrainMethod(int method)
+ {
+
+ setTrainMethod_1(nativeObj, method);
+
+ return;
+ }
+
+
+ //
+ // C++: void setActivationFunction(int type, double param1 = 0, double param2 = 0)
+ //
+
+ //javadoc: ANN_MLP::setActivationFunction(type, param1, param2)
+ public void setActivationFunction(int type, double param1, double param2)
+ {
+
+ setActivationFunction_0(nativeObj, type, param1, param2);
+
+ return;
+ }
+
+ //javadoc: ANN_MLP::setActivationFunction(type)
+ public void setActivationFunction(int type)
+ {
+
+ setActivationFunction_1(nativeObj, type);
+
+ return;
+ }
+
+
+ //
+ // C++: int getTrainMethod()
+ //
+
+ //javadoc: ANN_MLP::getTrainMethod()
+ public int getTrainMethod()
+ {
+
+ int retVal = getTrainMethod_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setLayerSizes(Mat _layer_sizes)
+ //
+
+ //javadoc: ANN_MLP::setLayerSizes(_layer_sizes)
+ public void setLayerSizes(Mat _layer_sizes)
+ {
+
+ setLayerSizes_0(nativeObj, _layer_sizes.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat getLayerSizes()
+ //
+
+ //javadoc: ANN_MLP::getLayerSizes()
+ public Mat getLayerSizes()
+ {
+
+ Mat retVal = new Mat(getLayerSizes_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: TermCriteria getTermCriteria()
+ //
+
+ //javadoc: ANN_MLP::getTermCriteria()
+ public TermCriteria getTermCriteria()
+ {
+
+ TermCriteria retVal = new TermCriteria(getTermCriteria_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setTermCriteria(TermCriteria val)
+ //
+
+ //javadoc: ANN_MLP::setTermCriteria(val)
+ public void setTermCriteria(TermCriteria val)
+ {
+
+ setTermCriteria_0(nativeObj, val.type, val.maxCount, val.epsilon);
+
+ return;
+ }
+
+
+ //
+ // C++: double getBackpropWeightScale()
+ //
+
+ //javadoc: ANN_MLP::getBackpropWeightScale()
+ public double getBackpropWeightScale()
+ {
+
+ double retVal = getBackpropWeightScale_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setBackpropWeightScale(double val)
+ //
+
+ //javadoc: ANN_MLP::setBackpropWeightScale(val)
+ public void setBackpropWeightScale(double val)
+ {
+
+ setBackpropWeightScale_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: double getBackpropMomentumScale()
+ //
+
+ //javadoc: ANN_MLP::getBackpropMomentumScale()
+ public double getBackpropMomentumScale()
+ {
+
+ double retVal = getBackpropMomentumScale_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setBackpropMomentumScale(double val)
+ //
+
+ //javadoc: ANN_MLP::setBackpropMomentumScale(val)
+ public void setBackpropMomentumScale(double val)
+ {
+
+ setBackpropMomentumScale_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: double getRpropDW0()
+ //
+
+ //javadoc: ANN_MLP::getRpropDW0()
+ public double getRpropDW0()
+ {
+
+ double retVal = getRpropDW0_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setRpropDW0(double val)
+ //
+
+ //javadoc: ANN_MLP::setRpropDW0(val)
+ public void setRpropDW0(double val)
+ {
+
+ setRpropDW0_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: double getRpropDWPlus()
+ //
+
+ //javadoc: ANN_MLP::getRpropDWPlus()
+ public double getRpropDWPlus()
+ {
+
+ double retVal = getRpropDWPlus_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setRpropDWPlus(double val)
+ //
+
+ //javadoc: ANN_MLP::setRpropDWPlus(val)
+ public void setRpropDWPlus(double val)
+ {
+
+ setRpropDWPlus_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: double getRpropDWMinus()
+ //
+
+ //javadoc: ANN_MLP::getRpropDWMinus()
+ public double getRpropDWMinus()
+ {
+
+ double retVal = getRpropDWMinus_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setRpropDWMinus(double val)
+ //
+
+ //javadoc: ANN_MLP::setRpropDWMinus(val)
+ public void setRpropDWMinus(double val)
+ {
+
+ setRpropDWMinus_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: double getRpropDWMin()
+ //
+
+ //javadoc: ANN_MLP::getRpropDWMin()
+ public double getRpropDWMin()
+ {
+
+ double retVal = getRpropDWMin_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setRpropDWMin(double val)
+ //
+
+ //javadoc: ANN_MLP::setRpropDWMin(val)
+ public void setRpropDWMin(double val)
+ {
+
+ setRpropDWMin_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: double getRpropDWMax()
+ //
+
+ //javadoc: ANN_MLP::getRpropDWMax()
+ public double getRpropDWMax()
+ {
+
+ double retVal = getRpropDWMax_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setRpropDWMax(double val)
+ //
+
+ //javadoc: ANN_MLP::setRpropDWMax(val)
+ public void setRpropDWMax(double val)
+ {
+
+ setRpropDWMax_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat getWeights(int layerIdx)
+ //
+
+ //javadoc: ANN_MLP::getWeights(layerIdx)
+ public Mat getWeights(int layerIdx)
+ {
+
+ Mat retVal = new Mat(getWeights_0(nativeObj, layerIdx));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static Ptr_ANN_MLP create()
+ //
+
+ //javadoc: ANN_MLP::create()
+ public static ANN_MLP create()
+ {
+
+ ANN_MLP retVal = new ANN_MLP(create_0());
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void setTrainMethod(int method, double param1 = 0, double param2 = 0)
+ private static native void setTrainMethod_0(long nativeObj, int method, double param1, double param2);
+ private static native void setTrainMethod_1(long nativeObj, int method);
+
+ // C++: void setActivationFunction(int type, double param1 = 0, double param2 = 0)
+ private static native void setActivationFunction_0(long nativeObj, int type, double param1, double param2);
+ private static native void setActivationFunction_1(long nativeObj, int type);
+
+ // C++: int getTrainMethod()
+ private static native int getTrainMethod_0(long nativeObj);
+
+ // C++: void setLayerSizes(Mat _layer_sizes)
+ private static native void setLayerSizes_0(long nativeObj, long _layer_sizes_nativeObj);
+
+ // C++: Mat getLayerSizes()
+ private static native long getLayerSizes_0(long nativeObj);
+
+ // C++: TermCriteria getTermCriteria()
+ private static native double[] getTermCriteria_0(long nativeObj);
+
+ // C++: void setTermCriteria(TermCriteria val)
+ private static native void setTermCriteria_0(long nativeObj, int val_type, int val_maxCount, double val_epsilon);
+
+ // C++: double getBackpropWeightScale()
+ private static native double getBackpropWeightScale_0(long nativeObj);
+
+ // C++: void setBackpropWeightScale(double val)
+ private static native void setBackpropWeightScale_0(long nativeObj, double val);
+
+ // C++: double getBackpropMomentumScale()
+ private static native double getBackpropMomentumScale_0(long nativeObj);
+
+ // C++: void setBackpropMomentumScale(double val)
+ private static native void setBackpropMomentumScale_0(long nativeObj, double val);
+
+ // C++: double getRpropDW0()
+ private static native double getRpropDW0_0(long nativeObj);
+
+ // C++: void setRpropDW0(double val)
+ private static native void setRpropDW0_0(long nativeObj, double val);
+
+ // C++: double getRpropDWPlus()
+ private static native double getRpropDWPlus_0(long nativeObj);
+
+ // C++: void setRpropDWPlus(double val)
+ private static native void setRpropDWPlus_0(long nativeObj, double val);
+
+ // C++: double getRpropDWMinus()
+ private static native double getRpropDWMinus_0(long nativeObj);
+
+ // C++: void setRpropDWMinus(double val)
+ private static native void setRpropDWMinus_0(long nativeObj, double val);
+
+ // C++: double getRpropDWMin()
+ private static native double getRpropDWMin_0(long nativeObj);
+
+ // C++: void setRpropDWMin(double val)
+ private static native void setRpropDWMin_0(long nativeObj, double val);
+
+ // C++: double getRpropDWMax()
+ private static native double getRpropDWMax_0(long nativeObj);
+
+ // C++: void setRpropDWMax(double val)
+ private static native void setRpropDWMax_0(long nativeObj, double val);
+
+ // C++: Mat getWeights(int layerIdx)
+ private static native long getWeights_0(long nativeObj, int layerIdx);
+
+ // C++: static Ptr_ANN_MLP create()
+ private static native long create_0();
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/ml+Boost.java b/modules/java/src/ml+Boost.java
new file mode 100644
index 0000000..a6ea173
--- /dev/null
+++ b/modules/java/src/ml+Boost.java
@@ -0,0 +1,152 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+
+
+// C++: class Boost
+//javadoc: Boost
+public class Boost extends DTrees {
+
+ protected Boost(long addr) { super(addr); }
+
+
+ public static final int
+ DISCRETE = 0,
+ REAL = 1,
+ LOGIT = 2,
+ GENTLE = 3;
+
+
+ //
+ // C++: int getBoostType()
+ //
+
+ //javadoc: Boost::getBoostType()
+ public int getBoostType()
+ {
+
+ int retVal = getBoostType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setBoostType(int val)
+ //
+
+ //javadoc: Boost::setBoostType(val)
+ public void setBoostType(int val)
+ {
+
+ setBoostType_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: int getWeakCount()
+ //
+
+ //javadoc: Boost::getWeakCount()
+ public int getWeakCount()
+ {
+
+ int retVal = getWeakCount_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setWeakCount(int val)
+ //
+
+ //javadoc: Boost::setWeakCount(val)
+ public void setWeakCount(int val)
+ {
+
+ setWeakCount_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: double getWeightTrimRate()
+ //
+
+ //javadoc: Boost::getWeightTrimRate()
+ public double getWeightTrimRate()
+ {
+
+ double retVal = getWeightTrimRate_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setWeightTrimRate(double val)
+ //
+
+ //javadoc: Boost::setWeightTrimRate(val)
+ public void setWeightTrimRate(double val)
+ {
+
+ setWeightTrimRate_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: static Ptr_Boost create()
+ //
+
+ //javadoc: Boost::create()
+ public static Boost create()
+ {
+
+ Boost retVal = new Boost(create_0());
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: int getBoostType()
+ private static native int getBoostType_0(long nativeObj);
+
+ // C++: void setBoostType(int val)
+ private static native void setBoostType_0(long nativeObj, int val);
+
+ // C++: int getWeakCount()
+ private static native int getWeakCount_0(long nativeObj);
+
+ // C++: void setWeakCount(int val)
+ private static native void setWeakCount_0(long nativeObj, int val);
+
+ // C++: double getWeightTrimRate()
+ private static native double getWeightTrimRate_0(long nativeObj);
+
+ // C++: void setWeightTrimRate(double val)
+ private static native void setWeightTrimRate_0(long nativeObj, double val);
+
+ // C++: static Ptr_Boost create()
+ private static native long create_0();
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/ml+DTrees.java b/modules/java/src/ml+DTrees.java
new file mode 100644
index 0000000..6ed2213
--- /dev/null
+++ b/modules/java/src/ml+DTrees.java
@@ -0,0 +1,356 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import org.opencv.core.Mat;
+
+// C++: class DTrees
+//javadoc: DTrees
+public class DTrees extends StatModel {
+
+ protected DTrees(long addr) { super(addr); }
+
+
+ public static final int
+ PREDICT_AUTO = 0,
+ PREDICT_SUM = (1<<8),
+ PREDICT_MAX_VOTE = (2<<8),
+ PREDICT_MASK = (3<<8);
+
+
+ //
+ // C++: int getMaxCategories()
+ //
+
+ //javadoc: DTrees::getMaxCategories()
+ public int getMaxCategories()
+ {
+
+ int retVal = getMaxCategories_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setMaxCategories(int val)
+ //
+
+ //javadoc: DTrees::setMaxCategories(val)
+ public void setMaxCategories(int val)
+ {
+
+ setMaxCategories_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: int getMaxDepth()
+ //
+
+ //javadoc: DTrees::getMaxDepth()
+ public int getMaxDepth()
+ {
+
+ int retVal = getMaxDepth_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setMaxDepth(int val)
+ //
+
+ //javadoc: DTrees::setMaxDepth(val)
+ public void setMaxDepth(int val)
+ {
+
+ setMaxDepth_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: int getMinSampleCount()
+ //
+
+ //javadoc: DTrees::getMinSampleCount()
+ public int getMinSampleCount()
+ {
+
+ int retVal = getMinSampleCount_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setMinSampleCount(int val)
+ //
+
+ //javadoc: DTrees::setMinSampleCount(val)
+ public void setMinSampleCount(int val)
+ {
+
+ setMinSampleCount_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: int getCVFolds()
+ //
+
+ //javadoc: DTrees::getCVFolds()
+ public int getCVFolds()
+ {
+
+ int retVal = getCVFolds_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setCVFolds(int val)
+ //
+
+ //javadoc: DTrees::setCVFolds(val)
+ public void setCVFolds(int val)
+ {
+
+ setCVFolds_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: bool getUseSurrogates()
+ //
+
+ //javadoc: DTrees::getUseSurrogates()
+ public boolean getUseSurrogates()
+ {
+
+ boolean retVal = getUseSurrogates_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setUseSurrogates(bool val)
+ //
+
+ //javadoc: DTrees::setUseSurrogates(val)
+ public void setUseSurrogates(boolean val)
+ {
+
+ setUseSurrogates_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: bool getUse1SERule()
+ //
+
+ //javadoc: DTrees::getUse1SERule()
+ public boolean getUse1SERule()
+ {
+
+ boolean retVal = getUse1SERule_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setUse1SERule(bool val)
+ //
+
+ //javadoc: DTrees::setUse1SERule(val)
+ public void setUse1SERule(boolean val)
+ {
+
+ setUse1SERule_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: bool getTruncatePrunedTree()
+ //
+
+ //javadoc: DTrees::getTruncatePrunedTree()
+ public boolean getTruncatePrunedTree()
+ {
+
+ boolean retVal = getTruncatePrunedTree_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setTruncatePrunedTree(bool val)
+ //
+
+ //javadoc: DTrees::setTruncatePrunedTree(val)
+ public void setTruncatePrunedTree(boolean val)
+ {
+
+ setTruncatePrunedTree_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: float getRegressionAccuracy()
+ //
+
+ //javadoc: DTrees::getRegressionAccuracy()
+ public float getRegressionAccuracy()
+ {
+
+ float retVal = getRegressionAccuracy_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setRegressionAccuracy(float val)
+ //
+
+ //javadoc: DTrees::setRegressionAccuracy(val)
+ public void setRegressionAccuracy(float val)
+ {
+
+ setRegressionAccuracy_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat getPriors()
+ //
+
+ //javadoc: DTrees::getPriors()
+ public Mat getPriors()
+ {
+
+ Mat retVal = new Mat(getPriors_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setPriors(Mat val)
+ //
+
+ //javadoc: DTrees::setPriors(val)
+ public void setPriors(Mat val)
+ {
+
+ setPriors_0(nativeObj, val.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: static Ptr_DTrees create()
+ //
+
+ //javadoc: DTrees::create()
+ public static DTrees create()
+ {
+
+ DTrees retVal = new DTrees(create_0());
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: int getMaxCategories()
+ private static native int getMaxCategories_0(long nativeObj);
+
+ // C++: void setMaxCategories(int val)
+ private static native void setMaxCategories_0(long nativeObj, int val);
+
+ // C++: int getMaxDepth()
+ private static native int getMaxDepth_0(long nativeObj);
+
+ // C++: void setMaxDepth(int val)
+ private static native void setMaxDepth_0(long nativeObj, int val);
+
+ // C++: int getMinSampleCount()
+ private static native int getMinSampleCount_0(long nativeObj);
+
+ // C++: void setMinSampleCount(int val)
+ private static native void setMinSampleCount_0(long nativeObj, int val);
+
+ // C++: int getCVFolds()
+ private static native int getCVFolds_0(long nativeObj);
+
+ // C++: void setCVFolds(int val)
+ private static native void setCVFolds_0(long nativeObj, int val);
+
+ // C++: bool getUseSurrogates()
+ private static native boolean getUseSurrogates_0(long nativeObj);
+
+ // C++: void setUseSurrogates(bool val)
+ private static native void setUseSurrogates_0(long nativeObj, boolean val);
+
+ // C++: bool getUse1SERule()
+ private static native boolean getUse1SERule_0(long nativeObj);
+
+ // C++: void setUse1SERule(bool val)
+ private static native void setUse1SERule_0(long nativeObj, boolean val);
+
+ // C++: bool getTruncatePrunedTree()
+ private static native boolean getTruncatePrunedTree_0(long nativeObj);
+
+ // C++: void setTruncatePrunedTree(bool val)
+ private static native void setTruncatePrunedTree_0(long nativeObj, boolean val);
+
+ // C++: float getRegressionAccuracy()
+ private static native float getRegressionAccuracy_0(long nativeObj);
+
+ // C++: void setRegressionAccuracy(float val)
+ private static native void setRegressionAccuracy_0(long nativeObj, float val);
+
+ // C++: Mat getPriors()
+ private static native long getPriors_0(long nativeObj);
+
+ // C++: void setPriors(Mat val)
+ private static native void setPriors_0(long nativeObj, long val_nativeObj);
+
+ // C++: static Ptr_DTrees create()
+ private static native long create_0();
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/ml+EM.java b/modules/java/src/ml+EM.java
new file mode 100644
index 0000000..0b6b454
--- /dev/null
+++ b/modules/java/src/ml+EM.java
@@ -0,0 +1,290 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import org.opencv.core.Mat;
+import org.opencv.core.TermCriteria;
+
+// C++: class EM
+//javadoc: EM
+public class EM extends StatModel {
+
+ protected EM(long addr) { super(addr); }
+
+
+ public static final int
+ COV_MAT_SPHERICAL = 0,
+ COV_MAT_DIAGONAL = 1,
+ COV_MAT_GENERIC = 2,
+ COV_MAT_DEFAULT = COV_MAT_DIAGONAL,
+ DEFAULT_NCLUSTERS = 5,
+ DEFAULT_MAX_ITERS = 100,
+ START_E_STEP = 1,
+ START_M_STEP = 2,
+ START_AUTO_STEP = 0;
+
+
+ //
+ // C++: int getClustersNumber()
+ //
+
+ //javadoc: EM::getClustersNumber()
+ public int getClustersNumber()
+ {
+
+ int retVal = getClustersNumber_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setClustersNumber(int val)
+ //
+
+ //javadoc: EM::setClustersNumber(val)
+ public void setClustersNumber(int val)
+ {
+
+ setClustersNumber_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: int getCovarianceMatrixType()
+ //
+
+ //javadoc: EM::getCovarianceMatrixType()
+ public int getCovarianceMatrixType()
+ {
+
+ int retVal = getCovarianceMatrixType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setCovarianceMatrixType(int val)
+ //
+
+ //javadoc: EM::setCovarianceMatrixType(val)
+ public void setCovarianceMatrixType(int val)
+ {
+
+ setCovarianceMatrixType_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: TermCriteria getTermCriteria()
+ //
+
+ //javadoc: EM::getTermCriteria()
+ public TermCriteria getTermCriteria()
+ {
+
+ TermCriteria retVal = new TermCriteria(getTermCriteria_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setTermCriteria(TermCriteria val)
+ //
+
+ //javadoc: EM::setTermCriteria(val)
+ public void setTermCriteria(TermCriteria val)
+ {
+
+ setTermCriteria_0(nativeObj, val.type, val.maxCount, val.epsilon);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat getWeights()
+ //
+
+ //javadoc: EM::getWeights()
+ public Mat getWeights()
+ {
+
+ Mat retVal = new Mat(getWeights_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getMeans()
+ //
+
+ //javadoc: EM::getMeans()
+ public Mat getMeans()
+ {
+
+ Mat retVal = new Mat(getMeans_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Vec2d predict2(Mat sample, Mat& probs)
+ //
+
+ //javadoc: EM::predict2(sample, probs)
+ public double[] predict2(Mat sample, Mat probs)
+ {
+
+ double[] retVal = predict2_0(nativeObj, sample.nativeObj, probs.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool trainEM(Mat samples, Mat& logLikelihoods = Mat(), Mat& labels = Mat(), Mat& probs = Mat())
+ //
+
+ //javadoc: EM::trainEM(samples, logLikelihoods, labels, probs)
+ public boolean trainEM(Mat samples, Mat logLikelihoods, Mat labels, Mat probs)
+ {
+
+ boolean retVal = trainEM_0(nativeObj, samples.nativeObj, logLikelihoods.nativeObj, labels.nativeObj, probs.nativeObj);
+
+ return retVal;
+ }
+
+ //javadoc: EM::trainEM(samples)
+ public boolean trainEM(Mat samples)
+ {
+
+ boolean retVal = trainEM_1(nativeObj, samples.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool trainE(Mat samples, Mat means0, Mat covs0 = Mat(), Mat weights0 = Mat(), Mat& logLikelihoods = Mat(), Mat& labels = Mat(), Mat& probs = Mat())
+ //
+
+ //javadoc: EM::trainE(samples, means0, covs0, weights0, logLikelihoods, labels, probs)
+ public boolean trainE(Mat samples, Mat means0, Mat covs0, Mat weights0, Mat logLikelihoods, Mat labels, Mat probs)
+ {
+
+ boolean retVal = trainE_0(nativeObj, samples.nativeObj, means0.nativeObj, covs0.nativeObj, weights0.nativeObj, logLikelihoods.nativeObj, labels.nativeObj, probs.nativeObj);
+
+ return retVal;
+ }
+
+ //javadoc: EM::trainE(samples, means0)
+ public boolean trainE(Mat samples, Mat means0)
+ {
+
+ boolean retVal = trainE_1(nativeObj, samples.nativeObj, means0.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool trainM(Mat samples, Mat probs0, Mat& logLikelihoods = Mat(), Mat& labels = Mat(), Mat& probs = Mat())
+ //
+
+ //javadoc: EM::trainM(samples, probs0, logLikelihoods, labels, probs)
+ public boolean trainM(Mat samples, Mat probs0, Mat logLikelihoods, Mat labels, Mat probs)
+ {
+
+ boolean retVal = trainM_0(nativeObj, samples.nativeObj, probs0.nativeObj, logLikelihoods.nativeObj, labels.nativeObj, probs.nativeObj);
+
+ return retVal;
+ }
+
+ //javadoc: EM::trainM(samples, probs0)
+ public boolean trainM(Mat samples, Mat probs0)
+ {
+
+ boolean retVal = trainM_1(nativeObj, samples.nativeObj, probs0.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static Ptr_EM create()
+ //
+
+ //javadoc: EM::create()
+ public static EM create()
+ {
+
+ EM retVal = new EM(create_0());
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: int getClustersNumber()
+ private static native int getClustersNumber_0(long nativeObj);
+
+ // C++: void setClustersNumber(int val)
+ private static native void setClustersNumber_0(long nativeObj, int val);
+
+ // C++: int getCovarianceMatrixType()
+ private static native int getCovarianceMatrixType_0(long nativeObj);
+
+ // C++: void setCovarianceMatrixType(int val)
+ private static native void setCovarianceMatrixType_0(long nativeObj, int val);
+
+ // C++: TermCriteria getTermCriteria()
+ private static native double[] getTermCriteria_0(long nativeObj);
+
+ // C++: void setTermCriteria(TermCriteria val)
+ private static native void setTermCriteria_0(long nativeObj, int val_type, int val_maxCount, double val_epsilon);
+
+ // C++: Mat getWeights()
+ private static native long getWeights_0(long nativeObj);
+
+ // C++: Mat getMeans()
+ private static native long getMeans_0(long nativeObj);
+
+ // C++: Vec2d predict2(Mat sample, Mat& probs)
+ private static native double[] predict2_0(long nativeObj, long sample_nativeObj, long probs_nativeObj);
+
+ // C++: bool trainEM(Mat samples, Mat& logLikelihoods = Mat(), Mat& labels = Mat(), Mat& probs = Mat())
+ private static native boolean trainEM_0(long nativeObj, long samples_nativeObj, long logLikelihoods_nativeObj, long labels_nativeObj, long probs_nativeObj);
+ private static native boolean trainEM_1(long nativeObj, long samples_nativeObj);
+
+ // C++: bool trainE(Mat samples, Mat means0, Mat covs0 = Mat(), Mat weights0 = Mat(), Mat& logLikelihoods = Mat(), Mat& labels = Mat(), Mat& probs = Mat())
+ private static native boolean trainE_0(long nativeObj, long samples_nativeObj, long means0_nativeObj, long covs0_nativeObj, long weights0_nativeObj, long logLikelihoods_nativeObj, long labels_nativeObj, long probs_nativeObj);
+ private static native boolean trainE_1(long nativeObj, long samples_nativeObj, long means0_nativeObj);
+
+ // C++: bool trainM(Mat samples, Mat probs0, Mat& logLikelihoods = Mat(), Mat& labels = Mat(), Mat& probs = Mat())
+ private static native boolean trainM_0(long nativeObj, long samples_nativeObj, long probs0_nativeObj, long logLikelihoods_nativeObj, long labels_nativeObj, long probs_nativeObj);
+ private static native boolean trainM_1(long nativeObj, long samples_nativeObj, long probs0_nativeObj);
+
+ // C++: static Ptr_EM create()
+ private static native long create_0();
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/ml+KNearest.java b/modules/java/src/ml+KNearest.java
new file mode 100644
index 0000000..9bba1d6
--- /dev/null
+++ b/modules/java/src/ml+KNearest.java
@@ -0,0 +1,211 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import org.opencv.core.Mat;
+
+// C++: class KNearest
+//javadoc: KNearest
+public class KNearest extends StatModel {
+
+ protected KNearest(long addr) { super(addr); }
+
+
+ public static final int
+ BRUTE_FORCE = 1,
+ KDTREE = 2;
+
+
+ //
+ // C++: void setDefaultK(int val)
+ //
+
+ //javadoc: KNearest::setDefaultK(val)
+ public void setDefaultK(int val)
+ {
+
+ setDefaultK_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: int getDefaultK()
+ //
+
+ //javadoc: KNearest::getDefaultK()
+ public int getDefaultK()
+ {
+
+ int retVal = getDefaultK_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool getIsClassifier()
+ //
+
+ //javadoc: KNearest::getIsClassifier()
+ public boolean getIsClassifier()
+ {
+
+ boolean retVal = getIsClassifier_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setIsClassifier(bool val)
+ //
+
+ //javadoc: KNearest::setIsClassifier(val)
+ public void setIsClassifier(boolean val)
+ {
+
+ setIsClassifier_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: int getEmax()
+ //
+
+ //javadoc: KNearest::getEmax()
+ public int getEmax()
+ {
+
+ int retVal = getEmax_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setEmax(int val)
+ //
+
+ //javadoc: KNearest::setEmax(val)
+ public void setEmax(int val)
+ {
+
+ setEmax_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: int getAlgorithmType()
+ //
+
+ //javadoc: KNearest::getAlgorithmType()
+ public int getAlgorithmType()
+ {
+
+ int retVal = getAlgorithmType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setAlgorithmType(int val)
+ //
+
+ //javadoc: KNearest::setAlgorithmType(val)
+ public void setAlgorithmType(int val)
+ {
+
+ setAlgorithmType_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: float findNearest(Mat samples, int k, Mat& results, Mat& neighborResponses = Mat(), Mat& dist = Mat())
+ //
+
+ //javadoc: KNearest::findNearest(samples, k, results, neighborResponses, dist)
+ public float findNearest(Mat samples, int k, Mat results, Mat neighborResponses, Mat dist)
+ {
+
+ float retVal = findNearest_0(nativeObj, samples.nativeObj, k, results.nativeObj, neighborResponses.nativeObj, dist.nativeObj);
+
+ return retVal;
+ }
+
+ //javadoc: KNearest::findNearest(samples, k, results)
+ public float findNearest(Mat samples, int k, Mat results)
+ {
+
+ float retVal = findNearest_1(nativeObj, samples.nativeObj, k, results.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static Ptr_KNearest create()
+ //
+
+ //javadoc: KNearest::create()
+ public static KNearest create()
+ {
+
+ KNearest retVal = new KNearest(create_0());
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void setDefaultK(int val)
+ private static native void setDefaultK_0(long nativeObj, int val);
+
+ // C++: int getDefaultK()
+ private static native int getDefaultK_0(long nativeObj);
+
+ // C++: bool getIsClassifier()
+ private static native boolean getIsClassifier_0(long nativeObj);
+
+ // C++: void setIsClassifier(bool val)
+ private static native void setIsClassifier_0(long nativeObj, boolean val);
+
+ // C++: int getEmax()
+ private static native int getEmax_0(long nativeObj);
+
+ // C++: void setEmax(int val)
+ private static native void setEmax_0(long nativeObj, int val);
+
+ // C++: int getAlgorithmType()
+ private static native int getAlgorithmType_0(long nativeObj);
+
+ // C++: void setAlgorithmType(int val)
+ private static native void setAlgorithmType_0(long nativeObj, int val);
+
+ // C++: float findNearest(Mat samples, int k, Mat& results, Mat& neighborResponses = Mat(), Mat& dist = Mat())
+ private static native float findNearest_0(long nativeObj, long samples_nativeObj, int k, long results_nativeObj, long neighborResponses_nativeObj, long dist_nativeObj);
+ private static native float findNearest_1(long nativeObj, long samples_nativeObj, int k, long results_nativeObj);
+
+ // C++: static Ptr_KNearest create()
+ private static native long create_0();
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/ml+LogisticRegression.java b/modules/java/src/ml+LogisticRegression.java
new file mode 100644
index 0000000..c60e958
--- /dev/null
+++ b/modules/java/src/ml+LogisticRegression.java
@@ -0,0 +1,300 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import org.opencv.core.Mat;
+import org.opencv.core.TermCriteria;
+
+// C++: class LogisticRegression
+//javadoc: LogisticRegression
+public class LogisticRegression extends StatModel {
+
+ protected LogisticRegression(long addr) { super(addr); }
+
+
+ public static final int
+ REG_DISABLE = -1,
+ REG_L1 = 0,
+ REG_L2 = 1,
+ BATCH = 0,
+ MINI_BATCH = 1;
+
+
+ //
+ // C++: double getLearningRate()
+ //
+
+ //javadoc: LogisticRegression::getLearningRate()
+ public double getLearningRate()
+ {
+
+ double retVal = getLearningRate_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setLearningRate(double val)
+ //
+
+ //javadoc: LogisticRegression::setLearningRate(val)
+ public void setLearningRate(double val)
+ {
+
+ setLearningRate_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: int getIterations()
+ //
+
+ //javadoc: LogisticRegression::getIterations()
+ public int getIterations()
+ {
+
+ int retVal = getIterations_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setIterations(int val)
+ //
+
+ //javadoc: LogisticRegression::setIterations(val)
+ public void setIterations(int val)
+ {
+
+ setIterations_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: int getRegularization()
+ //
+
+ //javadoc: LogisticRegression::getRegularization()
+ public int getRegularization()
+ {
+
+ int retVal = getRegularization_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setRegularization(int val)
+ //
+
+ //javadoc: LogisticRegression::setRegularization(val)
+ public void setRegularization(int val)
+ {
+
+ setRegularization_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: int getTrainMethod()
+ //
+
+ //javadoc: LogisticRegression::getTrainMethod()
+ public int getTrainMethod()
+ {
+
+ int retVal = getTrainMethod_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setTrainMethod(int val)
+ //
+
+ //javadoc: LogisticRegression::setTrainMethod(val)
+ public void setTrainMethod(int val)
+ {
+
+ setTrainMethod_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: int getMiniBatchSize()
+ //
+
+ //javadoc: LogisticRegression::getMiniBatchSize()
+ public int getMiniBatchSize()
+ {
+
+ int retVal = getMiniBatchSize_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setMiniBatchSize(int val)
+ //
+
+ //javadoc: LogisticRegression::setMiniBatchSize(val)
+ public void setMiniBatchSize(int val)
+ {
+
+ setMiniBatchSize_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: TermCriteria getTermCriteria()
+ //
+
+ //javadoc: LogisticRegression::getTermCriteria()
+ public TermCriteria getTermCriteria()
+ {
+
+ TermCriteria retVal = new TermCriteria(getTermCriteria_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setTermCriteria(TermCriteria val)
+ //
+
+ //javadoc: LogisticRegression::setTermCriteria(val)
+ public void setTermCriteria(TermCriteria val)
+ {
+
+ setTermCriteria_0(nativeObj, val.type, val.maxCount, val.epsilon);
+
+ return;
+ }
+
+
+ //
+ // C++: float predict(Mat samples, Mat& results = Mat(), int flags = 0)
+ //
+
+ //javadoc: LogisticRegression::predict(samples, results, flags)
+ public float predict(Mat samples, Mat results, int flags)
+ {
+
+ float retVal = predict_0(nativeObj, samples.nativeObj, results.nativeObj, flags);
+
+ return retVal;
+ }
+
+ //javadoc: LogisticRegression::predict(samples)
+ public float predict(Mat samples)
+ {
+
+ float retVal = predict_1(nativeObj, samples.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat get_learnt_thetas()
+ //
+
+ //javadoc: LogisticRegression::get_learnt_thetas()
+ public Mat get_learnt_thetas()
+ {
+
+ Mat retVal = new Mat(get_learnt_thetas_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static Ptr_LogisticRegression create()
+ //
+
+ //javadoc: LogisticRegression::create()
+ public static LogisticRegression create()
+ {
+
+ LogisticRegression retVal = new LogisticRegression(create_0());
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: double getLearningRate()
+ private static native double getLearningRate_0(long nativeObj);
+
+ // C++: void setLearningRate(double val)
+ private static native void setLearningRate_0(long nativeObj, double val);
+
+ // C++: int getIterations()
+ private static native int getIterations_0(long nativeObj);
+
+ // C++: void setIterations(int val)
+ private static native void setIterations_0(long nativeObj, int val);
+
+ // C++: int getRegularization()
+ private static native int getRegularization_0(long nativeObj);
+
+ // C++: void setRegularization(int val)
+ private static native void setRegularization_0(long nativeObj, int val);
+
+ // C++: int getTrainMethod()
+ private static native int getTrainMethod_0(long nativeObj);
+
+ // C++: void setTrainMethod(int val)
+ private static native void setTrainMethod_0(long nativeObj, int val);
+
+ // C++: int getMiniBatchSize()
+ private static native int getMiniBatchSize_0(long nativeObj);
+
+ // C++: void setMiniBatchSize(int val)
+ private static native void setMiniBatchSize_0(long nativeObj, int val);
+
+ // C++: TermCriteria getTermCriteria()
+ private static native double[] getTermCriteria_0(long nativeObj);
+
+ // C++: void setTermCriteria(TermCriteria val)
+ private static native void setTermCriteria_0(long nativeObj, int val_type, int val_maxCount, double val_epsilon);
+
+ // C++: float predict(Mat samples, Mat& results = Mat(), int flags = 0)
+ private static native float predict_0(long nativeObj, long samples_nativeObj, long results_nativeObj, int flags);
+ private static native float predict_1(long nativeObj, long samples_nativeObj);
+
+ // C++: Mat get_learnt_thetas()
+ private static native long get_learnt_thetas_0(long nativeObj);
+
+ // C++: static Ptr_LogisticRegression create()
+ private static native long create_0();
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/ml+Ml.java b/modules/java/src/ml+Ml.java
new file mode 100644
index 0000000..e8f317d
--- /dev/null
+++ b/modules/java/src/ml+Ml.java
@@ -0,0 +1,23 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+
+
+public class Ml {
+
+ public static final int
+ VAR_NUMERICAL = 0,
+ VAR_ORDERED = 0,
+ VAR_CATEGORICAL = 1,
+ TEST_ERROR = 0,
+ TRAIN_ERROR = 1,
+ ROW_SAMPLE = 0,
+ COL_SAMPLE = 1;
+
+
+
+
+}
diff --git a/modules/java/src/ml+NormalBayesClassifier.java b/modules/java/src/ml+NormalBayesClassifier.java
new file mode 100644
index 0000000..b7ae1db
--- /dev/null
+++ b/modules/java/src/ml+NormalBayesClassifier.java
@@ -0,0 +1,70 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import org.opencv.core.Mat;
+
+// C++: class NormalBayesClassifier
+//javadoc: NormalBayesClassifier
+public class NormalBayesClassifier extends StatModel {
+
+ protected NormalBayesClassifier(long addr) { super(addr); }
+
+
+ //
+ // C++: float predictProb(Mat inputs, Mat& outputs, Mat& outputProbs, int flags = 0)
+ //
+
+ //javadoc: NormalBayesClassifier::predictProb(inputs, outputs, outputProbs, flags)
+ public float predictProb(Mat inputs, Mat outputs, Mat outputProbs, int flags)
+ {
+
+ float retVal = predictProb_0(nativeObj, inputs.nativeObj, outputs.nativeObj, outputProbs.nativeObj, flags);
+
+ return retVal;
+ }
+
+ //javadoc: NormalBayesClassifier::predictProb(inputs, outputs, outputProbs)
+ public float predictProb(Mat inputs, Mat outputs, Mat outputProbs)
+ {
+
+ float retVal = predictProb_1(nativeObj, inputs.nativeObj, outputs.nativeObj, outputProbs.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static Ptr_NormalBayesClassifier create()
+ //
+
+ //javadoc: NormalBayesClassifier::create()
+ public static NormalBayesClassifier create()
+ {
+
+ NormalBayesClassifier retVal = new NormalBayesClassifier(create_0());
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: float predictProb(Mat inputs, Mat& outputs, Mat& outputProbs, int flags = 0)
+ private static native float predictProb_0(long nativeObj, long inputs_nativeObj, long outputs_nativeObj, long outputProbs_nativeObj, int flags);
+ private static native float predictProb_1(long nativeObj, long inputs_nativeObj, long outputs_nativeObj, long outputProbs_nativeObj);
+
+ // C++: static Ptr_NormalBayesClassifier create()
+ private static native long create_0();
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/ml+RTrees.java b/modules/java/src/ml+RTrees.java
new file mode 100644
index 0000000..cd10d00
--- /dev/null
+++ b/modules/java/src/ml+RTrees.java
@@ -0,0 +1,163 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import org.opencv.core.Mat;
+import org.opencv.core.TermCriteria;
+
+// C++: class RTrees
+//javadoc: RTrees
+public class RTrees extends DTrees {
+
+ protected RTrees(long addr) { super(addr); }
+
+
+ //
+ // C++: bool getCalculateVarImportance()
+ //
+
+ //javadoc: RTrees::getCalculateVarImportance()
+ public boolean getCalculateVarImportance()
+ {
+
+ boolean retVal = getCalculateVarImportance_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setCalculateVarImportance(bool val)
+ //
+
+ //javadoc: RTrees::setCalculateVarImportance(val)
+ public void setCalculateVarImportance(boolean val)
+ {
+
+ setCalculateVarImportance_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: int getActiveVarCount()
+ //
+
+ //javadoc: RTrees::getActiveVarCount()
+ public int getActiveVarCount()
+ {
+
+ int retVal = getActiveVarCount_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setActiveVarCount(int val)
+ //
+
+ //javadoc: RTrees::setActiveVarCount(val)
+ public void setActiveVarCount(int val)
+ {
+
+ setActiveVarCount_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: TermCriteria getTermCriteria()
+ //
+
+ //javadoc: RTrees::getTermCriteria()
+ public TermCriteria getTermCriteria()
+ {
+
+ TermCriteria retVal = new TermCriteria(getTermCriteria_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setTermCriteria(TermCriteria val)
+ //
+
+ //javadoc: RTrees::setTermCriteria(val)
+ public void setTermCriteria(TermCriteria val)
+ {
+
+ setTermCriteria_0(nativeObj, val.type, val.maxCount, val.epsilon);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat getVarImportance()
+ //
+
+ //javadoc: RTrees::getVarImportance()
+ public Mat getVarImportance()
+ {
+
+ Mat retVal = new Mat(getVarImportance_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static Ptr_RTrees create()
+ //
+
+ //javadoc: RTrees::create()
+ public static RTrees create()
+ {
+
+ RTrees retVal = new RTrees(create_0());
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: bool getCalculateVarImportance()
+ private static native boolean getCalculateVarImportance_0(long nativeObj);
+
+ // C++: void setCalculateVarImportance(bool val)
+ private static native void setCalculateVarImportance_0(long nativeObj, boolean val);
+
+ // C++: int getActiveVarCount()
+ private static native int getActiveVarCount_0(long nativeObj);
+
+ // C++: void setActiveVarCount(int val)
+ private static native void setActiveVarCount_0(long nativeObj, int val);
+
+ // C++: TermCriteria getTermCriteria()
+ private static native double[] getTermCriteria_0(long nativeObj);
+
+ // C++: void setTermCriteria(TermCriteria val)
+ private static native void setTermCriteria_0(long nativeObj, int val_type, int val_maxCount, double val_epsilon);
+
+ // C++: Mat getVarImportance()
+ private static native long getVarImportance_0(long nativeObj);
+
+ // C++: static Ptr_RTrees create()
+ private static native long create_0();
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/ml+SVM.java b/modules/java/src/ml+SVM.java
new file mode 100644
index 0000000..0fc5b80
--- /dev/null
+++ b/modules/java/src/ml+SVM.java
@@ -0,0 +1,439 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import org.opencv.core.Mat;
+import org.opencv.core.TermCriteria;
+
+// C++: class SVM
+//javadoc: SVM
+public class SVM extends StatModel {
+
+ protected SVM(long addr) { super(addr); }
+
+
+ public static final int
+ C_SVC = 100,
+ NU_SVC = 101,
+ ONE_CLASS = 102,
+ EPS_SVR = 103,
+ NU_SVR = 104,
+ CUSTOM = -1,
+ LINEAR = 0,
+ POLY = 1,
+ RBF = 2,
+ SIGMOID = 3,
+ CHI2 = 4,
+ INTER = 5,
+ C = 0,
+ GAMMA = 1,
+ P = 2,
+ NU = 3,
+ COEF = 4,
+ DEGREE = 5;
+
+
+ //
+ // C++: int getType()
+ //
+
+ //javadoc: SVM::getType()
+ public int getType()
+ {
+
+ int retVal = getType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setType(int val)
+ //
+
+ //javadoc: SVM::setType(val)
+ public void setType(int val)
+ {
+
+ setType_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: double getGamma()
+ //
+
+ //javadoc: SVM::getGamma()
+ public double getGamma()
+ {
+
+ double retVal = getGamma_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setGamma(double val)
+ //
+
+ //javadoc: SVM::setGamma(val)
+ public void setGamma(double val)
+ {
+
+ setGamma_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: double getCoef0()
+ //
+
+ //javadoc: SVM::getCoef0()
+ public double getCoef0()
+ {
+
+ double retVal = getCoef0_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setCoef0(double val)
+ //
+
+ //javadoc: SVM::setCoef0(val)
+ public void setCoef0(double val)
+ {
+
+ setCoef0_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: double getDegree()
+ //
+
+ //javadoc: SVM::getDegree()
+ public double getDegree()
+ {
+
+ double retVal = getDegree_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setDegree(double val)
+ //
+
+ //javadoc: SVM::setDegree(val)
+ public void setDegree(double val)
+ {
+
+ setDegree_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: double getC()
+ //
+
+ //javadoc: SVM::getC()
+ public double getC()
+ {
+
+ double retVal = getC_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setC(double val)
+ //
+
+ //javadoc: SVM::setC(val)
+ public void setC(double val)
+ {
+
+ setC_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: double getNu()
+ //
+
+ //javadoc: SVM::getNu()
+ public double getNu()
+ {
+
+ double retVal = getNu_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setNu(double val)
+ //
+
+ //javadoc: SVM::setNu(val)
+ public void setNu(double val)
+ {
+
+ setNu_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: double getP()
+ //
+
+ //javadoc: SVM::getP()
+ public double getP()
+ {
+
+ double retVal = getP_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setP(double val)
+ //
+
+ //javadoc: SVM::setP(val)
+ public void setP(double val)
+ {
+
+ setP_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat getClassWeights()
+ //
+
+ //javadoc: SVM::getClassWeights()
+ public Mat getClassWeights()
+ {
+
+ Mat retVal = new Mat(getClassWeights_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setClassWeights(Mat val)
+ //
+
+ //javadoc: SVM::setClassWeights(val)
+ public void setClassWeights(Mat val)
+ {
+
+ setClassWeights_0(nativeObj, val.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: TermCriteria getTermCriteria()
+ //
+
+ //javadoc: SVM::getTermCriteria()
+ public TermCriteria getTermCriteria()
+ {
+
+ TermCriteria retVal = new TermCriteria(getTermCriteria_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setTermCriteria(TermCriteria val)
+ //
+
+ //javadoc: SVM::setTermCriteria(val)
+ public void setTermCriteria(TermCriteria val)
+ {
+
+ setTermCriteria_0(nativeObj, val.type, val.maxCount, val.epsilon);
+
+ return;
+ }
+
+
+ //
+ // C++: int getKernelType()
+ //
+
+ //javadoc: SVM::getKernelType()
+ public int getKernelType()
+ {
+
+ int retVal = getKernelType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setKernel(int kernelType)
+ //
+
+ //javadoc: SVM::setKernel(kernelType)
+ public void setKernel(int kernelType)
+ {
+
+ setKernel_0(nativeObj, kernelType);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat getSupportVectors()
+ //
+
+ //javadoc: SVM::getSupportVectors()
+ public Mat getSupportVectors()
+ {
+
+ Mat retVal = new Mat(getSupportVectors_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double getDecisionFunction(int i, Mat& alpha, Mat& svidx)
+ //
+
+ //javadoc: SVM::getDecisionFunction(i, alpha, svidx)
+ public double getDecisionFunction(int i, Mat alpha, Mat svidx)
+ {
+
+ double retVal = getDecisionFunction_0(nativeObj, i, alpha.nativeObj, svidx.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static Ptr_SVM create()
+ //
+
+ //javadoc: SVM::create()
+ public static SVM create()
+ {
+
+ SVM retVal = new SVM(create_0());
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: int getType()
+ private static native int getType_0(long nativeObj);
+
+ // C++: void setType(int val)
+ private static native void setType_0(long nativeObj, int val);
+
+ // C++: double getGamma()
+ private static native double getGamma_0(long nativeObj);
+
+ // C++: void setGamma(double val)
+ private static native void setGamma_0(long nativeObj, double val);
+
+ // C++: double getCoef0()
+ private static native double getCoef0_0(long nativeObj);
+
+ // C++: void setCoef0(double val)
+ private static native void setCoef0_0(long nativeObj, double val);
+
+ // C++: double getDegree()
+ private static native double getDegree_0(long nativeObj);
+
+ // C++: void setDegree(double val)
+ private static native void setDegree_0(long nativeObj, double val);
+
+ // C++: double getC()
+ private static native double getC_0(long nativeObj);
+
+ // C++: void setC(double val)
+ private static native void setC_0(long nativeObj, double val);
+
+ // C++: double getNu()
+ private static native double getNu_0(long nativeObj);
+
+ // C++: void setNu(double val)
+ private static native void setNu_0(long nativeObj, double val);
+
+ // C++: double getP()
+ private static native double getP_0(long nativeObj);
+
+ // C++: void setP(double val)
+ private static native void setP_0(long nativeObj, double val);
+
+ // C++: Mat getClassWeights()
+ private static native long getClassWeights_0(long nativeObj);
+
+ // C++: void setClassWeights(Mat val)
+ private static native void setClassWeights_0(long nativeObj, long val_nativeObj);
+
+ // C++: TermCriteria getTermCriteria()
+ private static native double[] getTermCriteria_0(long nativeObj);
+
+ // C++: void setTermCriteria(TermCriteria val)
+ private static native void setTermCriteria_0(long nativeObj, int val_type, int val_maxCount, double val_epsilon);
+
+ // C++: int getKernelType()
+ private static native int getKernelType_0(long nativeObj);
+
+ // C++: void setKernel(int kernelType)
+ private static native void setKernel_0(long nativeObj, int kernelType);
+
+ // C++: Mat getSupportVectors()
+ private static native long getSupportVectors_0(long nativeObj);
+
+ // C++: double getDecisionFunction(int i, Mat& alpha, Mat& svidx)
+ private static native double getDecisionFunction_0(long nativeObj, int i, long alpha_nativeObj, long svidx_nativeObj);
+
+ // C++: static Ptr_SVM create()
+ private static native long create_0();
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/ml+StatModel.java b/modules/java/src/ml+StatModel.java
new file mode 100644
index 0000000..6db0662
--- /dev/null
+++ b/modules/java/src/ml+StatModel.java
@@ -0,0 +1,160 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+
+// C++: class StatModel
+//javadoc: StatModel
+public class StatModel extends Algorithm {
+
+ protected StatModel(long addr) { super(addr); }
+
+
+ public static final int
+ UPDATE_MODEL = 1,
+ RAW_OUTPUT = 1,
+ COMPRESSED_INPUT = 2,
+ PREPROCESSED_INPUT = 4;
+
+
+ //
+ // C++: int getVarCount()
+ //
+
+ //javadoc: StatModel::getVarCount()
+ public int getVarCount()
+ {
+
+ int retVal = getVarCount_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool empty()
+ //
+
+ //javadoc: StatModel::empty()
+ public boolean empty()
+ {
+
+ boolean retVal = empty_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool isTrained()
+ //
+
+ //javadoc: StatModel::isTrained()
+ public boolean isTrained()
+ {
+
+ boolean retVal = isTrained_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool isClassifier()
+ //
+
+ //javadoc: StatModel::isClassifier()
+ public boolean isClassifier()
+ {
+
+ boolean retVal = isClassifier_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool train(Ptr_TrainData trainData, int flags = 0)
+ //
+
+ // Unknown type 'Ptr_TrainData' (I), skipping the function
+
+
+ //
+ // C++: bool train(Mat samples, int layout, Mat responses)
+ //
+
+ //javadoc: StatModel::train(samples, layout, responses)
+ public boolean train(Mat samples, int layout, Mat responses)
+ {
+
+ boolean retVal = train_0(nativeObj, samples.nativeObj, layout, responses.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: float calcError(Ptr_TrainData data, bool test, Mat& resp)
+ //
+
+ // Unknown type 'Ptr_TrainData' (I), skipping the function
+
+
+ //
+ // C++: float predict(Mat samples, Mat& results = Mat(), int flags = 0)
+ //
+
+ //javadoc: StatModel::predict(samples, results, flags)
+ public float predict(Mat samples, Mat results, int flags)
+ {
+
+ float retVal = predict_0(nativeObj, samples.nativeObj, results.nativeObj, flags);
+
+ return retVal;
+ }
+
+ //javadoc: StatModel::predict(samples)
+ public float predict(Mat samples)
+ {
+
+ float retVal = predict_1(nativeObj, samples.nativeObj);
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: int getVarCount()
+ private static native int getVarCount_0(long nativeObj);
+
+ // C++: bool empty()
+ private static native boolean empty_0(long nativeObj);
+
+ // C++: bool isTrained()
+ private static native boolean isTrained_0(long nativeObj);
+
+ // C++: bool isClassifier()
+ private static native boolean isClassifier_0(long nativeObj);
+
+ // C++: bool train(Mat samples, int layout, Mat responses)
+ private static native boolean train_0(long nativeObj, long samples_nativeObj, int layout, long responses_nativeObj);
+
+ // C++: float predict(Mat samples, Mat& results = Mat(), int flags = 0)
+ private static native float predict_0(long nativeObj, long samples_nativeObj, long results_nativeObj, int flags);
+ private static native float predict_1(long nativeObj, long samples_nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/ml+TrainData.java b/modules/java/src/ml+TrainData.java
new file mode 100644
index 0000000..6c56d4b
--- /dev/null
+++ b/modules/java/src/ml+TrainData.java
@@ -0,0 +1,642 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import org.opencv.core.Mat;
+
+// C++: class TrainData
+//javadoc: TrainData
+public class TrainData {
+
+ protected final long nativeObj;
+ protected TrainData(long addr) { nativeObj = addr; }
+
+
+ //
+ // C++: int getLayout()
+ //
+
+ //javadoc: TrainData::getLayout()
+ public int getLayout()
+ {
+
+ int retVal = getLayout_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getNTestSamples()
+ //
+
+ //javadoc: TrainData::getNTestSamples()
+ public int getNTestSamples()
+ {
+
+ int retVal = getNTestSamples_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getNTrainSamples()
+ //
+
+ //javadoc: TrainData::getNTrainSamples()
+ public int getNTrainSamples()
+ {
+
+ int retVal = getNTrainSamples_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getNSamples()
+ //
+
+ //javadoc: TrainData::getNSamples()
+ public int getNSamples()
+ {
+
+ int retVal = getNSamples_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getNVars()
+ //
+
+ //javadoc: TrainData::getNVars()
+ public int getNVars()
+ {
+
+ int retVal = getNVars_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void getSample(Mat varIdx, int sidx, float* buf)
+ //
+
+ //javadoc: TrainData::getSample(varIdx, sidx, buf)
+ public void getSample(Mat varIdx, int sidx, float buf)
+ {
+
+ getSample_0(nativeObj, varIdx.nativeObj, sidx, buf);
+
+ return;
+ }
+
+
+ //
+ // C++: int getNAllVars()
+ //
+
+ //javadoc: TrainData::getNAllVars()
+ public int getNAllVars()
+ {
+
+ int retVal = getNAllVars_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getMissing()
+ //
+
+ //javadoc: TrainData::getMissing()
+ public Mat getMissing()
+ {
+
+ Mat retVal = new Mat(getMissing_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getTrainSamples(int layout = ROW_SAMPLE, bool compressSamples = true, bool compressVars = true)
+ //
+
+ //javadoc: TrainData::getTrainSamples(layout, compressSamples, compressVars)
+ public Mat getTrainSamples(int layout, boolean compressSamples, boolean compressVars)
+ {
+
+ Mat retVal = new Mat(getTrainSamples_0(nativeObj, layout, compressSamples, compressVars));
+
+ return retVal;
+ }
+
+ //javadoc: TrainData::getTrainSamples()
+ public Mat getTrainSamples()
+ {
+
+ Mat retVal = new Mat(getTrainSamples_1(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getTrainResponses()
+ //
+
+ //javadoc: TrainData::getTrainResponses()
+ public Mat getTrainResponses()
+ {
+
+ Mat retVal = new Mat(getTrainResponses_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getTrainNormCatResponses()
+ //
+
+ //javadoc: TrainData::getTrainNormCatResponses()
+ public Mat getTrainNormCatResponses()
+ {
+
+ Mat retVal = new Mat(getTrainNormCatResponses_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getTestResponses()
+ //
+
+ //javadoc: TrainData::getTestResponses()
+ public Mat getTestResponses()
+ {
+
+ Mat retVal = new Mat(getTestResponses_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getTestNormCatResponses()
+ //
+
+ //javadoc: TrainData::getTestNormCatResponses()
+ public Mat getTestNormCatResponses()
+ {
+
+ Mat retVal = new Mat(getTestNormCatResponses_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getResponses()
+ //
+
+ //javadoc: TrainData::getResponses()
+ public Mat getResponses()
+ {
+
+ Mat retVal = new Mat(getResponses_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getSamples()
+ //
+
+ //javadoc: TrainData::getSamples()
+ public Mat getSamples()
+ {
+
+ Mat retVal = new Mat(getSamples_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getNormCatResponses()
+ //
+
+ //javadoc: TrainData::getNormCatResponses()
+ public Mat getNormCatResponses()
+ {
+
+ Mat retVal = new Mat(getNormCatResponses_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getSampleWeights()
+ //
+
+ //javadoc: TrainData::getSampleWeights()
+ public Mat getSampleWeights()
+ {
+
+ Mat retVal = new Mat(getSampleWeights_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getTrainSampleWeights()
+ //
+
+ //javadoc: TrainData::getTrainSampleWeights()
+ public Mat getTrainSampleWeights()
+ {
+
+ Mat retVal = new Mat(getTrainSampleWeights_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getTestSampleWeights()
+ //
+
+ //javadoc: TrainData::getTestSampleWeights()
+ public Mat getTestSampleWeights()
+ {
+
+ Mat retVal = new Mat(getTestSampleWeights_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getVarIdx()
+ //
+
+ //javadoc: TrainData::getVarIdx()
+ public Mat getVarIdx()
+ {
+
+ Mat retVal = new Mat(getVarIdx_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getVarType()
+ //
+
+ //javadoc: TrainData::getVarType()
+ public Mat getVarType()
+ {
+
+ Mat retVal = new Mat(getVarType_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getResponseType()
+ //
+
+ //javadoc: TrainData::getResponseType()
+ public int getResponseType()
+ {
+
+ int retVal = getResponseType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getTrainSampleIdx()
+ //
+
+ //javadoc: TrainData::getTrainSampleIdx()
+ public Mat getTrainSampleIdx()
+ {
+
+ Mat retVal = new Mat(getTrainSampleIdx_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getTestSampleIdx()
+ //
+
+ //javadoc: TrainData::getTestSampleIdx()
+ public Mat getTestSampleIdx()
+ {
+
+ Mat retVal = new Mat(getTestSampleIdx_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void getValues(int vi, Mat sidx, float* values)
+ //
+
+ //javadoc: TrainData::getValues(vi, sidx, values)
+ public void getValues(int vi, Mat sidx, float values)
+ {
+
+ getValues_0(nativeObj, vi, sidx.nativeObj, values);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat getDefaultSubstValues()
+ //
+
+ //javadoc: TrainData::getDefaultSubstValues()
+ public Mat getDefaultSubstValues()
+ {
+
+ Mat retVal = new Mat(getDefaultSubstValues_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getCatCount(int vi)
+ //
+
+ //javadoc: TrainData::getCatCount(vi)
+ public int getCatCount(int vi)
+ {
+
+ int retVal = getCatCount_0(nativeObj, vi);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getClassLabels()
+ //
+
+ //javadoc: TrainData::getClassLabels()
+ public Mat getClassLabels()
+ {
+
+ Mat retVal = new Mat(getClassLabels_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getCatOfs()
+ //
+
+ //javadoc: TrainData::getCatOfs()
+ public Mat getCatOfs()
+ {
+
+ Mat retVal = new Mat(getCatOfs_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getCatMap()
+ //
+
+ //javadoc: TrainData::getCatMap()
+ public Mat getCatMap()
+ {
+
+ Mat retVal = new Mat(getCatMap_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setTrainTestSplit(int count, bool shuffle = true)
+ //
+
+ //javadoc: TrainData::setTrainTestSplit(count, shuffle)
+ public void setTrainTestSplit(int count, boolean shuffle)
+ {
+
+ setTrainTestSplit_0(nativeObj, count, shuffle);
+
+ return;
+ }
+
+ //javadoc: TrainData::setTrainTestSplit(count)
+ public void setTrainTestSplit(int count)
+ {
+
+ setTrainTestSplit_1(nativeObj, count);
+
+ return;
+ }
+
+
+ //
+ // C++: void setTrainTestSplitRatio(double ratio, bool shuffle = true)
+ //
+
+ //javadoc: TrainData::setTrainTestSplitRatio(ratio, shuffle)
+ public void setTrainTestSplitRatio(double ratio, boolean shuffle)
+ {
+
+ setTrainTestSplitRatio_0(nativeObj, ratio, shuffle);
+
+ return;
+ }
+
+ //javadoc: TrainData::setTrainTestSplitRatio(ratio)
+ public void setTrainTestSplitRatio(double ratio)
+ {
+
+ setTrainTestSplitRatio_1(nativeObj, ratio);
+
+ return;
+ }
+
+
+ //
+ // C++: void shuffleTrainTest()
+ //
+
+ //javadoc: TrainData::shuffleTrainTest()
+ public void shuffleTrainTest()
+ {
+
+ shuffleTrainTest_0(nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: static Mat getSubVector(Mat vec, Mat idx)
+ //
+
+ //javadoc: TrainData::getSubVector(vec, idx)
+ public static Mat getSubVector(Mat vec, Mat idx)
+ {
+
+ Mat retVal = new Mat(getSubVector_0(vec.nativeObj, idx.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static Ptr_TrainData create(Mat samples, int layout, Mat responses, Mat varIdx = Mat(), Mat sampleIdx = Mat(), Mat sampleWeights = Mat(), Mat varType = Mat())
+ //
+
+ // Return type 'Ptr_TrainData' is not supported, skipping the function
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: int getLayout()
+ private static native int getLayout_0(long nativeObj);
+
+ // C++: int getNTestSamples()
+ private static native int getNTestSamples_0(long nativeObj);
+
+ // C++: int getNTrainSamples()
+ private static native int getNTrainSamples_0(long nativeObj);
+
+ // C++: int getNSamples()
+ private static native int getNSamples_0(long nativeObj);
+
+ // C++: int getNVars()
+ private static native int getNVars_0(long nativeObj);
+
+ // C++: void getSample(Mat varIdx, int sidx, float* buf)
+ private static native void getSample_0(long nativeObj, long varIdx_nativeObj, int sidx, float buf);
+
+ // C++: int getNAllVars()
+ private static native int getNAllVars_0(long nativeObj);
+
+ // C++: Mat getMissing()
+ private static native long getMissing_0(long nativeObj);
+
+ // C++: Mat getTrainSamples(int layout = ROW_SAMPLE, bool compressSamples = true, bool compressVars = true)
+ private static native long getTrainSamples_0(long nativeObj, int layout, boolean compressSamples, boolean compressVars);
+ private static native long getTrainSamples_1(long nativeObj);
+
+ // C++: Mat getTrainResponses()
+ private static native long getTrainResponses_0(long nativeObj);
+
+ // C++: Mat getTrainNormCatResponses()
+ private static native long getTrainNormCatResponses_0(long nativeObj);
+
+ // C++: Mat getTestResponses()
+ private static native long getTestResponses_0(long nativeObj);
+
+ // C++: Mat getTestNormCatResponses()
+ private static native long getTestNormCatResponses_0(long nativeObj);
+
+ // C++: Mat getResponses()
+ private static native long getResponses_0(long nativeObj);
+
+ // C++: Mat getSamples()
+ private static native long getSamples_0(long nativeObj);
+
+ // C++: Mat getNormCatResponses()
+ private static native long getNormCatResponses_0(long nativeObj);
+
+ // C++: Mat getSampleWeights()
+ private static native long getSampleWeights_0(long nativeObj);
+
+ // C++: Mat getTrainSampleWeights()
+ private static native long getTrainSampleWeights_0(long nativeObj);
+
+ // C++: Mat getTestSampleWeights()
+ private static native long getTestSampleWeights_0(long nativeObj);
+
+ // C++: Mat getVarIdx()
+ private static native long getVarIdx_0(long nativeObj);
+
+ // C++: Mat getVarType()
+ private static native long getVarType_0(long nativeObj);
+
+ // C++: int getResponseType()
+ private static native int getResponseType_0(long nativeObj);
+
+ // C++: Mat getTrainSampleIdx()
+ private static native long getTrainSampleIdx_0(long nativeObj);
+
+ // C++: Mat getTestSampleIdx()
+ private static native long getTestSampleIdx_0(long nativeObj);
+
+ // C++: void getValues(int vi, Mat sidx, float* values)
+ private static native void getValues_0(long nativeObj, int vi, long sidx_nativeObj, float values);
+
+ // C++: Mat getDefaultSubstValues()
+ private static native long getDefaultSubstValues_0(long nativeObj);
+
+ // C++: int getCatCount(int vi)
+ private static native int getCatCount_0(long nativeObj, int vi);
+
+ // C++: Mat getClassLabels()
+ private static native long getClassLabels_0(long nativeObj);
+
+ // C++: Mat getCatOfs()
+ private static native long getCatOfs_0(long nativeObj);
+
+ // C++: Mat getCatMap()
+ private static native long getCatMap_0(long nativeObj);
+
+ // C++: void setTrainTestSplit(int count, bool shuffle = true)
+ private static native void setTrainTestSplit_0(long nativeObj, int count, boolean shuffle);
+ private static native void setTrainTestSplit_1(long nativeObj, int count);
+
+ // C++: void setTrainTestSplitRatio(double ratio, bool shuffle = true)
+ private static native void setTrainTestSplitRatio_0(long nativeObj, double ratio, boolean shuffle);
+ private static native void setTrainTestSplitRatio_1(long nativeObj, double ratio);
+
+ // C++: void shuffleTrainTest()
+ private static native void shuffleTrainTest_0(long nativeObj);
+
+ // C++: static Mat getSubVector(Mat vec, Mat idx)
+ private static native long getSubVector_0(long vec_nativeObj, long idx_nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/ml.cpp b/modules/java/src/ml.cpp
new file mode 100644
index 0000000..c9041e5
--- /dev/null
+++ b/modules/java/src/ml.cpp
@@ -0,0 +1,4508 @@
+
+//
+// This file is auto-generated, please don't edit!
+//
+
+#define LOG_TAG "org.opencv.ml"
+
+#include "common.h"
+
+#include "opencv2/opencv_modules.hpp"
+#ifdef HAVE_OPENCV_ML
+
+#include <string>
+
+#include "opencv2/ml.hpp"
+
+#include "../../ml/include/opencv2/ml.hpp"
+
+using namespace cv;
+
+/// throw java exception
+static void throwJavaException(JNIEnv *env, const std::exception *e, const char *method) {
+ std::string what = "unknown exception";
+ jclass je = 0;
+
+ if(e) {
+ std::string exception_type = "std::exception";
+
+ if(dynamic_cast<const cv::Exception*>(e)) {
+ exception_type = "cv::Exception";
+ je = env->FindClass("org/opencv/core/CvException");
+ }
+
+ what = exception_type + ": " + e->what();
+ }
+
+ if(!je) je = env->FindClass("java/lang/Exception");
+ env->ThrowNew(je, what.c_str());
+
+ LOGE("%s caught %s", method, what.c_str());
+ (void)method; // avoid "unused" warning
+}
+
+
+extern "C" {
+
+
+//
+// int getClustersNumber()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_EM_getClustersNumber_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_EM_getClustersNumber_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getClustersNumber_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getClustersNumber( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setClustersNumber(int val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_EM_setClustersNumber_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_EM_setClustersNumber_10
+ (JNIEnv* env, jclass , jlong self, jint val)
+{
+ static const char method_name[] = "ml::setClustersNumber_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
+ (*me)->setClustersNumber( (int)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getCovarianceMatrixType()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_EM_getCovarianceMatrixType_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_EM_getCovarianceMatrixType_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getCovarianceMatrixType_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getCovarianceMatrixType( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setCovarianceMatrixType(int val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_EM_setCovarianceMatrixType_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_EM_setCovarianceMatrixType_10
+ (JNIEnv* env, jclass , jlong self, jint val)
+{
+ static const char method_name[] = "ml::setCovarianceMatrixType_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
+ (*me)->setCovarianceMatrixType( (int)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// TermCriteria getTermCriteria()
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_EM_getTermCriteria_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_EM_getTermCriteria_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getTermCriteria_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
+ TermCriteria _retval_ = (*me)->getTermCriteria( );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(3); jdouble _tmp_retval_[3] = {_retval_.type, _retval_.maxCount, _retval_.epsilon}; env->SetDoubleArrayRegion(_da_retval_, 0, 3, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setTermCriteria(TermCriteria val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_EM_setTermCriteria_10 (JNIEnv*, jclass, jlong, jint, jint, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_EM_setTermCriteria_10
+ (JNIEnv* env, jclass , jlong self, jint val_type, jint val_maxCount, jdouble val_epsilon)
+{
+ static const char method_name[] = "ml::setTermCriteria_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
+ TermCriteria val(val_type, val_maxCount, val_epsilon);
+ (*me)->setTermCriteria( val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat getWeights()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_EM_getWeights_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_EM_getWeights_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getWeights_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
+ ::Mat _retval_ = (*me)->getWeights( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getMeans()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_EM_getMeans_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_EM_getMeans_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getMeans_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
+ ::Mat _retval_ = (*me)->getMeans( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Vec2d predict2(Mat sample, Mat& probs)
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_EM_predict2_10 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_EM_predict2_10
+ (JNIEnv* env, jclass , jlong self, jlong sample_nativeObj, jlong probs_nativeObj)
+{
+ static const char method_name[] = "ml::predict2_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
+ Mat& sample = *((Mat*)sample_nativeObj);
+ Mat& probs = *((Mat*)probs_nativeObj);
+ Vec2d _retval_ = (*me)->predict2( sample, probs );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(2); jdouble _tmp_retval_[2] = {_retval_.val[0], _retval_.val[1]}; env->SetDoubleArrayRegion(_da_retval_, 0, 2, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool trainEM(Mat samples, Mat& logLikelihoods = Mat(), Mat& labels = Mat(), Mat& probs = Mat())
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainEM_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainEM_10
+ (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jlong logLikelihoods_nativeObj, jlong labels_nativeObj, jlong probs_nativeObj)
+{
+ static const char method_name[] = "ml::trainEM_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
+ Mat& samples = *((Mat*)samples_nativeObj);
+ Mat& logLikelihoods = *((Mat*)logLikelihoods_nativeObj);
+ Mat& labels = *((Mat*)labels_nativeObj);
+ Mat& probs = *((Mat*)probs_nativeObj);
+ bool _retval_ = (*me)->trainEM( samples, logLikelihoods, labels, probs );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainEM_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainEM_11
+ (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj)
+{
+ static const char method_name[] = "ml::trainEM_11()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
+ Mat& samples = *((Mat*)samples_nativeObj);
+ bool _retval_ = (*me)->trainEM( samples );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool trainE(Mat samples, Mat means0, Mat covs0 = Mat(), Mat weights0 = Mat(), Mat& logLikelihoods = Mat(), Mat& labels = Mat(), Mat& probs = Mat())
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainE_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainE_10
+ (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jlong means0_nativeObj, jlong covs0_nativeObj, jlong weights0_nativeObj, jlong logLikelihoods_nativeObj, jlong labels_nativeObj, jlong probs_nativeObj)
+{
+ static const char method_name[] = "ml::trainE_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
+ Mat& samples = *((Mat*)samples_nativeObj);
+ Mat& means0 = *((Mat*)means0_nativeObj);
+ Mat& covs0 = *((Mat*)covs0_nativeObj);
+ Mat& weights0 = *((Mat*)weights0_nativeObj);
+ Mat& logLikelihoods = *((Mat*)logLikelihoods_nativeObj);
+ Mat& labels = *((Mat*)labels_nativeObj);
+ Mat& probs = *((Mat*)probs_nativeObj);
+ bool _retval_ = (*me)->trainE( samples, means0, covs0, weights0, logLikelihoods, labels, probs );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainE_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainE_11
+ (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jlong means0_nativeObj)
+{
+ static const char method_name[] = "ml::trainE_11()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
+ Mat& samples = *((Mat*)samples_nativeObj);
+ Mat& means0 = *((Mat*)means0_nativeObj);
+ bool _retval_ = (*me)->trainE( samples, means0 );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool trainM(Mat samples, Mat probs0, Mat& logLikelihoods = Mat(), Mat& labels = Mat(), Mat& probs = Mat())
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainM_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainM_10
+ (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jlong probs0_nativeObj, jlong logLikelihoods_nativeObj, jlong labels_nativeObj, jlong probs_nativeObj)
+{
+ static const char method_name[] = "ml::trainM_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
+ Mat& samples = *((Mat*)samples_nativeObj);
+ Mat& probs0 = *((Mat*)probs0_nativeObj);
+ Mat& logLikelihoods = *((Mat*)logLikelihoods_nativeObj);
+ Mat& labels = *((Mat*)labels_nativeObj);
+ Mat& probs = *((Mat*)probs_nativeObj);
+ bool _retval_ = (*me)->trainM( samples, probs0, logLikelihoods, labels, probs );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainM_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainM_11
+ (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jlong probs0_nativeObj)
+{
+ static const char method_name[] = "ml::trainM_11()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
+ Mat& samples = *((Mat*)samples_nativeObj);
+ Mat& probs0 = *((Mat*)probs0_nativeObj);
+ bool _retval_ = (*me)->trainM( samples, probs0 );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// static Ptr_EM create()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_EM_create_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_EM_create_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "ml::create_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::ml::EM> Ptr_EM;
+ Ptr_EM _retval_ = cv::ml::EM::create( );
+ return (jlong)(new Ptr_EM(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::ml::EM>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_ml_EM_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_EM_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::ml::EM>*) self;
+}
+
+
+//
+// int getType()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_SVM_getType_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_SVM_getType_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getType_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getType( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setType(int val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setType_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setType_10
+ (JNIEnv* env, jclass , jlong self, jint val)
+{
+ static const char method_name[] = "ml::setType_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ (*me)->setType( (int)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getGamma()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getGamma_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getGamma_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getGamma_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getGamma( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setGamma(double val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setGamma_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setGamma_10
+ (JNIEnv* env, jclass , jlong self, jdouble val)
+{
+ static const char method_name[] = "ml::setGamma_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ (*me)->setGamma( (double)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getCoef0()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getCoef0_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getCoef0_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getCoef0_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getCoef0( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setCoef0(double val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setCoef0_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setCoef0_10
+ (JNIEnv* env, jclass , jlong self, jdouble val)
+{
+ static const char method_name[] = "ml::setCoef0_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ (*me)->setCoef0( (double)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getDegree()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getDegree_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getDegree_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getDegree_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getDegree( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setDegree(double val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setDegree_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setDegree_10
+ (JNIEnv* env, jclass , jlong self, jdouble val)
+{
+ static const char method_name[] = "ml::setDegree_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ (*me)->setDegree( (double)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getC()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getC_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getC_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getC_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getC( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setC(double val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setC_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setC_10
+ (JNIEnv* env, jclass , jlong self, jdouble val)
+{
+ static const char method_name[] = "ml::setC_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ (*me)->setC( (double)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getNu()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getNu_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getNu_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getNu_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getNu( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setNu(double val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setNu_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setNu_10
+ (JNIEnv* env, jclass , jlong self, jdouble val)
+{
+ static const char method_name[] = "ml::setNu_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ (*me)->setNu( (double)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getP()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getP_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getP_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getP_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getP( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setP(double val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setP_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setP_10
+ (JNIEnv* env, jclass , jlong self, jdouble val)
+{
+ static const char method_name[] = "ml::setP_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ (*me)->setP( (double)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat getClassWeights()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_SVM_getClassWeights_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_SVM_getClassWeights_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getClassWeights_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ ::Mat _retval_ = (*me)->getClassWeights( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setClassWeights(Mat val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setClassWeights_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setClassWeights_10
+ (JNIEnv* env, jclass , jlong self, jlong val_nativeObj)
+{
+ static const char method_name[] = "ml::setClassWeights_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ Mat& val = *((Mat*)val_nativeObj);
+ (*me)->setClassWeights( val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// TermCriteria getTermCriteria()
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_SVM_getTermCriteria_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_SVM_getTermCriteria_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getTermCriteria_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ TermCriteria _retval_ = (*me)->getTermCriteria( );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(3); jdouble _tmp_retval_[3] = {_retval_.type, _retval_.maxCount, _retval_.epsilon}; env->SetDoubleArrayRegion(_da_retval_, 0, 3, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setTermCriteria(TermCriteria val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setTermCriteria_10 (JNIEnv*, jclass, jlong, jint, jint, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setTermCriteria_10
+ (JNIEnv* env, jclass , jlong self, jint val_type, jint val_maxCount, jdouble val_epsilon)
+{
+ static const char method_name[] = "ml::setTermCriteria_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ TermCriteria val(val_type, val_maxCount, val_epsilon);
+ (*me)->setTermCriteria( val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getKernelType()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_SVM_getKernelType_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_SVM_getKernelType_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getKernelType_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getKernelType( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setKernel(int kernelType)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setKernel_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setKernel_10
+ (JNIEnv* env, jclass , jlong self, jint kernelType)
+{
+ static const char method_name[] = "ml::setKernel_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ (*me)->setKernel( (int)kernelType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat getSupportVectors()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_SVM_getSupportVectors_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_SVM_getSupportVectors_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getSupportVectors_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ ::Mat _retval_ = (*me)->getSupportVectors( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// double getDecisionFunction(int i, Mat& alpha, Mat& svidx)
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getDecisionFunction_10 (JNIEnv*, jclass, jlong, jint, jlong, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getDecisionFunction_10
+ (JNIEnv* env, jclass , jlong self, jint i, jlong alpha_nativeObj, jlong svidx_nativeObj)
+{
+ static const char method_name[] = "ml::getDecisionFunction_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
+ Mat& alpha = *((Mat*)alpha_nativeObj);
+ Mat& svidx = *((Mat*)svidx_nativeObj);
+ double _retval_ = (*me)->getDecisionFunction( (int)i, alpha, svidx );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// static Ptr_SVM create()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_SVM_create_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_SVM_create_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "ml::create_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::ml::SVM> Ptr_SVM;
+ Ptr_SVM _retval_ = cv::ml::SVM::create( );
+ return (jlong)(new Ptr_SVM(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::ml::SVM>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::ml::SVM>*) self;
+}
+
+
+//
+// float predictProb(Mat inputs, Mat& outputs, Mat& outputProbs, int flags = 0)
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_ml_NormalBayesClassifier_predictProb_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jint);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_ml_NormalBayesClassifier_predictProb_10
+ (JNIEnv* env, jclass , jlong self, jlong inputs_nativeObj, jlong outputs_nativeObj, jlong outputProbs_nativeObj, jint flags)
+{
+ static const char method_name[] = "ml::predictProb_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::NormalBayesClassifier>* me = (Ptr<cv::ml::NormalBayesClassifier>*) self; //TODO: check for NULL
+ Mat& inputs = *((Mat*)inputs_nativeObj);
+ Mat& outputs = *((Mat*)outputs_nativeObj);
+ Mat& outputProbs = *((Mat*)outputProbs_nativeObj);
+ float _retval_ = (*me)->predictProb( inputs, outputs, outputProbs, (int)flags );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_ml_NormalBayesClassifier_predictProb_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_ml_NormalBayesClassifier_predictProb_11
+ (JNIEnv* env, jclass , jlong self, jlong inputs_nativeObj, jlong outputs_nativeObj, jlong outputProbs_nativeObj)
+{
+ static const char method_name[] = "ml::predictProb_11()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::NormalBayesClassifier>* me = (Ptr<cv::ml::NormalBayesClassifier>*) self; //TODO: check for NULL
+ Mat& inputs = *((Mat*)inputs_nativeObj);
+ Mat& outputs = *((Mat*)outputs_nativeObj);
+ Mat& outputProbs = *((Mat*)outputProbs_nativeObj);
+ float _retval_ = (*me)->predictProb( inputs, outputs, outputProbs );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// static Ptr_NormalBayesClassifier create()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_NormalBayesClassifier_create_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_NormalBayesClassifier_create_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "ml::create_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::ml::NormalBayesClassifier> Ptr_NormalBayesClassifier;
+ Ptr_NormalBayesClassifier _retval_ = cv::ml::NormalBayesClassifier::create( );
+ return (jlong)(new Ptr_NormalBayesClassifier(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::ml::NormalBayesClassifier>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_ml_NormalBayesClassifier_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_NormalBayesClassifier_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::ml::NormalBayesClassifier>*) self;
+}
+
+
+//
+// int getLayout()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getLayout_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getLayout_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getLayout_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ int _retval_ = me->getLayout( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int getNTestSamples()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNTestSamples_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNTestSamples_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getNTestSamples_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ int _retval_ = me->getNTestSamples( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int getNTrainSamples()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNTrainSamples_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNTrainSamples_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getNTrainSamples_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ int _retval_ = me->getNTrainSamples( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int getNSamples()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNSamples_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNSamples_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getNSamples_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ int _retval_ = me->getNSamples( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int getNVars()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNVars_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNVars_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getNVars_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ int _retval_ = me->getNVars( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void getSample(Mat varIdx, int sidx, float* buf)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_getSample_10 (JNIEnv*, jclass, jlong, jlong, jint, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_getSample_10
+ (JNIEnv* env, jclass , jlong self, jlong varIdx_nativeObj, jint sidx, jfloat buf)
+{
+ static const char method_name[] = "ml::getSample_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ Mat& varIdx = *((Mat*)varIdx_nativeObj);
+ me->getSample( varIdx, (int)sidx, &buf );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getNAllVars()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNAllVars_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNAllVars_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getNAllVars_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ int _retval_ = me->getNAllVars( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getMissing()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getMissing_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getMissing_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getMissing_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getMissing( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getTrainSamples(int layout = ROW_SAMPLE, bool compressSamples = true, bool compressVars = true)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainSamples_10 (JNIEnv*, jclass, jlong, jint, jboolean, jboolean);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainSamples_10
+ (JNIEnv* env, jclass , jlong self, jint layout, jboolean compressSamples, jboolean compressVars)
+{
+ static const char method_name[] = "ml::getTrainSamples_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getTrainSamples( (int)layout, (bool)compressSamples, (bool)compressVars );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainSamples_11 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainSamples_11
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getTrainSamples_11()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getTrainSamples( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getTrainResponses()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainResponses_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainResponses_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getTrainResponses_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getTrainResponses( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getTrainNormCatResponses()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainNormCatResponses_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainNormCatResponses_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getTrainNormCatResponses_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getTrainNormCatResponses( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getTestResponses()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTestResponses_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTestResponses_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getTestResponses_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getTestResponses( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getTestNormCatResponses()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTestNormCatResponses_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTestNormCatResponses_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getTestNormCatResponses_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getTestNormCatResponses( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getResponses()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getResponses_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getResponses_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getResponses_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getResponses( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getSamples()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getSamples_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getSamples_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getSamples_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getSamples( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getNormCatResponses()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getNormCatResponses_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getNormCatResponses_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getNormCatResponses_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getNormCatResponses( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getSampleWeights()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getSampleWeights_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getSampleWeights_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getSampleWeights_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getSampleWeights( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getTrainSampleWeights()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainSampleWeights_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainSampleWeights_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getTrainSampleWeights_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getTrainSampleWeights( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getTestSampleWeights()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTestSampleWeights_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTestSampleWeights_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getTestSampleWeights_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getTestSampleWeights( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getVarIdx()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getVarIdx_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getVarIdx_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getVarIdx_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getVarIdx( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getVarType()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getVarType_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getVarType_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getVarType_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getVarType( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int getResponseType()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getResponseType_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getResponseType_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getResponseType_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ int _retval_ = me->getResponseType( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getTrainSampleIdx()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainSampleIdx_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainSampleIdx_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getTrainSampleIdx_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getTrainSampleIdx( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getTestSampleIdx()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTestSampleIdx_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTestSampleIdx_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getTestSampleIdx_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getTestSampleIdx( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void getValues(int vi, Mat sidx, float* values)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_getValues_10 (JNIEnv*, jclass, jlong, jint, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_getValues_10
+ (JNIEnv* env, jclass , jlong self, jint vi, jlong sidx_nativeObj, jfloat values)
+{
+ static const char method_name[] = "ml::getValues_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ Mat& sidx = *((Mat*)sidx_nativeObj);
+ me->getValues( (int)vi, sidx, &values );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat getDefaultSubstValues()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getDefaultSubstValues_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getDefaultSubstValues_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getDefaultSubstValues_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getDefaultSubstValues( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int getCatCount(int vi)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getCatCount_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getCatCount_10
+ (JNIEnv* env, jclass , jlong self, jint vi)
+{
+ static const char method_name[] = "ml::getCatCount_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ int _retval_ = me->getCatCount( (int)vi );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getClassLabels()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getClassLabels_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getClassLabels_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getClassLabels_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getClassLabels( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getCatOfs()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getCatOfs_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getCatOfs_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getCatOfs_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getCatOfs( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat getCatMap()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getCatMap_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getCatMap_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getCatMap_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->getCatMap( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setTrainTestSplit(int count, bool shuffle = true)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_setTrainTestSplit_10 (JNIEnv*, jclass, jlong, jint, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_setTrainTestSplit_10
+ (JNIEnv* env, jclass , jlong self, jint count, jboolean shuffle)
+{
+ static const char method_name[] = "ml::setTrainTestSplit_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ me->setTrainTestSplit( (int)count, (bool)shuffle );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_setTrainTestSplit_11 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_setTrainTestSplit_11
+ (JNIEnv* env, jclass , jlong self, jint count)
+{
+ static const char method_name[] = "ml::setTrainTestSplit_11()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ me->setTrainTestSplit( (int)count );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void setTrainTestSplitRatio(double ratio, bool shuffle = true)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_setTrainTestSplitRatio_10 (JNIEnv*, jclass, jlong, jdouble, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_setTrainTestSplitRatio_10
+ (JNIEnv* env, jclass , jlong self, jdouble ratio, jboolean shuffle)
+{
+ static const char method_name[] = "ml::setTrainTestSplitRatio_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ me->setTrainTestSplitRatio( (double)ratio, (bool)shuffle );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_setTrainTestSplitRatio_11 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_setTrainTestSplitRatio_11
+ (JNIEnv* env, jclass , jlong self, jdouble ratio)
+{
+ static const char method_name[] = "ml::setTrainTestSplitRatio_11()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ me->setTrainTestSplitRatio( (double)ratio );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void shuffleTrainTest()
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_shuffleTrainTest_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_shuffleTrainTest_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::shuffleTrainTest_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
+ me->shuffleTrainTest( );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// static Mat getSubVector(Mat vec, Mat idx)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getSubVector_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getSubVector_10
+ (JNIEnv* env, jclass , jlong vec_nativeObj, jlong idx_nativeObj)
+{
+ static const char method_name[] = "ml::getSubVector_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& vec = *((Mat*)vec_nativeObj);
+ Mat& idx = *((Mat*)idx_nativeObj);
+ ::Mat _retval_ = cv::ml::TrainData::getSubVector( vec, idx );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// native support for java finalize()
+// static void cv::ml::TrainData::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (cv::ml::TrainData*) self;
+}
+
+
+//
+// int getBoostType()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_Boost_getBoostType_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_Boost_getBoostType_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getBoostType_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::Boost>* me = (Ptr<cv::ml::Boost>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getBoostType( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setBoostType(int val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_Boost_setBoostType_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_Boost_setBoostType_10
+ (JNIEnv* env, jclass , jlong self, jint val)
+{
+ static const char method_name[] = "ml::setBoostType_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::Boost>* me = (Ptr<cv::ml::Boost>*) self; //TODO: check for NULL
+ (*me)->setBoostType( (int)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getWeakCount()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_Boost_getWeakCount_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_Boost_getWeakCount_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getWeakCount_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::Boost>* me = (Ptr<cv::ml::Boost>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getWeakCount( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setWeakCount(int val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_Boost_setWeakCount_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_Boost_setWeakCount_10
+ (JNIEnv* env, jclass , jlong self, jint val)
+{
+ static const char method_name[] = "ml::setWeakCount_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::Boost>* me = (Ptr<cv::ml::Boost>*) self; //TODO: check for NULL
+ (*me)->setWeakCount( (int)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getWeightTrimRate()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_Boost_getWeightTrimRate_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_Boost_getWeightTrimRate_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getWeightTrimRate_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::Boost>* me = (Ptr<cv::ml::Boost>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getWeightTrimRate( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setWeightTrimRate(double val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_Boost_setWeightTrimRate_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_Boost_setWeightTrimRate_10
+ (JNIEnv* env, jclass , jlong self, jdouble val)
+{
+ static const char method_name[] = "ml::setWeightTrimRate_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::Boost>* me = (Ptr<cv::ml::Boost>*) self; //TODO: check for NULL
+ (*me)->setWeightTrimRate( (double)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// static Ptr_Boost create()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_Boost_create_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_Boost_create_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "ml::create_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::ml::Boost> Ptr_Boost;
+ Ptr_Boost _retval_ = cv::ml::Boost::create( );
+ return (jlong)(new Ptr_Boost(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::ml::Boost>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_ml_Boost_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_Boost_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::ml::Boost>*) self;
+}
+
+
+//
+// double getLearningRate()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_LogisticRegression_getLearningRate_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_LogisticRegression_getLearningRate_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getLearningRate_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getLearningRate( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setLearningRate(double val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setLearningRate_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setLearningRate_10
+ (JNIEnv* env, jclass , jlong self, jdouble val)
+{
+ static const char method_name[] = "ml::setLearningRate_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
+ (*me)->setLearningRate( (double)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getIterations()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_LogisticRegression_getIterations_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_LogisticRegression_getIterations_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getIterations_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getIterations( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setIterations(int val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setIterations_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setIterations_10
+ (JNIEnv* env, jclass , jlong self, jint val)
+{
+ static const char method_name[] = "ml::setIterations_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
+ (*me)->setIterations( (int)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getRegularization()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_LogisticRegression_getRegularization_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_LogisticRegression_getRegularization_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getRegularization_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getRegularization( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setRegularization(int val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setRegularization_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setRegularization_10
+ (JNIEnv* env, jclass , jlong self, jint val)
+{
+ static const char method_name[] = "ml::setRegularization_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
+ (*me)->setRegularization( (int)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getTrainMethod()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_LogisticRegression_getTrainMethod_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_LogisticRegression_getTrainMethod_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getTrainMethod_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getTrainMethod( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setTrainMethod(int val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setTrainMethod_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setTrainMethod_10
+ (JNIEnv* env, jclass , jlong self, jint val)
+{
+ static const char method_name[] = "ml::setTrainMethod_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
+ (*me)->setTrainMethod( (int)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getMiniBatchSize()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_LogisticRegression_getMiniBatchSize_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_LogisticRegression_getMiniBatchSize_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getMiniBatchSize_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getMiniBatchSize( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setMiniBatchSize(int val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setMiniBatchSize_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setMiniBatchSize_10
+ (JNIEnv* env, jclass , jlong self, jint val)
+{
+ static const char method_name[] = "ml::setMiniBatchSize_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
+ (*me)->setMiniBatchSize( (int)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// TermCriteria getTermCriteria()
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_LogisticRegression_getTermCriteria_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_LogisticRegression_getTermCriteria_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getTermCriteria_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
+ TermCriteria _retval_ = (*me)->getTermCriteria( );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(3); jdouble _tmp_retval_[3] = {_retval_.type, _retval_.maxCount, _retval_.epsilon}; env->SetDoubleArrayRegion(_da_retval_, 0, 3, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setTermCriteria(TermCriteria val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setTermCriteria_10 (JNIEnv*, jclass, jlong, jint, jint, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setTermCriteria_10
+ (JNIEnv* env, jclass , jlong self, jint val_type, jint val_maxCount, jdouble val_epsilon)
+{
+ static const char method_name[] = "ml::setTermCriteria_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
+ TermCriteria val(val_type, val_maxCount, val_epsilon);
+ (*me)->setTermCriteria( val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// float predict(Mat samples, Mat& results = Mat(), int flags = 0)
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_ml_LogisticRegression_predict_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_ml_LogisticRegression_predict_10
+ (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jlong results_nativeObj, jint flags)
+{
+ static const char method_name[] = "ml::predict_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
+ Mat& samples = *((Mat*)samples_nativeObj);
+ Mat& results = *((Mat*)results_nativeObj);
+ float _retval_ = (*me)->predict( samples, results, (int)flags );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_ml_LogisticRegression_predict_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_ml_LogisticRegression_predict_11
+ (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj)
+{
+ static const char method_name[] = "ml::predict_11()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
+ Mat& samples = *((Mat*)samples_nativeObj);
+ float _retval_ = (*me)->predict( samples );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat get_learnt_thetas()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_LogisticRegression_get_1learnt_1thetas_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_LogisticRegression_get_1learnt_1thetas_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::get_1learnt_1thetas_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
+ ::Mat _retval_ = (*me)->get_learnt_thetas( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// static Ptr_LogisticRegression create()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_LogisticRegression_create_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_LogisticRegression_create_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "ml::create_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::ml::LogisticRegression> Ptr_LogisticRegression;
+ Ptr_LogisticRegression _retval_ = cv::ml::LogisticRegression::create( );
+ return (jlong)(new Ptr_LogisticRegression(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::ml::LogisticRegression>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::ml::LogisticRegression>*) self;
+}
+
+
+//
+// void setDefaultK(int val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_setDefaultK_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_setDefaultK_10
+ (JNIEnv* env, jclass , jlong self, jint val)
+{
+ static const char method_name[] = "ml::setDefaultK_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
+ (*me)->setDefaultK( (int)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getDefaultK()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_KNearest_getDefaultK_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_KNearest_getDefaultK_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getDefaultK_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getDefaultK( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool getIsClassifier()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_KNearest_getIsClassifier_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_KNearest_getIsClassifier_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getIsClassifier_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
+ bool _retval_ = (*me)->getIsClassifier( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setIsClassifier(bool val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_setIsClassifier_10 (JNIEnv*, jclass, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_setIsClassifier_10
+ (JNIEnv* env, jclass , jlong self, jboolean val)
+{
+ static const char method_name[] = "ml::setIsClassifier_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
+ (*me)->setIsClassifier( (bool)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getEmax()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_KNearest_getEmax_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_KNearest_getEmax_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getEmax_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getEmax( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setEmax(int val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_setEmax_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_setEmax_10
+ (JNIEnv* env, jclass , jlong self, jint val)
+{
+ static const char method_name[] = "ml::setEmax_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
+ (*me)->setEmax( (int)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getAlgorithmType()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_KNearest_getAlgorithmType_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_KNearest_getAlgorithmType_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getAlgorithmType_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getAlgorithmType( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setAlgorithmType(int val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_setAlgorithmType_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_setAlgorithmType_10
+ (JNIEnv* env, jclass , jlong self, jint val)
+{
+ static const char method_name[] = "ml::setAlgorithmType_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
+ (*me)->setAlgorithmType( (int)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// float findNearest(Mat samples, int k, Mat& results, Mat& neighborResponses = Mat(), Mat& dist = Mat())
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_ml_KNearest_findNearest_10 (JNIEnv*, jclass, jlong, jlong, jint, jlong, jlong, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_ml_KNearest_findNearest_10
+ (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jint k, jlong results_nativeObj, jlong neighborResponses_nativeObj, jlong dist_nativeObj)
+{
+ static const char method_name[] = "ml::findNearest_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
+ Mat& samples = *((Mat*)samples_nativeObj);
+ Mat& results = *((Mat*)results_nativeObj);
+ Mat& neighborResponses = *((Mat*)neighborResponses_nativeObj);
+ Mat& dist = *((Mat*)dist_nativeObj);
+ float _retval_ = (*me)->findNearest( samples, (int)k, results, neighborResponses, dist );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_ml_KNearest_findNearest_11 (JNIEnv*, jclass, jlong, jlong, jint, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_ml_KNearest_findNearest_11
+ (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jint k, jlong results_nativeObj)
+{
+ static const char method_name[] = "ml::findNearest_11()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
+ Mat& samples = *((Mat*)samples_nativeObj);
+ Mat& results = *((Mat*)results_nativeObj);
+ float _retval_ = (*me)->findNearest( samples, (int)k, results );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// static Ptr_KNearest create()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_KNearest_create_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_KNearest_create_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "ml::create_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::ml::KNearest> Ptr_KNearest;
+ Ptr_KNearest _retval_ = cv::ml::KNearest::create( );
+ return (jlong)(new Ptr_KNearest(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::ml::KNearest>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::ml::KNearest>*) self;
+}
+
+
+//
+// int getMaxCategories()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_DTrees_getMaxCategories_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_DTrees_getMaxCategories_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getMaxCategories_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getMaxCategories( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setMaxCategories(int val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setMaxCategories_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setMaxCategories_10
+ (JNIEnv* env, jclass , jlong self, jint val)
+{
+ static const char method_name[] = "ml::setMaxCategories_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
+ (*me)->setMaxCategories( (int)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getMaxDepth()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_DTrees_getMaxDepth_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_DTrees_getMaxDepth_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getMaxDepth_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getMaxDepth( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setMaxDepth(int val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setMaxDepth_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setMaxDepth_10
+ (JNIEnv* env, jclass , jlong self, jint val)
+{
+ static const char method_name[] = "ml::setMaxDepth_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
+ (*me)->setMaxDepth( (int)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getMinSampleCount()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_DTrees_getMinSampleCount_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_DTrees_getMinSampleCount_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getMinSampleCount_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getMinSampleCount( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setMinSampleCount(int val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setMinSampleCount_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setMinSampleCount_10
+ (JNIEnv* env, jclass , jlong self, jint val)
+{
+ static const char method_name[] = "ml::setMinSampleCount_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
+ (*me)->setMinSampleCount( (int)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getCVFolds()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_DTrees_getCVFolds_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_DTrees_getCVFolds_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getCVFolds_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getCVFolds( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setCVFolds(int val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setCVFolds_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setCVFolds_10
+ (JNIEnv* env, jclass , jlong self, jint val)
+{
+ static const char method_name[] = "ml::setCVFolds_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
+ (*me)->setCVFolds( (int)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool getUseSurrogates()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_DTrees_getUseSurrogates_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_DTrees_getUseSurrogates_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getUseSurrogates_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
+ bool _retval_ = (*me)->getUseSurrogates( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setUseSurrogates(bool val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setUseSurrogates_10 (JNIEnv*, jclass, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setUseSurrogates_10
+ (JNIEnv* env, jclass , jlong self, jboolean val)
+{
+ static const char method_name[] = "ml::setUseSurrogates_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
+ (*me)->setUseSurrogates( (bool)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool getUse1SERule()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_DTrees_getUse1SERule_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_DTrees_getUse1SERule_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getUse1SERule_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
+ bool _retval_ = (*me)->getUse1SERule( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setUse1SERule(bool val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setUse1SERule_10 (JNIEnv*, jclass, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setUse1SERule_10
+ (JNIEnv* env, jclass , jlong self, jboolean val)
+{
+ static const char method_name[] = "ml::setUse1SERule_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
+ (*me)->setUse1SERule( (bool)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool getTruncatePrunedTree()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_DTrees_getTruncatePrunedTree_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_DTrees_getTruncatePrunedTree_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getTruncatePrunedTree_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
+ bool _retval_ = (*me)->getTruncatePrunedTree( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setTruncatePrunedTree(bool val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setTruncatePrunedTree_10 (JNIEnv*, jclass, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setTruncatePrunedTree_10
+ (JNIEnv* env, jclass , jlong self, jboolean val)
+{
+ static const char method_name[] = "ml::setTruncatePrunedTree_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
+ (*me)->setTruncatePrunedTree( (bool)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// float getRegressionAccuracy()
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_ml_DTrees_getRegressionAccuracy_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_ml_DTrees_getRegressionAccuracy_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getRegressionAccuracy_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
+ float _retval_ = (*me)->getRegressionAccuracy( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setRegressionAccuracy(float val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setRegressionAccuracy_10 (JNIEnv*, jclass, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setRegressionAccuracy_10
+ (JNIEnv* env, jclass , jlong self, jfloat val)
+{
+ static const char method_name[] = "ml::setRegressionAccuracy_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
+ (*me)->setRegressionAccuracy( (float)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat getPriors()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_DTrees_getPriors_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_DTrees_getPriors_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getPriors_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
+ ::Mat _retval_ = (*me)->getPriors( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setPriors(Mat val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setPriors_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setPriors_10
+ (JNIEnv* env, jclass , jlong self, jlong val_nativeObj)
+{
+ static const char method_name[] = "ml::setPriors_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
+ Mat& val = *((Mat*)val_nativeObj);
+ (*me)->setPriors( val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// static Ptr_DTrees create()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_DTrees_create_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_DTrees_create_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "ml::create_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::ml::DTrees> Ptr_DTrees;
+ Ptr_DTrees _retval_ = cv::ml::DTrees::create( );
+ return (jlong)(new Ptr_DTrees(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::ml::DTrees>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::ml::DTrees>*) self;
+}
+
+
+//
+// void setTrainMethod(int method, double param1 = 0, double param2 = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setTrainMethod_10 (JNIEnv*, jclass, jlong, jint, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setTrainMethod_10
+ (JNIEnv* env, jclass , jlong self, jint method, jdouble param1, jdouble param2)
+{
+ static const char method_name[] = "ml::setTrainMethod_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ (*me)->setTrainMethod( (int)method, (double)param1, (double)param2 );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setTrainMethod_11 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setTrainMethod_11
+ (JNIEnv* env, jclass , jlong self, jint method)
+{
+ static const char method_name[] = "ml::setTrainMethod_11()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ (*me)->setTrainMethod( (int)method );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void setActivationFunction(int type, double param1 = 0, double param2 = 0)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setActivationFunction_10 (JNIEnv*, jclass, jlong, jint, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setActivationFunction_10
+ (JNIEnv* env, jclass , jlong self, jint type, jdouble param1, jdouble param2)
+{
+ static const char method_name[] = "ml::setActivationFunction_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ (*me)->setActivationFunction( (int)type, (double)param1, (double)param2 );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setActivationFunction_11 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setActivationFunction_11
+ (JNIEnv* env, jclass , jlong self, jint type)
+{
+ static const char method_name[] = "ml::setActivationFunction_11()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ (*me)->setActivationFunction( (int)type );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getTrainMethod()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_ANN_1MLP_getTrainMethod_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_ANN_1MLP_getTrainMethod_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getTrainMethod_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getTrainMethod( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setLayerSizes(Mat _layer_sizes)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setLayerSizes_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setLayerSizes_10
+ (JNIEnv* env, jclass , jlong self, jlong _layer_sizes_nativeObj)
+{
+ static const char method_name[] = "ml::setLayerSizes_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ Mat& _layer_sizes = *((Mat*)_layer_sizes_nativeObj);
+ (*me)->setLayerSizes( _layer_sizes );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat getLayerSizes()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_ANN_1MLP_getLayerSizes_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_ANN_1MLP_getLayerSizes_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getLayerSizes_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ ::Mat _retval_ = (*me)->getLayerSizes( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// TermCriteria getTermCriteria()
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_ANN_1MLP_getTermCriteria_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_ANN_1MLP_getTermCriteria_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getTermCriteria_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ TermCriteria _retval_ = (*me)->getTermCriteria( );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(3); jdouble _tmp_retval_[3] = {_retval_.type, _retval_.maxCount, _retval_.epsilon}; env->SetDoubleArrayRegion(_da_retval_, 0, 3, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setTermCriteria(TermCriteria val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setTermCriteria_10 (JNIEnv*, jclass, jlong, jint, jint, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setTermCriteria_10
+ (JNIEnv* env, jclass , jlong self, jint val_type, jint val_maxCount, jdouble val_epsilon)
+{
+ static const char method_name[] = "ml::setTermCriteria_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ TermCriteria val(val_type, val_maxCount, val_epsilon);
+ (*me)->setTermCriteria( val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getBackpropWeightScale()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getBackpropWeightScale_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getBackpropWeightScale_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getBackpropWeightScale_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getBackpropWeightScale( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setBackpropWeightScale(double val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setBackpropWeightScale_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setBackpropWeightScale_10
+ (JNIEnv* env, jclass , jlong self, jdouble val)
+{
+ static const char method_name[] = "ml::setBackpropWeightScale_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ (*me)->setBackpropWeightScale( (double)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getBackpropMomentumScale()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getBackpropMomentumScale_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getBackpropMomentumScale_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getBackpropMomentumScale_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getBackpropMomentumScale( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setBackpropMomentumScale(double val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setBackpropMomentumScale_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setBackpropMomentumScale_10
+ (JNIEnv* env, jclass , jlong self, jdouble val)
+{
+ static const char method_name[] = "ml::setBackpropMomentumScale_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ (*me)->setBackpropMomentumScale( (double)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getRpropDW0()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDW0_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDW0_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getRpropDW0_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getRpropDW0( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setRpropDW0(double val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDW0_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDW0_10
+ (JNIEnv* env, jclass , jlong self, jdouble val)
+{
+ static const char method_name[] = "ml::setRpropDW0_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ (*me)->setRpropDW0( (double)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getRpropDWPlus()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDWPlus_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDWPlus_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getRpropDWPlus_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getRpropDWPlus( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setRpropDWPlus(double val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDWPlus_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDWPlus_10
+ (JNIEnv* env, jclass , jlong self, jdouble val)
+{
+ static const char method_name[] = "ml::setRpropDWPlus_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ (*me)->setRpropDWPlus( (double)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getRpropDWMinus()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDWMinus_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDWMinus_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getRpropDWMinus_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getRpropDWMinus( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setRpropDWMinus(double val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDWMinus_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDWMinus_10
+ (JNIEnv* env, jclass , jlong self, jdouble val)
+{
+ static const char method_name[] = "ml::setRpropDWMinus_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ (*me)->setRpropDWMinus( (double)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getRpropDWMin()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDWMin_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDWMin_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getRpropDWMin_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getRpropDWMin( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setRpropDWMin(double val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDWMin_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDWMin_10
+ (JNIEnv* env, jclass , jlong self, jdouble val)
+{
+ static const char method_name[] = "ml::setRpropDWMin_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ (*me)->setRpropDWMin( (double)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getRpropDWMax()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDWMax_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDWMax_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getRpropDWMax_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getRpropDWMax( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setRpropDWMax(double val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDWMax_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDWMax_10
+ (JNIEnv* env, jclass , jlong self, jdouble val)
+{
+ static const char method_name[] = "ml::setRpropDWMax_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ (*me)->setRpropDWMax( (double)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat getWeights(int layerIdx)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_ANN_1MLP_getWeights_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_ANN_1MLP_getWeights_10
+ (JNIEnv* env, jclass , jlong self, jint layerIdx)
+{
+ static const char method_name[] = "ml::getWeights_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
+ ::Mat _retval_ = (*me)->getWeights( (int)layerIdx );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// static Ptr_ANN_MLP create()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_ANN_1MLP_create_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_ANN_1MLP_create_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "ml::create_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::ml::ANN_MLP> Ptr_ANN_MLP;
+ Ptr_ANN_MLP _retval_ = cv::ml::ANN_MLP::create( );
+ return (jlong)(new Ptr_ANN_MLP(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::ml::ANN_MLP>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::ml::ANN_MLP>*) self;
+}
+
+
+//
+// int getVarCount()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_StatModel_getVarCount_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_StatModel_getVarCount_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getVarCount_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::StatModel>* me = (Ptr<cv::ml::StatModel>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getVarCount( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool empty()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_StatModel_empty_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_StatModel_empty_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::empty_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::StatModel>* me = (Ptr<cv::ml::StatModel>*) self; //TODO: check for NULL
+ bool _retval_ = (*me)->empty( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool isTrained()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_StatModel_isTrained_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_StatModel_isTrained_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::isTrained_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::StatModel>* me = (Ptr<cv::ml::StatModel>*) self; //TODO: check for NULL
+ bool _retval_ = (*me)->isTrained( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool isClassifier()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_StatModel_isClassifier_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_StatModel_isClassifier_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::isClassifier_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::StatModel>* me = (Ptr<cv::ml::StatModel>*) self; //TODO: check for NULL
+ bool _retval_ = (*me)->isClassifier( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool train(Mat samples, int layout, Mat responses)
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_StatModel_train_10 (JNIEnv*, jclass, jlong, jlong, jint, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_StatModel_train_10
+ (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jint layout, jlong responses_nativeObj)
+{
+ static const char method_name[] = "ml::train_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::StatModel>* me = (Ptr<cv::ml::StatModel>*) self; //TODO: check for NULL
+ Mat& samples = *((Mat*)samples_nativeObj);
+ Mat& responses = *((Mat*)responses_nativeObj);
+ bool _retval_ = (*me)->train( samples, (int)layout, responses );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// float predict(Mat samples, Mat& results = Mat(), int flags = 0)
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_ml_StatModel_predict_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_ml_StatModel_predict_10
+ (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jlong results_nativeObj, jint flags)
+{
+ static const char method_name[] = "ml::predict_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::StatModel>* me = (Ptr<cv::ml::StatModel>*) self; //TODO: check for NULL
+ Mat& samples = *((Mat*)samples_nativeObj);
+ Mat& results = *((Mat*)results_nativeObj);
+ float _retval_ = (*me)->predict( samples, results, (int)flags );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_ml_StatModel_predict_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_ml_StatModel_predict_11
+ (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj)
+{
+ static const char method_name[] = "ml::predict_11()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::StatModel>* me = (Ptr<cv::ml::StatModel>*) self; //TODO: check for NULL
+ Mat& samples = *((Mat*)samples_nativeObj);
+ float _retval_ = (*me)->predict( samples );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::ml::StatModel>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_ml_StatModel_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_StatModel_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::ml::StatModel>*) self;
+}
+
+
+//
+// bool getCalculateVarImportance()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_RTrees_getCalculateVarImportance_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_ml_RTrees_getCalculateVarImportance_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getCalculateVarImportance_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::RTrees>* me = (Ptr<cv::ml::RTrees>*) self; //TODO: check for NULL
+ bool _retval_ = (*me)->getCalculateVarImportance( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setCalculateVarImportance(bool val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_RTrees_setCalculateVarImportance_10 (JNIEnv*, jclass, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_RTrees_setCalculateVarImportance_10
+ (JNIEnv* env, jclass , jlong self, jboolean val)
+{
+ static const char method_name[] = "ml::setCalculateVarImportance_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::RTrees>* me = (Ptr<cv::ml::RTrees>*) self; //TODO: check for NULL
+ (*me)->setCalculateVarImportance( (bool)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getActiveVarCount()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_RTrees_getActiveVarCount_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_ml_RTrees_getActiveVarCount_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getActiveVarCount_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::RTrees>* me = (Ptr<cv::ml::RTrees>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getActiveVarCount( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setActiveVarCount(int val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_RTrees_setActiveVarCount_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_RTrees_setActiveVarCount_10
+ (JNIEnv* env, jclass , jlong self, jint val)
+{
+ static const char method_name[] = "ml::setActiveVarCount_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::RTrees>* me = (Ptr<cv::ml::RTrees>*) self; //TODO: check for NULL
+ (*me)->setActiveVarCount( (int)val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// TermCriteria getTermCriteria()
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_RTrees_getTermCriteria_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_RTrees_getTermCriteria_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getTermCriteria_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::RTrees>* me = (Ptr<cv::ml::RTrees>*) self; //TODO: check for NULL
+ TermCriteria _retval_ = (*me)->getTermCriteria( );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(3); jdouble _tmp_retval_[3] = {_retval_.type, _retval_.maxCount, _retval_.epsilon}; env->SetDoubleArrayRegion(_da_retval_, 0, 3, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setTermCriteria(TermCriteria val)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_RTrees_setTermCriteria_10 (JNIEnv*, jclass, jlong, jint, jint, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_RTrees_setTermCriteria_10
+ (JNIEnv* env, jclass , jlong self, jint val_type, jint val_maxCount, jdouble val_epsilon)
+{
+ static const char method_name[] = "ml::setTermCriteria_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::RTrees>* me = (Ptr<cv::ml::RTrees>*) self; //TODO: check for NULL
+ TermCriteria val(val_type, val_maxCount, val_epsilon);
+ (*me)->setTermCriteria( val );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat getVarImportance()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_RTrees_getVarImportance_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_RTrees_getVarImportance_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "ml::getVarImportance_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::ml::RTrees>* me = (Ptr<cv::ml::RTrees>*) self; //TODO: check for NULL
+ ::Mat _retval_ = (*me)->getVarImportance( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// static Ptr_RTrees create()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_RTrees_create_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_ml_RTrees_create_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "ml::create_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::ml::RTrees> Ptr_RTrees;
+ Ptr_RTrees _retval_ = cv::ml::RTrees::create( );
+ return (jlong)(new Ptr_RTrees(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::ml::RTrees>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_ml_RTrees_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_ml_RTrees_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::ml::RTrees>*) self;
+}
+
+
+
+} // extern "C"
+
+#endif // HAVE_OPENCV_ML
diff --git a/modules/java/src/objdetect+BaseCascadeClassifier.java b/modules/java/src/objdetect+BaseCascadeClassifier.java
new file mode 100644
index 0000000..21c8db7
--- /dev/null
+++ b/modules/java/src/objdetect+BaseCascadeClassifier.java
@@ -0,0 +1,26 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.objdetect;
+
+import org.opencv.core.Algorithm;
+
+// C++: class BaseCascadeClassifier
+//javadoc: BaseCascadeClassifier
+public class BaseCascadeClassifier extends Algorithm {
+
+ protected BaseCascadeClassifier(long addr) { super(addr); }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/objdetect+CascadeClassifier.java b/modules/java/src/objdetect+CascadeClassifier.java
new file mode 100644
index 0000000..6527880
--- /dev/null
+++ b/modules/java/src/objdetect+CascadeClassifier.java
@@ -0,0 +1,263 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.objdetect;
+
+import java.lang.String;
+import java.util.ArrayList;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfDouble;
+import org.opencv.core.MatOfInt;
+import org.opencv.core.MatOfRect;
+import org.opencv.core.Size;
+
+// C++: class CascadeClassifier
+//javadoc: CascadeClassifier
+public class CascadeClassifier {
+
+ protected final long nativeObj;
+ protected CascadeClassifier(long addr) { nativeObj = addr; }
+
+
+ //
+ // C++: CascadeClassifier()
+ //
+
+ //javadoc: CascadeClassifier::CascadeClassifier()
+ public CascadeClassifier()
+ {
+
+ nativeObj = CascadeClassifier_0();
+
+ return;
+ }
+
+
+ //
+ // C++: CascadeClassifier(String filename)
+ //
+
+ //javadoc: CascadeClassifier::CascadeClassifier(filename)
+ public CascadeClassifier(String filename)
+ {
+
+ nativeObj = CascadeClassifier_1(filename);
+
+ return;
+ }
+
+
+ //
+ // C++: bool empty()
+ //
+
+ //javadoc: CascadeClassifier::empty()
+ public boolean empty()
+ {
+
+ boolean retVal = empty_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool load(String filename)
+ //
+
+ //javadoc: CascadeClassifier::load(filename)
+ public boolean load(String filename)
+ {
+
+ boolean retVal = load_0(nativeObj, filename);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool read(FileNode node)
+ //
+
+ // Unknown type 'FileNode' (I), skipping the function
+
+
+ //
+ // C++: void detectMultiScale(Mat image, vector_Rect& objects, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size())
+ //
+
+ //javadoc: CascadeClassifier::detectMultiScale(image, objects, scaleFactor, minNeighbors, flags, minSize, maxSize)
+ public void detectMultiScale(Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
+ {
+ Mat objects_mat = objects;
+ detectMultiScale_0(nativeObj, image.nativeObj, objects_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
+
+ return;
+ }
+
+ //javadoc: CascadeClassifier::detectMultiScale(image, objects)
+ public void detectMultiScale(Mat image, MatOfRect objects)
+ {
+ Mat objects_mat = objects;
+ detectMultiScale_1(nativeObj, image.nativeObj, objects_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void detectMultiScale(Mat image, vector_Rect& objects, vector_int& numDetections, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size())
+ //
+
+ //javadoc: CascadeClassifier::detectMultiScale(image, objects, numDetections, scaleFactor, minNeighbors, flags, minSize, maxSize)
+ public void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
+ {
+ Mat objects_mat = objects;
+ Mat numDetections_mat = numDetections;
+ detectMultiScale2_0(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
+
+ return;
+ }
+
+ //javadoc: CascadeClassifier::detectMultiScale(image, objects, numDetections)
+ public void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections)
+ {
+ Mat objects_mat = objects;
+ Mat numDetections_mat = numDetections;
+ detectMultiScale2_1(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void detectMultiScale(Mat image, vector_Rect& objects, vector_int& rejectLevels, vector_double& levelWeights, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size(), bool outputRejectLevels = false)
+ //
+
+ //javadoc: CascadeClassifier::detectMultiScale(image, objects, rejectLevels, levelWeights, scaleFactor, minNeighbors, flags, minSize, maxSize, outputRejectLevels)
+ public void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize, boolean outputRejectLevels)
+ {
+ Mat objects_mat = objects;
+ Mat rejectLevels_mat = rejectLevels;
+ Mat levelWeights_mat = levelWeights;
+ detectMultiScale3_0(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height, outputRejectLevels);
+
+ return;
+ }
+
+ //javadoc: CascadeClassifier::detectMultiScale(image, objects, rejectLevels, levelWeights)
+ public void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights)
+ {
+ Mat objects_mat = objects;
+ Mat rejectLevels_mat = rejectLevels;
+ Mat levelWeights_mat = levelWeights;
+ detectMultiScale3_1(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: bool isOldFormatCascade()
+ //
+
+ //javadoc: CascadeClassifier::isOldFormatCascade()
+ public boolean isOldFormatCascade()
+ {
+
+ boolean retVal = isOldFormatCascade_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Size getOriginalWindowSize()
+ //
+
+ //javadoc: CascadeClassifier::getOriginalWindowSize()
+ public Size getOriginalWindowSize()
+ {
+
+ Size retVal = new Size(getOriginalWindowSize_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getFeatureType()
+ //
+
+ //javadoc: CascadeClassifier::getFeatureType()
+ public int getFeatureType()
+ {
+
+ int retVal = getFeatureType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static bool convert(String oldcascade, String newcascade)
+ //
+
+ //javadoc: CascadeClassifier::convert(oldcascade, newcascade)
+ public static boolean convert(String oldcascade, String newcascade)
+ {
+
+ boolean retVal = convert_0(oldcascade, newcascade);
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: CascadeClassifier()
+ private static native long CascadeClassifier_0();
+
+ // C++: CascadeClassifier(String filename)
+ private static native long CascadeClassifier_1(String filename);
+
+ // C++: bool empty()
+ private static native boolean empty_0(long nativeObj);
+
+ // C++: bool load(String filename)
+ private static native boolean load_0(long nativeObj, String filename);
+
+ // C++: void detectMultiScale(Mat image, vector_Rect& objects, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size())
+ private static native void detectMultiScale_0(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, double scaleFactor, int minNeighbors, int flags, double minSize_width, double minSize_height, double maxSize_width, double maxSize_height);
+ private static native void detectMultiScale_1(long nativeObj, long image_nativeObj, long objects_mat_nativeObj);
+
+ // C++: void detectMultiScale(Mat image, vector_Rect& objects, vector_int& numDetections, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size())
+ private static native void detectMultiScale2_0(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, long numDetections_mat_nativeObj, double scaleFactor, int minNeighbors, int flags, double minSize_width, double minSize_height, double maxSize_width, double maxSize_height);
+ private static native void detectMultiScale2_1(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, long numDetections_mat_nativeObj);
+
+ // C++: void detectMultiScale(Mat image, vector_Rect& objects, vector_int& rejectLevels, vector_double& levelWeights, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size(), bool outputRejectLevels = false)
+ private static native void detectMultiScale3_0(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, long rejectLevels_mat_nativeObj, long levelWeights_mat_nativeObj, double scaleFactor, int minNeighbors, int flags, double minSize_width, double minSize_height, double maxSize_width, double maxSize_height, boolean outputRejectLevels);
+ private static native void detectMultiScale3_1(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, long rejectLevels_mat_nativeObj, long levelWeights_mat_nativeObj);
+
+ // C++: bool isOldFormatCascade()
+ private static native boolean isOldFormatCascade_0(long nativeObj);
+
+ // C++: Size getOriginalWindowSize()
+ private static native double[] getOriginalWindowSize_0(long nativeObj);
+
+ // C++: int getFeatureType()
+ private static native int getFeatureType_0(long nativeObj);
+
+ // C++: static bool convert(String oldcascade, String newcascade)
+ private static native boolean convert_0(String oldcascade, String newcascade);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/objdetect+HOGDescriptor.java b/modules/java/src/objdetect+HOGDescriptor.java
new file mode 100644
index 0000000..da4e32c
--- /dev/null
+++ b/modules/java/src/objdetect+HOGDescriptor.java
@@ -0,0 +1,591 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.objdetect;
+
+import java.lang.String;
+import java.util.ArrayList;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfDouble;
+import org.opencv.core.MatOfFloat;
+import org.opencv.core.MatOfPoint;
+import org.opencv.core.MatOfRect;
+import org.opencv.core.Size;
+
+// C++: class HOGDescriptor
+//javadoc: HOGDescriptor
+public class HOGDescriptor {
+
+ protected final long nativeObj;
+ protected HOGDescriptor(long addr) { nativeObj = addr; }
+
+
+ public static final int
+ L2Hys = 0,
+ DEFAULT_NLEVELS = 64;
+
+
+ //
+ // C++: HOGDescriptor()
+ //
+
+ //javadoc: HOGDescriptor::HOGDescriptor()
+ public HOGDescriptor()
+ {
+
+ nativeObj = HOGDescriptor_0();
+
+ return;
+ }
+
+
+ //
+ // C++: HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture = 1, double _winSigma = -1, int _histogramNormType = HOGDescriptor::L2Hys, double _L2HysThreshold = 0.2, bool _gammaCorrection = false, int _nlevels = HOGDescriptor::DEFAULT_NLEVELS, bool _signedGradient = false)
+ //
+
+ //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold, _gammaCorrection, _nlevels, _signedGradient)
+ public HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, boolean _gammaCorrection, int _nlevels, boolean _signedGradient)
+ {
+
+ nativeObj = HOGDescriptor_1(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold, _gammaCorrection, _nlevels, _signedGradient);
+
+ return;
+ }
+
+ //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins)
+ public HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins)
+ {
+
+ nativeObj = HOGDescriptor_2(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins);
+
+ return;
+ }
+
+
+ //
+ // C++: HOGDescriptor(String filename)
+ //
+
+ //javadoc: HOGDescriptor::HOGDescriptor(filename)
+ public HOGDescriptor(String filename)
+ {
+
+ nativeObj = HOGDescriptor_3(filename);
+
+ return;
+ }
+
+
+ //
+ // C++: size_t getDescriptorSize()
+ //
+
+ //javadoc: HOGDescriptor::getDescriptorSize()
+ public long getDescriptorSize()
+ {
+
+ long retVal = getDescriptorSize_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool checkDetectorSize()
+ //
+
+ //javadoc: HOGDescriptor::checkDetectorSize()
+ public boolean checkDetectorSize()
+ {
+
+ boolean retVal = checkDetectorSize_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double getWinSigma()
+ //
+
+ //javadoc: HOGDescriptor::getWinSigma()
+ public double getWinSigma()
+ {
+
+ double retVal = getWinSigma_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setSVMDetector(Mat _svmdetector)
+ //
+
+ //javadoc: HOGDescriptor::setSVMDetector(_svmdetector)
+ public void setSVMDetector(Mat _svmdetector)
+ {
+
+ setSVMDetector_0(nativeObj, _svmdetector.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: bool load(String filename, String objname = String())
+ //
+
+ //javadoc: HOGDescriptor::load(filename, objname)
+ public boolean load(String filename, String objname)
+ {
+
+ boolean retVal = load_0(nativeObj, filename, objname);
+
+ return retVal;
+ }
+
+ //javadoc: HOGDescriptor::load(filename)
+ public boolean load(String filename)
+ {
+
+ boolean retVal = load_1(nativeObj, filename);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void save(String filename, String objname = String())
+ //
+
+ //javadoc: HOGDescriptor::save(filename, objname)
+ public void save(String filename, String objname)
+ {
+
+ save_0(nativeObj, filename, objname);
+
+ return;
+ }
+
+ //javadoc: HOGDescriptor::save(filename)
+ public void save(String filename)
+ {
+
+ save_1(nativeObj, filename);
+
+ return;
+ }
+
+
+ //
+ // C++: void compute(Mat img, vector_float& descriptors, Size winStride = Size(), Size padding = Size(), vector_Point locations = std::vector<Point>())
+ //
+
+ //javadoc: HOGDescriptor::compute(img, descriptors, winStride, padding, locations)
+ public void compute(Mat img, MatOfFloat descriptors, Size winStride, Size padding, MatOfPoint locations)
+ {
+ Mat descriptors_mat = descriptors;
+ Mat locations_mat = locations;
+ compute_0(nativeObj, img.nativeObj, descriptors_mat.nativeObj, winStride.width, winStride.height, padding.width, padding.height, locations_mat.nativeObj);
+
+ return;
+ }
+
+ //javadoc: HOGDescriptor::compute(img, descriptors)
+ public void compute(Mat img, MatOfFloat descriptors)
+ {
+ Mat descriptors_mat = descriptors;
+ compute_1(nativeObj, img.nativeObj, descriptors_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void detect(Mat img, vector_Point& foundLocations, vector_double& weights, double hitThreshold = 0, Size winStride = Size(), Size padding = Size(), vector_Point searchLocations = std::vector<Point>())
+ //
+
+ //javadoc: HOGDescriptor::detect(img, foundLocations, weights, hitThreshold, winStride, padding, searchLocations)
+ public void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride, Size padding, MatOfPoint searchLocations)
+ {
+ Mat foundLocations_mat = foundLocations;
+ Mat weights_mat = weights;
+ Mat searchLocations_mat = searchLocations;
+ detect_0(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, searchLocations_mat.nativeObj);
+
+ return;
+ }
+
+ //javadoc: HOGDescriptor::detect(img, foundLocations, weights)
+ public void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights)
+ {
+ Mat foundLocations_mat = foundLocations;
+ Mat weights_mat = weights;
+ detect_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void detectMultiScale(Mat img, vector_Rect& foundLocations, vector_double& foundWeights, double hitThreshold = 0, Size winStride = Size(), Size padding = Size(), double scale = 1.05, double finalThreshold = 2.0, bool useMeanshiftGrouping = false)
+ //
+
+ //javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights, hitThreshold, winStride, padding, scale, finalThreshold, useMeanshiftGrouping)
+ public void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold, boolean useMeanshiftGrouping)
+ {
+ Mat foundLocations_mat = foundLocations;
+ Mat foundWeights_mat = foundWeights;
+ detectMultiScale_0(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, scale, finalThreshold, useMeanshiftGrouping);
+
+ return;
+ }
+
+ //javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights)
+ public void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights)
+ {
+ Mat foundLocations_mat = foundLocations;
+ Mat foundWeights_mat = foundWeights;
+ detectMultiScale_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void computeGradient(Mat img, Mat& grad, Mat& angleOfs, Size paddingTL = Size(), Size paddingBR = Size())
+ //
+
+ //javadoc: HOGDescriptor::computeGradient(img, grad, angleOfs, paddingTL, paddingBR)
+ public void computeGradient(Mat img, Mat grad, Mat angleOfs, Size paddingTL, Size paddingBR)
+ {
+
+ computeGradient_0(nativeObj, img.nativeObj, grad.nativeObj, angleOfs.nativeObj, paddingTL.width, paddingTL.height, paddingBR.width, paddingBR.height);
+
+ return;
+ }
+
+ //javadoc: HOGDescriptor::computeGradient(img, grad, angleOfs)
+ public void computeGradient(Mat img, Mat grad, Mat angleOfs)
+ {
+
+ computeGradient_1(nativeObj, img.nativeObj, grad.nativeObj, angleOfs.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: static vector_float getDefaultPeopleDetector()
+ //
+
+ //javadoc: HOGDescriptor::getDefaultPeopleDetector()
+ public static MatOfFloat getDefaultPeopleDetector()
+ {
+
+ MatOfFloat retVal = MatOfFloat.fromNativeAddr(getDefaultPeopleDetector_0());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static vector_float getDaimlerPeopleDetector()
+ //
+
+ //javadoc: HOGDescriptor::getDaimlerPeopleDetector()
+ public static MatOfFloat getDaimlerPeopleDetector()
+ {
+
+ MatOfFloat retVal = MatOfFloat.fromNativeAddr(getDaimlerPeopleDetector_0());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Size HOGDescriptor::winSize
+ //
+
+ //javadoc: HOGDescriptor::get_winSize()
+ public Size get_winSize()
+ {
+
+ Size retVal = new Size(get_winSize_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Size HOGDescriptor::blockSize
+ //
+
+ //javadoc: HOGDescriptor::get_blockSize()
+ public Size get_blockSize()
+ {
+
+ Size retVal = new Size(get_blockSize_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Size HOGDescriptor::blockStride
+ //
+
+ //javadoc: HOGDescriptor::get_blockStride()
+ public Size get_blockStride()
+ {
+
+ Size retVal = new Size(get_blockStride_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Size HOGDescriptor::cellSize
+ //
+
+ //javadoc: HOGDescriptor::get_cellSize()
+ public Size get_cellSize()
+ {
+
+ Size retVal = new Size(get_cellSize_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int HOGDescriptor::nbins
+ //
+
+ //javadoc: HOGDescriptor::get_nbins()
+ public int get_nbins()
+ {
+
+ int retVal = get_nbins_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int HOGDescriptor::derivAperture
+ //
+
+ //javadoc: HOGDescriptor::get_derivAperture()
+ public int get_derivAperture()
+ {
+
+ int retVal = get_derivAperture_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double HOGDescriptor::winSigma
+ //
+
+ //javadoc: HOGDescriptor::get_winSigma()
+ public double get_winSigma()
+ {
+
+ double retVal = get_winSigma_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int HOGDescriptor::histogramNormType
+ //
+
+ //javadoc: HOGDescriptor::get_histogramNormType()
+ public int get_histogramNormType()
+ {
+
+ int retVal = get_histogramNormType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double HOGDescriptor::L2HysThreshold
+ //
+
+ //javadoc: HOGDescriptor::get_L2HysThreshold()
+ public double get_L2HysThreshold()
+ {
+
+ double retVal = get_L2HysThreshold_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool HOGDescriptor::gammaCorrection
+ //
+
+ //javadoc: HOGDescriptor::get_gammaCorrection()
+ public boolean get_gammaCorrection()
+ {
+
+ boolean retVal = get_gammaCorrection_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: vector_float HOGDescriptor::svmDetector
+ //
+
+ //javadoc: HOGDescriptor::get_svmDetector()
+ public MatOfFloat get_svmDetector()
+ {
+
+ MatOfFloat retVal = MatOfFloat.fromNativeAddr(get_svmDetector_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int HOGDescriptor::nlevels
+ //
+
+ //javadoc: HOGDescriptor::get_nlevels()
+ public int get_nlevels()
+ {
+
+ int retVal = get_nlevels_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool HOGDescriptor::signedGradient
+ //
+
+ //javadoc: HOGDescriptor::get_signedGradient()
+ public boolean get_signedGradient()
+ {
+
+ boolean retVal = get_signedGradient_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: HOGDescriptor()
+ private static native long HOGDescriptor_0();
+
+ // C++: HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture = 1, double _winSigma = -1, int _histogramNormType = HOGDescriptor::L2Hys, double _L2HysThreshold = 0.2, bool _gammaCorrection = false, int _nlevels = HOGDescriptor::DEFAULT_NLEVELS, bool _signedGradient = false)
+ private static native long HOGDescriptor_1(double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, boolean _gammaCorrection, int _nlevels, boolean _signedGradient);
+ private static native long HOGDescriptor_2(double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins);
+
+ // C++: HOGDescriptor(String filename)
+ private static native long HOGDescriptor_3(String filename);
+
+ // C++: size_t getDescriptorSize()
+ private static native long getDescriptorSize_0(long nativeObj);
+
+ // C++: bool checkDetectorSize()
+ private static native boolean checkDetectorSize_0(long nativeObj);
+
+ // C++: double getWinSigma()
+ private static native double getWinSigma_0(long nativeObj);
+
+ // C++: void setSVMDetector(Mat _svmdetector)
+ private static native void setSVMDetector_0(long nativeObj, long _svmdetector_nativeObj);
+
+ // C++: bool load(String filename, String objname = String())
+ private static native boolean load_0(long nativeObj, String filename, String objname);
+ private static native boolean load_1(long nativeObj, String filename);
+
+ // C++: void save(String filename, String objname = String())
+ private static native void save_0(long nativeObj, String filename, String objname);
+ private static native void save_1(long nativeObj, String filename);
+
+ // C++: void compute(Mat img, vector_float& descriptors, Size winStride = Size(), Size padding = Size(), vector_Point locations = std::vector<Point>())
+ private static native void compute_0(long nativeObj, long img_nativeObj, long descriptors_mat_nativeObj, double winStride_width, double winStride_height, double padding_width, double padding_height, long locations_mat_nativeObj);
+ private static native void compute_1(long nativeObj, long img_nativeObj, long descriptors_mat_nativeObj);
+
+ // C++: void detect(Mat img, vector_Point& foundLocations, vector_double& weights, double hitThreshold = 0, Size winStride = Size(), Size padding = Size(), vector_Point searchLocations = std::vector<Point>())
+ private static native void detect_0(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long weights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height, double padding_width, double padding_height, long searchLocations_mat_nativeObj);
+ private static native void detect_1(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long weights_mat_nativeObj);
+
+ // C++: void detectMultiScale(Mat img, vector_Rect& foundLocations, vector_double& foundWeights, double hitThreshold = 0, Size winStride = Size(), Size padding = Size(), double scale = 1.05, double finalThreshold = 2.0, bool useMeanshiftGrouping = false)
+ private static native void detectMultiScale_0(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long foundWeights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height, double padding_width, double padding_height, double scale, double finalThreshold, boolean useMeanshiftGrouping);
+ private static native void detectMultiScale_1(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long foundWeights_mat_nativeObj);
+
+ // C++: void computeGradient(Mat img, Mat& grad, Mat& angleOfs, Size paddingTL = Size(), Size paddingBR = Size())
+ private static native void computeGradient_0(long nativeObj, long img_nativeObj, long grad_nativeObj, long angleOfs_nativeObj, double paddingTL_width, double paddingTL_height, double paddingBR_width, double paddingBR_height);
+ private static native void computeGradient_1(long nativeObj, long img_nativeObj, long grad_nativeObj, long angleOfs_nativeObj);
+
+ // C++: static vector_float getDefaultPeopleDetector()
+ private static native long getDefaultPeopleDetector_0();
+
+ // C++: static vector_float getDaimlerPeopleDetector()
+ private static native long getDaimlerPeopleDetector_0();
+
+ // C++: Size HOGDescriptor::winSize
+ private static native double[] get_winSize_0(long nativeObj);
+
+ // C++: Size HOGDescriptor::blockSize
+ private static native double[] get_blockSize_0(long nativeObj);
+
+ // C++: Size HOGDescriptor::blockStride
+ private static native double[] get_blockStride_0(long nativeObj);
+
+ // C++: Size HOGDescriptor::cellSize
+ private static native double[] get_cellSize_0(long nativeObj);
+
+ // C++: int HOGDescriptor::nbins
+ private static native int get_nbins_0(long nativeObj);
+
+ // C++: int HOGDescriptor::derivAperture
+ private static native int get_derivAperture_0(long nativeObj);
+
+ // C++: double HOGDescriptor::winSigma
+ private static native double get_winSigma_0(long nativeObj);
+
+ // C++: int HOGDescriptor::histogramNormType
+ private static native int get_histogramNormType_0(long nativeObj);
+
+ // C++: double HOGDescriptor::L2HysThreshold
+ private static native double get_L2HysThreshold_0(long nativeObj);
+
+ // C++: bool HOGDescriptor::gammaCorrection
+ private static native boolean get_gammaCorrection_0(long nativeObj);
+
+ // C++: vector_float HOGDescriptor::svmDetector
+ private static native long get_svmDetector_0(long nativeObj);
+
+ // C++: int HOGDescriptor::nlevels
+ private static native int get_nlevels_0(long nativeObj);
+
+ // C++: bool HOGDescriptor::signedGradient
+ private static native boolean get_signedGradient_0(long nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/objdetect+Objdetect.java b/modules/java/src/objdetect+Objdetect.java
new file mode 100644
index 0000000..c17b239
--- /dev/null
+++ b/modules/java/src/objdetect+Objdetect.java
@@ -0,0 +1,52 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.objdetect;
+
+import java.util.ArrayList;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfInt;
+import org.opencv.core.MatOfRect;
+
+public class Objdetect {
+
+ public static final int
+ CASCADE_DO_CANNY_PRUNING = 1,
+ CASCADE_SCALE_IMAGE = 2,
+ CASCADE_FIND_BIGGEST_OBJECT = 4,
+ CASCADE_DO_ROUGH_SEARCH = 8;
+
+
+ //
+ // C++: void groupRectangles(vector_Rect& rectList, vector_int& weights, int groupThreshold, double eps = 0.2)
+ //
+
+ //javadoc: groupRectangles(rectList, weights, groupThreshold, eps)
+ public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold, double eps)
+ {
+ Mat rectList_mat = rectList;
+ Mat weights_mat = weights;
+ groupRectangles_0(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold, eps);
+
+ return;
+ }
+
+ //javadoc: groupRectangles(rectList, weights, groupThreshold)
+ public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold)
+ {
+ Mat rectList_mat = rectList;
+ Mat weights_mat = weights;
+ groupRectangles_1(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold);
+
+ return;
+ }
+
+
+
+
+ // C++: void groupRectangles(vector_Rect& rectList, vector_int& weights, int groupThreshold, double eps = 0.2)
+ private static native void groupRectangles_0(long rectList_mat_nativeObj, long weights_mat_nativeObj, int groupThreshold, double eps);
+ private static native void groupRectangles_1(long rectList_mat_nativeObj, long weights_mat_nativeObj, int groupThreshold);
+
+}
diff --git a/modules/java/src/objdetect.cpp b/modules/java/src/objdetect.cpp
new file mode 100644
index 0000000..26d866b
--- /dev/null
+++ b/modules/java/src/objdetect.cpp
@@ -0,0 +1,1449 @@
+
+//
+// This file is auto-generated, please don't edit!
+//
+
+#define LOG_TAG "org.opencv.objdetect"
+
+#include "common.h"
+
+#include "opencv2/opencv_modules.hpp"
+#ifdef HAVE_OPENCV_OBJDETECT
+
+#include <string>
+
+#include "opencv2/objdetect.hpp"
+
+#include "../../objdetect/include/opencv2/objdetect.hpp"
+#include "../../objdetect/include/opencv2/objdetect/detection_based_tracker.hpp"
+
+using namespace cv;
+
+/// throw java exception
+static void throwJavaException(JNIEnv *env, const std::exception *e, const char *method) {
+ std::string what = "unknown exception";
+ jclass je = 0;
+
+ if(e) {
+ std::string exception_type = "std::exception";
+
+ if(dynamic_cast<const cv::Exception*>(e)) {
+ exception_type = "cv::Exception";
+ je = env->FindClass("org/opencv/core/CvException");
+ }
+
+ what = exception_type + ": " + e->what();
+ }
+
+ if(!je) je = env->FindClass("java/lang/Exception");
+ env->ThrowNew(je, what.c_str());
+
+ LOGE("%s caught %s", method, what.c_str());
+ (void)method; // avoid "unused" warning
+}
+
+
+extern "C" {
+
+
+//
+// CascadeClassifier()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_CascadeClassifier_CascadeClassifier_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_CascadeClassifier_CascadeClassifier_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "objdetect::CascadeClassifier_10()";
+ try {
+ LOGD("%s", method_name);
+
+ cv::CascadeClassifier* _retval_ = new cv::CascadeClassifier( );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// CascadeClassifier(String filename)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_CascadeClassifier_CascadeClassifier_11 (JNIEnv*, jclass, jstring);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_CascadeClassifier_CascadeClassifier_11
+ (JNIEnv* env, jclass , jstring filename)
+{
+ static const char method_name[] = "objdetect::CascadeClassifier_11()";
+ try {
+ LOGD("%s", method_name);
+ const char* utf_filename = env->GetStringUTFChars(filename, 0); String n_filename( utf_filename ? utf_filename : "" ); env->ReleaseStringUTFChars(filename, utf_filename);
+ cv::CascadeClassifier* _retval_ = new cv::CascadeClassifier( n_filename );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool empty()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_objdetect_CascadeClassifier_empty_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_objdetect_CascadeClassifier_empty_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::empty_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::CascadeClassifier* me = (cv::CascadeClassifier*) self; //TODO: check for NULL
+ bool _retval_ = me->empty( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool load(String filename)
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_objdetect_CascadeClassifier_load_10 (JNIEnv*, jclass, jlong, jstring);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_objdetect_CascadeClassifier_load_10
+ (JNIEnv* env, jclass , jlong self, jstring filename)
+{
+ static const char method_name[] = "objdetect::load_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::CascadeClassifier* me = (cv::CascadeClassifier*) self; //TODO: check for NULL
+ const char* utf_filename = env->GetStringUTFChars(filename, 0); String n_filename( utf_filename ? utf_filename : "" ); env->ReleaseStringUTFChars(filename, utf_filename);
+ bool _retval_ = me->load( n_filename );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void detectMultiScale(Mat image, vector_Rect& objects, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_CascadeClassifier_detectMultiScale_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jint, jint, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_CascadeClassifier_detectMultiScale_10
+ (JNIEnv* env, jclass , jlong self, jlong image_nativeObj, jlong objects_mat_nativeObj, jdouble scaleFactor, jint minNeighbors, jint flags, jdouble minSize_width, jdouble minSize_height, jdouble maxSize_width, jdouble maxSize_height)
+{
+ static const char method_name[] = "objdetect::detectMultiScale_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Rect> objects;
+ Mat& objects_mat = *((Mat*)objects_mat_nativeObj);
+ cv::CascadeClassifier* me = (cv::CascadeClassifier*) self; //TODO: check for NULL
+ Mat& image = *((Mat*)image_nativeObj);
+ Size minSize((int)minSize_width, (int)minSize_height);
+ Size maxSize((int)maxSize_width, (int)maxSize_height);
+ me->detectMultiScale( image, objects, (double)scaleFactor, (int)minNeighbors, (int)flags, minSize, maxSize );
+ vector_Rect_to_Mat( objects, objects_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_CascadeClassifier_detectMultiScale_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_CascadeClassifier_detectMultiScale_11
+ (JNIEnv* env, jclass , jlong self, jlong image_nativeObj, jlong objects_mat_nativeObj)
+{
+ static const char method_name[] = "objdetect::detectMultiScale_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Rect> objects;
+ Mat& objects_mat = *((Mat*)objects_mat_nativeObj);
+ cv::CascadeClassifier* me = (cv::CascadeClassifier*) self; //TODO: check for NULL
+ Mat& image = *((Mat*)image_nativeObj);
+ me->detectMultiScale( image, objects );
+ vector_Rect_to_Mat( objects, objects_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void detectMultiScale(Mat image, vector_Rect& objects, vector_int& numDetections, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_CascadeClassifier_detectMultiScale2_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jdouble, jint, jint, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_CascadeClassifier_detectMultiScale2_10
+ (JNIEnv* env, jclass , jlong self, jlong image_nativeObj, jlong objects_mat_nativeObj, jlong numDetections_mat_nativeObj, jdouble scaleFactor, jint minNeighbors, jint flags, jdouble minSize_width, jdouble minSize_height, jdouble maxSize_width, jdouble maxSize_height)
+{
+ static const char method_name[] = "objdetect::detectMultiScale2_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Rect> objects;
+ Mat& objects_mat = *((Mat*)objects_mat_nativeObj);
+ std::vector<int> numDetections;
+ Mat& numDetections_mat = *((Mat*)numDetections_mat_nativeObj);
+ cv::CascadeClassifier* me = (cv::CascadeClassifier*) self; //TODO: check for NULL
+ Mat& image = *((Mat*)image_nativeObj);
+ Size minSize((int)minSize_width, (int)minSize_height);
+ Size maxSize((int)maxSize_width, (int)maxSize_height);
+ me->detectMultiScale( image, objects, numDetections, (double)scaleFactor, (int)minNeighbors, (int)flags, minSize, maxSize );
+ vector_Rect_to_Mat( objects, objects_mat ); vector_int_to_Mat( numDetections, numDetections_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_CascadeClassifier_detectMultiScale2_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_CascadeClassifier_detectMultiScale2_11
+ (JNIEnv* env, jclass , jlong self, jlong image_nativeObj, jlong objects_mat_nativeObj, jlong numDetections_mat_nativeObj)
+{
+ static const char method_name[] = "objdetect::detectMultiScale2_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Rect> objects;
+ Mat& objects_mat = *((Mat*)objects_mat_nativeObj);
+ std::vector<int> numDetections;
+ Mat& numDetections_mat = *((Mat*)numDetections_mat_nativeObj);
+ cv::CascadeClassifier* me = (cv::CascadeClassifier*) self; //TODO: check for NULL
+ Mat& image = *((Mat*)image_nativeObj);
+ me->detectMultiScale( image, objects, numDetections );
+ vector_Rect_to_Mat( objects, objects_mat ); vector_int_to_Mat( numDetections, numDetections_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void detectMultiScale(Mat image, vector_Rect& objects, vector_int& rejectLevels, vector_double& levelWeights, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size(), bool outputRejectLevels = false)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_CascadeClassifier_detectMultiScale3_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jdouble, jint, jint, jdouble, jdouble, jdouble, jdouble, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_CascadeClassifier_detectMultiScale3_10
+ (JNIEnv* env, jclass , jlong self, jlong image_nativeObj, jlong objects_mat_nativeObj, jlong rejectLevels_mat_nativeObj, jlong levelWeights_mat_nativeObj, jdouble scaleFactor, jint minNeighbors, jint flags, jdouble minSize_width, jdouble minSize_height, jdouble maxSize_width, jdouble maxSize_height, jboolean outputRejectLevels)
+{
+ static const char method_name[] = "objdetect::detectMultiScale3_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Rect> objects;
+ Mat& objects_mat = *((Mat*)objects_mat_nativeObj);
+ std::vector<int> rejectLevels;
+ Mat& rejectLevels_mat = *((Mat*)rejectLevels_mat_nativeObj);
+ std::vector<double> levelWeights;
+ Mat& levelWeights_mat = *((Mat*)levelWeights_mat_nativeObj);
+ cv::CascadeClassifier* me = (cv::CascadeClassifier*) self; //TODO: check for NULL
+ Mat& image = *((Mat*)image_nativeObj);
+ Size minSize((int)minSize_width, (int)minSize_height);
+ Size maxSize((int)maxSize_width, (int)maxSize_height);
+ me->detectMultiScale( image, objects, rejectLevels, levelWeights, (double)scaleFactor, (int)minNeighbors, (int)flags, minSize, maxSize, (bool)outputRejectLevels );
+ vector_Rect_to_Mat( objects, objects_mat ); vector_int_to_Mat( rejectLevels, rejectLevels_mat ); vector_double_to_Mat( levelWeights, levelWeights_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_CascadeClassifier_detectMultiScale3_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_CascadeClassifier_detectMultiScale3_11
+ (JNIEnv* env, jclass , jlong self, jlong image_nativeObj, jlong objects_mat_nativeObj, jlong rejectLevels_mat_nativeObj, jlong levelWeights_mat_nativeObj)
+{
+ static const char method_name[] = "objdetect::detectMultiScale3_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Rect> objects;
+ Mat& objects_mat = *((Mat*)objects_mat_nativeObj);
+ std::vector<int> rejectLevels;
+ Mat& rejectLevels_mat = *((Mat*)rejectLevels_mat_nativeObj);
+ std::vector<double> levelWeights;
+ Mat& levelWeights_mat = *((Mat*)levelWeights_mat_nativeObj);
+ cv::CascadeClassifier* me = (cv::CascadeClassifier*) self; //TODO: check for NULL
+ Mat& image = *((Mat*)image_nativeObj);
+ me->detectMultiScale( image, objects, rejectLevels, levelWeights );
+ vector_Rect_to_Mat( objects, objects_mat ); vector_int_to_Mat( rejectLevels, rejectLevels_mat ); vector_double_to_Mat( levelWeights, levelWeights_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool isOldFormatCascade()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_objdetect_CascadeClassifier_isOldFormatCascade_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_objdetect_CascadeClassifier_isOldFormatCascade_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::isOldFormatCascade_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::CascadeClassifier* me = (cv::CascadeClassifier*) self; //TODO: check for NULL
+ bool _retval_ = me->isOldFormatCascade( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Size getOriginalWindowSize()
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_objdetect_CascadeClassifier_getOriginalWindowSize_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_objdetect_CascadeClassifier_getOriginalWindowSize_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::getOriginalWindowSize_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::CascadeClassifier* me = (cv::CascadeClassifier*) self; //TODO: check for NULL
+ Size _retval_ = me->getOriginalWindowSize( );
+ 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(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int getFeatureType()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_objdetect_CascadeClassifier_getFeatureType_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_objdetect_CascadeClassifier_getFeatureType_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::getFeatureType_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::CascadeClassifier* me = (cv::CascadeClassifier*) self; //TODO: check for NULL
+ int _retval_ = me->getFeatureType( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// static bool convert(String oldcascade, String newcascade)
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_objdetect_CascadeClassifier_convert_10 (JNIEnv*, jclass, jstring, jstring);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_objdetect_CascadeClassifier_convert_10
+ (JNIEnv* env, jclass , jstring oldcascade, jstring newcascade)
+{
+ static const char method_name[] = "objdetect::convert_10()";
+ try {
+ LOGD("%s", method_name);
+ const char* utf_oldcascade = env->GetStringUTFChars(oldcascade, 0); String n_oldcascade( utf_oldcascade ? utf_oldcascade : "" ); env->ReleaseStringUTFChars(oldcascade, utf_oldcascade);
+ const char* utf_newcascade = env->GetStringUTFChars(newcascade, 0); String n_newcascade( utf_newcascade ? utf_newcascade : "" ); env->ReleaseStringUTFChars(newcascade, utf_newcascade);
+ bool _retval_ = cv::CascadeClassifier::convert( n_oldcascade, n_newcascade );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// native support for java finalize()
+// static void cv::CascadeClassifier::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_CascadeClassifier_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_CascadeClassifier_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (cv::CascadeClassifier*) self;
+}
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::BaseCascadeClassifier>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_BaseCascadeClassifier_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_BaseCascadeClassifier_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::BaseCascadeClassifier>*) self;
+}
+
+
+//
+// HOGDescriptor()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_HOGDescriptor_HOGDescriptor_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_HOGDescriptor_HOGDescriptor_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "objdetect::HOGDescriptor_10()";
+ try {
+ LOGD("%s", method_name);
+
+ cv::HOGDescriptor* _retval_ = new cv::HOGDescriptor( );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture = 1, double _winSigma = -1, int _histogramNormType = HOGDescriptor::L2Hys, double _L2HysThreshold = 0.2, bool _gammaCorrection = false, int _nlevels = HOGDescriptor::DEFAULT_NLEVELS, bool _signedGradient = false)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_HOGDescriptor_HOGDescriptor_11 (JNIEnv*, jclass, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jint, jint, jdouble, jint, jdouble, jboolean, jint, jboolean);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_HOGDescriptor_HOGDescriptor_11
+ (JNIEnv* env, jclass , jdouble _winSize_width, jdouble _winSize_height, jdouble _blockSize_width, jdouble _blockSize_height, jdouble _blockStride_width, jdouble _blockStride_height, jdouble _cellSize_width, jdouble _cellSize_height, jint _nbins, jint _derivAperture, jdouble _winSigma, jint _histogramNormType, jdouble _L2HysThreshold, jboolean _gammaCorrection, jint _nlevels, jboolean _signedGradient)
+{
+ static const char method_name[] = "objdetect::HOGDescriptor_11()";
+ try {
+ LOGD("%s", method_name);
+ Size _winSize((int)_winSize_width, (int)_winSize_height);
+ Size _blockSize((int)_blockSize_width, (int)_blockSize_height);
+ Size _blockStride((int)_blockStride_width, (int)_blockStride_height);
+ Size _cellSize((int)_cellSize_width, (int)_cellSize_height);
+ cv::HOGDescriptor* _retval_ = new cv::HOGDescriptor( _winSize, _blockSize, _blockStride, _cellSize, (int)_nbins, (int)_derivAperture, (double)_winSigma, (int)_histogramNormType, (double)_L2HysThreshold, (bool)_gammaCorrection, (int)_nlevels, (bool)_signedGradient );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_HOGDescriptor_HOGDescriptor_12 (JNIEnv*, jclass, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jint);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_HOGDescriptor_HOGDescriptor_12
+ (JNIEnv* env, jclass , jdouble _winSize_width, jdouble _winSize_height, jdouble _blockSize_width, jdouble _blockSize_height, jdouble _blockStride_width, jdouble _blockStride_height, jdouble _cellSize_width, jdouble _cellSize_height, jint _nbins)
+{
+ static const char method_name[] = "objdetect::HOGDescriptor_12()";
+ try {
+ LOGD("%s", method_name);
+ Size _winSize((int)_winSize_width, (int)_winSize_height);
+ Size _blockSize((int)_blockSize_width, (int)_blockSize_height);
+ Size _blockStride((int)_blockStride_width, (int)_blockStride_height);
+ Size _cellSize((int)_cellSize_width, (int)_cellSize_height);
+ cv::HOGDescriptor* _retval_ = new cv::HOGDescriptor( _winSize, _blockSize, _blockStride, _cellSize, (int)_nbins );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// HOGDescriptor(String filename)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_HOGDescriptor_HOGDescriptor_13 (JNIEnv*, jclass, jstring);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_HOGDescriptor_HOGDescriptor_13
+ (JNIEnv* env, jclass , jstring filename)
+{
+ static const char method_name[] = "objdetect::HOGDescriptor_13()";
+ try {
+ LOGD("%s", method_name);
+ const char* utf_filename = env->GetStringUTFChars(filename, 0); String n_filename( utf_filename ? utf_filename : "" ); env->ReleaseStringUTFChars(filename, utf_filename);
+ cv::HOGDescriptor* _retval_ = new cv::HOGDescriptor( n_filename );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// size_t getDescriptorSize()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_HOGDescriptor_getDescriptorSize_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_HOGDescriptor_getDescriptorSize_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::getDescriptorSize_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ size_t _retval_ = me->getDescriptorSize( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool checkDetectorSize()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_objdetect_HOGDescriptor_checkDetectorSize_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_objdetect_HOGDescriptor_checkDetectorSize_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::checkDetectorSize_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ bool _retval_ = me->checkDetectorSize( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// double getWinSigma()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_objdetect_HOGDescriptor_getWinSigma_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_objdetect_HOGDescriptor_getWinSigma_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::getWinSigma_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ double _retval_ = me->getWinSigma( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setSVMDetector(Mat _svmdetector)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_setSVMDetector_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_setSVMDetector_10
+ (JNIEnv* env, jclass , jlong self, jlong _svmdetector_nativeObj)
+{
+ static const char method_name[] = "objdetect::setSVMDetector_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ Mat& _svmdetector = *((Mat*)_svmdetector_nativeObj);
+ me->setSVMDetector( _svmdetector );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool load(String filename, String objname = String())
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_objdetect_HOGDescriptor_load_10 (JNIEnv*, jclass, jlong, jstring, jstring);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_objdetect_HOGDescriptor_load_10
+ (JNIEnv* env, jclass , jlong self, jstring filename, jstring objname)
+{
+ static const char method_name[] = "objdetect::load_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ const char* utf_filename = env->GetStringUTFChars(filename, 0); String n_filename( utf_filename ? utf_filename : "" ); env->ReleaseStringUTFChars(filename, utf_filename);
+ const char* utf_objname = env->GetStringUTFChars(objname, 0); String n_objname( utf_objname ? utf_objname : "" ); env->ReleaseStringUTFChars(objname, utf_objname);
+ bool _retval_ = me->load( n_filename, n_objname );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_objdetect_HOGDescriptor_load_11 (JNIEnv*, jclass, jlong, jstring);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_objdetect_HOGDescriptor_load_11
+ (JNIEnv* env, jclass , jlong self, jstring filename)
+{
+ static const char method_name[] = "objdetect::load_11()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ const char* utf_filename = env->GetStringUTFChars(filename, 0); String n_filename( utf_filename ? utf_filename : "" ); env->ReleaseStringUTFChars(filename, utf_filename);
+ bool _retval_ = me->load( n_filename );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void save(String filename, String objname = String())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_save_10 (JNIEnv*, jclass, jlong, jstring, jstring);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_save_10
+ (JNIEnv* env, jclass , jlong self, jstring filename, jstring objname)
+{
+ static const char method_name[] = "objdetect::save_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ const char* utf_filename = env->GetStringUTFChars(filename, 0); String n_filename( utf_filename ? utf_filename : "" ); env->ReleaseStringUTFChars(filename, utf_filename);
+ const char* utf_objname = env->GetStringUTFChars(objname, 0); String n_objname( utf_objname ? utf_objname : "" ); env->ReleaseStringUTFChars(objname, utf_objname);
+ me->save( n_filename, n_objname );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_save_11 (JNIEnv*, jclass, jlong, jstring);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_save_11
+ (JNIEnv* env, jclass , jlong self, jstring filename)
+{
+ static const char method_name[] = "objdetect::save_11()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ const char* utf_filename = env->GetStringUTFChars(filename, 0); String n_filename( utf_filename ? utf_filename : "" ); env->ReleaseStringUTFChars(filename, utf_filename);
+ me->save( n_filename );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void compute(Mat img, vector_float& descriptors, Size winStride = Size(), Size padding = Size(), vector_Point locations = std::vector<Point>())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_compute_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jdouble, jdouble, jdouble, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_compute_10
+ (JNIEnv* env, jclass , jlong self, jlong img_nativeObj, jlong descriptors_mat_nativeObj, jdouble winStride_width, jdouble winStride_height, jdouble padding_width, jdouble padding_height, jlong locations_mat_nativeObj)
+{
+ static const char method_name[] = "objdetect::compute_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<float> descriptors;
+ Mat& descriptors_mat = *((Mat*)descriptors_mat_nativeObj);
+ std::vector<Point> locations;
+ Mat& locations_mat = *((Mat*)locations_mat_nativeObj);
+ Mat_to_vector_Point( locations_mat, locations );
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ Mat& img = *((Mat*)img_nativeObj);
+ Size winStride((int)winStride_width, (int)winStride_height);
+ Size padding((int)padding_width, (int)padding_height);
+ me->compute( img, descriptors, winStride, padding, locations );
+ vector_float_to_Mat( descriptors, descriptors_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_compute_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_compute_11
+ (JNIEnv* env, jclass , jlong self, jlong img_nativeObj, jlong descriptors_mat_nativeObj)
+{
+ static const char method_name[] = "objdetect::compute_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<float> descriptors;
+ Mat& descriptors_mat = *((Mat*)descriptors_mat_nativeObj);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ Mat& img = *((Mat*)img_nativeObj);
+ me->compute( img, descriptors );
+ vector_float_to_Mat( descriptors, descriptors_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void detect(Mat img, vector_Point& foundLocations, vector_double& weights, double hitThreshold = 0, Size winStride = Size(), Size padding = Size(), vector_Point searchLocations = std::vector<Point>())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_detect_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_detect_10
+ (JNIEnv* env, jclass , jlong self, jlong img_nativeObj, jlong foundLocations_mat_nativeObj, jlong weights_mat_nativeObj, jdouble hitThreshold, jdouble winStride_width, jdouble winStride_height, jdouble padding_width, jdouble padding_height, jlong searchLocations_mat_nativeObj)
+{
+ static const char method_name[] = "objdetect::detect_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point> foundLocations;
+ Mat& foundLocations_mat = *((Mat*)foundLocations_mat_nativeObj);
+ std::vector<double> weights;
+ Mat& weights_mat = *((Mat*)weights_mat_nativeObj);
+ std::vector<Point> searchLocations;
+ Mat& searchLocations_mat = *((Mat*)searchLocations_mat_nativeObj);
+ Mat_to_vector_Point( searchLocations_mat, searchLocations );
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ Mat& img = *((Mat*)img_nativeObj);
+ Size winStride((int)winStride_width, (int)winStride_height);
+ Size padding((int)padding_width, (int)padding_height);
+ me->detect( img, foundLocations, weights, (double)hitThreshold, winStride, padding, searchLocations );
+ vector_Point_to_Mat( foundLocations, foundLocations_mat ); vector_double_to_Mat( weights, weights_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_detect_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_detect_11
+ (JNIEnv* env, jclass , jlong self, jlong img_nativeObj, jlong foundLocations_mat_nativeObj, jlong weights_mat_nativeObj)
+{
+ static const char method_name[] = "objdetect::detect_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point> foundLocations;
+ Mat& foundLocations_mat = *((Mat*)foundLocations_mat_nativeObj);
+ std::vector<double> weights;
+ Mat& weights_mat = *((Mat*)weights_mat_nativeObj);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ Mat& img = *((Mat*)img_nativeObj);
+ me->detect( img, foundLocations, weights );
+ vector_Point_to_Mat( foundLocations, foundLocations_mat ); vector_double_to_Mat( weights, weights_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void detectMultiScale(Mat img, vector_Rect& foundLocations, vector_double& foundWeights, double hitThreshold = 0, Size winStride = Size(), Size padding = Size(), double scale = 1.05, double finalThreshold = 2.0, bool useMeanshiftGrouping = false)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_detectMultiScale_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_detectMultiScale_10
+ (JNIEnv* env, jclass , jlong self, jlong img_nativeObj, jlong foundLocations_mat_nativeObj, jlong foundWeights_mat_nativeObj, jdouble hitThreshold, jdouble winStride_width, jdouble winStride_height, jdouble padding_width, jdouble padding_height, jdouble scale, jdouble finalThreshold, jboolean useMeanshiftGrouping)
+{
+ static const char method_name[] = "objdetect::detectMultiScale_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Rect> foundLocations;
+ Mat& foundLocations_mat = *((Mat*)foundLocations_mat_nativeObj);
+ std::vector<double> foundWeights;
+ Mat& foundWeights_mat = *((Mat*)foundWeights_mat_nativeObj);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ Mat& img = *((Mat*)img_nativeObj);
+ Size winStride((int)winStride_width, (int)winStride_height);
+ Size padding((int)padding_width, (int)padding_height);
+ me->detectMultiScale( img, foundLocations, foundWeights, (double)hitThreshold, winStride, padding, (double)scale, (double)finalThreshold, (bool)useMeanshiftGrouping );
+ vector_Rect_to_Mat( foundLocations, foundLocations_mat ); vector_double_to_Mat( foundWeights, foundWeights_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_detectMultiScale_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_detectMultiScale_11
+ (JNIEnv* env, jclass , jlong self, jlong img_nativeObj, jlong foundLocations_mat_nativeObj, jlong foundWeights_mat_nativeObj)
+{
+ static const char method_name[] = "objdetect::detectMultiScale_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Rect> foundLocations;
+ Mat& foundLocations_mat = *((Mat*)foundLocations_mat_nativeObj);
+ std::vector<double> foundWeights;
+ Mat& foundWeights_mat = *((Mat*)foundWeights_mat_nativeObj);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ Mat& img = *((Mat*)img_nativeObj);
+ me->detectMultiScale( img, foundLocations, foundWeights );
+ vector_Rect_to_Mat( foundLocations, foundLocations_mat ); vector_double_to_Mat( foundWeights, foundWeights_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void computeGradient(Mat img, Mat& grad, Mat& angleOfs, Size paddingTL = Size(), Size paddingBR = Size())
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_computeGradient_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jdouble, jdouble, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_computeGradient_10
+ (JNIEnv* env, jclass , jlong self, jlong img_nativeObj, jlong grad_nativeObj, jlong angleOfs_nativeObj, jdouble paddingTL_width, jdouble paddingTL_height, jdouble paddingBR_width, jdouble paddingBR_height)
+{
+ static const char method_name[] = "objdetect::computeGradient_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ Mat& img = *((Mat*)img_nativeObj);
+ Mat& grad = *((Mat*)grad_nativeObj);
+ Mat& angleOfs = *((Mat*)angleOfs_nativeObj);
+ Size paddingTL((int)paddingTL_width, (int)paddingTL_height);
+ Size paddingBR((int)paddingBR_width, (int)paddingBR_height);
+ me->computeGradient( img, grad, angleOfs, paddingTL, paddingBR );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_computeGradient_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_computeGradient_11
+ (JNIEnv* env, jclass , jlong self, jlong img_nativeObj, jlong grad_nativeObj, jlong angleOfs_nativeObj)
+{
+ static const char method_name[] = "objdetect::computeGradient_11()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ Mat& img = *((Mat*)img_nativeObj);
+ Mat& grad = *((Mat*)grad_nativeObj);
+ Mat& angleOfs = *((Mat*)angleOfs_nativeObj);
+ me->computeGradient( img, grad, angleOfs );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// static vector_float getDefaultPeopleDetector()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_HOGDescriptor_getDefaultPeopleDetector_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_HOGDescriptor_getDefaultPeopleDetector_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "objdetect::getDefaultPeopleDetector_10()";
+ try {
+ LOGD("%s", method_name);
+
+ std::vector<float> _ret_val_vector_ = cv::HOGDescriptor::getDefaultPeopleDetector( );
+ Mat* _retval_ = new Mat(); vector_float_to_Mat(_ret_val_vector_, *_retval_);
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// static vector_float getDaimlerPeopleDetector()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_HOGDescriptor_getDaimlerPeopleDetector_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_HOGDescriptor_getDaimlerPeopleDetector_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "objdetect::getDaimlerPeopleDetector_10()";
+ try {
+ LOGD("%s", method_name);
+
+ std::vector<float> _ret_val_vector_ = cv::HOGDescriptor::getDaimlerPeopleDetector( );
+ Mat* _retval_ = new Mat(); vector_float_to_Mat(_ret_val_vector_, *_retval_);
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Size HOGDescriptor::winSize
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1winSize_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1winSize_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::get_1winSize_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ Size _retval_ = me->winSize;//( );
+ 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(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Size HOGDescriptor::blockSize
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1blockSize_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1blockSize_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::get_1blockSize_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ Size _retval_ = me->blockSize;//( );
+ 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(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Size HOGDescriptor::blockStride
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1blockStride_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1blockStride_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::get_1blockStride_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ Size _retval_ = me->blockStride;//( );
+ 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(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Size HOGDescriptor::cellSize
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1cellSize_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1cellSize_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::get_1cellSize_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ Size _retval_ = me->cellSize;//( );
+ 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(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int HOGDescriptor::nbins
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1nbins_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1nbins_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::get_1nbins_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ int _retval_ = me->nbins;//( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int HOGDescriptor::derivAperture
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1derivAperture_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1derivAperture_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::get_1derivAperture_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ int _retval_ = me->derivAperture;//( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// double HOGDescriptor::winSigma
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1winSigma_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1winSigma_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::get_1winSigma_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ double _retval_ = me->winSigma;//( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int HOGDescriptor::histogramNormType
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1histogramNormType_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1histogramNormType_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::get_1histogramNormType_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ int _retval_ = me->histogramNormType;//( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// double HOGDescriptor::L2HysThreshold
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1L2HysThreshold_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1L2HysThreshold_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::get_1L2HysThreshold_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ double _retval_ = me->L2HysThreshold;//( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool HOGDescriptor::gammaCorrection
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1gammaCorrection_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1gammaCorrection_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::get_1gammaCorrection_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ bool _retval_ = me->gammaCorrection;//( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// vector_float HOGDescriptor::svmDetector
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1svmDetector_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1svmDetector_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::get_1svmDetector_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ std::vector<float> _ret_val_vector_ = me->svmDetector;//( );
+ Mat* _retval_ = new Mat(); vector_float_to_Mat(_ret_val_vector_, *_retval_);
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int HOGDescriptor::nlevels
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1nlevels_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1nlevels_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::get_1nlevels_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ int _retval_ = me->nlevels;//( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool HOGDescriptor::signedGradient
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1signedGradient_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_objdetect_HOGDescriptor_get_1signedGradient_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "objdetect::get_1signedGradient_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::HOGDescriptor* me = (cv::HOGDescriptor*) self; //TODO: check for NULL
+ bool _retval_ = me->signedGradient;//( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// native support for java finalize()
+// static void cv::HOGDescriptor::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_HOGDescriptor_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (cv::HOGDescriptor*) self;
+}
+
+
+//
+// void groupRectangles(vector_Rect& rectList, vector_int& weights, int groupThreshold, double eps = 0.2)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_Objdetect_groupRectangles_10 (JNIEnv*, jclass, jlong, jlong, jint, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_Objdetect_groupRectangles_10
+ (JNIEnv* env, jclass , jlong rectList_mat_nativeObj, jlong weights_mat_nativeObj, jint groupThreshold, jdouble eps)
+{
+ static const char method_name[] = "objdetect::groupRectangles_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Rect> rectList;
+ Mat& rectList_mat = *((Mat*)rectList_mat_nativeObj);
+ Mat_to_vector_Rect( rectList_mat, rectList );
+ std::vector<int> weights;
+ Mat& weights_mat = *((Mat*)weights_mat_nativeObj);
+ cv::groupRectangles( rectList, weights, (int)groupThreshold, (double)eps );
+ vector_Rect_to_Mat( rectList, rectList_mat ); vector_int_to_Mat( weights, weights_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_Objdetect_groupRectangles_11 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_objdetect_Objdetect_groupRectangles_11
+ (JNIEnv* env, jclass , jlong rectList_mat_nativeObj, jlong weights_mat_nativeObj, jint groupThreshold)
+{
+ static const char method_name[] = "objdetect::groupRectangles_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Rect> rectList;
+ Mat& rectList_mat = *((Mat*)rectList_mat_nativeObj);
+ Mat_to_vector_Rect( rectList_mat, rectList );
+ std::vector<int> weights;
+ Mat& weights_mat = *((Mat*)weights_mat_nativeObj);
+ cv::groupRectangles( rectList, weights, (int)groupThreshold );
+ vector_Rect_to_Mat( rectList, rectList_mat ); vector_int_to_Mat( weights, weights_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+
+} // extern "C"
+
+#endif // HAVE_OPENCV_OBJDETECT
diff --git a/modules/java/src/photo+AlignExposures.java b/modules/java/src/photo+AlignExposures.java
new file mode 100644
index 0000000..e9b64e7
--- /dev/null
+++ b/modules/java/src/photo+AlignExposures.java
@@ -0,0 +1,48 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+import org.opencv.utils.Converters;
+
+// C++: class AlignExposures
+//javadoc: AlignExposures
+public class AlignExposures extends Algorithm {
+
+ protected AlignExposures(long addr) { super(addr); }
+
+
+ //
+ // C++: void process(vector_Mat src, vector_Mat dst, Mat times, Mat response)
+ //
+
+ //javadoc: AlignExposures::process(src, dst, times, response)
+ public void process(List<Mat> src, List<Mat> dst, Mat times, Mat response)
+ {
+ Mat src_mat = Converters.vector_Mat_to_Mat(src);
+ Mat dst_mat = Converters.vector_Mat_to_Mat(dst);
+ process_0(nativeObj, src_mat.nativeObj, dst_mat.nativeObj, times.nativeObj, response.nativeObj);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void process(vector_Mat src, vector_Mat dst, Mat times, Mat response)
+ private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_mat_nativeObj, long times_nativeObj, long response_nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/photo+AlignMTB.java b/modules/java/src/photo+AlignMTB.java
new file mode 100644
index 0000000..a059142
--- /dev/null
+++ b/modules/java/src/photo+AlignMTB.java
@@ -0,0 +1,219 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.Point;
+import org.opencv.utils.Converters;
+
+// C++: class AlignMTB
+//javadoc: AlignMTB
+public class AlignMTB extends AlignExposures {
+
+ protected AlignMTB(long addr) { super(addr); }
+
+
+ //
+ // C++: void process(vector_Mat src, vector_Mat dst, Mat times, Mat response)
+ //
+
+ //javadoc: AlignMTB::process(src, dst, times, response)
+ public void process(List<Mat> src, List<Mat> dst, Mat times, Mat response)
+ {
+ Mat src_mat = Converters.vector_Mat_to_Mat(src);
+ Mat dst_mat = Converters.vector_Mat_to_Mat(dst);
+ process_0(nativeObj, src_mat.nativeObj, dst_mat.nativeObj, times.nativeObj, response.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void process(vector_Mat src, vector_Mat dst)
+ //
+
+ //javadoc: AlignMTB::process(src, dst)
+ public void process(List<Mat> src, List<Mat> dst)
+ {
+ Mat src_mat = Converters.vector_Mat_to_Mat(src);
+ Mat dst_mat = Converters.vector_Mat_to_Mat(dst);
+ process_1(nativeObj, src_mat.nativeObj, dst_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: Point calculateShift(Mat img0, Mat img1)
+ //
+
+ //javadoc: AlignMTB::calculateShift(img0, img1)
+ public Point calculateShift(Mat img0, Mat img1)
+ {
+
+ Point retVal = new Point(calculateShift_0(nativeObj, img0.nativeObj, img1.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void shiftMat(Mat src, Mat& dst, Point shift)
+ //
+
+ //javadoc: AlignMTB::shiftMat(src, dst, shift)
+ public void shiftMat(Mat src, Mat dst, Point shift)
+ {
+
+ shiftMat_0(nativeObj, src.nativeObj, dst.nativeObj, shift.x, shift.y);
+
+ return;
+ }
+
+
+ //
+ // C++: void computeBitmaps(Mat img, Mat& tb, Mat& eb)
+ //
+
+ //javadoc: AlignMTB::computeBitmaps(img, tb, eb)
+ public void computeBitmaps(Mat img, Mat tb, Mat eb)
+ {
+
+ computeBitmaps_0(nativeObj, img.nativeObj, tb.nativeObj, eb.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: int getMaxBits()
+ //
+
+ //javadoc: AlignMTB::getMaxBits()
+ public int getMaxBits()
+ {
+
+ int retVal = getMaxBits_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setMaxBits(int max_bits)
+ //
+
+ //javadoc: AlignMTB::setMaxBits(max_bits)
+ public void setMaxBits(int max_bits)
+ {
+
+ setMaxBits_0(nativeObj, max_bits);
+
+ return;
+ }
+
+
+ //
+ // C++: int getExcludeRange()
+ //
+
+ //javadoc: AlignMTB::getExcludeRange()
+ public int getExcludeRange()
+ {
+
+ int retVal = getExcludeRange_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setExcludeRange(int exclude_range)
+ //
+
+ //javadoc: AlignMTB::setExcludeRange(exclude_range)
+ public void setExcludeRange(int exclude_range)
+ {
+
+ setExcludeRange_0(nativeObj, exclude_range);
+
+ return;
+ }
+
+
+ //
+ // C++: bool getCut()
+ //
+
+ //javadoc: AlignMTB::getCut()
+ public boolean getCut()
+ {
+
+ boolean retVal = getCut_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setCut(bool value)
+ //
+
+ //javadoc: AlignMTB::setCut(value)
+ public void setCut(boolean value)
+ {
+
+ setCut_0(nativeObj, value);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void process(vector_Mat src, vector_Mat dst, Mat times, Mat response)
+ private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_mat_nativeObj, long times_nativeObj, long response_nativeObj);
+
+ // C++: void process(vector_Mat src, vector_Mat dst)
+ private static native void process_1(long nativeObj, long src_mat_nativeObj, long dst_mat_nativeObj);
+
+ // C++: Point calculateShift(Mat img0, Mat img1)
+ private static native double[] calculateShift_0(long nativeObj, long img0_nativeObj, long img1_nativeObj);
+
+ // C++: void shiftMat(Mat src, Mat& dst, Point shift)
+ private static native void shiftMat_0(long nativeObj, long src_nativeObj, long dst_nativeObj, double shift_x, double shift_y);
+
+ // C++: void computeBitmaps(Mat img, Mat& tb, Mat& eb)
+ private static native void computeBitmaps_0(long nativeObj, long img_nativeObj, long tb_nativeObj, long eb_nativeObj);
+
+ // C++: int getMaxBits()
+ private static native int getMaxBits_0(long nativeObj);
+
+ // C++: void setMaxBits(int max_bits)
+ private static native void setMaxBits_0(long nativeObj, int max_bits);
+
+ // C++: int getExcludeRange()
+ private static native int getExcludeRange_0(long nativeObj);
+
+ // C++: void setExcludeRange(int exclude_range)
+ private static native void setExcludeRange_0(long nativeObj, int exclude_range);
+
+ // C++: bool getCut()
+ private static native boolean getCut_0(long nativeObj);
+
+ // C++: void setCut(bool value)
+ private static native void setCut_0(long nativeObj, boolean value);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/photo+CalibrateCRF.java b/modules/java/src/photo+CalibrateCRF.java
new file mode 100644
index 0000000..1273078
--- /dev/null
+++ b/modules/java/src/photo+CalibrateCRF.java
@@ -0,0 +1,47 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+import org.opencv.utils.Converters;
+
+// C++: class CalibrateCRF
+//javadoc: CalibrateCRF
+public class CalibrateCRF extends Algorithm {
+
+ protected CalibrateCRF(long addr) { super(addr); }
+
+
+ //
+ // C++: void process(vector_Mat src, Mat& dst, Mat times)
+ //
+
+ //javadoc: CalibrateCRF::process(src, dst, times)
+ public void process(List<Mat> src, Mat dst, Mat times)
+ {
+ Mat src_mat = Converters.vector_Mat_to_Mat(src);
+ process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void process(vector_Mat src, Mat& dst, Mat times)
+ private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/photo+CalibrateDebevec.java b/modules/java/src/photo+CalibrateDebevec.java
new file mode 100644
index 0000000..c3ff551
--- /dev/null
+++ b/modules/java/src/photo+CalibrateDebevec.java
@@ -0,0 +1,128 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+
+
+// C++: class CalibrateDebevec
+//javadoc: CalibrateDebevec
+public class CalibrateDebevec extends CalibrateCRF {
+
+ protected CalibrateDebevec(long addr) { super(addr); }
+
+
+ //
+ // C++: float getLambda()
+ //
+
+ //javadoc: CalibrateDebevec::getLambda()
+ public float getLambda()
+ {
+
+ float retVal = getLambda_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setLambda(float lambda)
+ //
+
+ //javadoc: CalibrateDebevec::setLambda(lambda)
+ public void setLambda(float lambda)
+ {
+
+ setLambda_0(nativeObj, lambda);
+
+ return;
+ }
+
+
+ //
+ // C++: int getSamples()
+ //
+
+ //javadoc: CalibrateDebevec::getSamples()
+ public int getSamples()
+ {
+
+ int retVal = getSamples_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setSamples(int samples)
+ //
+
+ //javadoc: CalibrateDebevec::setSamples(samples)
+ public void setSamples(int samples)
+ {
+
+ setSamples_0(nativeObj, samples);
+
+ return;
+ }
+
+
+ //
+ // C++: bool getRandom()
+ //
+
+ //javadoc: CalibrateDebevec::getRandom()
+ public boolean getRandom()
+ {
+
+ boolean retVal = getRandom_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setRandom(bool random)
+ //
+
+ //javadoc: CalibrateDebevec::setRandom(random)
+ public void setRandom(boolean random)
+ {
+
+ setRandom_0(nativeObj, random);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: float getLambda()
+ private static native float getLambda_0(long nativeObj);
+
+ // C++: void setLambda(float lambda)
+ private static native void setLambda_0(long nativeObj, float lambda);
+
+ // C++: int getSamples()
+ private static native int getSamples_0(long nativeObj);
+
+ // C++: void setSamples(int samples)
+ private static native void setSamples_0(long nativeObj, int samples);
+
+ // C++: bool getRandom()
+ private static native boolean getRandom_0(long nativeObj);
+
+ // C++: void setRandom(bool random)
+ private static native void setRandom_0(long nativeObj, boolean random);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/photo+CalibrateRobertson.java b/modules/java/src/photo+CalibrateRobertson.java
new file mode 100644
index 0000000..d650f05
--- /dev/null
+++ b/modules/java/src/photo+CalibrateRobertson.java
@@ -0,0 +1,111 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import org.opencv.core.Mat;
+
+// C++: class CalibrateRobertson
+//javadoc: CalibrateRobertson
+public class CalibrateRobertson extends CalibrateCRF {
+
+ protected CalibrateRobertson(long addr) { super(addr); }
+
+
+ //
+ // C++: int getMaxIter()
+ //
+
+ //javadoc: CalibrateRobertson::getMaxIter()
+ public int getMaxIter()
+ {
+
+ int retVal = getMaxIter_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setMaxIter(int max_iter)
+ //
+
+ //javadoc: CalibrateRobertson::setMaxIter(max_iter)
+ public void setMaxIter(int max_iter)
+ {
+
+ setMaxIter_0(nativeObj, max_iter);
+
+ return;
+ }
+
+
+ //
+ // C++: float getThreshold()
+ //
+
+ //javadoc: CalibrateRobertson::getThreshold()
+ public float getThreshold()
+ {
+
+ float retVal = getThreshold_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setThreshold(float threshold)
+ //
+
+ //javadoc: CalibrateRobertson::setThreshold(threshold)
+ public void setThreshold(float threshold)
+ {
+
+ setThreshold_0(nativeObj, threshold);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat getRadiance()
+ //
+
+ //javadoc: CalibrateRobertson::getRadiance()
+ public Mat getRadiance()
+ {
+
+ Mat retVal = new Mat(getRadiance_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: int getMaxIter()
+ private static native int getMaxIter_0(long nativeObj);
+
+ // C++: void setMaxIter(int max_iter)
+ private static native void setMaxIter_0(long nativeObj, int max_iter);
+
+ // C++: float getThreshold()
+ private static native float getThreshold_0(long nativeObj);
+
+ // C++: void setThreshold(float threshold)
+ private static native void setThreshold_0(long nativeObj, float threshold);
+
+ // C++: Mat getRadiance()
+ private static native long getRadiance_0(long nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/photo+MergeDebevec.java b/modules/java/src/photo+MergeDebevec.java
new file mode 100644
index 0000000..f540c88
--- /dev/null
+++ b/modules/java/src/photo+MergeDebevec.java
@@ -0,0 +1,63 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.utils.Converters;
+
+// C++: class MergeDebevec
+//javadoc: MergeDebevec
+public class MergeDebevec extends MergeExposures {
+
+ protected MergeDebevec(long addr) { super(addr); }
+
+
+ //
+ // C++: void process(vector_Mat src, Mat& dst, Mat times, Mat response)
+ //
+
+ //javadoc: MergeDebevec::process(src, dst, times, response)
+ public void process(List<Mat> src, Mat dst, Mat times, Mat response)
+ {
+ Mat src_mat = Converters.vector_Mat_to_Mat(src);
+ process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void process(vector_Mat src, Mat& dst, Mat times)
+ //
+
+ //javadoc: MergeDebevec::process(src, dst, times)
+ public void process(List<Mat> src, Mat dst, Mat times)
+ {
+ Mat src_mat = Converters.vector_Mat_to_Mat(src);
+ process_1(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void process(vector_Mat src, Mat& dst, Mat times, Mat response)
+ private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj, long response_nativeObj);
+
+ // C++: void process(vector_Mat src, Mat& dst, Mat times)
+ private static native void process_1(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/photo+MergeExposures.java b/modules/java/src/photo+MergeExposures.java
new file mode 100644
index 0000000..558dfcc
--- /dev/null
+++ b/modules/java/src/photo+MergeExposures.java
@@ -0,0 +1,47 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+import org.opencv.utils.Converters;
+
+// C++: class MergeExposures
+//javadoc: MergeExposures
+public class MergeExposures extends Algorithm {
+
+ protected MergeExposures(long addr) { super(addr); }
+
+
+ //
+ // C++: void process(vector_Mat src, Mat& dst, Mat times, Mat response)
+ //
+
+ //javadoc: MergeExposures::process(src, dst, times, response)
+ public void process(List<Mat> src, Mat dst, Mat times, Mat response)
+ {
+ Mat src_mat = Converters.vector_Mat_to_Mat(src);
+ process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void process(vector_Mat src, Mat& dst, Mat times, Mat response)
+ private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj, long response_nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/photo+MergeMertens.java b/modules/java/src/photo+MergeMertens.java
new file mode 100644
index 0000000..aee45de
--- /dev/null
+++ b/modules/java/src/photo+MergeMertens.java
@@ -0,0 +1,165 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.utils.Converters;
+
+// C++: class MergeMertens
+//javadoc: MergeMertens
+public class MergeMertens extends MergeExposures {
+
+ protected MergeMertens(long addr) { super(addr); }
+
+
+ //
+ // C++: void process(vector_Mat src, Mat& dst, Mat times, Mat response)
+ //
+
+ //javadoc: MergeMertens::process(src, dst, times, response)
+ public void process(List<Mat> src, Mat dst, Mat times, Mat response)
+ {
+ Mat src_mat = Converters.vector_Mat_to_Mat(src);
+ process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void process(vector_Mat src, Mat& dst)
+ //
+
+ //javadoc: MergeMertens::process(src, dst)
+ public void process(List<Mat> src, Mat dst)
+ {
+ Mat src_mat = Converters.vector_Mat_to_Mat(src);
+ process_1(nativeObj, src_mat.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: float getContrastWeight()
+ //
+
+ //javadoc: MergeMertens::getContrastWeight()
+ public float getContrastWeight()
+ {
+
+ float retVal = getContrastWeight_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setContrastWeight(float contrast_weiht)
+ //
+
+ //javadoc: MergeMertens::setContrastWeight(contrast_weiht)
+ public void setContrastWeight(float contrast_weiht)
+ {
+
+ setContrastWeight_0(nativeObj, contrast_weiht);
+
+ return;
+ }
+
+
+ //
+ // C++: float getSaturationWeight()
+ //
+
+ //javadoc: MergeMertens::getSaturationWeight()
+ public float getSaturationWeight()
+ {
+
+ float retVal = getSaturationWeight_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setSaturationWeight(float saturation_weight)
+ //
+
+ //javadoc: MergeMertens::setSaturationWeight(saturation_weight)
+ public void setSaturationWeight(float saturation_weight)
+ {
+
+ setSaturationWeight_0(nativeObj, saturation_weight);
+
+ return;
+ }
+
+
+ //
+ // C++: float getExposureWeight()
+ //
+
+ //javadoc: MergeMertens::getExposureWeight()
+ public float getExposureWeight()
+ {
+
+ float retVal = getExposureWeight_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setExposureWeight(float exposure_weight)
+ //
+
+ //javadoc: MergeMertens::setExposureWeight(exposure_weight)
+ public void setExposureWeight(float exposure_weight)
+ {
+
+ setExposureWeight_0(nativeObj, exposure_weight);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void process(vector_Mat src, Mat& dst, Mat times, Mat response)
+ private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj, long response_nativeObj);
+
+ // C++: void process(vector_Mat src, Mat& dst)
+ private static native void process_1(long nativeObj, long src_mat_nativeObj, long dst_nativeObj);
+
+ // C++: float getContrastWeight()
+ private static native float getContrastWeight_0(long nativeObj);
+
+ // C++: void setContrastWeight(float contrast_weiht)
+ private static native void setContrastWeight_0(long nativeObj, float contrast_weiht);
+
+ // C++: float getSaturationWeight()
+ private static native float getSaturationWeight_0(long nativeObj);
+
+ // C++: void setSaturationWeight(float saturation_weight)
+ private static native void setSaturationWeight_0(long nativeObj, float saturation_weight);
+
+ // C++: float getExposureWeight()
+ private static native float getExposureWeight_0(long nativeObj);
+
+ // C++: void setExposureWeight(float exposure_weight)
+ private static native void setExposureWeight_0(long nativeObj, float exposure_weight);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/photo+MergeRobertson.java b/modules/java/src/photo+MergeRobertson.java
new file mode 100644
index 0000000..86308b6
--- /dev/null
+++ b/modules/java/src/photo+MergeRobertson.java
@@ -0,0 +1,63 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.utils.Converters;
+
+// C++: class MergeRobertson
+//javadoc: MergeRobertson
+public class MergeRobertson extends MergeExposures {
+
+ protected MergeRobertson(long addr) { super(addr); }
+
+
+ //
+ // C++: void process(vector_Mat src, Mat& dst, Mat times, Mat response)
+ //
+
+ //javadoc: MergeRobertson::process(src, dst, times, response)
+ public void process(List<Mat> src, Mat dst, Mat times, Mat response)
+ {
+ Mat src_mat = Converters.vector_Mat_to_Mat(src);
+ process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void process(vector_Mat src, Mat& dst, Mat times)
+ //
+
+ //javadoc: MergeRobertson::process(src, dst, times)
+ public void process(List<Mat> src, Mat dst, Mat times)
+ {
+ Mat src_mat = Converters.vector_Mat_to_Mat(src);
+ process_1(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void process(vector_Mat src, Mat& dst, Mat times, Mat response)
+ private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj, long response_nativeObj);
+
+ // C++: void process(vector_Mat src, Mat& dst, Mat times)
+ private static native void process_1(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/photo+Photo.java b/modules/java/src/photo+Photo.java
new file mode 100644
index 0000000..9d8e314
--- /dev/null
+++ b/modules/java/src/photo+Photo.java
@@ -0,0 +1,742 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfFloat;
+import org.opencv.core.Point;
+import org.opencv.utils.Converters;
+
+public class Photo {
+
+ private static final int
+ CV_INPAINT_NS = 0,
+ CV_INPAINT_TELEA = 1;
+
+
+ public static final int
+ INPAINT_NS = 0,
+ INPAINT_TELEA = 1,
+ NORMAL_CLONE = 1,
+ MIXED_CLONE = 2,
+ MONOCHROME_TRANSFER = 3,
+ RECURS_FILTER = 1,
+ NORMCONV_FILTER = 2,
+ LDR_SIZE = 256;
+
+
+ //
+ // C++: void fastNlMeansDenoisingColoredMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, float h = 3, float hColor = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+ //
+
+ //javadoc: fastNlMeansDenoisingColoredMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize, h, hColor, templateWindowSize, searchWindowSize)
+ public static void fastNlMeansDenoisingColoredMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, float h, float hColor, int templateWindowSize, int searchWindowSize)
+ {
+ Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+ fastNlMeansDenoisingColoredMulti_0(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize, h, hColor, templateWindowSize, searchWindowSize);
+
+ return;
+ }
+
+ //javadoc: fastNlMeansDenoisingColoredMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize)
+ public static void fastNlMeansDenoisingColoredMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize)
+ {
+ Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+ fastNlMeansDenoisingColoredMulti_1(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize);
+
+ return;
+ }
+
+
+ //
+ // C++: void denoise_TVL1(vector_Mat observations, Mat result, double lambda = 1.0, int niters = 30)
+ //
+
+ //javadoc: denoise_TVL1(observations, result, lambda, niters)
+ public static void denoise_TVL1(List<Mat> observations, Mat result, double lambda, int niters)
+ {
+ Mat observations_mat = Converters.vector_Mat_to_Mat(observations);
+ denoise_TVL1_0(observations_mat.nativeObj, result.nativeObj, lambda, niters);
+
+ return;
+ }
+
+ //javadoc: denoise_TVL1(observations, result)
+ public static void denoise_TVL1(List<Mat> observations, Mat result)
+ {
+ Mat observations_mat = Converters.vector_Mat_to_Mat(observations);
+ denoise_TVL1_1(observations_mat.nativeObj, result.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: Ptr_Tonemap createTonemap(float gamma = 1.0f)
+ //
+
+ //javadoc: createTonemap(gamma)
+ public static Tonemap createTonemap(float gamma)
+ {
+
+ Tonemap retVal = new Tonemap(createTonemap_0(gamma));
+
+ return retVal;
+ }
+
+ //javadoc: createTonemap()
+ public static Tonemap createTonemap()
+ {
+
+ Tonemap retVal = new Tonemap(createTonemap_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Ptr_TonemapDrago createTonemapDrago(float gamma = 1.0f, float saturation = 1.0f, float bias = 0.85f)
+ //
+
+ //javadoc: createTonemapDrago(gamma, saturation, bias)
+ public static TonemapDrago createTonemapDrago(float gamma, float saturation, float bias)
+ {
+
+ TonemapDrago retVal = new TonemapDrago(createTonemapDrago_0(gamma, saturation, bias));
+
+ return retVal;
+ }
+
+ //javadoc: createTonemapDrago()
+ public static TonemapDrago createTonemapDrago()
+ {
+
+ TonemapDrago retVal = new TonemapDrago(createTonemapDrago_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: 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)
+ //
+
+ //javadoc: createTonemapDurand(gamma, contrast, saturation, sigma_space, sigma_color)
+ public static TonemapDurand createTonemapDurand(float gamma, float contrast, float saturation, float sigma_space, float sigma_color)
+ {
+
+ TonemapDurand retVal = new TonemapDurand(createTonemapDurand_0(gamma, contrast, saturation, sigma_space, sigma_color));
+
+ return retVal;
+ }
+
+ //javadoc: createTonemapDurand()
+ public static TonemapDurand createTonemapDurand()
+ {
+
+ TonemapDurand retVal = new TonemapDurand(createTonemapDurand_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Ptr_TonemapReinhard createTonemapReinhard(float gamma = 1.0f, float intensity = 0.0f, float light_adapt = 1.0f, float color_adapt = 0.0f)
+ //
+
+ //javadoc: createTonemapReinhard(gamma, intensity, light_adapt, color_adapt)
+ public static TonemapReinhard createTonemapReinhard(float gamma, float intensity, float light_adapt, float color_adapt)
+ {
+
+ TonemapReinhard retVal = new TonemapReinhard(createTonemapReinhard_0(gamma, intensity, light_adapt, color_adapt));
+
+ return retVal;
+ }
+
+ //javadoc: createTonemapReinhard()
+ public static TonemapReinhard createTonemapReinhard()
+ {
+
+ TonemapReinhard retVal = new TonemapReinhard(createTonemapReinhard_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Ptr_TonemapMantiuk createTonemapMantiuk(float gamma = 1.0f, float scale = 0.7f, float saturation = 1.0f)
+ //
+
+ //javadoc: createTonemapMantiuk(gamma, scale, saturation)
+ public static TonemapMantiuk createTonemapMantiuk(float gamma, float scale, float saturation)
+ {
+
+ TonemapMantiuk retVal = new TonemapMantiuk(createTonemapMantiuk_0(gamma, scale, saturation));
+
+ return retVal;
+ }
+
+ //javadoc: createTonemapMantiuk()
+ public static TonemapMantiuk createTonemapMantiuk()
+ {
+
+ TonemapMantiuk retVal = new TonemapMantiuk(createTonemapMantiuk_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Ptr_AlignMTB createAlignMTB(int max_bits = 6, int exclude_range = 4, bool cut = true)
+ //
+
+ //javadoc: createAlignMTB(max_bits, exclude_range, cut)
+ public static AlignMTB createAlignMTB(int max_bits, int exclude_range, boolean cut)
+ {
+
+ AlignMTB retVal = new AlignMTB(createAlignMTB_0(max_bits, exclude_range, cut));
+
+ return retVal;
+ }
+
+ //javadoc: createAlignMTB()
+ public static AlignMTB createAlignMTB()
+ {
+
+ AlignMTB retVal = new AlignMTB(createAlignMTB_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Ptr_CalibrateDebevec createCalibrateDebevec(int samples = 70, float lambda = 10.0f, bool random = false)
+ //
+
+ //javadoc: createCalibrateDebevec(samples, lambda, random)
+ public static CalibrateDebevec createCalibrateDebevec(int samples, float lambda, boolean random)
+ {
+
+ CalibrateDebevec retVal = new CalibrateDebevec(createCalibrateDebevec_0(samples, lambda, random));
+
+ return retVal;
+ }
+
+ //javadoc: createCalibrateDebevec()
+ public static CalibrateDebevec createCalibrateDebevec()
+ {
+
+ CalibrateDebevec retVal = new CalibrateDebevec(createCalibrateDebevec_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Ptr_CalibrateRobertson createCalibrateRobertson(int max_iter = 30, float threshold = 0.01f)
+ //
+
+ //javadoc: createCalibrateRobertson(max_iter, threshold)
+ public static CalibrateRobertson createCalibrateRobertson(int max_iter, float threshold)
+ {
+
+ CalibrateRobertson retVal = new CalibrateRobertson(createCalibrateRobertson_0(max_iter, threshold));
+
+ return retVal;
+ }
+
+ //javadoc: createCalibrateRobertson()
+ public static CalibrateRobertson createCalibrateRobertson()
+ {
+
+ CalibrateRobertson retVal = new CalibrateRobertson(createCalibrateRobertson_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Ptr_MergeDebevec createMergeDebevec()
+ //
+
+ //javadoc: createMergeDebevec()
+ public static MergeDebevec createMergeDebevec()
+ {
+
+ MergeDebevec retVal = new MergeDebevec(createMergeDebevec_0());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Ptr_MergeMertens createMergeMertens(float contrast_weight = 1.0f, float saturation_weight = 1.0f, float exposure_weight = 0.0f)
+ //
+
+ //javadoc: createMergeMertens(contrast_weight, saturation_weight, exposure_weight)
+ public static MergeMertens createMergeMertens(float contrast_weight, float saturation_weight, float exposure_weight)
+ {
+
+ MergeMertens retVal = new MergeMertens(createMergeMertens_0(contrast_weight, saturation_weight, exposure_weight));
+
+ return retVal;
+ }
+
+ //javadoc: createMergeMertens()
+ public static MergeMertens createMergeMertens()
+ {
+
+ MergeMertens retVal = new MergeMertens(createMergeMertens_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Ptr_MergeRobertson createMergeRobertson()
+ //
+
+ //javadoc: createMergeRobertson()
+ public static MergeRobertson createMergeRobertson()
+ {
+
+ MergeRobertson retVal = new MergeRobertson(createMergeRobertson_0());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void decolor(Mat src, Mat& grayscale, Mat& color_boost)
+ //
+
+ //javadoc: decolor(src, grayscale, color_boost)
+ public static void decolor(Mat src, Mat grayscale, Mat color_boost)
+ {
+
+ decolor_0(src.nativeObj, grayscale.nativeObj, color_boost.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void seamlessClone(Mat src, Mat dst, Mat mask, Point p, Mat& blend, int flags)
+ //
+
+ //javadoc: seamlessClone(src, dst, mask, p, blend, flags)
+ public static void seamlessClone(Mat src, Mat dst, Mat mask, Point p, Mat blend, int flags)
+ {
+
+ seamlessClone_0(src.nativeObj, dst.nativeObj, mask.nativeObj, p.x, p.y, blend.nativeObj, flags);
+
+ return;
+ }
+
+
+ //
+ // C++: void colorChange(Mat src, Mat mask, Mat& dst, float red_mul = 1.0f, float green_mul = 1.0f, float blue_mul = 1.0f)
+ //
+
+ //javadoc: colorChange(src, mask, dst, red_mul, green_mul, blue_mul)
+ public static void colorChange(Mat src, Mat mask, Mat dst, float red_mul, float green_mul, float blue_mul)
+ {
+
+ colorChange_0(src.nativeObj, mask.nativeObj, dst.nativeObj, red_mul, green_mul, blue_mul);
+
+ return;
+ }
+
+ //javadoc: colorChange(src, mask, dst)
+ public static void colorChange(Mat src, Mat mask, Mat dst)
+ {
+
+ colorChange_1(src.nativeObj, mask.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void illuminationChange(Mat src, Mat mask, Mat& dst, float alpha = 0.2f, float beta = 0.4f)
+ //
+
+ //javadoc: illuminationChange(src, mask, dst, alpha, beta)
+ public static void illuminationChange(Mat src, Mat mask, Mat dst, float alpha, float beta)
+ {
+
+ illuminationChange_0(src.nativeObj, mask.nativeObj, dst.nativeObj, alpha, beta);
+
+ return;
+ }
+
+ //javadoc: illuminationChange(src, mask, dst)
+ public static void illuminationChange(Mat src, Mat mask, Mat dst)
+ {
+
+ illuminationChange_1(src.nativeObj, mask.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void textureFlattening(Mat src, Mat mask, Mat& dst, float low_threshold = 30, float high_threshold = 45, int kernel_size = 3)
+ //
+
+ //javadoc: textureFlattening(src, mask, dst, low_threshold, high_threshold, kernel_size)
+ public static void textureFlattening(Mat src, Mat mask, Mat dst, float low_threshold, float high_threshold, int kernel_size)
+ {
+
+ textureFlattening_0(src.nativeObj, mask.nativeObj, dst.nativeObj, low_threshold, high_threshold, kernel_size);
+
+ return;
+ }
+
+ //javadoc: textureFlattening(src, mask, dst)
+ public static void textureFlattening(Mat src, Mat mask, Mat dst)
+ {
+
+ textureFlattening_1(src.nativeObj, mask.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void edgePreservingFilter(Mat src, Mat& dst, int flags = 1, float sigma_s = 60, float sigma_r = 0.4f)
+ //
+
+ //javadoc: edgePreservingFilter(src, dst, flags, sigma_s, sigma_r)
+ public static void edgePreservingFilter(Mat src, Mat dst, int flags, float sigma_s, float sigma_r)
+ {
+
+ edgePreservingFilter_0(src.nativeObj, dst.nativeObj, flags, sigma_s, sigma_r);
+
+ return;
+ }
+
+ //javadoc: edgePreservingFilter(src, dst)
+ public static void edgePreservingFilter(Mat src, Mat dst)
+ {
+
+ edgePreservingFilter_1(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void inpaint(Mat src, Mat inpaintMask, Mat& dst, double inpaintRadius, int flags)
+ //
+
+ //javadoc: inpaint(src, inpaintMask, dst, inpaintRadius, flags)
+ public static void inpaint(Mat src, Mat inpaintMask, Mat dst, double inpaintRadius, int flags)
+ {
+
+ inpaint_0(src.nativeObj, inpaintMask.nativeObj, dst.nativeObj, inpaintRadius, flags);
+
+ return;
+ }
+
+
+ //
+ // C++: void fastNlMeansDenoising(Mat src, Mat& dst, float h = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+ //
+
+ //javadoc: fastNlMeansDenoising(src, dst, h, templateWindowSize, searchWindowSize)
+ public static void fastNlMeansDenoising(Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize)
+ {
+
+ fastNlMeansDenoising_0(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize);
+
+ return;
+ }
+
+ //javadoc: fastNlMeansDenoising(src, dst)
+ public static void fastNlMeansDenoising(Mat src, Mat dst)
+ {
+
+ fastNlMeansDenoising_1(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void fastNlMeansDenoising(Mat src, Mat& dst, vector_float h, int templateWindowSize = 7, int searchWindowSize = 21, int normType = NORM_L2)
+ //
+
+ //javadoc: fastNlMeansDenoising(src, dst, h, templateWindowSize, searchWindowSize, normType)
+ public static void fastNlMeansDenoising(Mat src, Mat dst, MatOfFloat h, int templateWindowSize, int searchWindowSize, int normType)
+ {
+ Mat h_mat = h;
+ fastNlMeansDenoising_2(src.nativeObj, dst.nativeObj, h_mat.nativeObj, templateWindowSize, searchWindowSize, normType);
+
+ return;
+ }
+
+ //javadoc: fastNlMeansDenoising(src, dst, h)
+ public static void fastNlMeansDenoising(Mat src, Mat dst, MatOfFloat h)
+ {
+ Mat h_mat = h;
+ fastNlMeansDenoising_3(src.nativeObj, dst.nativeObj, h_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void fastNlMeansDenoisingColored(Mat src, Mat& dst, float h = 3, float hColor = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+ //
+
+ //javadoc: fastNlMeansDenoisingColored(src, dst, h, hColor, templateWindowSize, searchWindowSize)
+ public static void fastNlMeansDenoisingColored(Mat src, Mat dst, float h, float hColor, int templateWindowSize, int searchWindowSize)
+ {
+
+ fastNlMeansDenoisingColored_0(src.nativeObj, dst.nativeObj, h, hColor, templateWindowSize, searchWindowSize);
+
+ return;
+ }
+
+ //javadoc: fastNlMeansDenoisingColored(src, dst)
+ public static void fastNlMeansDenoisingColored(Mat src, Mat dst)
+ {
+
+ fastNlMeansDenoisingColored_1(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void fastNlMeansDenoisingMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, float h = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+ //
+
+ //javadoc: fastNlMeansDenoisingMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize, h, templateWindowSize, searchWindowSize)
+ public static void fastNlMeansDenoisingMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, float h, int templateWindowSize, int searchWindowSize)
+ {
+ Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+ fastNlMeansDenoisingMulti_0(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize, h, templateWindowSize, searchWindowSize);
+
+ return;
+ }
+
+ //javadoc: fastNlMeansDenoisingMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize)
+ public static void fastNlMeansDenoisingMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize)
+ {
+ Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+ fastNlMeansDenoisingMulti_1(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize);
+
+ return;
+ }
+
+
+ //
+ // C++: void fastNlMeansDenoisingMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, vector_float h, int templateWindowSize = 7, int searchWindowSize = 21, int normType = NORM_L2)
+ //
+
+ //javadoc: fastNlMeansDenoisingMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize, h, templateWindowSize, searchWindowSize, normType)
+ public static void fastNlMeansDenoisingMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, MatOfFloat h, int templateWindowSize, int searchWindowSize, int normType)
+ {
+ Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+ Mat h_mat = h;
+ fastNlMeansDenoisingMulti_2(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize, h_mat.nativeObj, templateWindowSize, searchWindowSize, normType);
+
+ return;
+ }
+
+ //javadoc: fastNlMeansDenoisingMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize, h)
+ public static void fastNlMeansDenoisingMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, MatOfFloat h)
+ {
+ Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+ Mat h_mat = h;
+ fastNlMeansDenoisingMulti_3(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize, h_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void detailEnhance(Mat src, Mat& dst, float sigma_s = 10, float sigma_r = 0.15f)
+ //
+
+ //javadoc: detailEnhance(src, dst, sigma_s, sigma_r)
+ public static void detailEnhance(Mat src, Mat dst, float sigma_s, float sigma_r)
+ {
+
+ detailEnhance_0(src.nativeObj, dst.nativeObj, sigma_s, sigma_r);
+
+ return;
+ }
+
+ //javadoc: detailEnhance(src, dst)
+ public static void detailEnhance(Mat src, Mat dst)
+ {
+
+ detailEnhance_1(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void pencilSketch(Mat src, Mat& dst1, Mat& dst2, float sigma_s = 60, float sigma_r = 0.07f, float shade_factor = 0.02f)
+ //
+
+ //javadoc: pencilSketch(src, dst1, dst2, sigma_s, sigma_r, shade_factor)
+ public static void pencilSketch(Mat src, Mat dst1, Mat dst2, float sigma_s, float sigma_r, float shade_factor)
+ {
+
+ pencilSketch_0(src.nativeObj, dst1.nativeObj, dst2.nativeObj, sigma_s, sigma_r, shade_factor);
+
+ return;
+ }
+
+ //javadoc: pencilSketch(src, dst1, dst2)
+ public static void pencilSketch(Mat src, Mat dst1, Mat dst2)
+ {
+
+ pencilSketch_1(src.nativeObj, dst1.nativeObj, dst2.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void stylization(Mat src, Mat& dst, float sigma_s = 60, float sigma_r = 0.45f)
+ //
+
+ //javadoc: stylization(src, dst, sigma_s, sigma_r)
+ public static void stylization(Mat src, Mat dst, float sigma_s, float sigma_r)
+ {
+
+ stylization_0(src.nativeObj, dst.nativeObj, sigma_s, sigma_r);
+
+ return;
+ }
+
+ //javadoc: stylization(src, dst)
+ public static void stylization(Mat src, Mat dst)
+ {
+
+ stylization_1(src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+
+
+ // C++: void fastNlMeansDenoisingColoredMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, float h = 3, float hColor = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+ private static native void fastNlMeansDenoisingColoredMulti_0(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize, float h, float hColor, int templateWindowSize, int searchWindowSize);
+ private static native void fastNlMeansDenoisingColoredMulti_1(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize);
+
+ // C++: void denoise_TVL1(vector_Mat observations, Mat result, double lambda = 1.0, int niters = 30)
+ private static native void denoise_TVL1_0(long observations_mat_nativeObj, long result_nativeObj, double lambda, int niters);
+ private static native void denoise_TVL1_1(long observations_mat_nativeObj, long result_nativeObj);
+
+ // C++: Ptr_Tonemap createTonemap(float gamma = 1.0f)
+ private static native long createTonemap_0(float gamma);
+ private static native long createTonemap_1();
+
+ // C++: Ptr_TonemapDrago createTonemapDrago(float gamma = 1.0f, float saturation = 1.0f, float bias = 0.85f)
+ private static native long createTonemapDrago_0(float gamma, float saturation, float bias);
+ private static native long createTonemapDrago_1();
+
+ // C++: 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)
+ private static native long createTonemapDurand_0(float gamma, float contrast, float saturation, float sigma_space, float sigma_color);
+ private static native long createTonemapDurand_1();
+
+ // C++: Ptr_TonemapReinhard createTonemapReinhard(float gamma = 1.0f, float intensity = 0.0f, float light_adapt = 1.0f, float color_adapt = 0.0f)
+ private static native long createTonemapReinhard_0(float gamma, float intensity, float light_adapt, float color_adapt);
+ private static native long createTonemapReinhard_1();
+
+ // C++: Ptr_TonemapMantiuk createTonemapMantiuk(float gamma = 1.0f, float scale = 0.7f, float saturation = 1.0f)
+ private static native long createTonemapMantiuk_0(float gamma, float scale, float saturation);
+ private static native long createTonemapMantiuk_1();
+
+ // C++: Ptr_AlignMTB createAlignMTB(int max_bits = 6, int exclude_range = 4, bool cut = true)
+ private static native long createAlignMTB_0(int max_bits, int exclude_range, boolean cut);
+ private static native long createAlignMTB_1();
+
+ // C++: Ptr_CalibrateDebevec createCalibrateDebevec(int samples = 70, float lambda = 10.0f, bool random = false)
+ private static native long createCalibrateDebevec_0(int samples, float lambda, boolean random);
+ private static native long createCalibrateDebevec_1();
+
+ // C++: Ptr_CalibrateRobertson createCalibrateRobertson(int max_iter = 30, float threshold = 0.01f)
+ private static native long createCalibrateRobertson_0(int max_iter, float threshold);
+ private static native long createCalibrateRobertson_1();
+
+ // C++: Ptr_MergeDebevec createMergeDebevec()
+ private static native long createMergeDebevec_0();
+
+ // C++: Ptr_MergeMertens createMergeMertens(float contrast_weight = 1.0f, float saturation_weight = 1.0f, float exposure_weight = 0.0f)
+ private static native long createMergeMertens_0(float contrast_weight, float saturation_weight, float exposure_weight);
+ private static native long createMergeMertens_1();
+
+ // C++: Ptr_MergeRobertson createMergeRobertson()
+ private static native long createMergeRobertson_0();
+
+ // C++: void decolor(Mat src, Mat& grayscale, Mat& color_boost)
+ private static native void decolor_0(long src_nativeObj, long grayscale_nativeObj, long color_boost_nativeObj);
+
+ // C++: void seamlessClone(Mat src, Mat dst, Mat mask, Point p, Mat& blend, int flags)
+ private static native void seamlessClone_0(long src_nativeObj, long dst_nativeObj, long mask_nativeObj, double p_x, double p_y, long blend_nativeObj, int flags);
+
+ // C++: void colorChange(Mat src, Mat mask, Mat& dst, float red_mul = 1.0f, float green_mul = 1.0f, float blue_mul = 1.0f)
+ private static native void colorChange_0(long src_nativeObj, long mask_nativeObj, long dst_nativeObj, float red_mul, float green_mul, float blue_mul);
+ private static native void colorChange_1(long src_nativeObj, long mask_nativeObj, long dst_nativeObj);
+
+ // C++: void illuminationChange(Mat src, Mat mask, Mat& dst, float alpha = 0.2f, float beta = 0.4f)
+ private static native void illuminationChange_0(long src_nativeObj, long mask_nativeObj, long dst_nativeObj, float alpha, float beta);
+ private static native void illuminationChange_1(long src_nativeObj, long mask_nativeObj, long dst_nativeObj);
+
+ // C++: void textureFlattening(Mat src, Mat mask, Mat& dst, float low_threshold = 30, float high_threshold = 45, int kernel_size = 3)
+ private static native void textureFlattening_0(long src_nativeObj, long mask_nativeObj, long dst_nativeObj, float low_threshold, float high_threshold, int kernel_size);
+ private static native void textureFlattening_1(long src_nativeObj, long mask_nativeObj, long dst_nativeObj);
+
+ // C++: void edgePreservingFilter(Mat src, Mat& dst, int flags = 1, float sigma_s = 60, float sigma_r = 0.4f)
+ private static native void edgePreservingFilter_0(long src_nativeObj, long dst_nativeObj, int flags, float sigma_s, float sigma_r);
+ private static native void edgePreservingFilter_1(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void inpaint(Mat src, Mat inpaintMask, Mat& dst, double inpaintRadius, int flags)
+ private static native void inpaint_0(long src_nativeObj, long inpaintMask_nativeObj, long dst_nativeObj, double inpaintRadius, int flags);
+
+ // C++: void fastNlMeansDenoising(Mat src, Mat& dst, float h = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+ private static native void fastNlMeansDenoising_0(long src_nativeObj, long dst_nativeObj, float h, int templateWindowSize, int searchWindowSize);
+ private static native void fastNlMeansDenoising_1(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void fastNlMeansDenoising(Mat src, Mat& dst, vector_float h, int templateWindowSize = 7, int searchWindowSize = 21, int normType = NORM_L2)
+ private static native void fastNlMeansDenoising_2(long src_nativeObj, long dst_nativeObj, long h_mat_nativeObj, int templateWindowSize, int searchWindowSize, int normType);
+ private static native void fastNlMeansDenoising_3(long src_nativeObj, long dst_nativeObj, long h_mat_nativeObj);
+
+ // C++: void fastNlMeansDenoisingColored(Mat src, Mat& dst, float h = 3, float hColor = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+ private static native void fastNlMeansDenoisingColored_0(long src_nativeObj, long dst_nativeObj, float h, float hColor, int templateWindowSize, int searchWindowSize);
+ private static native void fastNlMeansDenoisingColored_1(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void fastNlMeansDenoisingMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, float h = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+ private static native void fastNlMeansDenoisingMulti_0(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize, float h, int templateWindowSize, int searchWindowSize);
+ private static native void fastNlMeansDenoisingMulti_1(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize);
+
+ // C++: void fastNlMeansDenoisingMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, vector_float h, int templateWindowSize = 7, int searchWindowSize = 21, int normType = NORM_L2)
+ private static native void fastNlMeansDenoisingMulti_2(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize, long h_mat_nativeObj, int templateWindowSize, int searchWindowSize, int normType);
+ private static native void fastNlMeansDenoisingMulti_3(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize, long h_mat_nativeObj);
+
+ // C++: void detailEnhance(Mat src, Mat& dst, float sigma_s = 10, float sigma_r = 0.15f)
+ private static native void detailEnhance_0(long src_nativeObj, long dst_nativeObj, float sigma_s, float sigma_r);
+ private static native void detailEnhance_1(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void pencilSketch(Mat src, Mat& dst1, Mat& dst2, float sigma_s = 60, float sigma_r = 0.07f, float shade_factor = 0.02f)
+ private static native void pencilSketch_0(long src_nativeObj, long dst1_nativeObj, long dst2_nativeObj, float sigma_s, float sigma_r, float shade_factor);
+ private static native void pencilSketch_1(long src_nativeObj, long dst1_nativeObj, long dst2_nativeObj);
+
+ // C++: void stylization(Mat src, Mat& dst, float sigma_s = 60, float sigma_r = 0.45f)
+ private static native void stylization_0(long src_nativeObj, long dst_nativeObj, float sigma_s, float sigma_r);
+ private static native void stylization_1(long src_nativeObj, long dst_nativeObj);
+
+}
diff --git a/modules/java/src/photo+Tonemap.java b/modules/java/src/photo+Tonemap.java
new file mode 100644
index 0000000..a86d717
--- /dev/null
+++ b/modules/java/src/photo+Tonemap.java
@@ -0,0 +1,78 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+
+// C++: class Tonemap
+//javadoc: Tonemap
+public class Tonemap extends Algorithm {
+
+ protected Tonemap(long addr) { super(addr); }
+
+
+ //
+ // C++: void process(Mat src, Mat& dst)
+ //
+
+ //javadoc: Tonemap::process(src, dst)
+ public void process(Mat src, Mat dst)
+ {
+
+ process_0(nativeObj, src.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: float getGamma()
+ //
+
+ //javadoc: Tonemap::getGamma()
+ public float getGamma()
+ {
+
+ float retVal = getGamma_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setGamma(float gamma)
+ //
+
+ //javadoc: Tonemap::setGamma(gamma)
+ public void setGamma(float gamma)
+ {
+
+ setGamma_0(nativeObj, gamma);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void process(Mat src, Mat& dst)
+ private static native void process_0(long nativeObj, long src_nativeObj, long dst_nativeObj);
+
+ // C++: float getGamma()
+ private static native float getGamma_0(long nativeObj);
+
+ // C++: void setGamma(float gamma)
+ private static native void setGamma_0(long nativeObj, float gamma);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/photo+TonemapDrago.java b/modules/java/src/photo+TonemapDrago.java
new file mode 100644
index 0000000..c090ca7
--- /dev/null
+++ b/modules/java/src/photo+TonemapDrago.java
@@ -0,0 +1,94 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+
+
+// C++: class TonemapDrago
+//javadoc: TonemapDrago
+public class TonemapDrago extends Tonemap {
+
+ protected TonemapDrago(long addr) { super(addr); }
+
+
+ //
+ // C++: float getSaturation()
+ //
+
+ //javadoc: TonemapDrago::getSaturation()
+ public float getSaturation()
+ {
+
+ float retVal = getSaturation_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setSaturation(float saturation)
+ //
+
+ //javadoc: TonemapDrago::setSaturation(saturation)
+ public void setSaturation(float saturation)
+ {
+
+ setSaturation_0(nativeObj, saturation);
+
+ return;
+ }
+
+
+ //
+ // C++: float getBias()
+ //
+
+ //javadoc: TonemapDrago::getBias()
+ public float getBias()
+ {
+
+ float retVal = getBias_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setBias(float bias)
+ //
+
+ //javadoc: TonemapDrago::setBias(bias)
+ public void setBias(float bias)
+ {
+
+ setBias_0(nativeObj, bias);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: float getSaturation()
+ private static native float getSaturation_0(long nativeObj);
+
+ // C++: void setSaturation(float saturation)
+ private static native void setSaturation_0(long nativeObj, float saturation);
+
+ // C++: float getBias()
+ private static native float getBias_0(long nativeObj);
+
+ // C++: void setBias(float bias)
+ private static native void setBias_0(long nativeObj, float bias);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/photo+TonemapDurand.java b/modules/java/src/photo+TonemapDurand.java
new file mode 100644
index 0000000..51f23d2
--- /dev/null
+++ b/modules/java/src/photo+TonemapDurand.java
@@ -0,0 +1,162 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+
+
+// C++: class TonemapDurand
+//javadoc: TonemapDurand
+public class TonemapDurand extends Tonemap {
+
+ protected TonemapDurand(long addr) { super(addr); }
+
+
+ //
+ // C++: float getSaturation()
+ //
+
+ //javadoc: TonemapDurand::getSaturation()
+ public float getSaturation()
+ {
+
+ float retVal = getSaturation_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setSaturation(float saturation)
+ //
+
+ //javadoc: TonemapDurand::setSaturation(saturation)
+ public void setSaturation(float saturation)
+ {
+
+ setSaturation_0(nativeObj, saturation);
+
+ return;
+ }
+
+
+ //
+ // C++: float getContrast()
+ //
+
+ //javadoc: TonemapDurand::getContrast()
+ public float getContrast()
+ {
+
+ float retVal = getContrast_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setContrast(float contrast)
+ //
+
+ //javadoc: TonemapDurand::setContrast(contrast)
+ public void setContrast(float contrast)
+ {
+
+ setContrast_0(nativeObj, contrast);
+
+ return;
+ }
+
+
+ //
+ // C++: float getSigmaSpace()
+ //
+
+ //javadoc: TonemapDurand::getSigmaSpace()
+ public float getSigmaSpace()
+ {
+
+ float retVal = getSigmaSpace_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setSigmaSpace(float sigma_space)
+ //
+
+ //javadoc: TonemapDurand::setSigmaSpace(sigma_space)
+ public void setSigmaSpace(float sigma_space)
+ {
+
+ setSigmaSpace_0(nativeObj, sigma_space);
+
+ return;
+ }
+
+
+ //
+ // C++: float getSigmaColor()
+ //
+
+ //javadoc: TonemapDurand::getSigmaColor()
+ public float getSigmaColor()
+ {
+
+ float retVal = getSigmaColor_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setSigmaColor(float sigma_color)
+ //
+
+ //javadoc: TonemapDurand::setSigmaColor(sigma_color)
+ public void setSigmaColor(float sigma_color)
+ {
+
+ setSigmaColor_0(nativeObj, sigma_color);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: float getSaturation()
+ private static native float getSaturation_0(long nativeObj);
+
+ // C++: void setSaturation(float saturation)
+ private static native void setSaturation_0(long nativeObj, float saturation);
+
+ // C++: float getContrast()
+ private static native float getContrast_0(long nativeObj);
+
+ // C++: void setContrast(float contrast)
+ private static native void setContrast_0(long nativeObj, float contrast);
+
+ // C++: float getSigmaSpace()
+ private static native float getSigmaSpace_0(long nativeObj);
+
+ // C++: void setSigmaSpace(float sigma_space)
+ private static native void setSigmaSpace_0(long nativeObj, float sigma_space);
+
+ // C++: float getSigmaColor()
+ private static native float getSigmaColor_0(long nativeObj);
+
+ // C++: void setSigmaColor(float sigma_color)
+ private static native void setSigmaColor_0(long nativeObj, float sigma_color);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/photo+TonemapMantiuk.java b/modules/java/src/photo+TonemapMantiuk.java
new file mode 100644
index 0000000..6a80930
--- /dev/null
+++ b/modules/java/src/photo+TonemapMantiuk.java
@@ -0,0 +1,94 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+
+
+// C++: class TonemapMantiuk
+//javadoc: TonemapMantiuk
+public class TonemapMantiuk extends Tonemap {
+
+ protected TonemapMantiuk(long addr) { super(addr); }
+
+
+ //
+ // C++: float getScale()
+ //
+
+ //javadoc: TonemapMantiuk::getScale()
+ public float getScale()
+ {
+
+ float retVal = getScale_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setScale(float scale)
+ //
+
+ //javadoc: TonemapMantiuk::setScale(scale)
+ public void setScale(float scale)
+ {
+
+ setScale_0(nativeObj, scale);
+
+ return;
+ }
+
+
+ //
+ // C++: float getSaturation()
+ //
+
+ //javadoc: TonemapMantiuk::getSaturation()
+ public float getSaturation()
+ {
+
+ float retVal = getSaturation_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setSaturation(float saturation)
+ //
+
+ //javadoc: TonemapMantiuk::setSaturation(saturation)
+ public void setSaturation(float saturation)
+ {
+
+ setSaturation_0(nativeObj, saturation);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: float getScale()
+ private static native float getScale_0(long nativeObj);
+
+ // C++: void setScale(float scale)
+ private static native void setScale_0(long nativeObj, float scale);
+
+ // C++: float getSaturation()
+ private static native float getSaturation_0(long nativeObj);
+
+ // C++: void setSaturation(float saturation)
+ private static native void setSaturation_0(long nativeObj, float saturation);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/photo+TonemapReinhard.java b/modules/java/src/photo+TonemapReinhard.java
new file mode 100644
index 0000000..6dfb043
--- /dev/null
+++ b/modules/java/src/photo+TonemapReinhard.java
@@ -0,0 +1,128 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+
+
+// C++: class TonemapReinhard
+//javadoc: TonemapReinhard
+public class TonemapReinhard extends Tonemap {
+
+ protected TonemapReinhard(long addr) { super(addr); }
+
+
+ //
+ // C++: float getIntensity()
+ //
+
+ //javadoc: TonemapReinhard::getIntensity()
+ public float getIntensity()
+ {
+
+ float retVal = getIntensity_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setIntensity(float intensity)
+ //
+
+ //javadoc: TonemapReinhard::setIntensity(intensity)
+ public void setIntensity(float intensity)
+ {
+
+ setIntensity_0(nativeObj, intensity);
+
+ return;
+ }
+
+
+ //
+ // C++: float getLightAdaptation()
+ //
+
+ //javadoc: TonemapReinhard::getLightAdaptation()
+ public float getLightAdaptation()
+ {
+
+ float retVal = getLightAdaptation_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setLightAdaptation(float light_adapt)
+ //
+
+ //javadoc: TonemapReinhard::setLightAdaptation(light_adapt)
+ public void setLightAdaptation(float light_adapt)
+ {
+
+ setLightAdaptation_0(nativeObj, light_adapt);
+
+ return;
+ }
+
+
+ //
+ // C++: float getColorAdaptation()
+ //
+
+ //javadoc: TonemapReinhard::getColorAdaptation()
+ public float getColorAdaptation()
+ {
+
+ float retVal = getColorAdaptation_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setColorAdaptation(float color_adapt)
+ //
+
+ //javadoc: TonemapReinhard::setColorAdaptation(color_adapt)
+ public void setColorAdaptation(float color_adapt)
+ {
+
+ setColorAdaptation_0(nativeObj, color_adapt);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: float getIntensity()
+ private static native float getIntensity_0(long nativeObj);
+
+ // C++: void setIntensity(float intensity)
+ private static native void setIntensity_0(long nativeObj, float intensity);
+
+ // C++: float getLightAdaptation()
+ private static native float getLightAdaptation_0(long nativeObj);
+
+ // C++: void setLightAdaptation(float light_adapt)
+ private static native void setLightAdaptation_0(long nativeObj, float light_adapt);
+
+ // C++: float getColorAdaptation()
+ private static native float getColorAdaptation_0(long nativeObj);
+
+ // C++: void setColorAdaptation(float color_adapt)
+ private static native void setColorAdaptation_0(long nativeObj, float color_adapt);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/photo.cpp b/modules/java/src/photo.cpp
new file mode 100644
index 0000000..0ae9f3c
--- /dev/null
+++ b/modules/java/src/photo.cpp
@@ -0,0 +1,3115 @@
+
+//
+// This file is auto-generated, please don't edit!
+//
+
+#define LOG_TAG "org.opencv.photo"
+
+#include "common.h"
+
+#include "opencv2/opencv_modules.hpp"
+#ifdef HAVE_OPENCV_PHOTO
+
+#include <string>
+
+#include "opencv2/photo.hpp"
+
+#include "../../photo/include/opencv2/photo/photo_c.h"
+#include "../../photo/include/opencv2/photo.hpp"
+
+using namespace cv;
+
+/// throw java exception
+static void throwJavaException(JNIEnv *env, const std::exception *e, const char *method) {
+ std::string what = "unknown exception";
+ jclass je = 0;
+
+ if(e) {
+ std::string exception_type = "std::exception";
+
+ if(dynamic_cast<const cv::Exception*>(e)) {
+ exception_type = "cv::Exception";
+ je = env->FindClass("org/opencv/core/CvException");
+ }
+
+ what = exception_type + ": " + e->what();
+ }
+
+ if(!je) je = env->FindClass("java/lang/Exception");
+ env->ThrowNew(je, what.c_str());
+
+ LOGE("%s caught %s", method, what.c_str());
+ (void)method; // avoid "unused" warning
+}
+
+
+extern "C" {
+
+
+//
+// int getMaxIter()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_photo_CalibrateRobertson_getMaxIter_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_photo_CalibrateRobertson_getMaxIter_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getMaxIter_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::CalibrateRobertson>* me = (Ptr<cv::CalibrateRobertson>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getMaxIter( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setMaxIter(int max_iter)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateRobertson_setMaxIter_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateRobertson_setMaxIter_10
+ (JNIEnv* env, jclass , jlong self, jint max_iter)
+{
+ static const char method_name[] = "photo::setMaxIter_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::CalibrateRobertson>* me = (Ptr<cv::CalibrateRobertson>*) self; //TODO: check for NULL
+ (*me)->setMaxIter( (int)max_iter );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// float getThreshold()
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_CalibrateRobertson_getThreshold_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_CalibrateRobertson_getThreshold_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getThreshold_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::CalibrateRobertson>* me = (Ptr<cv::CalibrateRobertson>*) self; //TODO: check for NULL
+ float _retval_ = (*me)->getThreshold( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setThreshold(float threshold)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateRobertson_setThreshold_10 (JNIEnv*, jclass, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateRobertson_setThreshold_10
+ (JNIEnv* env, jclass , jlong self, jfloat threshold)
+{
+ static const char method_name[] = "photo::setThreshold_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::CalibrateRobertson>* me = (Ptr<cv::CalibrateRobertson>*) self; //TODO: check for NULL
+ (*me)->setThreshold( (float)threshold );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat getRadiance()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_CalibrateRobertson_getRadiance_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_CalibrateRobertson_getRadiance_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getRadiance_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::CalibrateRobertson>* me = (Ptr<cv::CalibrateRobertson>*) self; //TODO: check for NULL
+ ::Mat _retval_ = (*me)->getRadiance( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::CalibrateRobertson>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateRobertson_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateRobertson_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::CalibrateRobertson>*) self;
+}
+
+
+//
+// float getScale()
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapMantiuk_getScale_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapMantiuk_getScale_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getScale_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapMantiuk>* me = (Ptr<cv::TonemapMantiuk>*) self; //TODO: check for NULL
+ float _retval_ = (*me)->getScale( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setScale(float scale)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapMantiuk_setScale_10 (JNIEnv*, jclass, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapMantiuk_setScale_10
+ (JNIEnv* env, jclass , jlong self, jfloat scale)
+{
+ static const char method_name[] = "photo::setScale_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapMantiuk>* me = (Ptr<cv::TonemapMantiuk>*) self; //TODO: check for NULL
+ (*me)->setScale( (float)scale );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// float getSaturation()
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapMantiuk_getSaturation_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapMantiuk_getSaturation_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getSaturation_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapMantiuk>* me = (Ptr<cv::TonemapMantiuk>*) self; //TODO: check for NULL
+ float _retval_ = (*me)->getSaturation( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setSaturation(float saturation)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapMantiuk_setSaturation_10 (JNIEnv*, jclass, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapMantiuk_setSaturation_10
+ (JNIEnv* env, jclass , jlong self, jfloat saturation)
+{
+ static const char method_name[] = "photo::setSaturation_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapMantiuk>* me = (Ptr<cv::TonemapMantiuk>*) self; //TODO: check for NULL
+ (*me)->setSaturation( (float)saturation );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::TonemapMantiuk>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapMantiuk_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapMantiuk_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::TonemapMantiuk>*) self;
+}
+
+
+//
+// float getSaturation()
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDurand_getSaturation_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDurand_getSaturation_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getSaturation_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapDurand>* me = (Ptr<cv::TonemapDurand>*) self; //TODO: check for NULL
+ float _retval_ = (*me)->getSaturation( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setSaturation(float saturation)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_setSaturation_10 (JNIEnv*, jclass, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_setSaturation_10
+ (JNIEnv* env, jclass , jlong self, jfloat saturation)
+{
+ static const char method_name[] = "photo::setSaturation_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapDurand>* me = (Ptr<cv::TonemapDurand>*) self; //TODO: check for NULL
+ (*me)->setSaturation( (float)saturation );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// float getContrast()
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDurand_getContrast_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDurand_getContrast_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getContrast_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapDurand>* me = (Ptr<cv::TonemapDurand>*) self; //TODO: check for NULL
+ float _retval_ = (*me)->getContrast( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setContrast(float contrast)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_setContrast_10 (JNIEnv*, jclass, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_setContrast_10
+ (JNIEnv* env, jclass , jlong self, jfloat contrast)
+{
+ static const char method_name[] = "photo::setContrast_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapDurand>* me = (Ptr<cv::TonemapDurand>*) self; //TODO: check for NULL
+ (*me)->setContrast( (float)contrast );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// float getSigmaSpace()
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDurand_getSigmaSpace_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDurand_getSigmaSpace_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getSigmaSpace_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapDurand>* me = (Ptr<cv::TonemapDurand>*) self; //TODO: check for NULL
+ float _retval_ = (*me)->getSigmaSpace( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setSigmaSpace(float sigma_space)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_setSigmaSpace_10 (JNIEnv*, jclass, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_setSigmaSpace_10
+ (JNIEnv* env, jclass , jlong self, jfloat sigma_space)
+{
+ static const char method_name[] = "photo::setSigmaSpace_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapDurand>* me = (Ptr<cv::TonemapDurand>*) self; //TODO: check for NULL
+ (*me)->setSigmaSpace( (float)sigma_space );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// float getSigmaColor()
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDurand_getSigmaColor_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDurand_getSigmaColor_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getSigmaColor_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapDurand>* me = (Ptr<cv::TonemapDurand>*) self; //TODO: check for NULL
+ float _retval_ = (*me)->getSigmaColor( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setSigmaColor(float sigma_color)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_setSigmaColor_10 (JNIEnv*, jclass, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_setSigmaColor_10
+ (JNIEnv* env, jclass , jlong self, jfloat sigma_color)
+{
+ static const char method_name[] = "photo::setSigmaColor_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapDurand>* me = (Ptr<cv::TonemapDurand>*) self; //TODO: check for NULL
+ (*me)->setSigmaColor( (float)sigma_color );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::TonemapDurand>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDurand_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::TonemapDurand>*) self;
+}
+
+
+//
+// float getLambda()
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_CalibrateDebevec_getLambda_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_CalibrateDebevec_getLambda_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getLambda_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::CalibrateDebevec>* me = (Ptr<cv::CalibrateDebevec>*) self; //TODO: check for NULL
+ float _retval_ = (*me)->getLambda( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setLambda(float lambda)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateDebevec_setLambda_10 (JNIEnv*, jclass, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateDebevec_setLambda_10
+ (JNIEnv* env, jclass , jlong self, jfloat lambda)
+{
+ static const char method_name[] = "photo::setLambda_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::CalibrateDebevec>* me = (Ptr<cv::CalibrateDebevec>*) self; //TODO: check for NULL
+ (*me)->setLambda( (float)lambda );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getSamples()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_photo_CalibrateDebevec_getSamples_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_photo_CalibrateDebevec_getSamples_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getSamples_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::CalibrateDebevec>* me = (Ptr<cv::CalibrateDebevec>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getSamples( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setSamples(int samples)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateDebevec_setSamples_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateDebevec_setSamples_10
+ (JNIEnv* env, jclass , jlong self, jint samples)
+{
+ static const char method_name[] = "photo::setSamples_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::CalibrateDebevec>* me = (Ptr<cv::CalibrateDebevec>*) self; //TODO: check for NULL
+ (*me)->setSamples( (int)samples );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool getRandom()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_photo_CalibrateDebevec_getRandom_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_photo_CalibrateDebevec_getRandom_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getRandom_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::CalibrateDebevec>* me = (Ptr<cv::CalibrateDebevec>*) self; //TODO: check for NULL
+ bool _retval_ = (*me)->getRandom( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setRandom(bool random)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateDebevec_setRandom_10 (JNIEnv*, jclass, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateDebevec_setRandom_10
+ (JNIEnv* env, jclass , jlong self, jboolean random)
+{
+ static const char method_name[] = "photo::setRandom_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::CalibrateDebevec>* me = (Ptr<cv::CalibrateDebevec>*) self; //TODO: check for NULL
+ (*me)->setRandom( (bool)random );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::CalibrateDebevec>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateDebevec_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateDebevec_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::CalibrateDebevec>*) self;
+}
+
+
+//
+// float getIntensity()
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapReinhard_getIntensity_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapReinhard_getIntensity_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getIntensity_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapReinhard>* me = (Ptr<cv::TonemapReinhard>*) self; //TODO: check for NULL
+ float _retval_ = (*me)->getIntensity( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setIntensity(float intensity)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapReinhard_setIntensity_10 (JNIEnv*, jclass, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapReinhard_setIntensity_10
+ (JNIEnv* env, jclass , jlong self, jfloat intensity)
+{
+ static const char method_name[] = "photo::setIntensity_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapReinhard>* me = (Ptr<cv::TonemapReinhard>*) self; //TODO: check for NULL
+ (*me)->setIntensity( (float)intensity );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// float getLightAdaptation()
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapReinhard_getLightAdaptation_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapReinhard_getLightAdaptation_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getLightAdaptation_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapReinhard>* me = (Ptr<cv::TonemapReinhard>*) self; //TODO: check for NULL
+ float _retval_ = (*me)->getLightAdaptation( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setLightAdaptation(float light_adapt)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapReinhard_setLightAdaptation_10 (JNIEnv*, jclass, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapReinhard_setLightAdaptation_10
+ (JNIEnv* env, jclass , jlong self, jfloat light_adapt)
+{
+ static const char method_name[] = "photo::setLightAdaptation_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapReinhard>* me = (Ptr<cv::TonemapReinhard>*) self; //TODO: check for NULL
+ (*me)->setLightAdaptation( (float)light_adapt );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// float getColorAdaptation()
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapReinhard_getColorAdaptation_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapReinhard_getColorAdaptation_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getColorAdaptation_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapReinhard>* me = (Ptr<cv::TonemapReinhard>*) self; //TODO: check for NULL
+ float _retval_ = (*me)->getColorAdaptation( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setColorAdaptation(float color_adapt)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapReinhard_setColorAdaptation_10 (JNIEnv*, jclass, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapReinhard_setColorAdaptation_10
+ (JNIEnv* env, jclass , jlong self, jfloat color_adapt)
+{
+ static const char method_name[] = "photo::setColorAdaptation_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapReinhard>* me = (Ptr<cv::TonemapReinhard>*) self; //TODO: check for NULL
+ (*me)->setColorAdaptation( (float)color_adapt );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::TonemapReinhard>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapReinhard_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapReinhard_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::TonemapReinhard>*) self;
+}
+
+
+//
+// void fastNlMeansDenoisingColoredMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, float h = 3, float hColor = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingColoredMulti_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jfloat, jfloat, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingColoredMulti_10
+ (JNIEnv* env, jclass , jlong srcImgs_mat_nativeObj, jlong dst_nativeObj, jint imgToDenoiseIndex, jint temporalWindowSize, jfloat h, jfloat hColor, jint templateWindowSize, jint searchWindowSize)
+{
+ static const char method_name[] = "photo::fastNlMeansDenoisingColoredMulti_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> srcImgs;
+ Mat& srcImgs_mat = *((Mat*)srcImgs_mat_nativeObj);
+ Mat_to_vector_Mat( srcImgs_mat, srcImgs );
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::fastNlMeansDenoisingColoredMulti( srcImgs, dst, (int)imgToDenoiseIndex, (int)temporalWindowSize, (float)h, (float)hColor, (int)templateWindowSize, (int)searchWindowSize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingColoredMulti_11 (JNIEnv*, jclass, jlong, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingColoredMulti_11
+ (JNIEnv* env, jclass , jlong srcImgs_mat_nativeObj, jlong dst_nativeObj, jint imgToDenoiseIndex, jint temporalWindowSize)
+{
+ static const char method_name[] = "photo::fastNlMeansDenoisingColoredMulti_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> srcImgs;
+ Mat& srcImgs_mat = *((Mat*)srcImgs_mat_nativeObj);
+ Mat_to_vector_Mat( srcImgs_mat, srcImgs );
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::fastNlMeansDenoisingColoredMulti( srcImgs, dst, (int)imgToDenoiseIndex, (int)temporalWindowSize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void denoise_TVL1(vector_Mat observations, Mat result, double lambda = 1.0, int niters = 30)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_denoise_1TVL1_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_denoise_1TVL1_10
+ (JNIEnv* env, jclass , jlong observations_mat_nativeObj, jlong result_nativeObj, jdouble lambda, jint niters)
+{
+ static const char method_name[] = "photo::denoise_1TVL1_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> observations;
+ Mat& observations_mat = *((Mat*)observations_mat_nativeObj);
+ Mat_to_vector_Mat( observations_mat, observations );
+ Mat& result = *((Mat*)result_nativeObj);
+ cv::denoise_TVL1( observations, result, (double)lambda, (int)niters );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_denoise_1TVL1_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_denoise_1TVL1_11
+ (JNIEnv* env, jclass , jlong observations_mat_nativeObj, jlong result_nativeObj)
+{
+ static const char method_name[] = "photo::denoise_1TVL1_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> observations;
+ Mat& observations_mat = *((Mat*)observations_mat_nativeObj);
+ Mat_to_vector_Mat( observations_mat, observations );
+ Mat& result = *((Mat*)result_nativeObj);
+ cv::denoise_TVL1( observations, result );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Ptr_Tonemap createTonemap(float gamma = 1.0f)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemap_10 (JNIEnv*, jclass, jfloat);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemap_10
+ (JNIEnv* env, jclass , jfloat gamma)
+{
+ static const char method_name[] = "photo::createTonemap_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::Tonemap> Ptr_Tonemap;
+ Ptr_Tonemap _retval_ = cv::createTonemap( (float)gamma );
+ return (jlong)(new Ptr_Tonemap(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemap_11 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemap_11
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "photo::createTonemap_11()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::Tonemap> Ptr_Tonemap;
+ Ptr_Tonemap _retval_ = cv::createTonemap( );
+ return (jlong)(new Ptr_Tonemap(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Ptr_TonemapDrago createTonemapDrago(float gamma = 1.0f, float saturation = 1.0f, float bias = 0.85f)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapDrago_10 (JNIEnv*, jclass, jfloat, jfloat, jfloat);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapDrago_10
+ (JNIEnv* env, jclass , jfloat gamma, jfloat saturation, jfloat bias)
+{
+ static const char method_name[] = "photo::createTonemapDrago_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::TonemapDrago> Ptr_TonemapDrago;
+ Ptr_TonemapDrago _retval_ = cv::createTonemapDrago( (float)gamma, (float)saturation, (float)bias );
+ return (jlong)(new Ptr_TonemapDrago(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapDrago_11 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapDrago_11
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "photo::createTonemapDrago_11()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::TonemapDrago> Ptr_TonemapDrago;
+ Ptr_TonemapDrago _retval_ = cv::createTonemapDrago( );
+ return (jlong)(new Ptr_TonemapDrago(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// 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)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapDurand_10 (JNIEnv*, jclass, jfloat, jfloat, jfloat, jfloat, jfloat);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapDurand_10
+ (JNIEnv* env, jclass , jfloat gamma, jfloat contrast, jfloat saturation, jfloat sigma_space, jfloat sigma_color)
+{
+ static const char method_name[] = "photo::createTonemapDurand_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::TonemapDurand> Ptr_TonemapDurand;
+ Ptr_TonemapDurand _retval_ = cv::createTonemapDurand( (float)gamma, (float)contrast, (float)saturation, (float)sigma_space, (float)sigma_color );
+ return (jlong)(new Ptr_TonemapDurand(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapDurand_11 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapDurand_11
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "photo::createTonemapDurand_11()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::TonemapDurand> Ptr_TonemapDurand;
+ Ptr_TonemapDurand _retval_ = cv::createTonemapDurand( );
+ return (jlong)(new Ptr_TonemapDurand(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Ptr_TonemapReinhard createTonemapReinhard(float gamma = 1.0f, float intensity = 0.0f, float light_adapt = 1.0f, float color_adapt = 0.0f)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapReinhard_10 (JNIEnv*, jclass, jfloat, jfloat, jfloat, jfloat);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapReinhard_10
+ (JNIEnv* env, jclass , jfloat gamma, jfloat intensity, jfloat light_adapt, jfloat color_adapt)
+{
+ static const char method_name[] = "photo::createTonemapReinhard_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::TonemapReinhard> Ptr_TonemapReinhard;
+ Ptr_TonemapReinhard _retval_ = cv::createTonemapReinhard( (float)gamma, (float)intensity, (float)light_adapt, (float)color_adapt );
+ return (jlong)(new Ptr_TonemapReinhard(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapReinhard_11 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapReinhard_11
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "photo::createTonemapReinhard_11()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::TonemapReinhard> Ptr_TonemapReinhard;
+ Ptr_TonemapReinhard _retval_ = cv::createTonemapReinhard( );
+ return (jlong)(new Ptr_TonemapReinhard(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Ptr_TonemapMantiuk createTonemapMantiuk(float gamma = 1.0f, float scale = 0.7f, float saturation = 1.0f)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapMantiuk_10 (JNIEnv*, jclass, jfloat, jfloat, jfloat);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapMantiuk_10
+ (JNIEnv* env, jclass , jfloat gamma, jfloat scale, jfloat saturation)
+{
+ static const char method_name[] = "photo::createTonemapMantiuk_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::TonemapMantiuk> Ptr_TonemapMantiuk;
+ Ptr_TonemapMantiuk _retval_ = cv::createTonemapMantiuk( (float)gamma, (float)scale, (float)saturation );
+ return (jlong)(new Ptr_TonemapMantiuk(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapMantiuk_11 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createTonemapMantiuk_11
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "photo::createTonemapMantiuk_11()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::TonemapMantiuk> Ptr_TonemapMantiuk;
+ Ptr_TonemapMantiuk _retval_ = cv::createTonemapMantiuk( );
+ return (jlong)(new Ptr_TonemapMantiuk(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Ptr_AlignMTB createAlignMTB(int max_bits = 6, int exclude_range = 4, bool cut = true)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createAlignMTB_10 (JNIEnv*, jclass, jint, jint, jboolean);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createAlignMTB_10
+ (JNIEnv* env, jclass , jint max_bits, jint exclude_range, jboolean cut)
+{
+ static const char method_name[] = "photo::createAlignMTB_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::AlignMTB> Ptr_AlignMTB;
+ Ptr_AlignMTB _retval_ = cv::createAlignMTB( (int)max_bits, (int)exclude_range, (bool)cut );
+ return (jlong)(new Ptr_AlignMTB(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createAlignMTB_11 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createAlignMTB_11
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "photo::createAlignMTB_11()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::AlignMTB> Ptr_AlignMTB;
+ Ptr_AlignMTB _retval_ = cv::createAlignMTB( );
+ return (jlong)(new Ptr_AlignMTB(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Ptr_CalibrateDebevec createCalibrateDebevec(int samples = 70, float lambda = 10.0f, bool random = false)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createCalibrateDebevec_10 (JNIEnv*, jclass, jint, jfloat, jboolean);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createCalibrateDebevec_10
+ (JNIEnv* env, jclass , jint samples, jfloat lambda, jboolean random)
+{
+ static const char method_name[] = "photo::createCalibrateDebevec_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::CalibrateDebevec> Ptr_CalibrateDebevec;
+ Ptr_CalibrateDebevec _retval_ = cv::createCalibrateDebevec( (int)samples, (float)lambda, (bool)random );
+ return (jlong)(new Ptr_CalibrateDebevec(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createCalibrateDebevec_11 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createCalibrateDebevec_11
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "photo::createCalibrateDebevec_11()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::CalibrateDebevec> Ptr_CalibrateDebevec;
+ Ptr_CalibrateDebevec _retval_ = cv::createCalibrateDebevec( );
+ return (jlong)(new Ptr_CalibrateDebevec(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Ptr_CalibrateRobertson createCalibrateRobertson(int max_iter = 30, float threshold = 0.01f)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createCalibrateRobertson_10 (JNIEnv*, jclass, jint, jfloat);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createCalibrateRobertson_10
+ (JNIEnv* env, jclass , jint max_iter, jfloat threshold)
+{
+ static const char method_name[] = "photo::createCalibrateRobertson_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::CalibrateRobertson> Ptr_CalibrateRobertson;
+ Ptr_CalibrateRobertson _retval_ = cv::createCalibrateRobertson( (int)max_iter, (float)threshold );
+ return (jlong)(new Ptr_CalibrateRobertson(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createCalibrateRobertson_11 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createCalibrateRobertson_11
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "photo::createCalibrateRobertson_11()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::CalibrateRobertson> Ptr_CalibrateRobertson;
+ Ptr_CalibrateRobertson _retval_ = cv::createCalibrateRobertson( );
+ return (jlong)(new Ptr_CalibrateRobertson(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Ptr_MergeDebevec createMergeDebevec()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createMergeDebevec_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createMergeDebevec_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "photo::createMergeDebevec_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::MergeDebevec> Ptr_MergeDebevec;
+ Ptr_MergeDebevec _retval_ = cv::createMergeDebevec( );
+ return (jlong)(new Ptr_MergeDebevec(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Ptr_MergeMertens createMergeMertens(float contrast_weight = 1.0f, float saturation_weight = 1.0f, float exposure_weight = 0.0f)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createMergeMertens_10 (JNIEnv*, jclass, jfloat, jfloat, jfloat);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createMergeMertens_10
+ (JNIEnv* env, jclass , jfloat contrast_weight, jfloat saturation_weight, jfloat exposure_weight)
+{
+ static const char method_name[] = "photo::createMergeMertens_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::MergeMertens> Ptr_MergeMertens;
+ Ptr_MergeMertens _retval_ = cv::createMergeMertens( (float)contrast_weight, (float)saturation_weight, (float)exposure_weight );
+ return (jlong)(new Ptr_MergeMertens(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createMergeMertens_11 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createMergeMertens_11
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "photo::createMergeMertens_11()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::MergeMertens> Ptr_MergeMertens;
+ Ptr_MergeMertens _retval_ = cv::createMergeMertens( );
+ return (jlong)(new Ptr_MergeMertens(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Ptr_MergeRobertson createMergeRobertson()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createMergeRobertson_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_photo_Photo_createMergeRobertson_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "photo::createMergeRobertson_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::MergeRobertson> Ptr_MergeRobertson;
+ Ptr_MergeRobertson _retval_ = cv::createMergeRobertson( );
+ return (jlong)(new Ptr_MergeRobertson(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void decolor(Mat src, Mat& grayscale, Mat& color_boost)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_decolor_10 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_decolor_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong grayscale_nativeObj, jlong color_boost_nativeObj)
+{
+ static const char method_name[] = "photo::decolor_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& grayscale = *((Mat*)grayscale_nativeObj);
+ Mat& color_boost = *((Mat*)color_boost_nativeObj);
+ cv::decolor( src, grayscale, color_boost );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void seamlessClone(Mat src, Mat dst, Mat mask, Point p, Mat& blend, int flags)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_seamlessClone_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jdouble, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_seamlessClone_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong mask_nativeObj, jdouble p_x, jdouble p_y, jlong blend_nativeObj, jint flags)
+{
+ static const char method_name[] = "photo::seamlessClone_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ Point p((int)p_x, (int)p_y);
+ Mat& blend = *((Mat*)blend_nativeObj);
+ cv::seamlessClone( src, dst, mask, p, blend, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void colorChange(Mat src, Mat mask, Mat& dst, float red_mul = 1.0f, float green_mul = 1.0f, float blue_mul = 1.0f)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_colorChange_10 (JNIEnv*, jclass, jlong, jlong, jlong, jfloat, jfloat, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_colorChange_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong mask_nativeObj, jlong dst_nativeObj, jfloat red_mul, jfloat green_mul, jfloat blue_mul)
+{
+ static const char method_name[] = "photo::colorChange_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::colorChange( src, mask, dst, (float)red_mul, (float)green_mul, (float)blue_mul );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_colorChange_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_colorChange_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong mask_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "photo::colorChange_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::colorChange( src, mask, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void illuminationChange(Mat src, Mat mask, Mat& dst, float alpha = 0.2f, float beta = 0.4f)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_illuminationChange_10 (JNIEnv*, jclass, jlong, jlong, jlong, jfloat, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_illuminationChange_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong mask_nativeObj, jlong dst_nativeObj, jfloat alpha, jfloat beta)
+{
+ static const char method_name[] = "photo::illuminationChange_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::illuminationChange( src, mask, dst, (float)alpha, (float)beta );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_illuminationChange_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_illuminationChange_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong mask_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "photo::illuminationChange_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::illuminationChange( src, mask, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void textureFlattening(Mat src, Mat mask, Mat& dst, float low_threshold = 30, float high_threshold = 45, int kernel_size = 3)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_textureFlattening_10 (JNIEnv*, jclass, jlong, jlong, jlong, jfloat, jfloat, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_textureFlattening_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong mask_nativeObj, jlong dst_nativeObj, jfloat low_threshold, jfloat high_threshold, jint kernel_size)
+{
+ static const char method_name[] = "photo::textureFlattening_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::textureFlattening( src, mask, dst, (float)low_threshold, (float)high_threshold, (int)kernel_size );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_textureFlattening_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_textureFlattening_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong mask_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "photo::textureFlattening_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& mask = *((Mat*)mask_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::textureFlattening( src, mask, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void edgePreservingFilter(Mat src, Mat& dst, int flags = 1, float sigma_s = 60, float sigma_r = 0.4f)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_edgePreservingFilter_10 (JNIEnv*, jclass, jlong, jlong, jint, jfloat, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_edgePreservingFilter_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jint flags, jfloat sigma_s, jfloat sigma_r)
+{
+ static const char method_name[] = "photo::edgePreservingFilter_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::edgePreservingFilter( src, dst, (int)flags, (float)sigma_s, (float)sigma_r );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_edgePreservingFilter_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_edgePreservingFilter_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "photo::edgePreservingFilter_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::edgePreservingFilter( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void inpaint(Mat src, Mat inpaintMask, Mat& dst, double inpaintRadius, int flags)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_inpaint_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_inpaint_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong inpaintMask_nativeObj, jlong dst_nativeObj, jdouble inpaintRadius, jint flags)
+{
+ static const char method_name[] = "photo::inpaint_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& inpaintMask = *((Mat*)inpaintMask_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::inpaint( src, inpaintMask, dst, (double)inpaintRadius, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void fastNlMeansDenoising(Mat src, Mat& dst, float h = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoising_10 (JNIEnv*, jclass, jlong, jlong, jfloat, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoising_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jfloat h, jint templateWindowSize, jint searchWindowSize)
+{
+ static const char method_name[] = "photo::fastNlMeansDenoising_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::fastNlMeansDenoising( src, dst, (float)h, (int)templateWindowSize, (int)searchWindowSize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoising_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoising_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "photo::fastNlMeansDenoising_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::fastNlMeansDenoising( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void fastNlMeansDenoising(Mat src, Mat& dst, vector_float h, int templateWindowSize = 7, int searchWindowSize = 21, int normType = NORM_L2)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoising_12 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoising_12
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong h_mat_nativeObj, jint templateWindowSize, jint searchWindowSize, jint normType)
+{
+ static const char method_name[] = "photo::fastNlMeansDenoising_12()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<float> h;
+ Mat& h_mat = *((Mat*)h_mat_nativeObj);
+ Mat_to_vector_float( h_mat, h );
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::fastNlMeansDenoising( src, dst, h, (int)templateWindowSize, (int)searchWindowSize, (int)normType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoising_13 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoising_13
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jlong h_mat_nativeObj)
+{
+ static const char method_name[] = "photo::fastNlMeansDenoising_13()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<float> h;
+ Mat& h_mat = *((Mat*)h_mat_nativeObj);
+ Mat_to_vector_float( h_mat, h );
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::fastNlMeansDenoising( src, dst, h );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void fastNlMeansDenoisingColored(Mat src, Mat& dst, float h = 3, float hColor = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingColored_10 (JNIEnv*, jclass, jlong, jlong, jfloat, jfloat, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingColored_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jfloat h, jfloat hColor, jint templateWindowSize, jint searchWindowSize)
+{
+ static const char method_name[] = "photo::fastNlMeansDenoisingColored_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::fastNlMeansDenoisingColored( src, dst, (float)h, (float)hColor, (int)templateWindowSize, (int)searchWindowSize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingColored_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingColored_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "photo::fastNlMeansDenoisingColored_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::fastNlMeansDenoisingColored( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void fastNlMeansDenoisingMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, float h = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingMulti_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jfloat, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingMulti_10
+ (JNIEnv* env, jclass , jlong srcImgs_mat_nativeObj, jlong dst_nativeObj, jint imgToDenoiseIndex, jint temporalWindowSize, jfloat h, jint templateWindowSize, jint searchWindowSize)
+{
+ static const char method_name[] = "photo::fastNlMeansDenoisingMulti_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> srcImgs;
+ Mat& srcImgs_mat = *((Mat*)srcImgs_mat_nativeObj);
+ Mat_to_vector_Mat( srcImgs_mat, srcImgs );
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::fastNlMeansDenoisingMulti( srcImgs, dst, (int)imgToDenoiseIndex, (int)temporalWindowSize, (float)h, (int)templateWindowSize, (int)searchWindowSize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingMulti_11 (JNIEnv*, jclass, jlong, jlong, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingMulti_11
+ (JNIEnv* env, jclass , jlong srcImgs_mat_nativeObj, jlong dst_nativeObj, jint imgToDenoiseIndex, jint temporalWindowSize)
+{
+ static const char method_name[] = "photo::fastNlMeansDenoisingMulti_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> srcImgs;
+ Mat& srcImgs_mat = *((Mat*)srcImgs_mat_nativeObj);
+ Mat_to_vector_Mat( srcImgs_mat, srcImgs );
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::fastNlMeansDenoisingMulti( srcImgs, dst, (int)imgToDenoiseIndex, (int)temporalWindowSize );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void fastNlMeansDenoisingMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, vector_float h, int templateWindowSize = 7, int searchWindowSize = 21, int normType = NORM_L2)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingMulti_12 (JNIEnv*, jclass, jlong, jlong, jint, jint, jlong, jint, jint, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingMulti_12
+ (JNIEnv* env, jclass , jlong srcImgs_mat_nativeObj, jlong dst_nativeObj, jint imgToDenoiseIndex, jint temporalWindowSize, jlong h_mat_nativeObj, jint templateWindowSize, jint searchWindowSize, jint normType)
+{
+ static const char method_name[] = "photo::fastNlMeansDenoisingMulti_12()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> srcImgs;
+ Mat& srcImgs_mat = *((Mat*)srcImgs_mat_nativeObj);
+ Mat_to_vector_Mat( srcImgs_mat, srcImgs );
+ std::vector<float> h;
+ Mat& h_mat = *((Mat*)h_mat_nativeObj);
+ Mat_to_vector_float( h_mat, h );
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::fastNlMeansDenoisingMulti( srcImgs, dst, (int)imgToDenoiseIndex, (int)temporalWindowSize, h, (int)templateWindowSize, (int)searchWindowSize, (int)normType );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingMulti_13 (JNIEnv*, jclass, jlong, jlong, jint, jint, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_fastNlMeansDenoisingMulti_13
+ (JNIEnv* env, jclass , jlong srcImgs_mat_nativeObj, jlong dst_nativeObj, jint imgToDenoiseIndex, jint temporalWindowSize, jlong h_mat_nativeObj)
+{
+ static const char method_name[] = "photo::fastNlMeansDenoisingMulti_13()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> srcImgs;
+ Mat& srcImgs_mat = *((Mat*)srcImgs_mat_nativeObj);
+ Mat_to_vector_Mat( srcImgs_mat, srcImgs );
+ std::vector<float> h;
+ Mat& h_mat = *((Mat*)h_mat_nativeObj);
+ Mat_to_vector_float( h_mat, h );
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::fastNlMeansDenoisingMulti( srcImgs, dst, (int)imgToDenoiseIndex, (int)temporalWindowSize, h );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void detailEnhance(Mat src, Mat& dst, float sigma_s = 10, float sigma_r = 0.15f)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_detailEnhance_10 (JNIEnv*, jclass, jlong, jlong, jfloat, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_detailEnhance_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jfloat sigma_s, jfloat sigma_r)
+{
+ static const char method_name[] = "photo::detailEnhance_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::detailEnhance( src, dst, (float)sigma_s, (float)sigma_r );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_detailEnhance_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_detailEnhance_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "photo::detailEnhance_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::detailEnhance( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void pencilSketch(Mat src, Mat& dst1, Mat& dst2, float sigma_s = 60, float sigma_r = 0.07f, float shade_factor = 0.02f)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_pencilSketch_10 (JNIEnv*, jclass, jlong, jlong, jlong, jfloat, jfloat, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_pencilSketch_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst1_nativeObj, jlong dst2_nativeObj, jfloat sigma_s, jfloat sigma_r, jfloat shade_factor)
+{
+ static const char method_name[] = "photo::pencilSketch_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst1 = *((Mat*)dst1_nativeObj);
+ Mat& dst2 = *((Mat*)dst2_nativeObj);
+ cv::pencilSketch( src, dst1, dst2, (float)sigma_s, (float)sigma_r, (float)shade_factor );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_pencilSketch_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_pencilSketch_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst1_nativeObj, jlong dst2_nativeObj)
+{
+ static const char method_name[] = "photo::pencilSketch_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst1 = *((Mat*)dst1_nativeObj);
+ Mat& dst2 = *((Mat*)dst2_nativeObj);
+ cv::pencilSketch( src, dst1, dst2 );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void stylization(Mat src, Mat& dst, float sigma_s = 60, float sigma_r = 0.45f)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_stylization_10 (JNIEnv*, jclass, jlong, jlong, jfloat, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_stylization_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jfloat sigma_s, jfloat sigma_r)
+{
+ static const char method_name[] = "photo::stylization_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::stylization( src, dst, (float)sigma_s, (float)sigma_r );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_stylization_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Photo_stylization_11
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "photo::stylization_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ cv::stylization( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void process(vector_Mat src, vector_Mat dst, Mat times, Mat response)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignExposures_process_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignExposures_process_10
+ (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_mat_nativeObj, jlong times_nativeObj, jlong response_nativeObj)
+{
+ static const char method_name[] = "photo::process_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> src;
+ Mat& src_mat = *((Mat*)src_mat_nativeObj);
+ Mat_to_vector_Mat( src_mat, src );
+ std::vector<Mat> dst;
+ Mat& dst_mat = *((Mat*)dst_mat_nativeObj);
+ Mat_to_vector_Mat( dst_mat, dst );
+ Ptr<cv::AlignExposures>* me = (Ptr<cv::AlignExposures>*) self; //TODO: check for NULL
+ Mat& times = *((Mat*)times_nativeObj);
+ Mat& response = *((Mat*)response_nativeObj);
+ (*me)->process( src, dst, times, response );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::AlignExposures>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignExposures_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignExposures_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::AlignExposures>*) self;
+}
+
+
+//
+// void process(vector_Mat src, Mat& dst, Mat times)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateCRF_process_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateCRF_process_10
+ (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_nativeObj, jlong times_nativeObj)
+{
+ static const char method_name[] = "photo::process_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> src;
+ Mat& src_mat = *((Mat*)src_mat_nativeObj);
+ Mat_to_vector_Mat( src_mat, src );
+ Ptr<cv::CalibrateCRF>* me = (Ptr<cv::CalibrateCRF>*) self; //TODO: check for NULL
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& times = *((Mat*)times_nativeObj);
+ (*me)->process( src, dst, times );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::CalibrateCRF>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateCRF_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_CalibrateCRF_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::CalibrateCRF>*) self;
+}
+
+
+//
+// float getSaturation()
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDrago_getSaturation_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDrago_getSaturation_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getSaturation_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapDrago>* me = (Ptr<cv::TonemapDrago>*) self; //TODO: check for NULL
+ float _retval_ = (*me)->getSaturation( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setSaturation(float saturation)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDrago_setSaturation_10 (JNIEnv*, jclass, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDrago_setSaturation_10
+ (JNIEnv* env, jclass , jlong self, jfloat saturation)
+{
+ static const char method_name[] = "photo::setSaturation_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapDrago>* me = (Ptr<cv::TonemapDrago>*) self; //TODO: check for NULL
+ (*me)->setSaturation( (float)saturation );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// float getBias()
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDrago_getBias_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_TonemapDrago_getBias_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getBias_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapDrago>* me = (Ptr<cv::TonemapDrago>*) self; //TODO: check for NULL
+ float _retval_ = (*me)->getBias( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setBias(float bias)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDrago_setBias_10 (JNIEnv*, jclass, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDrago_setBias_10
+ (JNIEnv* env, jclass , jlong self, jfloat bias)
+{
+ static const char method_name[] = "photo::setBias_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::TonemapDrago>* me = (Ptr<cv::TonemapDrago>*) self; //TODO: check for NULL
+ (*me)->setBias( (float)bias );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::TonemapDrago>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDrago_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_TonemapDrago_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::TonemapDrago>*) self;
+}
+
+
+//
+// void process(vector_Mat src, vector_Mat dst, Mat times, Mat response)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_process_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_process_10
+ (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_mat_nativeObj, jlong times_nativeObj, jlong response_nativeObj)
+{
+ static const char method_name[] = "photo::process_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> src;
+ Mat& src_mat = *((Mat*)src_mat_nativeObj);
+ Mat_to_vector_Mat( src_mat, src );
+ std::vector<Mat> dst;
+ Mat& dst_mat = *((Mat*)dst_mat_nativeObj);
+ Mat_to_vector_Mat( dst_mat, dst );
+ Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL
+ Mat& times = *((Mat*)times_nativeObj);
+ Mat& response = *((Mat*)response_nativeObj);
+ (*me)->process( src, dst, times, response );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void process(vector_Mat src, vector_Mat dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_process_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_process_11
+ (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_mat_nativeObj)
+{
+ static const char method_name[] = "photo::process_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> src;
+ Mat& src_mat = *((Mat*)src_mat_nativeObj);
+ Mat_to_vector_Mat( src_mat, src );
+ std::vector<Mat> dst;
+ Mat& dst_mat = *((Mat*)dst_mat_nativeObj);
+ Mat_to_vector_Mat( dst_mat, dst );
+ Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL
+ (*me)->process( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Point calculateShift(Mat img0, Mat img1)
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_photo_AlignMTB_calculateShift_10 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_photo_AlignMTB_calculateShift_10
+ (JNIEnv* env, jclass , jlong self, jlong img0_nativeObj, jlong img1_nativeObj)
+{
+ static const char method_name[] = "photo::calculateShift_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL
+ Mat& img0 = *((Mat*)img0_nativeObj);
+ Mat& img1 = *((Mat*)img1_nativeObj);
+ Point _retval_ = (*me)->calculateShift( img0, img1 );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(2); jdouble _tmp_retval_[2] = {_retval_.x, _retval_.y}; env->SetDoubleArrayRegion(_da_retval_, 0, 2, _tmp_retval_);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void shiftMat(Mat src, Mat& dst, Point shift)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_shiftMat_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_shiftMat_10
+ (JNIEnv* env, jclass , jlong self, jlong src_nativeObj, jlong dst_nativeObj, jdouble shift_x, jdouble shift_y)
+{
+ static const char method_name[] = "photo::shiftMat_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Point shift((int)shift_x, (int)shift_y);
+ (*me)->shiftMat( src, dst, shift );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void computeBitmaps(Mat img, Mat& tb, Mat& eb)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_computeBitmaps_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_computeBitmaps_10
+ (JNIEnv* env, jclass , jlong self, jlong img_nativeObj, jlong tb_nativeObj, jlong eb_nativeObj)
+{
+ static const char method_name[] = "photo::computeBitmaps_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL
+ Mat& img = *((Mat*)img_nativeObj);
+ Mat& tb = *((Mat*)tb_nativeObj);
+ Mat& eb = *((Mat*)eb_nativeObj);
+ (*me)->computeBitmaps( img, tb, eb );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getMaxBits()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_photo_AlignMTB_getMaxBits_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_photo_AlignMTB_getMaxBits_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getMaxBits_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getMaxBits( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setMaxBits(int max_bits)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_setMaxBits_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_setMaxBits_10
+ (JNIEnv* env, jclass , jlong self, jint max_bits)
+{
+ static const char method_name[] = "photo::setMaxBits_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL
+ (*me)->setMaxBits( (int)max_bits );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getExcludeRange()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_photo_AlignMTB_getExcludeRange_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_photo_AlignMTB_getExcludeRange_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getExcludeRange_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getExcludeRange( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setExcludeRange(int exclude_range)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_setExcludeRange_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_setExcludeRange_10
+ (JNIEnv* env, jclass , jlong self, jint exclude_range)
+{
+ static const char method_name[] = "photo::setExcludeRange_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL
+ (*me)->setExcludeRange( (int)exclude_range );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool getCut()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_photo_AlignMTB_getCut_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_photo_AlignMTB_getCut_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getCut_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL
+ bool _retval_ = (*me)->getCut( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setCut(bool value)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_setCut_10 (JNIEnv*, jclass, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_setCut_10
+ (JNIEnv* env, jclass , jlong self, jboolean value)
+{
+ static const char method_name[] = "photo::setCut_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::AlignMTB>* me = (Ptr<cv::AlignMTB>*) self; //TODO: check for NULL
+ (*me)->setCut( (bool)value );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::AlignMTB>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_AlignMTB_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::AlignMTB>*) self;
+}
+
+
+//
+// void process(vector_Mat src, Mat& dst, Mat times, Mat response)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeDebevec_process_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeDebevec_process_10
+ (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_nativeObj, jlong times_nativeObj, jlong response_nativeObj)
+{
+ static const char method_name[] = "photo::process_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> src;
+ Mat& src_mat = *((Mat*)src_mat_nativeObj);
+ Mat_to_vector_Mat( src_mat, src );
+ Ptr<cv::MergeDebevec>* me = (Ptr<cv::MergeDebevec>*) self; //TODO: check for NULL
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& times = *((Mat*)times_nativeObj);
+ Mat& response = *((Mat*)response_nativeObj);
+ (*me)->process( src, dst, times, response );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void process(vector_Mat src, Mat& dst, Mat times)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeDebevec_process_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeDebevec_process_11
+ (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_nativeObj, jlong times_nativeObj)
+{
+ static const char method_name[] = "photo::process_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> src;
+ Mat& src_mat = *((Mat*)src_mat_nativeObj);
+ Mat_to_vector_Mat( src_mat, src );
+ Ptr<cv::MergeDebevec>* me = (Ptr<cv::MergeDebevec>*) self; //TODO: check for NULL
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& times = *((Mat*)times_nativeObj);
+ (*me)->process( src, dst, times );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::MergeDebevec>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeDebevec_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeDebevec_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::MergeDebevec>*) self;
+}
+
+
+//
+// void process(vector_Mat src, Mat& dst, Mat times, Mat response)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_process_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_process_10
+ (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_nativeObj, jlong times_nativeObj, jlong response_nativeObj)
+{
+ static const char method_name[] = "photo::process_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> src;
+ Mat& src_mat = *((Mat*)src_mat_nativeObj);
+ Mat_to_vector_Mat( src_mat, src );
+ Ptr<cv::MergeMertens>* me = (Ptr<cv::MergeMertens>*) self; //TODO: check for NULL
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& times = *((Mat*)times_nativeObj);
+ Mat& response = *((Mat*)response_nativeObj);
+ (*me)->process( src, dst, times, response );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void process(vector_Mat src, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_process_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_process_11
+ (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "photo::process_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> src;
+ Mat& src_mat = *((Mat*)src_mat_nativeObj);
+ Mat_to_vector_Mat( src_mat, src );
+ Ptr<cv::MergeMertens>* me = (Ptr<cv::MergeMertens>*) self; //TODO: check for NULL
+ Mat& dst = *((Mat*)dst_nativeObj);
+ (*me)->process( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// float getContrastWeight()
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_MergeMertens_getContrastWeight_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_MergeMertens_getContrastWeight_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getContrastWeight_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::MergeMertens>* me = (Ptr<cv::MergeMertens>*) self; //TODO: check for NULL
+ float _retval_ = (*me)->getContrastWeight( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setContrastWeight(float contrast_weiht)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_setContrastWeight_10 (JNIEnv*, jclass, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_setContrastWeight_10
+ (JNIEnv* env, jclass , jlong self, jfloat contrast_weiht)
+{
+ static const char method_name[] = "photo::setContrastWeight_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::MergeMertens>* me = (Ptr<cv::MergeMertens>*) self; //TODO: check for NULL
+ (*me)->setContrastWeight( (float)contrast_weiht );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// float getSaturationWeight()
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_MergeMertens_getSaturationWeight_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_MergeMertens_getSaturationWeight_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getSaturationWeight_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::MergeMertens>* me = (Ptr<cv::MergeMertens>*) self; //TODO: check for NULL
+ float _retval_ = (*me)->getSaturationWeight( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setSaturationWeight(float saturation_weight)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_setSaturationWeight_10 (JNIEnv*, jclass, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_setSaturationWeight_10
+ (JNIEnv* env, jclass , jlong self, jfloat saturation_weight)
+{
+ static const char method_name[] = "photo::setSaturationWeight_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::MergeMertens>* me = (Ptr<cv::MergeMertens>*) self; //TODO: check for NULL
+ (*me)->setSaturationWeight( (float)saturation_weight );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// float getExposureWeight()
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_MergeMertens_getExposureWeight_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_MergeMertens_getExposureWeight_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getExposureWeight_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::MergeMertens>* me = (Ptr<cv::MergeMertens>*) self; //TODO: check for NULL
+ float _retval_ = (*me)->getExposureWeight( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setExposureWeight(float exposure_weight)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_setExposureWeight_10 (JNIEnv*, jclass, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_setExposureWeight_10
+ (JNIEnv* env, jclass , jlong self, jfloat exposure_weight)
+{
+ static const char method_name[] = "photo::setExposureWeight_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::MergeMertens>* me = (Ptr<cv::MergeMertens>*) self; //TODO: check for NULL
+ (*me)->setExposureWeight( (float)exposure_weight );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::MergeMertens>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeMertens_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::MergeMertens>*) self;
+}
+
+
+//
+// void process(vector_Mat src, Mat& dst, Mat times, Mat response)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeExposures_process_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeExposures_process_10
+ (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_nativeObj, jlong times_nativeObj, jlong response_nativeObj)
+{
+ static const char method_name[] = "photo::process_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> src;
+ Mat& src_mat = *((Mat*)src_mat_nativeObj);
+ Mat_to_vector_Mat( src_mat, src );
+ Ptr<cv::MergeExposures>* me = (Ptr<cv::MergeExposures>*) self; //TODO: check for NULL
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& times = *((Mat*)times_nativeObj);
+ Mat& response = *((Mat*)response_nativeObj);
+ (*me)->process( src, dst, times, response );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::MergeExposures>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeExposures_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeExposures_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::MergeExposures>*) self;
+}
+
+
+//
+// void process(vector_Mat src, Mat& dst, Mat times, Mat response)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeRobertson_process_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeRobertson_process_10
+ (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_nativeObj, jlong times_nativeObj, jlong response_nativeObj)
+{
+ static const char method_name[] = "photo::process_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> src;
+ Mat& src_mat = *((Mat*)src_mat_nativeObj);
+ Mat_to_vector_Mat( src_mat, src );
+ Ptr<cv::MergeRobertson>* me = (Ptr<cv::MergeRobertson>*) self; //TODO: check for NULL
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& times = *((Mat*)times_nativeObj);
+ Mat& response = *((Mat*)response_nativeObj);
+ (*me)->process( src, dst, times, response );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void process(vector_Mat src, Mat& dst, Mat times)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeRobertson_process_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeRobertson_process_11
+ (JNIEnv* env, jclass , jlong self, jlong src_mat_nativeObj, jlong dst_nativeObj, jlong times_nativeObj)
+{
+ static const char method_name[] = "photo::process_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> src;
+ Mat& src_mat = *((Mat*)src_mat_nativeObj);
+ Mat_to_vector_Mat( src_mat, src );
+ Ptr<cv::MergeRobertson>* me = (Ptr<cv::MergeRobertson>*) self; //TODO: check for NULL
+ Mat& dst = *((Mat*)dst_nativeObj);
+ Mat& times = *((Mat*)times_nativeObj);
+ (*me)->process( src, dst, times );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::MergeRobertson>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeRobertson_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_MergeRobertson_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::MergeRobertson>*) self;
+}
+
+
+//
+// void process(Mat src, Mat& dst)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Tonemap_process_10 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Tonemap_process_10
+ (JNIEnv* env, jclass , jlong self, jlong src_nativeObj, jlong dst_nativeObj)
+{
+ static const char method_name[] = "photo::process_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::Tonemap>* me = (Ptr<cv::Tonemap>*) self; //TODO: check for NULL
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ (*me)->process( src, dst );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// float getGamma()
+//
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_Tonemap_getGamma_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jfloat JNICALL Java_org_opencv_photo_Tonemap_getGamma_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "photo::getGamma_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::Tonemap>* me = (Ptr<cv::Tonemap>*) self; //TODO: check for NULL
+ float _retval_ = (*me)->getGamma( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setGamma(float gamma)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Tonemap_setGamma_10 (JNIEnv*, jclass, jlong, jfloat);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Tonemap_setGamma_10
+ (JNIEnv* env, jclass , jlong self, jfloat gamma)
+{
+ static const char method_name[] = "photo::setGamma_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::Tonemap>* me = (Ptr<cv::Tonemap>*) self; //TODO: check for NULL
+ (*me)->setGamma( (float)gamma );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::Tonemap>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_photo_Tonemap_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_photo_Tonemap_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::Tonemap>*) self;
+}
+
+
+
+} // extern "C"
+
+#endif // HAVE_OPENCV_PHOTO
diff --git a/modules/java/src/video+BackgroundSubtractor.java b/modules/java/src/video+BackgroundSubtractor.java
new file mode 100644
index 0000000..5645f1d
--- /dev/null
+++ b/modules/java/src/video+BackgroundSubtractor.java
@@ -0,0 +1,71 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.video;
+
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+
+// C++: class BackgroundSubtractor
+//javadoc: BackgroundSubtractor
+public class BackgroundSubtractor extends Algorithm {
+
+ protected BackgroundSubtractor(long addr) { super(addr); }
+
+
+ //
+ // C++: void getBackgroundImage(Mat& backgroundImage)
+ //
+
+ //javadoc: BackgroundSubtractor::getBackgroundImage(backgroundImage)
+ public void getBackgroundImage(Mat backgroundImage)
+ {
+
+ getBackgroundImage_0(nativeObj, backgroundImage.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void apply(Mat image, Mat& fgmask, double learningRate = -1)
+ //
+
+ //javadoc: BackgroundSubtractor::apply(image, fgmask, learningRate)
+ public void apply(Mat image, Mat fgmask, double learningRate)
+ {
+
+ apply_0(nativeObj, image.nativeObj, fgmask.nativeObj, learningRate);
+
+ return;
+ }
+
+ //javadoc: BackgroundSubtractor::apply(image, fgmask)
+ public void apply(Mat image, Mat fgmask)
+ {
+
+ apply_1(nativeObj, image.nativeObj, fgmask.nativeObj);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void getBackgroundImage(Mat& backgroundImage)
+ private static native void getBackgroundImage_0(long nativeObj, long backgroundImage_nativeObj);
+
+ // C++: void apply(Mat image, Mat& fgmask, double learningRate = -1)
+ private static native void apply_0(long nativeObj, long image_nativeObj, long fgmask_nativeObj, double learningRate);
+ private static native void apply_1(long nativeObj, long image_nativeObj, long fgmask_nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/video+BackgroundSubtractorKNN.java b/modules/java/src/video+BackgroundSubtractorKNN.java
new file mode 100644
index 0000000..ec471ea
--- /dev/null
+++ b/modules/java/src/video+BackgroundSubtractorKNN.java
@@ -0,0 +1,264 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.video;
+
+
+
+// C++: class BackgroundSubtractorKNN
+//javadoc: BackgroundSubtractorKNN
+public class BackgroundSubtractorKNN extends BackgroundSubtractor {
+
+ protected BackgroundSubtractorKNN(long addr) { super(addr); }
+
+
+ //
+ // C++: int getHistory()
+ //
+
+ //javadoc: BackgroundSubtractorKNN::getHistory()
+ public int getHistory()
+ {
+
+ int retVal = getHistory_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setHistory(int history)
+ //
+
+ //javadoc: BackgroundSubtractorKNN::setHistory(history)
+ public void setHistory(int history)
+ {
+
+ setHistory_0(nativeObj, history);
+
+ return;
+ }
+
+
+ //
+ // C++: int getNSamples()
+ //
+
+ //javadoc: BackgroundSubtractorKNN::getNSamples()
+ public int getNSamples()
+ {
+
+ int retVal = getNSamples_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setNSamples(int _nN)
+ //
+
+ //javadoc: BackgroundSubtractorKNN::setNSamples(_nN)
+ public void setNSamples(int _nN)
+ {
+
+ setNSamples_0(nativeObj, _nN);
+
+ return;
+ }
+
+
+ //
+ // C++: double getDist2Threshold()
+ //
+
+ //javadoc: BackgroundSubtractorKNN::getDist2Threshold()
+ public double getDist2Threshold()
+ {
+
+ double retVal = getDist2Threshold_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setDist2Threshold(double _dist2Threshold)
+ //
+
+ //javadoc: BackgroundSubtractorKNN::setDist2Threshold(_dist2Threshold)
+ public void setDist2Threshold(double _dist2Threshold)
+ {
+
+ setDist2Threshold_0(nativeObj, _dist2Threshold);
+
+ return;
+ }
+
+
+ //
+ // C++: int getkNNSamples()
+ //
+
+ //javadoc: BackgroundSubtractorKNN::getkNNSamples()
+ public int getkNNSamples()
+ {
+
+ int retVal = getkNNSamples_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setkNNSamples(int _nkNN)
+ //
+
+ //javadoc: BackgroundSubtractorKNN::setkNNSamples(_nkNN)
+ public void setkNNSamples(int _nkNN)
+ {
+
+ setkNNSamples_0(nativeObj, _nkNN);
+
+ return;
+ }
+
+
+ //
+ // C++: bool getDetectShadows()
+ //
+
+ //javadoc: BackgroundSubtractorKNN::getDetectShadows()
+ public boolean getDetectShadows()
+ {
+
+ boolean retVal = getDetectShadows_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setDetectShadows(bool detectShadows)
+ //
+
+ //javadoc: BackgroundSubtractorKNN::setDetectShadows(detectShadows)
+ public void setDetectShadows(boolean detectShadows)
+ {
+
+ setDetectShadows_0(nativeObj, detectShadows);
+
+ return;
+ }
+
+
+ //
+ // C++: int getShadowValue()
+ //
+
+ //javadoc: BackgroundSubtractorKNN::getShadowValue()
+ public int getShadowValue()
+ {
+
+ int retVal = getShadowValue_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setShadowValue(int value)
+ //
+
+ //javadoc: BackgroundSubtractorKNN::setShadowValue(value)
+ public void setShadowValue(int value)
+ {
+
+ setShadowValue_0(nativeObj, value);
+
+ return;
+ }
+
+
+ //
+ // C++: double getShadowThreshold()
+ //
+
+ //javadoc: BackgroundSubtractorKNN::getShadowThreshold()
+ public double getShadowThreshold()
+ {
+
+ double retVal = getShadowThreshold_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setShadowThreshold(double threshold)
+ //
+
+ //javadoc: BackgroundSubtractorKNN::setShadowThreshold(threshold)
+ public void setShadowThreshold(double threshold)
+ {
+
+ setShadowThreshold_0(nativeObj, threshold);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: int getHistory()
+ private static native int getHistory_0(long nativeObj);
+
+ // C++: void setHistory(int history)
+ private static native void setHistory_0(long nativeObj, int history);
+
+ // C++: int getNSamples()
+ private static native int getNSamples_0(long nativeObj);
+
+ // C++: void setNSamples(int _nN)
+ private static native void setNSamples_0(long nativeObj, int _nN);
+
+ // C++: double getDist2Threshold()
+ private static native double getDist2Threshold_0(long nativeObj);
+
+ // C++: void setDist2Threshold(double _dist2Threshold)
+ private static native void setDist2Threshold_0(long nativeObj, double _dist2Threshold);
+
+ // C++: int getkNNSamples()
+ private static native int getkNNSamples_0(long nativeObj);
+
+ // C++: void setkNNSamples(int _nkNN)
+ private static native void setkNNSamples_0(long nativeObj, int _nkNN);
+
+ // C++: bool getDetectShadows()
+ private static native boolean getDetectShadows_0(long nativeObj);
+
+ // C++: void setDetectShadows(bool detectShadows)
+ private static native void setDetectShadows_0(long nativeObj, boolean detectShadows);
+
+ // C++: int getShadowValue()
+ private static native int getShadowValue_0(long nativeObj);
+
+ // C++: void setShadowValue(int value)
+ private static native void setShadowValue_0(long nativeObj, int value);
+
+ // C++: double getShadowThreshold()
+ private static native double getShadowThreshold_0(long nativeObj);
+
+ // C++: void setShadowThreshold(double threshold)
+ private static native void setShadowThreshold_0(long nativeObj, double threshold);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/video+BackgroundSubtractorMOG2.java b/modules/java/src/video+BackgroundSubtractorMOG2.java
new file mode 100644
index 0000000..ce9e7a9
--- /dev/null
+++ b/modules/java/src/video+BackgroundSubtractorMOG2.java
@@ -0,0 +1,434 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.video;
+
+
+
+// C++: class BackgroundSubtractorMOG2
+//javadoc: BackgroundSubtractorMOG2
+public class BackgroundSubtractorMOG2 extends BackgroundSubtractor {
+
+ protected BackgroundSubtractorMOG2(long addr) { super(addr); }
+
+
+ //
+ // C++: double getVarThreshold()
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::getVarThreshold()
+ public double getVarThreshold()
+ {
+
+ double retVal = getVarThreshold_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setVarThreshold(double varThreshold)
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::setVarThreshold(varThreshold)
+ public void setVarThreshold(double varThreshold)
+ {
+
+ setVarThreshold_0(nativeObj, varThreshold);
+
+ return;
+ }
+
+
+ //
+ // C++: double getVarThresholdGen()
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::getVarThresholdGen()
+ public double getVarThresholdGen()
+ {
+
+ double retVal = getVarThresholdGen_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setVarThresholdGen(double varThresholdGen)
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::setVarThresholdGen(varThresholdGen)
+ public void setVarThresholdGen(double varThresholdGen)
+ {
+
+ setVarThresholdGen_0(nativeObj, varThresholdGen);
+
+ return;
+ }
+
+
+ //
+ // C++: double getVarInit()
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::getVarInit()
+ public double getVarInit()
+ {
+
+ double retVal = getVarInit_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setVarInit(double varInit)
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::setVarInit(varInit)
+ public void setVarInit(double varInit)
+ {
+
+ setVarInit_0(nativeObj, varInit);
+
+ return;
+ }
+
+
+ //
+ // C++: double getVarMin()
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::getVarMin()
+ public double getVarMin()
+ {
+
+ double retVal = getVarMin_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setVarMin(double varMin)
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::setVarMin(varMin)
+ public void setVarMin(double varMin)
+ {
+
+ setVarMin_0(nativeObj, varMin);
+
+ return;
+ }
+
+
+ //
+ // C++: double getVarMax()
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::getVarMax()
+ public double getVarMax()
+ {
+
+ double retVal = getVarMax_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setVarMax(double varMax)
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::setVarMax(varMax)
+ public void setVarMax(double varMax)
+ {
+
+ setVarMax_0(nativeObj, varMax);
+
+ return;
+ }
+
+
+ //
+ // C++: double getComplexityReductionThreshold()
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::getComplexityReductionThreshold()
+ public double getComplexityReductionThreshold()
+ {
+
+ double retVal = getComplexityReductionThreshold_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setComplexityReductionThreshold(double ct)
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::setComplexityReductionThreshold(ct)
+ public void setComplexityReductionThreshold(double ct)
+ {
+
+ setComplexityReductionThreshold_0(nativeObj, ct);
+
+ return;
+ }
+
+
+ //
+ // C++: bool getDetectShadows()
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::getDetectShadows()
+ public boolean getDetectShadows()
+ {
+
+ boolean retVal = getDetectShadows_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setDetectShadows(bool detectShadows)
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::setDetectShadows(detectShadows)
+ public void setDetectShadows(boolean detectShadows)
+ {
+
+ setDetectShadows_0(nativeObj, detectShadows);
+
+ return;
+ }
+
+
+ //
+ // C++: int getShadowValue()
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::getShadowValue()
+ public int getShadowValue()
+ {
+
+ int retVal = getShadowValue_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setShadowValue(int value)
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::setShadowValue(value)
+ public void setShadowValue(int value)
+ {
+
+ setShadowValue_0(nativeObj, value);
+
+ return;
+ }
+
+
+ //
+ // C++: double getShadowThreshold()
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::getShadowThreshold()
+ public double getShadowThreshold()
+ {
+
+ double retVal = getShadowThreshold_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setShadowThreshold(double threshold)
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::setShadowThreshold(threshold)
+ public void setShadowThreshold(double threshold)
+ {
+
+ setShadowThreshold_0(nativeObj, threshold);
+
+ return;
+ }
+
+
+ //
+ // C++: int getHistory()
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::getHistory()
+ public int getHistory()
+ {
+
+ int retVal = getHistory_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setHistory(int history)
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::setHistory(history)
+ public void setHistory(int history)
+ {
+
+ setHistory_0(nativeObj, history);
+
+ return;
+ }
+
+
+ //
+ // C++: int getNMixtures()
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::getNMixtures()
+ public int getNMixtures()
+ {
+
+ int retVal = getNMixtures_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setNMixtures(int nmixtures)
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::setNMixtures(nmixtures)
+ public void setNMixtures(int nmixtures)
+ {
+
+ setNMixtures_0(nativeObj, nmixtures);
+
+ return;
+ }
+
+
+ //
+ // C++: double getBackgroundRatio()
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::getBackgroundRatio()
+ public double getBackgroundRatio()
+ {
+
+ double retVal = getBackgroundRatio_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setBackgroundRatio(double ratio)
+ //
+
+ //javadoc: BackgroundSubtractorMOG2::setBackgroundRatio(ratio)
+ public void setBackgroundRatio(double ratio)
+ {
+
+ setBackgroundRatio_0(nativeObj, ratio);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: double getVarThreshold()
+ private static native double getVarThreshold_0(long nativeObj);
+
+ // C++: void setVarThreshold(double varThreshold)
+ private static native void setVarThreshold_0(long nativeObj, double varThreshold);
+
+ // C++: double getVarThresholdGen()
+ private static native double getVarThresholdGen_0(long nativeObj);
+
+ // C++: void setVarThresholdGen(double varThresholdGen)
+ private static native void setVarThresholdGen_0(long nativeObj, double varThresholdGen);
+
+ // C++: double getVarInit()
+ private static native double getVarInit_0(long nativeObj);
+
+ // C++: void setVarInit(double varInit)
+ private static native void setVarInit_0(long nativeObj, double varInit);
+
+ // C++: double getVarMin()
+ private static native double getVarMin_0(long nativeObj);
+
+ // C++: void setVarMin(double varMin)
+ private static native void setVarMin_0(long nativeObj, double varMin);
+
+ // C++: double getVarMax()
+ private static native double getVarMax_0(long nativeObj);
+
+ // C++: void setVarMax(double varMax)
+ private static native void setVarMax_0(long nativeObj, double varMax);
+
+ // C++: double getComplexityReductionThreshold()
+ private static native double getComplexityReductionThreshold_0(long nativeObj);
+
+ // C++: void setComplexityReductionThreshold(double ct)
+ private static native void setComplexityReductionThreshold_0(long nativeObj, double ct);
+
+ // C++: bool getDetectShadows()
+ private static native boolean getDetectShadows_0(long nativeObj);
+
+ // C++: void setDetectShadows(bool detectShadows)
+ private static native void setDetectShadows_0(long nativeObj, boolean detectShadows);
+
+ // C++: int getShadowValue()
+ private static native int getShadowValue_0(long nativeObj);
+
+ // C++: void setShadowValue(int value)
+ private static native void setShadowValue_0(long nativeObj, int value);
+
+ // C++: double getShadowThreshold()
+ private static native double getShadowThreshold_0(long nativeObj);
+
+ // C++: void setShadowThreshold(double threshold)
+ private static native void setShadowThreshold_0(long nativeObj, double threshold);
+
+ // C++: int getHistory()
+ private static native int getHistory_0(long nativeObj);
+
+ // C++: void setHistory(int history)
+ private static native void setHistory_0(long nativeObj, int history);
+
+ // C++: int getNMixtures()
+ private static native int getNMixtures_0(long nativeObj);
+
+ // C++: void setNMixtures(int nmixtures)
+ private static native void setNMixtures_0(long nativeObj, int nmixtures);
+
+ // C++: double getBackgroundRatio()
+ private static native double getBackgroundRatio_0(long nativeObj);
+
+ // C++: void setBackgroundRatio(double ratio)
+ private static native void setBackgroundRatio_0(long nativeObj, double ratio);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/video+DenseOpticalFlow.java b/modules/java/src/video+DenseOpticalFlow.java
new file mode 100644
index 0000000..7639671
--- /dev/null
+++ b/modules/java/src/video+DenseOpticalFlow.java
@@ -0,0 +1,61 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.video;
+
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+
+// C++: class DenseOpticalFlow
+//javadoc: DenseOpticalFlow
+public class DenseOpticalFlow extends Algorithm {
+
+ protected DenseOpticalFlow(long addr) { super(addr); }
+
+
+ //
+ // C++: void calc(Mat I0, Mat I1, Mat& flow)
+ //
+
+ //javadoc: DenseOpticalFlow::calc(I0, I1, flow)
+ public void calc(Mat I0, Mat I1, Mat flow)
+ {
+
+ calc_0(nativeObj, I0.nativeObj, I1.nativeObj, flow.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void collectGarbage()
+ //
+
+ //javadoc: DenseOpticalFlow::collectGarbage()
+ public void collectGarbage()
+ {
+
+ collectGarbage_0(nativeObj);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void calc(Mat I0, Mat I1, Mat& flow)
+ private static native void calc_0(long nativeObj, long I0_nativeObj, long I1_nativeObj, long flow_nativeObj);
+
+ // C++: void collectGarbage()
+ private static native void collectGarbage_0(long nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/video+DualTVL1OpticalFlow.java b/modules/java/src/video+DualTVL1OpticalFlow.java
new file mode 100644
index 0000000..f5b0e7c
--- /dev/null
+++ b/modules/java/src/video+DualTVL1OpticalFlow.java
@@ -0,0 +1,26 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.video;
+
+
+
+// C++: class DualTVL1OpticalFlow
+//javadoc: DualTVL1OpticalFlow
+public class DualTVL1OpticalFlow extends DenseOpticalFlow {
+
+ protected DualTVL1OpticalFlow(long addr) { super(addr); }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/video+KalmanFilter.java b/modules/java/src/video+KalmanFilter.java
new file mode 100644
index 0000000..272eb08
--- /dev/null
+++ b/modules/java/src/video+KalmanFilter.java
@@ -0,0 +1,455 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.video;
+
+import org.opencv.core.Mat;
+
+// C++: class KalmanFilter
+//javadoc: KalmanFilter
+public class KalmanFilter {
+
+ protected final long nativeObj;
+ protected KalmanFilter(long addr) { nativeObj = addr; }
+
+
+ //
+ // C++: KalmanFilter()
+ //
+
+ //javadoc: KalmanFilter::KalmanFilter()
+ public KalmanFilter()
+ {
+
+ nativeObj = KalmanFilter_0();
+
+ return;
+ }
+
+
+ //
+ // C++: KalmanFilter(int dynamParams, int measureParams, int controlParams = 0, int type = CV_32F)
+ //
+
+ //javadoc: KalmanFilter::KalmanFilter(dynamParams, measureParams, controlParams, type)
+ public KalmanFilter(int dynamParams, int measureParams, int controlParams, int type)
+ {
+
+ nativeObj = KalmanFilter_1(dynamParams, measureParams, controlParams, type);
+
+ return;
+ }
+
+ //javadoc: KalmanFilter::KalmanFilter(dynamParams, measureParams)
+ public KalmanFilter(int dynamParams, int measureParams)
+ {
+
+ nativeObj = KalmanFilter_2(dynamParams, measureParams);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat predict(Mat control = Mat())
+ //
+
+ //javadoc: KalmanFilter::predict(control)
+ public Mat predict(Mat control)
+ {
+
+ Mat retVal = new Mat(predict_0(nativeObj, control.nativeObj));
+
+ return retVal;
+ }
+
+ //javadoc: KalmanFilter::predict()
+ public Mat predict()
+ {
+
+ Mat retVal = new Mat(predict_1(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat correct(Mat measurement)
+ //
+
+ //javadoc: KalmanFilter::correct(measurement)
+ public Mat correct(Mat measurement)
+ {
+
+ Mat retVal = new Mat(correct_0(nativeObj, measurement.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat KalmanFilter::statePre
+ //
+
+ //javadoc: KalmanFilter::get_statePre()
+ public Mat get_statePre()
+ {
+
+ Mat retVal = new Mat(get_statePre_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void KalmanFilter::statePre
+ //
+
+ //javadoc: KalmanFilter::set_statePre(statePre)
+ public void set_statePre(Mat statePre)
+ {
+
+ set_statePre_0(nativeObj, statePre.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat KalmanFilter::statePost
+ //
+
+ //javadoc: KalmanFilter::get_statePost()
+ public Mat get_statePost()
+ {
+
+ Mat retVal = new Mat(get_statePost_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void KalmanFilter::statePost
+ //
+
+ //javadoc: KalmanFilter::set_statePost(statePost)
+ public void set_statePost(Mat statePost)
+ {
+
+ set_statePost_0(nativeObj, statePost.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat KalmanFilter::transitionMatrix
+ //
+
+ //javadoc: KalmanFilter::get_transitionMatrix()
+ public Mat get_transitionMatrix()
+ {
+
+ Mat retVal = new Mat(get_transitionMatrix_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void KalmanFilter::transitionMatrix
+ //
+
+ //javadoc: KalmanFilter::set_transitionMatrix(transitionMatrix)
+ public void set_transitionMatrix(Mat transitionMatrix)
+ {
+
+ set_transitionMatrix_0(nativeObj, transitionMatrix.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat KalmanFilter::controlMatrix
+ //
+
+ //javadoc: KalmanFilter::get_controlMatrix()
+ public Mat get_controlMatrix()
+ {
+
+ Mat retVal = new Mat(get_controlMatrix_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void KalmanFilter::controlMatrix
+ //
+
+ //javadoc: KalmanFilter::set_controlMatrix(controlMatrix)
+ public void set_controlMatrix(Mat controlMatrix)
+ {
+
+ set_controlMatrix_0(nativeObj, controlMatrix.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat KalmanFilter::measurementMatrix
+ //
+
+ //javadoc: KalmanFilter::get_measurementMatrix()
+ public Mat get_measurementMatrix()
+ {
+
+ Mat retVal = new Mat(get_measurementMatrix_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void KalmanFilter::measurementMatrix
+ //
+
+ //javadoc: KalmanFilter::set_measurementMatrix(measurementMatrix)
+ public void set_measurementMatrix(Mat measurementMatrix)
+ {
+
+ set_measurementMatrix_0(nativeObj, measurementMatrix.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat KalmanFilter::processNoiseCov
+ //
+
+ //javadoc: KalmanFilter::get_processNoiseCov()
+ public Mat get_processNoiseCov()
+ {
+
+ Mat retVal = new Mat(get_processNoiseCov_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void KalmanFilter::processNoiseCov
+ //
+
+ //javadoc: KalmanFilter::set_processNoiseCov(processNoiseCov)
+ public void set_processNoiseCov(Mat processNoiseCov)
+ {
+
+ set_processNoiseCov_0(nativeObj, processNoiseCov.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat KalmanFilter::measurementNoiseCov
+ //
+
+ //javadoc: KalmanFilter::get_measurementNoiseCov()
+ public Mat get_measurementNoiseCov()
+ {
+
+ Mat retVal = new Mat(get_measurementNoiseCov_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void KalmanFilter::measurementNoiseCov
+ //
+
+ //javadoc: KalmanFilter::set_measurementNoiseCov(measurementNoiseCov)
+ public void set_measurementNoiseCov(Mat measurementNoiseCov)
+ {
+
+ set_measurementNoiseCov_0(nativeObj, measurementNoiseCov.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat KalmanFilter::errorCovPre
+ //
+
+ //javadoc: KalmanFilter::get_errorCovPre()
+ public Mat get_errorCovPre()
+ {
+
+ Mat retVal = new Mat(get_errorCovPre_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void KalmanFilter::errorCovPre
+ //
+
+ //javadoc: KalmanFilter::set_errorCovPre(errorCovPre)
+ public void set_errorCovPre(Mat errorCovPre)
+ {
+
+ set_errorCovPre_0(nativeObj, errorCovPre.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat KalmanFilter::gain
+ //
+
+ //javadoc: KalmanFilter::get_gain()
+ public Mat get_gain()
+ {
+
+ Mat retVal = new Mat(get_gain_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void KalmanFilter::gain
+ //
+
+ //javadoc: KalmanFilter::set_gain(gain)
+ public void set_gain(Mat gain)
+ {
+
+ set_gain_0(nativeObj, gain.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat KalmanFilter::errorCovPost
+ //
+
+ //javadoc: KalmanFilter::get_errorCovPost()
+ public Mat get_errorCovPost()
+ {
+
+ Mat retVal = new Mat(get_errorCovPost_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void KalmanFilter::errorCovPost
+ //
+
+ //javadoc: KalmanFilter::set_errorCovPost(errorCovPost)
+ public void set_errorCovPost(Mat errorCovPost)
+ {
+
+ set_errorCovPost_0(nativeObj, errorCovPost.nativeObj);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: KalmanFilter()
+ private static native long KalmanFilter_0();
+
+ // C++: KalmanFilter(int dynamParams, int measureParams, int controlParams = 0, int type = CV_32F)
+ private static native long KalmanFilter_1(int dynamParams, int measureParams, int controlParams, int type);
+ private static native long KalmanFilter_2(int dynamParams, int measureParams);
+
+ // C++: Mat predict(Mat control = Mat())
+ private static native long predict_0(long nativeObj, long control_nativeObj);
+ private static native long predict_1(long nativeObj);
+
+ // C++: Mat correct(Mat measurement)
+ private static native long correct_0(long nativeObj, long measurement_nativeObj);
+
+ // C++: Mat KalmanFilter::statePre
+ private static native long get_statePre_0(long nativeObj);
+
+ // C++: void KalmanFilter::statePre
+ private static native void set_statePre_0(long nativeObj, long statePre_nativeObj);
+
+ // C++: Mat KalmanFilter::statePost
+ private static native long get_statePost_0(long nativeObj);
+
+ // C++: void KalmanFilter::statePost
+ private static native void set_statePost_0(long nativeObj, long statePost_nativeObj);
+
+ // C++: Mat KalmanFilter::transitionMatrix
+ private static native long get_transitionMatrix_0(long nativeObj);
+
+ // C++: void KalmanFilter::transitionMatrix
+ private static native void set_transitionMatrix_0(long nativeObj, long transitionMatrix_nativeObj);
+
+ // C++: Mat KalmanFilter::controlMatrix
+ private static native long get_controlMatrix_0(long nativeObj);
+
+ // C++: void KalmanFilter::controlMatrix
+ private static native void set_controlMatrix_0(long nativeObj, long controlMatrix_nativeObj);
+
+ // C++: Mat KalmanFilter::measurementMatrix
+ private static native long get_measurementMatrix_0(long nativeObj);
+
+ // C++: void KalmanFilter::measurementMatrix
+ private static native void set_measurementMatrix_0(long nativeObj, long measurementMatrix_nativeObj);
+
+ // C++: Mat KalmanFilter::processNoiseCov
+ private static native long get_processNoiseCov_0(long nativeObj);
+
+ // C++: void KalmanFilter::processNoiseCov
+ private static native void set_processNoiseCov_0(long nativeObj, long processNoiseCov_nativeObj);
+
+ // C++: Mat KalmanFilter::measurementNoiseCov
+ private static native long get_measurementNoiseCov_0(long nativeObj);
+
+ // C++: void KalmanFilter::measurementNoiseCov
+ private static native void set_measurementNoiseCov_0(long nativeObj, long measurementNoiseCov_nativeObj);
+
+ // C++: Mat KalmanFilter::errorCovPre
+ private static native long get_errorCovPre_0(long nativeObj);
+
+ // C++: void KalmanFilter::errorCovPre
+ private static native void set_errorCovPre_0(long nativeObj, long errorCovPre_nativeObj);
+
+ // C++: Mat KalmanFilter::gain
+ private static native long get_gain_0(long nativeObj);
+
+ // C++: void KalmanFilter::gain
+ private static native void set_gain_0(long nativeObj, long gain_nativeObj);
+
+ // C++: Mat KalmanFilter::errorCovPost
+ private static native long get_errorCovPost_0(long nativeObj);
+
+ // C++: void KalmanFilter::errorCovPost
+ private static native void set_errorCovPost_0(long nativeObj, long errorCovPost_nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/video+Video.java b/modules/java/src/video+Video.java
new file mode 100644
index 0000000..2617f0a
--- /dev/null
+++ b/modules/java/src/video+Video.java
@@ -0,0 +1,289 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.video;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfByte;
+import org.opencv.core.MatOfFloat;
+import org.opencv.core.MatOfPoint2f;
+import org.opencv.core.Rect;
+import org.opencv.core.RotatedRect;
+import org.opencv.core.Size;
+import org.opencv.core.TermCriteria;
+import org.opencv.utils.Converters;
+
+public class Video {
+
+ private static final int
+ CV_LKFLOW_INITIAL_GUESSES = 4,
+ CV_LKFLOW_GET_MIN_EIGENVALS = 8;
+
+
+ public static final int
+ OPTFLOW_USE_INITIAL_FLOW = 4,
+ OPTFLOW_LK_GET_MIN_EIGENVALS = 8,
+ OPTFLOW_FARNEBACK_GAUSSIAN = 256,
+ MOTION_TRANSLATION = 0,
+ MOTION_EUCLIDEAN = 1,
+ MOTION_AFFINE = 2,
+ MOTION_HOMOGRAPHY = 3;
+
+
+ //
+ // C++: RotatedRect CamShift(Mat probImage, Rect& window, TermCriteria criteria)
+ //
+
+ //javadoc: CamShift(probImage, window, criteria)
+ public static RotatedRect CamShift(Mat probImage, Rect window, TermCriteria criteria)
+ {
+ double[] window_out = new double[4];
+ RotatedRect retVal = new RotatedRect(CamShift_0(probImage.nativeObj, window.x, window.y, window.width, window.height, window_out, criteria.type, criteria.maxCount, criteria.epsilon));
+ if(window!=null){ window.x = (int)window_out[0]; window.y = (int)window_out[1]; window.width = (int)window_out[2]; window.height = (int)window_out[3]; }
+ return retVal;
+ }
+
+
+ //
+ // C++: int meanShift(Mat probImage, Rect& window, TermCriteria criteria)
+ //
+
+ //javadoc: meanShift(probImage, window, criteria)
+ public static int meanShift(Mat probImage, Rect window, TermCriteria criteria)
+ {
+ double[] window_out = new double[4];
+ int retVal = meanShift_0(probImage.nativeObj, window.x, window.y, window.width, window.height, window_out, criteria.type, criteria.maxCount, criteria.epsilon);
+ if(window!=null){ window.x = (int)window_out[0]; window.y = (int)window_out[1]; window.width = (int)window_out[2]; window.height = (int)window_out[3]; }
+ return retVal;
+ }
+
+
+ //
+ // C++: int buildOpticalFlowPyramid(Mat img, vector_Mat& pyramid, Size winSize, int maxLevel, bool withDerivatives = true, int pyrBorder = BORDER_REFLECT_101, int derivBorder = BORDER_CONSTANT, bool tryReuseInputImage = true)
+ //
+
+ //javadoc: buildOpticalFlowPyramid(img, pyramid, winSize, maxLevel, withDerivatives, pyrBorder, derivBorder, tryReuseInputImage)
+ public static int buildOpticalFlowPyramid(Mat img, List<Mat> pyramid, Size winSize, int maxLevel, boolean withDerivatives, int pyrBorder, int derivBorder, boolean tryReuseInputImage)
+ {
+ Mat pyramid_mat = new Mat();
+ int retVal = buildOpticalFlowPyramid_0(img.nativeObj, pyramid_mat.nativeObj, winSize.width, winSize.height, maxLevel, withDerivatives, pyrBorder, derivBorder, tryReuseInputImage);
+ Converters.Mat_to_vector_Mat(pyramid_mat, pyramid);
+ pyramid_mat.release();
+ return retVal;
+ }
+
+ //javadoc: buildOpticalFlowPyramid(img, pyramid, winSize, maxLevel)
+ public static int buildOpticalFlowPyramid(Mat img, List<Mat> pyramid, Size winSize, int maxLevel)
+ {
+ Mat pyramid_mat = new Mat();
+ int retVal = buildOpticalFlowPyramid_1(img.nativeObj, pyramid_mat.nativeObj, winSize.width, winSize.height, maxLevel);
+ Converters.Mat_to_vector_Mat(pyramid_mat, pyramid);
+ pyramid_mat.release();
+ return retVal;
+ }
+
+
+ //
+ // C++: void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, vector_Point2f prevPts, vector_Point2f& nextPts, vector_uchar& status, vector_float& err, Size winSize = Size(21,21), int maxLevel = 3, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), int flags = 0, double minEigThreshold = 1e-4)
+ //
+
+ //javadoc: calcOpticalFlowPyrLK(prevImg, nextImg, prevPts, nextPts, status, err, winSize, maxLevel, criteria, flags, minEigThreshold)
+ public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel, TermCriteria criteria, int flags, double minEigThreshold)
+ {
+ Mat prevPts_mat = prevPts;
+ Mat nextPts_mat = nextPts;
+ Mat status_mat = status;
+ Mat err_mat = err;
+ calcOpticalFlowPyrLK_0(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel, criteria.type, criteria.maxCount, criteria.epsilon, flags, minEigThreshold);
+
+ return;
+ }
+
+ //javadoc: calcOpticalFlowPyrLK(prevImg, nextImg, prevPts, nextPts, status, err, winSize, maxLevel)
+ public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel)
+ {
+ Mat prevPts_mat = prevPts;
+ Mat nextPts_mat = nextPts;
+ Mat status_mat = status;
+ Mat err_mat = err;
+ calcOpticalFlowPyrLK_1(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel);
+
+ return;
+ }
+
+ //javadoc: calcOpticalFlowPyrLK(prevImg, nextImg, prevPts, nextPts, status, err)
+ public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err)
+ {
+ Mat prevPts_mat = prevPts;
+ Mat nextPts_mat = nextPts;
+ Mat status_mat = status;
+ Mat err_mat = err;
+ calcOpticalFlowPyrLK_2(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void calcOpticalFlowFarneback(Mat prev, Mat next, Mat& flow, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags)
+ //
+
+ //javadoc: calcOpticalFlowFarneback(prev, next, flow, pyr_scale, levels, winsize, iterations, poly_n, poly_sigma, flags)
+ public static void calcOpticalFlowFarneback(Mat prev, Mat next, Mat flow, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags)
+ {
+
+ calcOpticalFlowFarneback_0(prev.nativeObj, next.nativeObj, flow.nativeObj, pyr_scale, levels, winsize, iterations, poly_n, poly_sigma, flags);
+
+ return;
+ }
+
+
+ //
+ // C++: Mat estimateRigidTransform(Mat src, Mat dst, bool fullAffine)
+ //
+
+ //javadoc: estimateRigidTransform(src, dst, fullAffine)
+ public static Mat estimateRigidTransform(Mat src, Mat dst, boolean fullAffine)
+ {
+
+ Mat retVal = new Mat(estimateRigidTransform_0(src.nativeObj, dst.nativeObj, fullAffine));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double findTransformECC(Mat templateImage, Mat inputImage, Mat& warpMatrix, int motionType = MOTION_AFFINE, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 50, 0.001), Mat inputMask = Mat())
+ //
+
+ //javadoc: findTransformECC(templateImage, inputImage, warpMatrix, motionType, criteria, inputMask)
+ public static double findTransformECC(Mat templateImage, Mat inputImage, Mat warpMatrix, int motionType, TermCriteria criteria, Mat inputMask)
+ {
+
+ double retVal = findTransformECC_0(templateImage.nativeObj, inputImage.nativeObj, warpMatrix.nativeObj, motionType, criteria.type, criteria.maxCount, criteria.epsilon, inputMask.nativeObj);
+
+ return retVal;
+ }
+
+ //javadoc: findTransformECC(templateImage, inputImage, warpMatrix, motionType)
+ public static double findTransformECC(Mat templateImage, Mat inputImage, Mat warpMatrix, int motionType)
+ {
+
+ double retVal = findTransformECC_1(templateImage.nativeObj, inputImage.nativeObj, warpMatrix.nativeObj, motionType);
+
+ return retVal;
+ }
+
+ //javadoc: findTransformECC(templateImage, inputImage, warpMatrix)
+ public static double findTransformECC(Mat templateImage, Mat inputImage, Mat warpMatrix)
+ {
+
+ double retVal = findTransformECC_2(templateImage.nativeObj, inputImage.nativeObj, warpMatrix.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Ptr_BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history = 500, double varThreshold = 16, bool detectShadows = true)
+ //
+
+ //javadoc: createBackgroundSubtractorMOG2(history, varThreshold, detectShadows)
+ public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, double varThreshold, boolean detectShadows)
+ {
+
+ BackgroundSubtractorMOG2 retVal = new BackgroundSubtractorMOG2(createBackgroundSubtractorMOG2_0(history, varThreshold, detectShadows));
+
+ return retVal;
+ }
+
+ //javadoc: createBackgroundSubtractorMOG2()
+ public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2()
+ {
+
+ BackgroundSubtractorMOG2 retVal = new BackgroundSubtractorMOG2(createBackgroundSubtractorMOG2_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Ptr_DualTVL1OpticalFlow createOptFlow_DualTVL1()
+ //
+
+ //javadoc: createOptFlow_DualTVL1()
+ public static DualTVL1OpticalFlow createOptFlow_DualTVL1()
+ {
+
+ DualTVL1OpticalFlow retVal = new DualTVL1OpticalFlow(createOptFlow_DualTVL1_0());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Ptr_BackgroundSubtractorKNN createBackgroundSubtractorKNN(int history = 500, double dist2Threshold = 400.0, bool detectShadows = true)
+ //
+
+ //javadoc: createBackgroundSubtractorKNN(history, dist2Threshold, detectShadows)
+ public static BackgroundSubtractorKNN createBackgroundSubtractorKNN(int history, double dist2Threshold, boolean detectShadows)
+ {
+
+ BackgroundSubtractorKNN retVal = new BackgroundSubtractorKNN(createBackgroundSubtractorKNN_0(history, dist2Threshold, detectShadows));
+
+ return retVal;
+ }
+
+ //javadoc: createBackgroundSubtractorKNN()
+ public static BackgroundSubtractorKNN createBackgroundSubtractorKNN()
+ {
+
+ BackgroundSubtractorKNN retVal = new BackgroundSubtractorKNN(createBackgroundSubtractorKNN_1());
+
+ return retVal;
+ }
+
+
+
+
+ // C++: RotatedRect CamShift(Mat probImage, Rect& window, TermCriteria criteria)
+ private static native double[] CamShift_0(long probImage_nativeObj, int window_x, int window_y, int window_width, int window_height, double[] window_out, int criteria_type, int criteria_maxCount, double criteria_epsilon);
+
+ // C++: int meanShift(Mat probImage, Rect& window, TermCriteria criteria)
+ private static native int meanShift_0(long probImage_nativeObj, int window_x, int window_y, int window_width, int window_height, double[] window_out, int criteria_type, int criteria_maxCount, double criteria_epsilon);
+
+ // C++: int buildOpticalFlowPyramid(Mat img, vector_Mat& pyramid, Size winSize, int maxLevel, bool withDerivatives = true, int pyrBorder = BORDER_REFLECT_101, int derivBorder = BORDER_CONSTANT, bool tryReuseInputImage = true)
+ private static native int buildOpticalFlowPyramid_0(long img_nativeObj, long pyramid_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel, boolean withDerivatives, int pyrBorder, int derivBorder, boolean tryReuseInputImage);
+ private static native int buildOpticalFlowPyramid_1(long img_nativeObj, long pyramid_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel);
+
+ // C++: void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, vector_Point2f prevPts, vector_Point2f& nextPts, vector_uchar& status, vector_float& err, Size winSize = Size(21,21), int maxLevel = 3, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), int flags = 0, double minEigThreshold = 1e-4)
+ private static native void calcOpticalFlowPyrLK_0(long prevImg_nativeObj, long nextImg_nativeObj, long prevPts_mat_nativeObj, long nextPts_mat_nativeObj, long status_mat_nativeObj, long err_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel, int criteria_type, int criteria_maxCount, double criteria_epsilon, int flags, double minEigThreshold);
+ private static native void calcOpticalFlowPyrLK_1(long prevImg_nativeObj, long nextImg_nativeObj, long prevPts_mat_nativeObj, long nextPts_mat_nativeObj, long status_mat_nativeObj, long err_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel);
+ private static native void calcOpticalFlowPyrLK_2(long prevImg_nativeObj, long nextImg_nativeObj, long prevPts_mat_nativeObj, long nextPts_mat_nativeObj, long status_mat_nativeObj, long err_mat_nativeObj);
+
+ // C++: void calcOpticalFlowFarneback(Mat prev, Mat next, Mat& flow, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags)
+ private static native void calcOpticalFlowFarneback_0(long prev_nativeObj, long next_nativeObj, long flow_nativeObj, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags);
+
+ // C++: Mat estimateRigidTransform(Mat src, Mat dst, bool fullAffine)
+ private static native long estimateRigidTransform_0(long src_nativeObj, long dst_nativeObj, boolean fullAffine);
+
+ // C++: double findTransformECC(Mat templateImage, Mat inputImage, Mat& warpMatrix, int motionType = MOTION_AFFINE, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 50, 0.001), Mat inputMask = Mat())
+ private static native double findTransformECC_0(long templateImage_nativeObj, long inputImage_nativeObj, long warpMatrix_nativeObj, int motionType, int criteria_type, int criteria_maxCount, double criteria_epsilon, long inputMask_nativeObj);
+ private static native double findTransformECC_1(long templateImage_nativeObj, long inputImage_nativeObj, long warpMatrix_nativeObj, int motionType);
+ private static native double findTransformECC_2(long templateImage_nativeObj, long inputImage_nativeObj, long warpMatrix_nativeObj);
+
+ // C++: Ptr_BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history = 500, double varThreshold = 16, bool detectShadows = true)
+ private static native long createBackgroundSubtractorMOG2_0(int history, double varThreshold, boolean detectShadows);
+ private static native long createBackgroundSubtractorMOG2_1();
+
+ // C++: Ptr_DualTVL1OpticalFlow createOptFlow_DualTVL1()
+ private static native long createOptFlow_DualTVL1_0();
+
+ // C++: Ptr_BackgroundSubtractorKNN createBackgroundSubtractorKNN(int history = 500, double dist2Threshold = 400.0, bool detectShadows = true)
+ private static native long createBackgroundSubtractorKNN_0(int history, double dist2Threshold, boolean detectShadows);
+ private static native long createBackgroundSubtractorKNN_1();
+
+}
diff --git a/modules/java/src/video.cpp b/modules/java/src/video.cpp
new file mode 100644
index 0000000..74fcdbe
--- /dev/null
+++ b/modules/java/src/video.cpp
@@ -0,0 +1,2324 @@
+
+//
+// This file is auto-generated, please don't edit!
+//
+
+#define LOG_TAG "org.opencv.video"
+
+#include "common.h"
+
+#include "opencv2/opencv_modules.hpp"
+#ifdef HAVE_OPENCV_VIDEO
+
+#include <string>
+
+#include "opencv2/video.hpp"
+
+#include "../../video/include/opencv2/video/tracking.hpp"
+#include "../../video/include/opencv2/video/background_segm.hpp"
+
+using namespace cv;
+
+/// throw java exception
+static void throwJavaException(JNIEnv *env, const std::exception *e, const char *method) {
+ std::string what = "unknown exception";
+ jclass je = 0;
+
+ if(e) {
+ std::string exception_type = "std::exception";
+
+ if(dynamic_cast<const cv::Exception*>(e)) {
+ exception_type = "cv::Exception";
+ je = env->FindClass("org/opencv/core/CvException");
+ }
+
+ what = exception_type + ": " + e->what();
+ }
+
+ if(!je) je = env->FindClass("java/lang/Exception");
+ env->ThrowNew(je, what.c_str());
+
+ LOGE("%s caught %s", method, what.c_str());
+ (void)method; // avoid "unused" warning
+}
+
+
+extern "C" {
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::DualTVL1OpticalFlow>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_video_DualTVL1OpticalFlow_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_DualTVL1OpticalFlow_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::DualTVL1OpticalFlow>*) self;
+}
+
+
+//
+// void calc(Mat I0, Mat I1, Mat& flow)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_DenseOpticalFlow_calc_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_DenseOpticalFlow_calc_10
+ (JNIEnv* env, jclass , jlong self, jlong I0_nativeObj, jlong I1_nativeObj, jlong flow_nativeObj)
+{
+ static const char method_name[] = "video::calc_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::DenseOpticalFlow>* me = (Ptr<cv::DenseOpticalFlow>*) self; //TODO: check for NULL
+ Mat& I0 = *((Mat*)I0_nativeObj);
+ Mat& I1 = *((Mat*)I1_nativeObj);
+ Mat& flow = *((Mat*)flow_nativeObj);
+ (*me)->calc( I0, I1, flow );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void collectGarbage()
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_DenseOpticalFlow_collectGarbage_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_DenseOpticalFlow_collectGarbage_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::collectGarbage_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::DenseOpticalFlow>* me = (Ptr<cv::DenseOpticalFlow>*) self; //TODO: check for NULL
+ (*me)->collectGarbage( );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::DenseOpticalFlow>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_video_DenseOpticalFlow_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_DenseOpticalFlow_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::DenseOpticalFlow>*) self;
+}
+
+
+//
+// void getBackgroundImage(Mat& backgroundImage)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractor_getBackgroundImage_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractor_getBackgroundImage_10
+ (JNIEnv* env, jclass , jlong self, jlong backgroundImage_nativeObj)
+{
+ static const char method_name[] = "video::getBackgroundImage_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractor>* me = (Ptr<cv::BackgroundSubtractor>*) self; //TODO: check for NULL
+ Mat& backgroundImage = *((Mat*)backgroundImage_nativeObj);
+ (*me)->getBackgroundImage( backgroundImage );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void apply(Mat image, Mat& fgmask, double learningRate = -1)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractor_apply_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractor_apply_10
+ (JNIEnv* env, jclass , jlong self, jlong image_nativeObj, jlong fgmask_nativeObj, jdouble learningRate)
+{
+ static const char method_name[] = "video::apply_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractor>* me = (Ptr<cv::BackgroundSubtractor>*) self; //TODO: check for NULL
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& fgmask = *((Mat*)fgmask_nativeObj);
+ (*me)->apply( image, fgmask, (double)learningRate );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractor_apply_11 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractor_apply_11
+ (JNIEnv* env, jclass , jlong self, jlong image_nativeObj, jlong fgmask_nativeObj)
+{
+ static const char method_name[] = "video::apply_11()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractor>* me = (Ptr<cv::BackgroundSubtractor>*) self; //TODO: check for NULL
+ Mat& image = *((Mat*)image_nativeObj);
+ Mat& fgmask = *((Mat*)fgmask_nativeObj);
+ (*me)->apply( image, fgmask );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::BackgroundSubtractor>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractor_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractor_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::BackgroundSubtractor>*) self;
+}
+
+
+//
+// RotatedRect CamShift(Mat probImage, Rect& window, TermCriteria criteria)
+//
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_video_Video_CamShift_10 (JNIEnv*, jclass, jlong, jint, jint, jint, jint, jdoubleArray, jint, jint, jdouble);
+
+JNIEXPORT jdoubleArray JNICALL Java_org_opencv_video_Video_CamShift_10
+ (JNIEnv* env, jclass , jlong probImage_nativeObj, jint window_x, jint window_y, jint window_width, jint window_height, jdoubleArray window_out, jint criteria_type, jint criteria_maxCount, jdouble criteria_epsilon)
+{
+ static const char method_name[] = "video::CamShift_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& probImage = *((Mat*)probImage_nativeObj);
+ Rect window(window_x, window_y, window_width, window_height);
+ TermCriteria criteria(criteria_type, criteria_maxCount, criteria_epsilon);
+ RotatedRect _retval_ = cv::CamShift( probImage, window, criteria );
+ jdoubleArray _da_retval_ = env->NewDoubleArray(5); jdouble _tmp_retval_[5] = {_retval_.center.x, _retval_.center.y, _retval_.size.width, _retval_.size.height, _retval_.angle}; env->SetDoubleArrayRegion(_da_retval_, 0, 5, _tmp_retval_); jdouble tmp_window[4] = {window.x, window.y, window.width, window.height}; env->SetDoubleArrayRegion(window_out, 0, 4, tmp_window);
+ return _da_retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int meanShift(Mat probImage, Rect& window, TermCriteria criteria)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_Video_meanShift_10 (JNIEnv*, jclass, jlong, jint, jint, jint, jint, jdoubleArray, jint, jint, jdouble);
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_Video_meanShift_10
+ (JNIEnv* env, jclass , jlong probImage_nativeObj, jint window_x, jint window_y, jint window_width, jint window_height, jdoubleArray window_out, jint criteria_type, jint criteria_maxCount, jdouble criteria_epsilon)
+{
+ static const char method_name[] = "video::meanShift_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& probImage = *((Mat*)probImage_nativeObj);
+ Rect window(window_x, window_y, window_width, window_height);
+ TermCriteria criteria(criteria_type, criteria_maxCount, criteria_epsilon);
+ int _retval_ = cv::meanShift( probImage, window, criteria );
+ jdouble tmp_window[4] = {window.x, window.y, window.width, window.height}; env->SetDoubleArrayRegion(window_out, 0, 4, tmp_window);
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// int buildOpticalFlowPyramid(Mat img, vector_Mat& pyramid, Size winSize, int maxLevel, bool withDerivatives = true, int pyrBorder = BORDER_REFLECT_101, int derivBorder = BORDER_CONSTANT, bool tryReuseInputImage = true)
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_Video_buildOpticalFlowPyramid_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint, jboolean, jint, jint, jboolean);
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_Video_buildOpticalFlowPyramid_10
+ (JNIEnv* env, jclass , jlong img_nativeObj, jlong pyramid_mat_nativeObj, jdouble winSize_width, jdouble winSize_height, jint maxLevel, jboolean withDerivatives, jint pyrBorder, jint derivBorder, jboolean tryReuseInputImage)
+{
+ static const char method_name[] = "video::buildOpticalFlowPyramid_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> pyramid;
+ Mat& pyramid_mat = *((Mat*)pyramid_mat_nativeObj);
+ Mat& img = *((Mat*)img_nativeObj);
+ Size winSize((int)winSize_width, (int)winSize_height);
+ int _retval_ = cv::buildOpticalFlowPyramid( img, pyramid, winSize, (int)maxLevel, (bool)withDerivatives, (int)pyrBorder, (int)derivBorder, (bool)tryReuseInputImage );
+ vector_Mat_to_Mat( pyramid, pyramid_mat );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_Video_buildOpticalFlowPyramid_11 (JNIEnv*, jclass, jlong, jlong, jdouble, jdouble, jint);
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_Video_buildOpticalFlowPyramid_11
+ (JNIEnv* env, jclass , jlong img_nativeObj, jlong pyramid_mat_nativeObj, jdouble winSize_width, jdouble winSize_height, jint maxLevel)
+{
+ static const char method_name[] = "video::buildOpticalFlowPyramid_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Mat> pyramid;
+ Mat& pyramid_mat = *((Mat*)pyramid_mat_nativeObj);
+ Mat& img = *((Mat*)img_nativeObj);
+ Size winSize((int)winSize_width, (int)winSize_height);
+ int _retval_ = cv::buildOpticalFlowPyramid( img, pyramid, winSize, (int)maxLevel );
+ vector_Mat_to_Mat( pyramid, pyramid_mat );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, vector_Point2f prevPts, vector_Point2f& nextPts, vector_uchar& status, vector_float& err, Size winSize = Size(21,21), int maxLevel = 3, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), int flags = 0, double minEigThreshold = 1e-4)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_Video_calcOpticalFlowPyrLK_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jdouble, jdouble, jint, jint, jint, jdouble, jint, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_Video_calcOpticalFlowPyrLK_10
+ (JNIEnv* env, jclass , jlong prevImg_nativeObj, jlong nextImg_nativeObj, jlong prevPts_mat_nativeObj, jlong nextPts_mat_nativeObj, jlong status_mat_nativeObj, jlong err_mat_nativeObj, jdouble winSize_width, jdouble winSize_height, jint maxLevel, jint criteria_type, jint criteria_maxCount, jdouble criteria_epsilon, jint flags, jdouble minEigThreshold)
+{
+ static const char method_name[] = "video::calcOpticalFlowPyrLK_10()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> prevPts;
+ Mat& prevPts_mat = *((Mat*)prevPts_mat_nativeObj);
+ Mat_to_vector_Point2f( prevPts_mat, prevPts );
+ std::vector<Point2f> nextPts;
+ Mat& nextPts_mat = *((Mat*)nextPts_mat_nativeObj);
+ Mat_to_vector_Point2f( nextPts_mat, nextPts );
+ std::vector<uchar> status;
+ Mat& status_mat = *((Mat*)status_mat_nativeObj);
+ std::vector<float> err;
+ Mat& err_mat = *((Mat*)err_mat_nativeObj);
+ Mat& prevImg = *((Mat*)prevImg_nativeObj);
+ Mat& nextImg = *((Mat*)nextImg_nativeObj);
+ Size winSize((int)winSize_width, (int)winSize_height);
+ TermCriteria criteria(criteria_type, criteria_maxCount, criteria_epsilon);
+ cv::calcOpticalFlowPyrLK( prevImg, nextImg, prevPts, nextPts, status, err, winSize, (int)maxLevel, criteria, (int)flags, (double)minEigThreshold );
+ vector_Point2f_to_Mat( nextPts, nextPts_mat ); vector_uchar_to_Mat( status, status_mat ); vector_float_to_Mat( err, err_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_video_Video_calcOpticalFlowPyrLK_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jdouble, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_Video_calcOpticalFlowPyrLK_11
+ (JNIEnv* env, jclass , jlong prevImg_nativeObj, jlong nextImg_nativeObj, jlong prevPts_mat_nativeObj, jlong nextPts_mat_nativeObj, jlong status_mat_nativeObj, jlong err_mat_nativeObj, jdouble winSize_width, jdouble winSize_height, jint maxLevel)
+{
+ static const char method_name[] = "video::calcOpticalFlowPyrLK_11()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> prevPts;
+ Mat& prevPts_mat = *((Mat*)prevPts_mat_nativeObj);
+ Mat_to_vector_Point2f( prevPts_mat, prevPts );
+ std::vector<Point2f> nextPts;
+ Mat& nextPts_mat = *((Mat*)nextPts_mat_nativeObj);
+ Mat_to_vector_Point2f( nextPts_mat, nextPts );
+ std::vector<uchar> status;
+ Mat& status_mat = *((Mat*)status_mat_nativeObj);
+ std::vector<float> err;
+ Mat& err_mat = *((Mat*)err_mat_nativeObj);
+ Mat& prevImg = *((Mat*)prevImg_nativeObj);
+ Mat& nextImg = *((Mat*)nextImg_nativeObj);
+ Size winSize((int)winSize_width, (int)winSize_height);
+ cv::calcOpticalFlowPyrLK( prevImg, nextImg, prevPts, nextPts, status, err, winSize, (int)maxLevel );
+ vector_Point2f_to_Mat( nextPts, nextPts_mat ); vector_uchar_to_Mat( status, status_mat ); vector_float_to_Mat( err, err_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+JNIEXPORT void JNICALL Java_org_opencv_video_Video_calcOpticalFlowPyrLK_12 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_Video_calcOpticalFlowPyrLK_12
+ (JNIEnv* env, jclass , jlong prevImg_nativeObj, jlong nextImg_nativeObj, jlong prevPts_mat_nativeObj, jlong nextPts_mat_nativeObj, jlong status_mat_nativeObj, jlong err_mat_nativeObj)
+{
+ static const char method_name[] = "video::calcOpticalFlowPyrLK_12()";
+ try {
+ LOGD("%s", method_name);
+ std::vector<Point2f> prevPts;
+ Mat& prevPts_mat = *((Mat*)prevPts_mat_nativeObj);
+ Mat_to_vector_Point2f( prevPts_mat, prevPts );
+ std::vector<Point2f> nextPts;
+ Mat& nextPts_mat = *((Mat*)nextPts_mat_nativeObj);
+ Mat_to_vector_Point2f( nextPts_mat, nextPts );
+ std::vector<uchar> status;
+ Mat& status_mat = *((Mat*)status_mat_nativeObj);
+ std::vector<float> err;
+ Mat& err_mat = *((Mat*)err_mat_nativeObj);
+ Mat& prevImg = *((Mat*)prevImg_nativeObj);
+ Mat& nextImg = *((Mat*)nextImg_nativeObj);
+ cv::calcOpticalFlowPyrLK( prevImg, nextImg, prevPts, nextPts, status, err );
+ vector_Point2f_to_Mat( nextPts, nextPts_mat ); vector_uchar_to_Mat( status, status_mat ); vector_float_to_Mat( err, err_mat );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// void calcOpticalFlowFarneback(Mat prev, Mat next, Mat& flow, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_Video_calcOpticalFlowFarneback_10 (JNIEnv*, jclass, jlong, jlong, jlong, jdouble, jint, jint, jint, jint, jdouble, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_Video_calcOpticalFlowFarneback_10
+ (JNIEnv* env, jclass , jlong prev_nativeObj, jlong next_nativeObj, jlong flow_nativeObj, jdouble pyr_scale, jint levels, jint winsize, jint iterations, jint poly_n, jdouble poly_sigma, jint flags)
+{
+ static const char method_name[] = "video::calcOpticalFlowFarneback_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& prev = *((Mat*)prev_nativeObj);
+ Mat& next = *((Mat*)next_nativeObj);
+ Mat& flow = *((Mat*)flow_nativeObj);
+ cv::calcOpticalFlowFarneback( prev, next, flow, (double)pyr_scale, (int)levels, (int)winsize, (int)iterations, (int)poly_n, (double)poly_sigma, (int)flags );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat estimateRigidTransform(Mat src, Mat dst, bool fullAffine)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_Video_estimateRigidTransform_10 (JNIEnv*, jclass, jlong, jlong, jboolean);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_Video_estimateRigidTransform_10
+ (JNIEnv* env, jclass , jlong src_nativeObj, jlong dst_nativeObj, jboolean fullAffine)
+{
+ static const char method_name[] = "video::estimateRigidTransform_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& src = *((Mat*)src_nativeObj);
+ Mat& dst = *((Mat*)dst_nativeObj);
+ ::Mat _retval_ = cv::estimateRigidTransform( src, dst, (bool)fullAffine );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// double findTransformECC(Mat templateImage, Mat inputImage, Mat& warpMatrix, int motionType = MOTION_AFFINE, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 50, 0.001), Mat inputMask = Mat())
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_Video_findTransformECC_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint, jint, jint, jdouble, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_Video_findTransformECC_10
+ (JNIEnv* env, jclass , jlong templateImage_nativeObj, jlong inputImage_nativeObj, jlong warpMatrix_nativeObj, jint motionType, jint criteria_type, jint criteria_maxCount, jdouble criteria_epsilon, jlong inputMask_nativeObj)
+{
+ static const char method_name[] = "video::findTransformECC_10()";
+ try {
+ LOGD("%s", method_name);
+ Mat& templateImage = *((Mat*)templateImage_nativeObj);
+ Mat& inputImage = *((Mat*)inputImage_nativeObj);
+ Mat& warpMatrix = *((Mat*)warpMatrix_nativeObj);
+ TermCriteria criteria(criteria_type, criteria_maxCount, criteria_epsilon);
+ Mat& inputMask = *((Mat*)inputMask_nativeObj);
+ double _retval_ = cv::findTransformECC( templateImage, inputImage, warpMatrix, (int)motionType, criteria, inputMask );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_Video_findTransformECC_11 (JNIEnv*, jclass, jlong, jlong, jlong, jint);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_Video_findTransformECC_11
+ (JNIEnv* env, jclass , jlong templateImage_nativeObj, jlong inputImage_nativeObj, jlong warpMatrix_nativeObj, jint motionType)
+{
+ static const char method_name[] = "video::findTransformECC_11()";
+ try {
+ LOGD("%s", method_name);
+ Mat& templateImage = *((Mat*)templateImage_nativeObj);
+ Mat& inputImage = *((Mat*)inputImage_nativeObj);
+ Mat& warpMatrix = *((Mat*)warpMatrix_nativeObj);
+ double _retval_ = cv::findTransformECC( templateImage, inputImage, warpMatrix, (int)motionType );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_Video_findTransformECC_12 (JNIEnv*, jclass, jlong, jlong, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_Video_findTransformECC_12
+ (JNIEnv* env, jclass , jlong templateImage_nativeObj, jlong inputImage_nativeObj, jlong warpMatrix_nativeObj)
+{
+ static const char method_name[] = "video::findTransformECC_12()";
+ try {
+ LOGD("%s", method_name);
+ Mat& templateImage = *((Mat*)templateImage_nativeObj);
+ Mat& inputImage = *((Mat*)inputImage_nativeObj);
+ Mat& warpMatrix = *((Mat*)warpMatrix_nativeObj);
+ double _retval_ = cv::findTransformECC( templateImage, inputImage, warpMatrix );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Ptr_BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history = 500, double varThreshold = 16, bool detectShadows = true)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_Video_createBackgroundSubtractorMOG2_10 (JNIEnv*, jclass, jint, jdouble, jboolean);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_Video_createBackgroundSubtractorMOG2_10
+ (JNIEnv* env, jclass , jint history, jdouble varThreshold, jboolean detectShadows)
+{
+ static const char method_name[] = "video::createBackgroundSubtractorMOG2_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::BackgroundSubtractorMOG2> Ptr_BackgroundSubtractorMOG2;
+ Ptr_BackgroundSubtractorMOG2 _retval_ = cv::createBackgroundSubtractorMOG2( (int)history, (double)varThreshold, (bool)detectShadows );
+ return (jlong)(new Ptr_BackgroundSubtractorMOG2(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_Video_createBackgroundSubtractorMOG2_11 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_Video_createBackgroundSubtractorMOG2_11
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "video::createBackgroundSubtractorMOG2_11()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::BackgroundSubtractorMOG2> Ptr_BackgroundSubtractorMOG2;
+ Ptr_BackgroundSubtractorMOG2 _retval_ = cv::createBackgroundSubtractorMOG2( );
+ return (jlong)(new Ptr_BackgroundSubtractorMOG2(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Ptr_DualTVL1OpticalFlow createOptFlow_DualTVL1()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_Video_createOptFlow_1DualTVL1_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_Video_createOptFlow_1DualTVL1_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "video::createOptFlow_1DualTVL1_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::DualTVL1OpticalFlow> Ptr_DualTVL1OpticalFlow;
+ Ptr_DualTVL1OpticalFlow _retval_ = cv::createOptFlow_DualTVL1( );
+ return (jlong)(new Ptr_DualTVL1OpticalFlow(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Ptr_BackgroundSubtractorKNN createBackgroundSubtractorKNN(int history = 500, double dist2Threshold = 400.0, bool detectShadows = true)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_Video_createBackgroundSubtractorKNN_10 (JNIEnv*, jclass, jint, jdouble, jboolean);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_Video_createBackgroundSubtractorKNN_10
+ (JNIEnv* env, jclass , jint history, jdouble dist2Threshold, jboolean detectShadows)
+{
+ static const char method_name[] = "video::createBackgroundSubtractorKNN_10()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::BackgroundSubtractorKNN> Ptr_BackgroundSubtractorKNN;
+ Ptr_BackgroundSubtractorKNN _retval_ = cv::createBackgroundSubtractorKNN( (int)history, (double)dist2Threshold, (bool)detectShadows );
+ return (jlong)(new Ptr_BackgroundSubtractorKNN(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_Video_createBackgroundSubtractorKNN_11 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_Video_createBackgroundSubtractorKNN_11
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "video::createBackgroundSubtractorKNN_11()";
+ try {
+ LOGD("%s", method_name);
+ typedef Ptr<cv::BackgroundSubtractorKNN> Ptr_BackgroundSubtractorKNN;
+ Ptr_BackgroundSubtractorKNN _retval_ = cv::createBackgroundSubtractorKNN( );
+ return (jlong)(new Ptr_BackgroundSubtractorKNN(_retval_));
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// KalmanFilter()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_KalmanFilter_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_KalmanFilter_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "video::KalmanFilter_10()";
+ try {
+ LOGD("%s", method_name);
+
+ cv::KalmanFilter* _retval_ = new cv::KalmanFilter( );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// KalmanFilter(int dynamParams, int measureParams, int controlParams = 0, int type = CV_32F)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_KalmanFilter_11 (JNIEnv*, jclass, jint, jint, jint, jint);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_KalmanFilter_11
+ (JNIEnv* env, jclass , jint dynamParams, jint measureParams, jint controlParams, jint type)
+{
+ static const char method_name[] = "video::KalmanFilter_11()";
+ try {
+ LOGD("%s", method_name);
+
+ cv::KalmanFilter* _retval_ = new cv::KalmanFilter( (int)dynamParams, (int)measureParams, (int)controlParams, (int)type );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_KalmanFilter_12 (JNIEnv*, jclass, jint, jint);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_KalmanFilter_12
+ (JNIEnv* env, jclass , jint dynamParams, jint measureParams)
+{
+ static const char method_name[] = "video::KalmanFilter_12()";
+ try {
+ LOGD("%s", method_name);
+
+ cv::KalmanFilter* _retval_ = new cv::KalmanFilter( (int)dynamParams, (int)measureParams );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat predict(Mat control = Mat())
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_predict_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_predict_10
+ (JNIEnv* env, jclass , jlong self, jlong control_nativeObj)
+{
+ static const char method_name[] = "video::predict_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ Mat& control = *((Mat*)control_nativeObj);
+ ::Mat _retval_ = me->predict( control );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_predict_11 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_predict_11
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::predict_11()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->predict( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat correct(Mat measurement)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_correct_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_correct_10
+ (JNIEnv* env, jclass , jlong self, jlong measurement_nativeObj)
+{
+ static const char method_name[] = "video::correct_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ Mat& measurement = *((Mat*)measurement_nativeObj);
+ ::Mat _retval_ = me->correct( measurement );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// Mat KalmanFilter::statePre
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1statePre_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1statePre_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::get_1statePre_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->statePre;//( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void KalmanFilter::statePre
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1statePre_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1statePre_10
+ (JNIEnv* env, jclass , jlong self, jlong statePre_nativeObj)
+{
+ static const char method_name[] = "video::set_1statePre_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ Mat& statePre = *((Mat*)statePre_nativeObj);
+ me->statePre = ( statePre );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat KalmanFilter::statePost
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1statePost_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1statePost_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::get_1statePost_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->statePost;//( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void KalmanFilter::statePost
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1statePost_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1statePost_10
+ (JNIEnv* env, jclass , jlong self, jlong statePost_nativeObj)
+{
+ static const char method_name[] = "video::set_1statePost_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ Mat& statePost = *((Mat*)statePost_nativeObj);
+ me->statePost = ( statePost );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat KalmanFilter::transitionMatrix
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1transitionMatrix_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1transitionMatrix_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::get_1transitionMatrix_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->transitionMatrix;//( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void KalmanFilter::transitionMatrix
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1transitionMatrix_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1transitionMatrix_10
+ (JNIEnv* env, jclass , jlong self, jlong transitionMatrix_nativeObj)
+{
+ static const char method_name[] = "video::set_1transitionMatrix_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ Mat& transitionMatrix = *((Mat*)transitionMatrix_nativeObj);
+ me->transitionMatrix = ( transitionMatrix );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat KalmanFilter::controlMatrix
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1controlMatrix_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1controlMatrix_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::get_1controlMatrix_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->controlMatrix;//( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void KalmanFilter::controlMatrix
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1controlMatrix_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1controlMatrix_10
+ (JNIEnv* env, jclass , jlong self, jlong controlMatrix_nativeObj)
+{
+ static const char method_name[] = "video::set_1controlMatrix_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ Mat& controlMatrix = *((Mat*)controlMatrix_nativeObj);
+ me->controlMatrix = ( controlMatrix );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat KalmanFilter::measurementMatrix
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1measurementMatrix_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1measurementMatrix_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::get_1measurementMatrix_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->measurementMatrix;//( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void KalmanFilter::measurementMatrix
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1measurementMatrix_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1measurementMatrix_10
+ (JNIEnv* env, jclass , jlong self, jlong measurementMatrix_nativeObj)
+{
+ static const char method_name[] = "video::set_1measurementMatrix_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ Mat& measurementMatrix = *((Mat*)measurementMatrix_nativeObj);
+ me->measurementMatrix = ( measurementMatrix );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat KalmanFilter::processNoiseCov
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1processNoiseCov_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1processNoiseCov_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::get_1processNoiseCov_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->processNoiseCov;//( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void KalmanFilter::processNoiseCov
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1processNoiseCov_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1processNoiseCov_10
+ (JNIEnv* env, jclass , jlong self, jlong processNoiseCov_nativeObj)
+{
+ static const char method_name[] = "video::set_1processNoiseCov_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ Mat& processNoiseCov = *((Mat*)processNoiseCov_nativeObj);
+ me->processNoiseCov = ( processNoiseCov );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat KalmanFilter::measurementNoiseCov
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1measurementNoiseCov_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1measurementNoiseCov_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::get_1measurementNoiseCov_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->measurementNoiseCov;//( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void KalmanFilter::measurementNoiseCov
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1measurementNoiseCov_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1measurementNoiseCov_10
+ (JNIEnv* env, jclass , jlong self, jlong measurementNoiseCov_nativeObj)
+{
+ static const char method_name[] = "video::set_1measurementNoiseCov_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ Mat& measurementNoiseCov = *((Mat*)measurementNoiseCov_nativeObj);
+ me->measurementNoiseCov = ( measurementNoiseCov );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat KalmanFilter::errorCovPre
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1errorCovPre_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1errorCovPre_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::get_1errorCovPre_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->errorCovPre;//( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void KalmanFilter::errorCovPre
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1errorCovPre_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1errorCovPre_10
+ (JNIEnv* env, jclass , jlong self, jlong errorCovPre_nativeObj)
+{
+ static const char method_name[] = "video::set_1errorCovPre_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ Mat& errorCovPre = *((Mat*)errorCovPre_nativeObj);
+ me->errorCovPre = ( errorCovPre );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat KalmanFilter::gain
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1gain_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1gain_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::get_1gain_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->gain;//( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void KalmanFilter::gain
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1gain_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1gain_10
+ (JNIEnv* env, jclass , jlong self, jlong gain_nativeObj)
+{
+ static const char method_name[] = "video::set_1gain_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ Mat& gain = *((Mat*)gain_nativeObj);
+ me->gain = ( gain );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// Mat KalmanFilter::errorCovPost
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1errorCovPost_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_video_KalmanFilter_get_1errorCovPost_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::get_1errorCovPost_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ ::Mat _retval_ = me->errorCovPost;//( );
+ return (jlong) new ::Mat(_retval_);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void KalmanFilter::errorCovPost
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1errorCovPost_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_set_1errorCovPost_10
+ (JNIEnv* env, jclass , jlong self, jlong errorCovPost_nativeObj)
+{
+ static const char method_name[] = "video::set_1errorCovPost_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::KalmanFilter* me = (cv::KalmanFilter*) self; //TODO: check for NULL
+ Mat& errorCovPost = *((Mat*)errorCovPost_nativeObj);
+ me->errorCovPost = ( errorCovPost );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void cv::KalmanFilter::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_KalmanFilter_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (cv::KalmanFilter*) self;
+}
+
+
+//
+// double getVarThreshold()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getVarThreshold_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getVarThreshold_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getVarThreshold_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getVarThreshold( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setVarThreshold(double varThreshold)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setVarThreshold_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setVarThreshold_10
+ (JNIEnv* env, jclass , jlong self, jdouble varThreshold)
+{
+ static const char method_name[] = "video::setVarThreshold_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ (*me)->setVarThreshold( (double)varThreshold );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getVarThresholdGen()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getVarThresholdGen_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getVarThresholdGen_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getVarThresholdGen_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getVarThresholdGen( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setVarThresholdGen(double varThresholdGen)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setVarThresholdGen_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setVarThresholdGen_10
+ (JNIEnv* env, jclass , jlong self, jdouble varThresholdGen)
+{
+ static const char method_name[] = "video::setVarThresholdGen_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ (*me)->setVarThresholdGen( (double)varThresholdGen );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getVarInit()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getVarInit_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getVarInit_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getVarInit_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getVarInit( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setVarInit(double varInit)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setVarInit_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setVarInit_10
+ (JNIEnv* env, jclass , jlong self, jdouble varInit)
+{
+ static const char method_name[] = "video::setVarInit_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ (*me)->setVarInit( (double)varInit );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getVarMin()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getVarMin_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getVarMin_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getVarMin_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getVarMin( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setVarMin(double varMin)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setVarMin_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setVarMin_10
+ (JNIEnv* env, jclass , jlong self, jdouble varMin)
+{
+ static const char method_name[] = "video::setVarMin_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ (*me)->setVarMin( (double)varMin );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getVarMax()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getVarMax_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getVarMax_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getVarMax_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getVarMax( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setVarMax(double varMax)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setVarMax_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setVarMax_10
+ (JNIEnv* env, jclass , jlong self, jdouble varMax)
+{
+ static const char method_name[] = "video::setVarMax_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ (*me)->setVarMax( (double)varMax );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getComplexityReductionThreshold()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getComplexityReductionThreshold_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getComplexityReductionThreshold_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getComplexityReductionThreshold_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getComplexityReductionThreshold( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setComplexityReductionThreshold(double ct)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setComplexityReductionThreshold_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setComplexityReductionThreshold_10
+ (JNIEnv* env, jclass , jlong self, jdouble ct)
+{
+ static const char method_name[] = "video::setComplexityReductionThreshold_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ (*me)->setComplexityReductionThreshold( (double)ct );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool getDetectShadows()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getDetectShadows_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getDetectShadows_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getDetectShadows_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ bool _retval_ = (*me)->getDetectShadows( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setDetectShadows(bool detectShadows)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setDetectShadows_10 (JNIEnv*, jclass, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setDetectShadows_10
+ (JNIEnv* env, jclass , jlong self, jboolean detectShadows)
+{
+ static const char method_name[] = "video::setDetectShadows_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ (*me)->setDetectShadows( (bool)detectShadows );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getShadowValue()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getShadowValue_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getShadowValue_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getShadowValue_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getShadowValue( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setShadowValue(int value)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setShadowValue_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setShadowValue_10
+ (JNIEnv* env, jclass , jlong self, jint value)
+{
+ static const char method_name[] = "video::setShadowValue_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ (*me)->setShadowValue( (int)value );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getShadowThreshold()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getShadowThreshold_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getShadowThreshold_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getShadowThreshold_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getShadowThreshold( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setShadowThreshold(double threshold)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setShadowThreshold_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setShadowThreshold_10
+ (JNIEnv* env, jclass , jlong self, jdouble threshold)
+{
+ static const char method_name[] = "video::setShadowThreshold_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ (*me)->setShadowThreshold( (double)threshold );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getHistory()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getHistory_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getHistory_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getHistory_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getHistory( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setHistory(int history)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setHistory_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setHistory_10
+ (JNIEnv* env, jclass , jlong self, jint history)
+{
+ static const char method_name[] = "video::setHistory_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ (*me)->setHistory( (int)history );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getNMixtures()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getNMixtures_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getNMixtures_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getNMixtures_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getNMixtures( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setNMixtures(int nmixtures)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setNMixtures_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setNMixtures_10
+ (JNIEnv* env, jclass , jlong self, jint nmixtures)
+{
+ static const char method_name[] = "video::setNMixtures_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ (*me)->setNMixtures( (int)nmixtures );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getBackgroundRatio()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getBackgroundRatio_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_getBackgroundRatio_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getBackgroundRatio_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getBackgroundRatio( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setBackgroundRatio(double ratio)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setBackgroundRatio_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_setBackgroundRatio_10
+ (JNIEnv* env, jclass , jlong self, jdouble ratio)
+{
+ static const char method_name[] = "video::setBackgroundRatio_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorMOG2>* me = (Ptr<cv::BackgroundSubtractorMOG2>*) self; //TODO: check for NULL
+ (*me)->setBackgroundRatio( (double)ratio );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::BackgroundSubtractorMOG2>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorMOG2_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::BackgroundSubtractorMOG2>*) self;
+}
+
+
+//
+// int getHistory()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_getHistory_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_getHistory_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getHistory_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorKNN>* me = (Ptr<cv::BackgroundSubtractorKNN>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getHistory( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setHistory(int history)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_setHistory_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_setHistory_10
+ (JNIEnv* env, jclass , jlong self, jint history)
+{
+ static const char method_name[] = "video::setHistory_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorKNN>* me = (Ptr<cv::BackgroundSubtractorKNN>*) self; //TODO: check for NULL
+ (*me)->setHistory( (int)history );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getNSamples()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_getNSamples_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_getNSamples_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getNSamples_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorKNN>* me = (Ptr<cv::BackgroundSubtractorKNN>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getNSamples( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setNSamples(int _nN)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_setNSamples_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_setNSamples_10
+ (JNIEnv* env, jclass , jlong self, jint _nN)
+{
+ static const char method_name[] = "video::setNSamples_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorKNN>* me = (Ptr<cv::BackgroundSubtractorKNN>*) self; //TODO: check for NULL
+ (*me)->setNSamples( (int)_nN );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getDist2Threshold()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_getDist2Threshold_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_getDist2Threshold_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getDist2Threshold_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorKNN>* me = (Ptr<cv::BackgroundSubtractorKNN>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getDist2Threshold( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setDist2Threshold(double _dist2Threshold)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_setDist2Threshold_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_setDist2Threshold_10
+ (JNIEnv* env, jclass , jlong self, jdouble _dist2Threshold)
+{
+ static const char method_name[] = "video::setDist2Threshold_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorKNN>* me = (Ptr<cv::BackgroundSubtractorKNN>*) self; //TODO: check for NULL
+ (*me)->setDist2Threshold( (double)_dist2Threshold );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getkNNSamples()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_getkNNSamples_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_getkNNSamples_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getkNNSamples_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorKNN>* me = (Ptr<cv::BackgroundSubtractorKNN>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getkNNSamples( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setkNNSamples(int _nkNN)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_setkNNSamples_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_setkNNSamples_10
+ (JNIEnv* env, jclass , jlong self, jint _nkNN)
+{
+ static const char method_name[] = "video::setkNNSamples_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorKNN>* me = (Ptr<cv::BackgroundSubtractorKNN>*) self; //TODO: check for NULL
+ (*me)->setkNNSamples( (int)_nkNN );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool getDetectShadows()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_getDetectShadows_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_getDetectShadows_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getDetectShadows_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorKNN>* me = (Ptr<cv::BackgroundSubtractorKNN>*) self; //TODO: check for NULL
+ bool _retval_ = (*me)->getDetectShadows( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setDetectShadows(bool detectShadows)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_setDetectShadows_10 (JNIEnv*, jclass, jlong, jboolean);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_setDetectShadows_10
+ (JNIEnv* env, jclass , jlong self, jboolean detectShadows)
+{
+ static const char method_name[] = "video::setDetectShadows_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorKNN>* me = (Ptr<cv::BackgroundSubtractorKNN>*) self; //TODO: check for NULL
+ (*me)->setDetectShadows( (bool)detectShadows );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// int getShadowValue()
+//
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_getShadowValue_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jint JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_getShadowValue_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getShadowValue_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorKNN>* me = (Ptr<cv::BackgroundSubtractorKNN>*) self; //TODO: check for NULL
+ int _retval_ = (*me)->getShadowValue( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setShadowValue(int value)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_setShadowValue_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_setShadowValue_10
+ (JNIEnv* env, jclass , jlong self, jint value)
+{
+ static const char method_name[] = "video::setShadowValue_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorKNN>* me = (Ptr<cv::BackgroundSubtractorKNN>*) self; //TODO: check for NULL
+ (*me)->setShadowValue( (int)value );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// double getShadowThreshold()
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_getShadowThreshold_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_getShadowThreshold_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "video::getShadowThreshold_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorKNN>* me = (Ptr<cv::BackgroundSubtractorKNN>*) self; //TODO: check for NULL
+ double _retval_ = (*me)->getShadowThreshold( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void setShadowThreshold(double threshold)
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_setShadowThreshold_10 (JNIEnv*, jclass, jlong, jdouble);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_setShadowThreshold_10
+ (JNIEnv* env, jclass , jlong self, jdouble threshold)
+{
+ static const char method_name[] = "video::setShadowThreshold_10()";
+ try {
+ LOGD("%s", method_name);
+ Ptr<cv::BackgroundSubtractorKNN>* me = (Ptr<cv::BackgroundSubtractorKNN>*) self; //TODO: check for NULL
+ (*me)->setShadowThreshold( (double)threshold );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// native support for java finalize()
+// static void Ptr<cv::BackgroundSubtractorKNN>::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_video_BackgroundSubtractorKNN_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (Ptr<cv::BackgroundSubtractorKNN>*) self;
+}
+
+
+
+} // extern "C"
+
+#endif // HAVE_OPENCV_VIDEO
diff --git a/modules/java/src/videoio+VideoCapture.java b/modules/java/src/videoio+VideoCapture.java
new file mode 100644
index 0000000..4d4759a
--- /dev/null
+++ b/modules/java/src/videoio+VideoCapture.java
@@ -0,0 +1,258 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.videoio;
+
+import java.lang.String;
+import org.opencv.core.Mat;
+
+// C++: class VideoCapture
+//javadoc: VideoCapture
+public class VideoCapture {
+
+ protected final long nativeObj;
+ protected VideoCapture(long addr) { nativeObj = addr; }
+
+
+ //
+ // C++: VideoCapture()
+ //
+
+ //javadoc: VideoCapture::VideoCapture()
+ public VideoCapture()
+ {
+
+ nativeObj = VideoCapture_0();
+
+ return;
+ }
+
+
+ //
+ // C++: VideoCapture(String filename)
+ //
+
+ //javadoc: VideoCapture::VideoCapture(filename)
+ public VideoCapture(String filename)
+ {
+
+ nativeObj = VideoCapture_1(filename);
+
+ return;
+ }
+
+
+ //
+ // C++: VideoCapture(int device)
+ //
+
+ //javadoc: VideoCapture::VideoCapture(device)
+ public VideoCapture(int device)
+ {
+
+ nativeObj = VideoCapture_2(device);
+
+ return;
+ }
+
+
+ //
+ // C++: bool open(String filename)
+ //
+
+ //javadoc: VideoCapture::open(filename)
+ public boolean open(String filename)
+ {
+
+ boolean retVal = open_0(nativeObj, filename);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool open(int device)
+ //
+
+ //javadoc: VideoCapture::open(device)
+ public boolean open(int device)
+ {
+
+ boolean retVal = open_1(nativeObj, device);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool isOpened()
+ //
+
+ //javadoc: VideoCapture::isOpened()
+ public boolean isOpened()
+ {
+
+ boolean retVal = isOpened_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void release()
+ //
+
+ //javadoc: VideoCapture::release()
+ public void release()
+ {
+
+ release_0(nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: bool grab()
+ //
+
+ //javadoc: VideoCapture::grab()
+ public boolean grab()
+ {
+
+ boolean retVal = grab_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool retrieve(Mat& image, int flag = 0)
+ //
+
+ //javadoc: VideoCapture::retrieve(image, flag)
+ public boolean retrieve(Mat image, int flag)
+ {
+
+ boolean retVal = retrieve_0(nativeObj, image.nativeObj, flag);
+
+ return retVal;
+ }
+
+ //javadoc: VideoCapture::retrieve(image)
+ public boolean retrieve(Mat image)
+ {
+
+ boolean retVal = retrieve_1(nativeObj, image.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool read(Mat& image)
+ //
+
+ //javadoc: VideoCapture::read(image)
+ public boolean read(Mat image)
+ {
+
+ boolean retVal = read_0(nativeObj, image.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool set(int propId, double value)
+ //
+
+ //javadoc: VideoCapture::set(propId, value)
+ public boolean set(int propId, double value)
+ {
+
+ boolean retVal = set_0(nativeObj, propId, value);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double get(int propId)
+ //
+
+ //javadoc: VideoCapture::get(propId)
+ public double get(int propId)
+ {
+
+ double retVal = get_0(nativeObj, propId);
+
+ return retVal;
+ }
+
+
+ public java.util.List<org.opencv.core.Size> getSupportedPreviewSizes()
+ {
+ String[] sizes_str = getSupportedPreviewSizes_0(nativeObj).split(",");
+ java.util.List<org.opencv.core.Size> sizes = new java.util.ArrayList<org.opencv.core.Size>(sizes_str.length);
+
+ for (String str : sizes_str) {
+ String[] wh = str.split("x");
+ sizes.add(new org.opencv.core.Size(Double.parseDouble(wh[0]), Double.parseDouble(wh[1])));
+ }
+
+ return sizes;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: VideoCapture()
+ private static native long VideoCapture_0();
+
+ // C++: VideoCapture(String filename)
+ private static native long VideoCapture_1(String filename);
+
+ // C++: VideoCapture(int device)
+ private static native long VideoCapture_2(int device);
+
+ // C++: bool open(String filename)
+ private static native boolean open_0(long nativeObj, String filename);
+
+ // C++: bool open(int device)
+ private static native boolean open_1(long nativeObj, int device);
+
+ // C++: bool isOpened()
+ private static native boolean isOpened_0(long nativeObj);
+
+ // C++: void release()
+ private static native void release_0(long nativeObj);
+
+ // C++: bool grab()
+ private static native boolean grab_0(long nativeObj);
+
+ // C++: bool retrieve(Mat& image, int flag = 0)
+ private static native boolean retrieve_0(long nativeObj, long image_nativeObj, int flag);
+ private static native boolean retrieve_1(long nativeObj, long image_nativeObj);
+
+ // C++: bool read(Mat& image)
+ private static native boolean read_0(long nativeObj, long image_nativeObj);
+
+ // C++: bool set(int propId, double value)
+ private static native boolean set_0(long nativeObj, int propId, double value);
+
+ // C++: double get(int propId)
+ private static native double get_0(long nativeObj, int propId);
+
+ private static native String getSupportedPreviewSizes_0(long nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/modules/java/src/videoio+Videoio.java b/modules/java/src/videoio+Videoio.java
new file mode 100644
index 0000000..2ec0a5f
--- /dev/null
+++ b/modules/java/src/videoio+Videoio.java
@@ -0,0 +1,369 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.videoio;
+
+
+
+public class Videoio {
+
+ public static final int
+ CV_CAP_MSMF = 1400,
+ CV_CAP_ANDROID = 1000,
+ CV_CAP_ANDROID_BACK = CV_CAP_ANDROID+99,
+ CV_CAP_ANDROID_FRONT = CV_CAP_ANDROID+98,
+ CV_CAP_XIAPI = 1100,
+ CV_CAP_AVFOUNDATION = 1200,
+ CV_CAP_GIGANETIX = 1300,
+ CV_CAP_GPHOTO2 = 1700,
+ CV_CAP_PROP_FRAME_WIDTH = 3,
+ CV_CAP_PROP_FRAME_HEIGHT = 4,
+ CV_CAP_PROP_ZOOM = 27,
+ CV_CAP_PROP_FOCUS = 28,
+ CV_CAP_PROP_GUID = 29,
+ CV_CAP_PROP_ISO_SPEED = 30,
+ CV_CAP_PROP_BACKLIGHT = 32,
+ CV_CAP_PROP_PAN = 33,
+ CV_CAP_PROP_TILT = 34,
+ CV_CAP_PROP_ROLL = 35,
+ CV_CAP_PROP_IRIS = 36,
+ CV_CAP_PROP_SETTINGS = 37,
+ CV_CAP_PROP_BUFFERSIZE = 38,
+ CV_CAP_PROP_AUTOGRAB = 1024,
+ CV_CAP_PROP_PREVIEW_FORMAT = 1026,
+ CV_CAP_PROP_OPENNI2_SYNC = 110,
+ CV_CAP_PROP_OPENNI2_MIRROR = 111,
+ CV_CAP_PROP_PVAPI_FRAMESTARTTRIGGERMODE = 301,
+ CV_CAP_PROP_PVAPI_DECIMATIONHORIZONTAL = 302,
+ CV_CAP_PROP_PVAPI_DECIMATIONVERTICAL = 303,
+ CV_CAP_PROP_PVAPI_BINNINGX = 304,
+ CV_CAP_PROP_PVAPI_BINNINGY = 305,
+ CV_CAP_PROP_PVAPI_PIXELFORMAT = 306,
+ CV_CAP_PROP_XI_DOWNSAMPLING = 400,
+ CV_CAP_PROP_XI_DATA_FORMAT = 401,
+ CV_CAP_PROP_XI_OFFSET_X = 402,
+ CV_CAP_PROP_XI_OFFSET_Y = 403,
+ CV_CAP_PROP_XI_TRG_SOURCE = 404,
+ CV_CAP_PROP_XI_TRG_SOFTWARE = 405,
+ CV_CAP_PROP_XI_GPI_SELECTOR = 406,
+ CV_CAP_PROP_XI_GPI_MODE = 407,
+ CV_CAP_PROP_XI_GPI_LEVEL = 408,
+ CV_CAP_PROP_XI_GPO_SELECTOR = 409,
+ CV_CAP_PROP_XI_GPO_MODE = 410,
+ CV_CAP_PROP_XI_LED_SELECTOR = 411,
+ CV_CAP_PROP_XI_LED_MODE = 412,
+ CV_CAP_PROP_XI_MANUAL_WB = 413,
+ CV_CAP_PROP_XI_AUTO_WB = 414,
+ CV_CAP_PROP_XI_AEAG = 415,
+ CV_CAP_PROP_XI_EXP_PRIORITY = 416,
+ CV_CAP_PROP_XI_AE_MAX_LIMIT = 417,
+ CV_CAP_PROP_XI_AG_MAX_LIMIT = 418,
+ CV_CAP_PROP_XI_AEAG_LEVEL = 419,
+ CV_CAP_PROP_XI_TIMEOUT = 420,
+ CV_CAP_PROP_ANDROID_FLASH_MODE = 8001,
+ CV_CAP_PROP_ANDROID_FOCUS_MODE = 8002,
+ CV_CAP_PROP_ANDROID_WHITE_BALANCE = 8003,
+ CV_CAP_PROP_ANDROID_ANTIBANDING = 8004,
+ CV_CAP_PROP_ANDROID_FOCAL_LENGTH = 8005,
+ CV_CAP_PROP_ANDROID_FOCUS_DISTANCE_NEAR = 8006,
+ CV_CAP_PROP_ANDROID_FOCUS_DISTANCE_OPTIMAL = 8007,
+ CV_CAP_PROP_ANDROID_FOCUS_DISTANCE_FAR = 8008,
+ CV_CAP_PROP_ANDROID_EXPOSE_LOCK = 8009,
+ CV_CAP_PROP_ANDROID_WHITEBALANCE_LOCK = 8010,
+ CV_CAP_PROP_IOS_DEVICE_FOCUS = 9001,
+ CV_CAP_PROP_IOS_DEVICE_EXPOSURE = 9002,
+ CV_CAP_PROP_IOS_DEVICE_FLASH = 9003,
+ CV_CAP_PROP_IOS_DEVICE_WHITEBALANCE = 9004,
+ CV_CAP_PROP_IOS_DEVICE_TORCH = 9005,
+ CV_CAP_PROP_GIGA_FRAME_OFFSET_X = 10001,
+ CV_CAP_PROP_GIGA_FRAME_OFFSET_Y = 10002,
+ CV_CAP_PROP_GIGA_FRAME_WIDTH_MAX = 10003,
+ CV_CAP_PROP_GIGA_FRAME_HEIGH_MAX = 10004,
+ CV_CAP_PROP_GIGA_FRAME_SENS_WIDTH = 10005,
+ CV_CAP_PROP_GIGA_FRAME_SENS_HEIGH = 10006,
+ CV_CAP_PROP_INTELPERC_PROFILE_COUNT = 11001,
+ CV_CAP_PROP_INTELPERC_PROFILE_IDX = 11002,
+ CV_CAP_PROP_INTELPERC_DEPTH_LOW_CONFIDENCE_VALUE = 11003,
+ CV_CAP_PROP_INTELPERC_DEPTH_SATURATION_VALUE = 11004,
+ CV_CAP_PROP_INTELPERC_DEPTH_CONFIDENCE_THRESHOLD = 11005,
+ CV_CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_HORZ = 11006,
+ CV_CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_VERT = 11007,
+ CV_CAP_MODE_BGR = 0,
+ CV_CAP_MODE_RGB = 1,
+ CV_CAP_MODE_GRAY = 2,
+ CV_CAP_MODE_YUYV = 3,
+ CV_CAP_ANDROID_COLOR_FRAME_BGR = 0,
+ CV_CAP_ANDROID_COLOR_FRAME = CV_CAP_ANDROID_COLOR_FRAME_BGR,
+ CV_CAP_ANDROID_GREY_FRAME = 1,
+ CV_CAP_ANDROID_GRAY_FRAME = CV_CAP_ANDROID_GREY_FRAME,
+ CV_CAP_ANDROID_COLOR_FRAME_RGB = 2,
+ CV_CAP_ANDROID_COLOR_FRAME_BGRA = 3,
+ CV_CAP_ANDROID_COLOR_FRAME_RGBA = 4,
+ CV_CAP_ANDROID_FLASH_MODE_AUTO = 0,
+ CV_CAP_ANDROID_FLASH_MODE_OFF = 0+1,
+ CV_CAP_ANDROID_FLASH_MODE_ON = 0+2,
+ CV_CAP_ANDROID_FLASH_MODE_RED_EYE = 0+3,
+ CV_CAP_ANDROID_FLASH_MODE_TORCH = 0+4,
+ CV_CAP_ANDROID_FOCUS_MODE_AUTO = 0,
+ CV_CAP_ANDROID_FOCUS_MODE_CONTINUOUS_PICTURE = 0+1,
+ CV_CAP_ANDROID_FOCUS_MODE_CONTINUOUS_VIDEO = 0+2,
+ CV_CAP_ANDROID_FOCUS_MODE_EDOF = 0+3,
+ CV_CAP_ANDROID_FOCUS_MODE_FIXED = 0+4,
+ CV_CAP_ANDROID_FOCUS_MODE_INFINITY = 0+5,
+ CV_CAP_ANDROID_FOCUS_MODE_MACRO = 0+6,
+ CV_CAP_ANDROID_WHITE_BALANCE_AUTO = 0,
+ CV_CAP_ANDROID_WHITE_BALANCE_CLOUDY_DAYLIGHT = 0+1,
+ CV_CAP_ANDROID_WHITE_BALANCE_DAYLIGHT = 0+2,
+ CV_CAP_ANDROID_WHITE_BALANCE_FLUORESCENT = 0+3,
+ CV_CAP_ANDROID_WHITE_BALANCE_INCANDESCENT = 0+4,
+ CV_CAP_ANDROID_WHITE_BALANCE_SHADE = 0+5,
+ CV_CAP_ANDROID_WHITE_BALANCE_TWILIGHT = 0+6,
+ CV_CAP_ANDROID_WHITE_BALANCE_WARM_FLUORESCENT = 0+7,
+ CV_CAP_ANDROID_ANTIBANDING_50HZ = 0,
+ CV_CAP_ANDROID_ANTIBANDING_60HZ = 0+1,
+ CV_CAP_ANDROID_ANTIBANDING_AUTO = 0+2,
+ CV_CAP_ANDROID_ANTIBANDING_OFF = 0+3,
+ CV_CAP_PROP_GPHOTO2_PREVIEW = 17001,
+ CV_CAP_PROP_GPHOTO2_WIDGET_ENUMERATE = 17002,
+ CV_CAP_PROP_GPHOTO2_RELOAD_CONFIG = 17003,
+ CV_CAP_PROP_GPHOTO2_RELOAD_ON_CHANGE = 17004,
+ CV_CAP_PROP_GPHOTO2_COLLECT_MSGS = 17005,
+ CV_CAP_PROP_GPHOTO2_FLUSH_MSGS = 17006,
+ CV_CAP_PROP_SPEED = 17007,
+ CV_CAP_PROP_APERTURE = 17008,
+ CV_CAP_PROP_VIEWFINDER = 17010,
+ CAP_ANY = 0,
+ CAP_VFW = 200,
+ CAP_V4L = 200,
+ CAP_V4L2 = CAP_V4L,
+ CAP_FIREWARE = 300,
+ CAP_FIREWIRE = CAP_FIREWARE,
+ CAP_IEEE1394 = CAP_FIREWARE,
+ CAP_DC1394 = CAP_FIREWARE,
+ CAP_CMU1394 = CAP_FIREWARE,
+ CAP_QT = 500,
+ CAP_UNICAP = 600,
+ CAP_DSHOW = 700,
+ CAP_PVAPI = 800,
+ CAP_OPENNI = 900,
+ CAP_OPENNI_ASUS = 910,
+ CAP_ANDROID = 1000,
+ CAP_XIAPI = 1100,
+ CAP_AVFOUNDATION = 1200,
+ CAP_GIGANETIX = 1300,
+ CAP_MSMF = 1400,
+ CAP_WINRT = 1410,
+ CAP_INTELPERC = 1500,
+ CAP_OPENNI2 = 1600,
+ CAP_OPENNI2_ASUS = 1610,
+ CAP_GPHOTO2 = 1700,
+ CAP_PROP_POS_MSEC = 0,
+ CAP_PROP_POS_FRAMES = 1,
+ CAP_PROP_POS_AVI_RATIO = 2,
+ CAP_PROP_FRAME_WIDTH = 3,
+ CAP_PROP_FRAME_HEIGHT = 4,
+ CAP_PROP_FPS = 5,
+ CAP_PROP_FOURCC = 6,
+ CAP_PROP_FRAME_COUNT = 7,
+ CAP_PROP_FORMAT = 8,
+ CAP_PROP_MODE = 9,
+ CAP_PROP_BRIGHTNESS = 10,
+ CAP_PROP_CONTRAST = 11,
+ CAP_PROP_SATURATION = 12,
+ CAP_PROP_HUE = 13,
+ CAP_PROP_GAIN = 14,
+ CAP_PROP_EXPOSURE = 15,
+ CAP_PROP_CONVERT_RGB = 16,
+ CAP_PROP_WHITE_BALANCE_BLUE_U = 17,
+ CAP_PROP_RECTIFICATION = 18,
+ CAP_PROP_MONOCHROME = 19,
+ CAP_PROP_SHARPNESS = 20,
+ CAP_PROP_AUTO_EXPOSURE = 21,
+ CAP_PROP_GAMMA = 22,
+ CAP_PROP_TEMPERATURE = 23,
+ CAP_PROP_TRIGGER = 24,
+ CAP_PROP_TRIGGER_DELAY = 25,
+ CAP_PROP_WHITE_BALANCE_RED_V = 26,
+ CAP_PROP_ZOOM = 27,
+ CAP_PROP_FOCUS = 28,
+ CAP_PROP_GUID = 29,
+ CAP_PROP_ISO_SPEED = 30,
+ CAP_PROP_BACKLIGHT = 32,
+ CAP_PROP_PAN = 33,
+ CAP_PROP_TILT = 34,
+ CAP_PROP_ROLL = 35,
+ CAP_PROP_IRIS = 36,
+ CAP_PROP_SETTINGS = 37,
+ CAP_MODE_BGR = 0,
+ CAP_MODE_RGB = 1,
+ CAP_MODE_GRAY = 2,
+ CAP_MODE_YUYV = 3,
+ CAP_PROP_DC1394_OFF = -4,
+ CAP_PROP_DC1394_MODE_MANUAL = -3,
+ CAP_PROP_DC1394_MODE_AUTO = -2,
+ CAP_PROP_DC1394_MODE_ONE_PUSH_AUTO = -1,
+ CAP_PROP_DC1394_MAX = 31,
+ CAP_OPENNI_DEPTH_GENERATOR = 1 << 31,
+ CAP_OPENNI_IMAGE_GENERATOR = 1 << 30,
+ CAP_OPENNI_GENERATORS_MASK = CAP_OPENNI_DEPTH_GENERATOR + CAP_OPENNI_IMAGE_GENERATOR,
+ CAP_PROP_OPENNI_OUTPUT_MODE = 100,
+ CAP_PROP_OPENNI_FRAME_MAX_DEPTH = 101,
+ CAP_PROP_OPENNI_BASELINE = 102,
+ CAP_PROP_OPENNI_FOCAL_LENGTH = 103,
+ CAP_PROP_OPENNI_REGISTRATION = 104,
+ CAP_PROP_OPENNI_REGISTRATION_ON = CAP_PROP_OPENNI_REGISTRATION,
+ CAP_PROP_OPENNI_APPROX_FRAME_SYNC = 105,
+ CAP_PROP_OPENNI_MAX_BUFFER_SIZE = 106,
+ CAP_PROP_OPENNI_CIRCLE_BUFFER = 107,
+ CAP_PROP_OPENNI_MAX_TIME_DURATION = 108,
+ CAP_PROP_OPENNI_GENERATOR_PRESENT = 109,
+ CAP_PROP_OPENNI2_SYNC = 110,
+ CAP_PROP_OPENNI2_MIRROR = 111,
+ CAP_OPENNI_IMAGE_GENERATOR_PRESENT = CAP_OPENNI_IMAGE_GENERATOR + CAP_PROP_OPENNI_GENERATOR_PRESENT,
+ CAP_OPENNI_IMAGE_GENERATOR_OUTPUT_MODE = CAP_OPENNI_IMAGE_GENERATOR + CAP_PROP_OPENNI_OUTPUT_MODE,
+ CAP_OPENNI_DEPTH_GENERATOR_BASELINE = CAP_OPENNI_DEPTH_GENERATOR + CAP_PROP_OPENNI_BASELINE,
+ CAP_OPENNI_DEPTH_GENERATOR_FOCAL_LENGTH = CAP_OPENNI_DEPTH_GENERATOR + CAP_PROP_OPENNI_FOCAL_LENGTH,
+ CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION = CAP_OPENNI_DEPTH_GENERATOR + CAP_PROP_OPENNI_REGISTRATION,
+ CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION_ON = CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION,
+ CAP_OPENNI_DEPTH_MAP = 0,
+ CAP_OPENNI_POINT_CLOUD_MAP = 1,
+ CAP_OPENNI_DISPARITY_MAP = 2,
+ CAP_OPENNI_DISPARITY_MAP_32F = 3,
+ CAP_OPENNI_VALID_DEPTH_MASK = 4,
+ CAP_OPENNI_BGR_IMAGE = 5,
+ CAP_OPENNI_GRAY_IMAGE = 6,
+ CAP_OPENNI_VGA_30HZ = 0,
+ CAP_OPENNI_SXGA_15HZ = 1,
+ CAP_OPENNI_SXGA_30HZ = 2,
+ CAP_OPENNI_QVGA_30HZ = 3,
+ CAP_OPENNI_QVGA_60HZ = 4,
+ CAP_PROP_GSTREAMER_QUEUE_LENGTH = 200,
+ CAP_PROP_PVAPI_MULTICASTIP = 300,
+ CAP_PROP_PVAPI_FRAMESTARTTRIGGERMODE = 301,
+ CAP_PROP_PVAPI_DECIMATIONHORIZONTAL = 302,
+ CAP_PROP_PVAPI_DECIMATIONVERTICAL = 303,
+ CAP_PROP_PVAPI_BINNINGX = 304,
+ CAP_PROP_PVAPI_BINNINGY = 305,
+ CAP_PROP_PVAPI_PIXELFORMAT = 306,
+ CAP_PVAPI_FSTRIGMODE_FREERUN = 0,
+ CAP_PVAPI_FSTRIGMODE_SYNCIN1 = 1,
+ CAP_PVAPI_FSTRIGMODE_SYNCIN2 = 2,
+ CAP_PVAPI_FSTRIGMODE_FIXEDRATE = 3,
+ CAP_PVAPI_FSTRIGMODE_SOFTWARE = 4,
+ CAP_PVAPI_DECIMATION_OFF = 1,
+ CAP_PVAPI_DECIMATION_2OUTOF4 = 2,
+ CAP_PVAPI_DECIMATION_2OUTOF8 = 4,
+ CAP_PVAPI_DECIMATION_2OUTOF16 = 8,
+ CAP_PVAPI_PIXELFORMAT_MONO8 = 1,
+ CAP_PVAPI_PIXELFORMAT_MONO16 = 2,
+ CAP_PVAPI_PIXELFORMAT_BAYER8 = 3,
+ CAP_PVAPI_PIXELFORMAT_BAYER16 = 4,
+ CAP_PVAPI_PIXELFORMAT_RGB24 = 5,
+ CAP_PVAPI_PIXELFORMAT_BGR24 = 6,
+ CAP_PVAPI_PIXELFORMAT_RGBA32 = 7,
+ CAP_PVAPI_PIXELFORMAT_BGRA32 = 8,
+ CAP_PROP_XI_DOWNSAMPLING = 400,
+ CAP_PROP_XI_DATA_FORMAT = 401,
+ CAP_PROP_XI_OFFSET_X = 402,
+ CAP_PROP_XI_OFFSET_Y = 403,
+ CAP_PROP_XI_TRG_SOURCE = 404,
+ CAP_PROP_XI_TRG_SOFTWARE = 405,
+ CAP_PROP_XI_GPI_SELECTOR = 406,
+ CAP_PROP_XI_GPI_MODE = 407,
+ CAP_PROP_XI_GPI_LEVEL = 408,
+ CAP_PROP_XI_GPO_SELECTOR = 409,
+ CAP_PROP_XI_GPO_MODE = 410,
+ CAP_PROP_XI_LED_SELECTOR = 411,
+ CAP_PROP_XI_LED_MODE = 412,
+ CAP_PROP_XI_MANUAL_WB = 413,
+ CAP_PROP_XI_AUTO_WB = 414,
+ CAP_PROP_XI_AEAG = 415,
+ CAP_PROP_XI_EXP_PRIORITY = 416,
+ CAP_PROP_XI_AE_MAX_LIMIT = 417,
+ CAP_PROP_XI_AG_MAX_LIMIT = 418,
+ CAP_PROP_XI_AEAG_LEVEL = 419,
+ CAP_PROP_XI_TIMEOUT = 420,
+ CAP_PROP_ANDROID_AUTOGRAB = 1024,
+ CAP_PROP_ANDROID_PREVIEW_SIZES_STRING = 1025,
+ CAP_PROP_ANDROID_PREVIEW_FORMAT = 1026,
+ CAP_PROP_ANDROID_FLASH_MODE = 8001,
+ CAP_PROP_ANDROID_FOCUS_MODE = 8002,
+ CAP_PROP_ANDROID_WHITE_BALANCE = 8003,
+ CAP_PROP_ANDROID_ANTIBANDING = 8004,
+ CAP_PROP_ANDROID_FOCAL_LENGTH = 8005,
+ CAP_PROP_ANDROID_FOCUS_DISTANCE_NEAR = 8006,
+ CAP_PROP_ANDROID_FOCUS_DISTANCE_OPTIMAL = 8007,
+ CAP_PROP_ANDROID_FOCUS_DISTANCE_FAR = 8008,
+ CAP_ANDROID_COLOR_FRAME_BGR = 0,
+ CAP_ANDROID_COLOR_FRAME = CAP_ANDROID_COLOR_FRAME_BGR,
+ CAP_ANDROID_GREY_FRAME = 1,
+ CAP_ANDROID_GRAY_FRAME = CAP_ANDROID_GREY_FRAME,
+ CAP_ANDROID_COLOR_FRAME_RGB = 2,
+ CAP_ANDROID_COLOR_FRAME_BGRA = 3,
+ CAP_ANDROID_COLOR_FRAME_RGBA = 4,
+ CAP_ANDROID_FLASH_MODE_AUTO = 0,
+ CAP_ANDROID_FLASH_MODE_OFF = 1,
+ CAP_ANDROID_FLASH_MODE_ON = 2,
+ CAP_ANDROID_FLASH_MODE_RED_EYE = 3,
+ CAP_ANDROID_FLASH_MODE_TORCH = 4,
+ CAP_ANDROID_FOCUS_MODE_AUTO = 0,
+ CAP_ANDROID_FOCUS_MODE_CONTINUOUS_VIDEO = 1,
+ CAP_ANDROID_FOCUS_MODE_EDOF = 2,
+ CAP_ANDROID_FOCUS_MODE_FIXED = 3,
+ CAP_ANDROID_FOCUS_MODE_INFINITY = 4,
+ CAP_ANDROID_FOCUS_MODE_MACRO = 5,
+ CAP_ANDROID_WHITE_BALANCE_AUTO = 0,
+ CAP_ANDROID_WHITE_BALANCE_CLOUDY_DAYLIGHT = 1,
+ CAP_ANDROID_WHITE_BALANCE_DAYLIGHT = 2,
+ CAP_ANDROID_WHITE_BALANCE_FLUORESCENT = 3,
+ CAP_ANDROID_WHITE_BALANCE_INCANDESCENT = 4,
+ CAP_ANDROID_WHITE_BALANCE_SHADE = 5,
+ CAP_ANDROID_WHITE_BALANCE_TWILIGHT = 6,
+ CAP_ANDROID_WHITE_BALANCE_WARM_FLUORESCENT = 7,
+ CAP_ANDROID_ANTIBANDING_50HZ = 0,
+ CAP_ANDROID_ANTIBANDING_60HZ = 1,
+ CAP_ANDROID_ANTIBANDING_AUTO = 2,
+ CAP_ANDROID_ANTIBANDING_OFF = 3,
+ CAP_PROP_IOS_DEVICE_FOCUS = 9001,
+ CAP_PROP_IOS_DEVICE_EXPOSURE = 9002,
+ CAP_PROP_IOS_DEVICE_FLASH = 9003,
+ CAP_PROP_IOS_DEVICE_WHITEBALANCE = 9004,
+ CAP_PROP_IOS_DEVICE_TORCH = 9005,
+ CAP_PROP_GIGA_FRAME_OFFSET_X = 10001,
+ CAP_PROP_GIGA_FRAME_OFFSET_Y = 10002,
+ CAP_PROP_GIGA_FRAME_WIDTH_MAX = 10003,
+ CAP_PROP_GIGA_FRAME_HEIGH_MAX = 10004,
+ CAP_PROP_GIGA_FRAME_SENS_WIDTH = 10005,
+ CAP_PROP_GIGA_FRAME_SENS_HEIGH = 10006,
+ CAP_PROP_INTELPERC_PROFILE_COUNT = 11001,
+ CAP_PROP_INTELPERC_PROFILE_IDX = 11002,
+ CAP_PROP_INTELPERC_DEPTH_LOW_CONFIDENCE_VALUE = 11003,
+ CAP_PROP_INTELPERC_DEPTH_SATURATION_VALUE = 11004,
+ CAP_PROP_INTELPERC_DEPTH_CONFIDENCE_THRESHOLD = 11005,
+ CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_HORZ = 11006,
+ CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_VERT = 11007,
+ CAP_INTELPERC_DEPTH_GENERATOR = 1 << 29,
+ CAP_INTELPERC_IMAGE_GENERATOR = 1 << 28,
+ CAP_INTELPERC_GENERATORS_MASK = CAP_INTELPERC_DEPTH_GENERATOR + CAP_INTELPERC_IMAGE_GENERATOR,
+ CAP_INTELPERC_DEPTH_MAP = 0,
+ CAP_INTELPERC_UVDEPTH_MAP = 1,
+ CAP_INTELPERC_IR_MAP = 2,
+ CAP_INTELPERC_IMAGE = 3,
+ VIDEOWRITER_PROP_QUALITY = 1,
+ VIDEOWRITER_PROP_FRAMEBYTES = 2,
+ CAP_PROP_GPHOTO2_PREVIEW = 17001,
+ CAP_PROP_GPHOTO2_WIDGET_ENUMERATE = 17002,
+ CAP_PROP_GPHOTO2_RELOAD_CONFIG = 17003,
+ CAP_PROP_GPHOTO2_RELOAD_ON_CHANGE = 17004,
+ CAP_PROP_GPHOTO2_COLLECT_MSGS = 17005,
+ CAP_PROP_GPHOTO2_FLUSH_MSGS = 17006,
+ CAP_PROP_SPEED = 17007,
+ CAP_PROP_APERTURE = 17008,
+ CAP_PROP_EXPOSUREPROGRAM = 17009,
+ CAP_PROP_VIEWFINDER = 17010;
+
+
+
+
+}
diff --git a/modules/java/src/videoio.cpp b/modules/java/src/videoio.cpp
new file mode 100644
index 0000000..67ee126
--- /dev/null
+++ b/modules/java/src/videoio.cpp
@@ -0,0 +1,412 @@
+
+//
+// This file is auto-generated, please don't edit!
+//
+
+#define LOG_TAG "org.opencv.videoio"
+
+#include "common.h"
+
+#include "opencv2/opencv_modules.hpp"
+#ifdef HAVE_OPENCV_VIDEOIO
+
+#include <string>
+
+#include "opencv2/videoio.hpp"
+
+#include "../../videoio/include/opencv2/videoio/videoio_c.h"
+#include "../../videoio/include/opencv2/videoio.hpp"
+
+using namespace cv;
+
+/// throw java exception
+static void throwJavaException(JNIEnv *env, const std::exception *e, const char *method) {
+ std::string what = "unknown exception";
+ jclass je = 0;
+
+ if(e) {
+ std::string exception_type = "std::exception";
+
+ if(dynamic_cast<const cv::Exception*>(e)) {
+ exception_type = "cv::Exception";
+ je = env->FindClass("org/opencv/core/CvException");
+ }
+
+ what = exception_type + ": " + e->what();
+ }
+
+ if(!je) je = env->FindClass("java/lang/Exception");
+ env->ThrowNew(je, what.c_str());
+
+ LOGE("%s caught %s", method, what.c_str());
+ (void)method; // avoid "unused" warning
+}
+
+
+extern "C" {
+
+
+//
+// VideoCapture()
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_videoio_VideoCapture_VideoCapture_10 (JNIEnv*, jclass);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_videoio_VideoCapture_VideoCapture_10
+ (JNIEnv* env, jclass )
+{
+ static const char method_name[] = "videoio::VideoCapture_10()";
+ try {
+ LOGD("%s", method_name);
+
+ cv::VideoCapture* _retval_ = new cv::VideoCapture( );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// VideoCapture(String filename)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_videoio_VideoCapture_VideoCapture_11 (JNIEnv*, jclass, jstring);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_videoio_VideoCapture_VideoCapture_11
+ (JNIEnv* env, jclass , jstring filename)
+{
+ static const char method_name[] = "videoio::VideoCapture_11()";
+ try {
+ LOGD("%s", method_name);
+ const char* utf_filename = env->GetStringUTFChars(filename, 0); String n_filename( utf_filename ? utf_filename : "" ); env->ReleaseStringUTFChars(filename, utf_filename);
+ cv::VideoCapture* _retval_ = new cv::VideoCapture( n_filename );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// VideoCapture(int device)
+//
+
+JNIEXPORT jlong JNICALL Java_org_opencv_videoio_VideoCapture_VideoCapture_12 (JNIEnv*, jclass, jint);
+
+JNIEXPORT jlong JNICALL Java_org_opencv_videoio_VideoCapture_VideoCapture_12
+ (JNIEnv* env, jclass , jint device)
+{
+ static const char method_name[] = "videoio::VideoCapture_12()";
+ try {
+ LOGD("%s", method_name);
+
+ cv::VideoCapture* _retval_ = new cv::VideoCapture( (int)device );
+ return (jlong) _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool open(String filename)
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_videoio_VideoCapture_open_10 (JNIEnv*, jclass, jlong, jstring);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_videoio_VideoCapture_open_10
+ (JNIEnv* env, jclass , jlong self, jstring filename)
+{
+ static const char method_name[] = "videoio::open_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::VideoCapture* me = (cv::VideoCapture*) self; //TODO: check for NULL
+ const char* utf_filename = env->GetStringUTFChars(filename, 0); String n_filename( utf_filename ? utf_filename : "" ); env->ReleaseStringUTFChars(filename, utf_filename);
+ bool _retval_ = me->open( n_filename );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool open(int device)
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_videoio_VideoCapture_open_11 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_videoio_VideoCapture_open_11
+ (JNIEnv* env, jclass , jlong self, jint device)
+{
+ static const char method_name[] = "videoio::open_11()";
+ try {
+ LOGD("%s", method_name);
+ cv::VideoCapture* me = (cv::VideoCapture*) self; //TODO: check for NULL
+ bool _retval_ = me->open( (int)device );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool isOpened()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_videoio_VideoCapture_isOpened_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_videoio_VideoCapture_isOpened_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "videoio::isOpened_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::VideoCapture* me = (cv::VideoCapture*) self; //TODO: check for NULL
+ bool _retval_ = me->isOpened( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// void release()
+//
+
+JNIEXPORT void JNICALL Java_org_opencv_videoio_VideoCapture_release_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_videoio_VideoCapture_release_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "videoio::release_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::VideoCapture* me = (cv::VideoCapture*) self; //TODO: check for NULL
+ me->release( );
+ return;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return;
+}
+
+
+
+//
+// bool grab()
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_videoio_VideoCapture_grab_10 (JNIEnv*, jclass, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_videoio_VideoCapture_grab_10
+ (JNIEnv* env, jclass , jlong self)
+{
+ static const char method_name[] = "videoio::grab_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::VideoCapture* me = (cv::VideoCapture*) self; //TODO: check for NULL
+ bool _retval_ = me->grab( );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool retrieve(Mat& image, int flag = 0)
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_videoio_VideoCapture_retrieve_10 (JNIEnv*, jclass, jlong, jlong, jint);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_videoio_VideoCapture_retrieve_10
+ (JNIEnv* env, jclass , jlong self, jlong image_nativeObj, jint flag)
+{
+ static const char method_name[] = "videoio::retrieve_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::VideoCapture* me = (cv::VideoCapture*) self; //TODO: check for NULL
+ Mat& image = *((Mat*)image_nativeObj);
+ bool _retval_ = me->retrieve( image, (int)flag );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_videoio_VideoCapture_retrieve_11 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_videoio_VideoCapture_retrieve_11
+ (JNIEnv* env, jclass , jlong self, jlong image_nativeObj)
+{
+ static const char method_name[] = "videoio::retrieve_11()";
+ try {
+ LOGD("%s", method_name);
+ cv::VideoCapture* me = (cv::VideoCapture*) self; //TODO: check for NULL
+ Mat& image = *((Mat*)image_nativeObj);
+ bool _retval_ = me->retrieve( image );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool read(Mat& image)
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_videoio_VideoCapture_read_10 (JNIEnv*, jclass, jlong, jlong);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_videoio_VideoCapture_read_10
+ (JNIEnv* env, jclass , jlong self, jlong image_nativeObj)
+{
+ static const char method_name[] = "videoio::read_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::VideoCapture* me = (cv::VideoCapture*) self; //TODO: check for NULL
+ Mat& image = *((Mat*)image_nativeObj);
+ bool _retval_ = me->read( image );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// bool set(int propId, double value)
+//
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_videoio_VideoCapture_set_10 (JNIEnv*, jclass, jlong, jint, jdouble);
+
+JNIEXPORT jboolean JNICALL Java_org_opencv_videoio_VideoCapture_set_10
+ (JNIEnv* env, jclass , jlong self, jint propId, jdouble value)
+{
+ static const char method_name[] = "videoio::set_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::VideoCapture* me = (cv::VideoCapture*) self; //TODO: check for NULL
+ bool _retval_ = me->set( (int)propId, (double)value );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+//
+// double get(int propId)
+//
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_videoio_VideoCapture_get_10 (JNIEnv*, jclass, jlong, jint);
+
+JNIEXPORT jdouble JNICALL Java_org_opencv_videoio_VideoCapture_get_10
+ (JNIEnv* env, jclass , jlong self, jint propId)
+{
+ static const char method_name[] = "videoio::get_10()";
+ try {
+ LOGD("%s", method_name);
+ cv::VideoCapture* me = (cv::VideoCapture*) self; //TODO: check for NULL
+ double _retval_ = me->get( (int)propId );
+ return _retval_;
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return 0;
+}
+
+
+
+JNIEXPORT jstring JNICALL Java_org_opencv_videoio_VideoCapture_getSupportedPreviewSizes_10
+ (JNIEnv *env, jclass, jlong self);
+
+JNIEXPORT jstring JNICALL Java_org_opencv_videoio_VideoCapture_getSupportedPreviewSizes_10
+ (JNIEnv *env, jclass, jlong self)
+{
+ static const char method_name[] = "videoio::VideoCapture_getSupportedPreviewSizes_10()";
+ try {
+ LOGD("%s", method_name);
+ VideoCapture* me = (VideoCapture*) self; //TODO: check for NULL
+ union {double prop; const char* name;} u;
+ u.prop = me->get(CAP_PROP_ANDROID_PREVIEW_SIZES_STRING);
+ return env->NewStringUTF(u.name);
+ } catch(const std::exception &e) {
+ throwJavaException(env, &e, method_name);
+ } catch (...) {
+ throwJavaException(env, 0, method_name);
+ }
+ return env->NewStringUTF("");
+}
+
+
+//
+// native support for java finalize()
+// static void cv::VideoCapture::delete( __int64 self )
+//
+JNIEXPORT void JNICALL Java_org_opencv_videoio_VideoCapture_delete(JNIEnv*, jclass, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_videoio_VideoCapture_delete
+ (JNIEnv*, jclass, jlong self)
+{
+ delete (cv::VideoCapture*) self;
+}
+
+
+
+} // extern "C"
+
+#endif // HAVE_OPENCV_VIDEOIO
diff --git a/modules/ml/precomp.hpp b/modules/ml/precomp.hpp
new file mode 100644
index 0000000..8482198
--- /dev/null
+++ b/modules/ml/precomp.hpp
@@ -0,0 +1,383 @@
+/*M///////////////////////////////////////////////////////////////////////////////////////
+//
+// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+//
+// By downloading, copying, installing or using the software you agree to this license.
+// If you do not agree to this license, do not download, install,
+// copy or use the software.
+//
+//
+// Intel License Agreement
+//
+// Copyright (C) 2000, Intel Corporation, all rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// * Redistribution's of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// * Redistribution's in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// * The name of Intel Corporation may not be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// This software is provided by the copyright holders and contributors "as is" and
+// any express or implied warranties, including, but not limited to, the implied
+// warranties of merchantability and fitness for a particular purpose are disclaimed.
+// In no event shall the Intel Corporation or contributors be liable for any direct,
+// indirect, incidental, special, exemplary, or consequential damages
+// (including, but not limited to, procurement of substitute goods or services;
+// loss of use, data, or profits; or business interruption) however caused
+// and on any theory of liability, whether in contract, strict liability,
+// or tort (including negligence or otherwise) arising in any way out of
+// the use of this software, even if advised of the possibility of such damage.
+//
+//M*/
+
+#ifndef __OPENCV_ML_PRECOMP_HPP__
+#define __OPENCV_ML_PRECOMP_HPP__
+
+#include "opencv2/core.hpp"
+#include "opencv2/ml.hpp"
+#include "opencv2/core/core_c.h"
+#include "opencv2/core/utility.hpp"
+
+#include "opencv2/core/private.hpp"
+
+#include <assert.h>
+#include <float.h>
+#include <limits.h>
+#include <math.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <vector>
+
+/****************************************************************************************\
+ * Main struct definitions *
+ \****************************************************************************************/
+
+/* log(2*PI) */
+#define CV_LOG2PI (1.8378770664093454835606594728112)
+
+namespace cv
+{
+namespace ml
+{
+ using std::vector;
+
+ #define CV_DTREE_CAT_DIR(idx,subset) \
+ (2*((subset[(idx)>>5]&(1 << ((idx) & 31)))==0)-1)
+
+ template<typename _Tp> struct cmp_lt_idx
+ {
+ cmp_lt_idx(const _Tp* _arr) : arr(_arr) {}
+ bool operator ()(int a, int b) const { return arr[a] < arr[b]; }
+ const _Tp* arr;
+ };
+
+ template<typename _Tp> struct cmp_lt_ptr
+ {
+ cmp_lt_ptr() {}
+ bool operator ()(const _Tp* a, const _Tp* b) const { return *a < *b; }
+ };
+
+ static inline void setRangeVector(std::vector<int>& vec, int n)
+ {
+ vec.resize(n);
+ for( int i = 0; i < n; i++ )
+ vec[i] = i;
+ }
+
+ static inline void writeTermCrit(FileStorage& fs, const TermCriteria& termCrit)
+ {
+ if( (termCrit.type & TermCriteria::EPS) != 0 )
+ fs << "epsilon" << termCrit.epsilon;
+ if( (termCrit.type & TermCriteria::COUNT) != 0 )
+ fs << "iterations" << termCrit.maxCount;
+ }
+
+ static inline TermCriteria readTermCrit(const FileNode& fn)
+ {
+ TermCriteria termCrit;
+ double epsilon = (double)fn["epsilon"];
+ if( epsilon > 0 )
+ {
+ termCrit.type |= TermCriteria::EPS;
+ termCrit.epsilon = epsilon;
+ }
+ int iters = (int)fn["iterations"];
+ if( iters > 0 )
+ {
+ termCrit.type |= TermCriteria::COUNT;
+ termCrit.maxCount = iters;
+ }
+ return termCrit;
+ }
+
+ struct TreeParams
+ {
+ TreeParams();
+ TreeParams( int maxDepth, int minSampleCount,
+ double regressionAccuracy, bool useSurrogates,
+ int maxCategories, int CVFolds,
+ bool use1SERule, bool truncatePrunedTree,
+ const Mat& priors );
+
+ inline void setMaxCategories(int val)
+ {
+ if( val < 2 )
+ CV_Error( CV_StsOutOfRange, "max_categories should be >= 2" );
+ maxCategories = std::min(val, 15 );
+ }
+ inline void setMaxDepth(int val)
+ {
+ if( val < 0 )
+ CV_Error( CV_StsOutOfRange, "max_depth should be >= 0" );
+ maxDepth = std::min( val, 25 );
+ }
+ inline void setMinSampleCount(int val)
+ {
+ minSampleCount = std::max(val, 1);
+ }
+ inline void setCVFolds(int val)
+ {
+ if( val < 0 )
+ CV_Error( CV_StsOutOfRange,
+ "params.CVFolds should be =0 (the tree is not pruned) "
+ "or n>0 (tree is pruned using n-fold cross-validation)" );
+ if( val == 1 )
+ val = 0;
+ CVFolds = val;
+ }
+ inline void setRegressionAccuracy(float val)
+ {
+ if( val < 0 )
+ CV_Error( CV_StsOutOfRange, "params.regression_accuracy should be >= 0" );
+ regressionAccuracy = val;
+ }
+
+ inline int getMaxCategories() const { return maxCategories; }
+ inline int getMaxDepth() const { return maxDepth; }
+ inline int getMinSampleCount() const { return minSampleCount; }
+ inline int getCVFolds() const { return CVFolds; }
+ inline float getRegressionAccuracy() const { return regressionAccuracy; }
+
+ CV_IMPL_PROPERTY(bool, UseSurrogates, useSurrogates)
+ CV_IMPL_PROPERTY(bool, Use1SERule, use1SERule)
+ CV_IMPL_PROPERTY(bool, TruncatePrunedTree, truncatePrunedTree)
+ CV_IMPL_PROPERTY_S(cv::Mat, Priors, priors)
+
+ public:
+ bool useSurrogates;
+ bool use1SERule;
+ bool truncatePrunedTree;
+ Mat priors;
+
+ protected:
+ int maxCategories;
+ int maxDepth;
+ int minSampleCount;
+ int CVFolds;
+ float regressionAccuracy;
+ };
+
+ struct RTreeParams
+ {
+ RTreeParams();
+ RTreeParams(bool calcVarImportance, int nactiveVars, TermCriteria termCrit );
+ bool calcVarImportance;
+ int nactiveVars;
+ TermCriteria termCrit;
+ };
+
+ struct BoostTreeParams
+ {
+ BoostTreeParams();
+ BoostTreeParams(int boostType, int weakCount, double weightTrimRate);
+ int boostType;
+ int weakCount;
+ double weightTrimRate;
+ };
+
+ class DTreesImpl : public DTrees
+ {
+ public:
+ struct WNode
+ {
+ WNode()
+ {
+ class_idx = sample_count = depth = complexity = 0;
+ parent = left = right = split = defaultDir = -1;
+ Tn = INT_MAX;
+ value = maxlr = alpha = node_risk = tree_risk = tree_error = 0.;
+ }
+
+ int class_idx;
+ double Tn;
+ double value;
+
+ int parent;
+ int left;
+ int right;
+ int defaultDir;
+
+ int split;
+
+ int sample_count;
+ int depth;
+ double maxlr;
+
+ // global pruning data
+ int complexity;
+ double alpha;
+ double node_risk, tree_risk, tree_error;
+ };
+
+ struct WSplit
+ {
+ WSplit()
+ {
+ varIdx = next = 0;
+ inversed = false;
+ quality = c = 0.f;
+ subsetOfs = -1;
+ }
+
+ int varIdx;
+ bool inversed;
+ float quality;
+ int next;
+ float c;
+ int subsetOfs;
+ };
+
+ struct WorkData
+ {
+ WorkData(const Ptr<TrainData>& _data);
+
+ Ptr<TrainData> data;
+ vector<WNode> wnodes;
+ vector<WSplit> wsplits;
+ vector<int> wsubsets;
+ vector<double> cv_Tn;
+ vector<double> cv_node_risk;
+ vector<double> cv_node_error;
+ vector<int> cv_labels;
+ vector<double> sample_weights;
+ vector<int> cat_responses;
+ vector<double> ord_responses;
+ vector<int> sidx;
+ int maxSubsetSize;
+ };
+
+ CV_WRAP_SAME_PROPERTY(int, MaxCategories, params)
+ CV_WRAP_SAME_PROPERTY(int, MaxDepth, params)
+ CV_WRAP_SAME_PROPERTY(int, MinSampleCount, params)
+ CV_WRAP_SAME_PROPERTY(int, CVFolds, params)
+ CV_WRAP_SAME_PROPERTY(bool, UseSurrogates, params)
+ CV_WRAP_SAME_PROPERTY(bool, Use1SERule, params)
+ CV_WRAP_SAME_PROPERTY(bool, TruncatePrunedTree, params)
+ CV_WRAP_SAME_PROPERTY(float, RegressionAccuracy, params)
+ CV_WRAP_SAME_PROPERTY_S(cv::Mat, Priors, params)
+
+ DTreesImpl();
+ virtual ~DTreesImpl();
+ virtual void clear();
+
+ String getDefaultName() const { return "opencv_ml_dtree"; }
+ bool isTrained() const { return !roots.empty(); }
+ bool isClassifier() const { return _isClassifier; }
+ int getVarCount() const { return varType.empty() ? 0 : (int)(varType.size() - 1); }
+ int getCatCount(int vi) const { return catOfs[vi][1] - catOfs[vi][0]; }
+ int getSubsetSize(int vi) const { return (getCatCount(vi) + 31)/32; }
+
+ virtual void setDParams(const TreeParams& _params);
+ virtual void startTraining( const Ptr<TrainData>& trainData, int flags );
+ virtual void endTraining();
+ virtual void initCompVarIdx();
+ virtual bool train( const Ptr<TrainData>& trainData, int flags );
+
+ virtual int addTree( const vector<int>& sidx );
+ virtual int addNodeAndTrySplit( int parent, const vector<int>& sidx );
+ virtual const vector<int>& getActiveVars();
+ virtual int findBestSplit( const vector<int>& _sidx );
+ virtual void calcValue( int nidx, const vector<int>& _sidx );
+
+ virtual WSplit findSplitOrdClass( int vi, const vector<int>& _sidx, double initQuality );
+
+ // simple k-means, slightly modified to take into account the "weight" (L1-norm) of each vector.
+ virtual void clusterCategories( const double* vectors, int n, int m, double* csums, int k, int* labels );
+ virtual WSplit findSplitCatClass( int vi, const vector<int>& _sidx, double initQuality, int* subset );
+
+ virtual WSplit findSplitOrdReg( int vi, const vector<int>& _sidx, double initQuality );
+ virtual WSplit findSplitCatReg( int vi, const vector<int>& _sidx, double initQuality, int* subset );
+
+ virtual int calcDir( int splitidx, const vector<int>& _sidx, vector<int>& _sleft, vector<int>& _sright );
+ virtual int pruneCV( int root );
+
+ virtual double updateTreeRNC( int root, double T, int fold );
+ virtual bool cutTree( int root, double T, int fold, double min_alpha );
+ virtual float predictTrees( const Range& range, const Mat& sample, int flags ) const;
+ virtual float predict( InputArray inputs, OutputArray outputs, int flags ) const;
+
+ virtual void writeTrainingParams( FileStorage& fs ) const;
+ virtual void writeParams( FileStorage& fs ) const;
+ virtual void writeSplit( FileStorage& fs, int splitidx ) const;
+ virtual void writeNode( FileStorage& fs, int nidx, int depth ) const;
+ virtual void writeTree( FileStorage& fs, int root ) const;
+ virtual void write( FileStorage& fs ) const;
+
+ virtual void readParams( const FileNode& fn );
+ virtual int readSplit( const FileNode& fn );
+ virtual int readNode( const FileNode& fn );
+ virtual int readTree( const FileNode& fn );
+ virtual void read( const FileNode& fn );
+
+ virtual const std::vector<int>& getRoots() const { return roots; }
+ virtual const std::vector<Node>& getNodes() const { return nodes; }
+ virtual const std::vector<Split>& getSplits() const { return splits; }
+ virtual const std::vector<int>& getSubsets() const { return subsets; }
+
+ TreeParams params;
+
+ vector<int> varIdx;
+ vector<int> compVarIdx;
+ vector<uchar> varType;
+ vector<Vec2i> catOfs;
+ vector<int> catMap;
+ vector<int> roots;
+ vector<Node> nodes;
+ vector<Split> splits;
+ vector<int> subsets;
+ vector<int> classLabels;
+ vector<float> missingSubst;
+ vector<int> varMapping;
+ bool _isClassifier;
+
+ Ptr<WorkData> w;
+ };
+
+ template <typename T>
+ static inline void readVectorOrMat(const FileNode & node, std::vector<T> & v)
+ {
+ if (node.type() == FileNode::MAP)
+ {
+ Mat m;
+ node >> m;
+ m.copyTo(v);
+ }
+ else if (node.type() == FileNode::SEQ)
+ {
+ node >> v;
+ }
+ }
+
+}}
+
+#endif /* __OPENCV_ML_PRECOMP_HPP__ */
diff --git a/modules/objdetect/opencl_kernels_objdetect.cpp b/modules/objdetect/opencl_kernels_objdetect.cpp
new file mode 100644
index 0000000..1c30fd6
--- /dev/null
+++ b/modules/objdetect/opencl_kernels_objdetect.cpp
@@ -0,0 +1,1130 @@
+// This file is auto-generated. Do not edit!
+
+#include "precomp.hpp"
+#include "opencl_kernels_objdetect.hpp"
+
+namespace cv
+{
+namespace ocl
+{
+namespace objdetect
+{
+
+const struct ProgramEntry cascadedetect={"cascadedetect",
+"#ifdef HAAR\n"
+"typedef struct __attribute__((aligned(4))) OptHaarFeature\n"
+"{\n"
+"int4 ofs[3] __attribute__((aligned (4)));\n"
+"float4 weight __attribute__((aligned (4)));\n"
+"}\n"
+"OptHaarFeature;\n"
+"#endif\n"
+"#ifdef LBP\n"
+"typedef struct __attribute__((aligned(4))) OptLBPFeature\n"
+"{\n"
+"int16 ofs __attribute__((aligned (4)));\n"
+"}\n"
+"OptLBPFeature;\n"
+"#endif\n"
+"typedef struct __attribute__((aligned(4))) Stump\n"
+"{\n"
+"float4 st __attribute__((aligned (4)));\n"
+"}\n"
+"Stump;\n"
+"typedef struct __attribute__((aligned(4))) Node\n"
+"{\n"
+"int4 n __attribute__((aligned (4)));\n"
+"}\n"
+"Node;\n"
+"typedef struct __attribute__((aligned (4))) Stage\n"
+"{\n"
+"int first __attribute__((aligned (4)));\n"
+"int ntrees __attribute__((aligned (4)));\n"
+"float threshold __attribute__((aligned (4)));\n"
+"}\n"
+"Stage;\n"
+"typedef struct __attribute__((aligned (4))) ScaleData\n"
+"{\n"
+"float scale __attribute__((aligned (4)));\n"
+"int szi_width __attribute__((aligned (4)));\n"
+"int szi_height __attribute__((aligned (4)));\n"
+"int layer_ofs __attribute__((aligned (4)));\n"
+"int ystep __attribute__((aligned (4)));\n"
+"}\n"
+"ScaleData;\n"
+"#ifndef SUM_BUF_SIZE\n"
+"#define SUM_BUF_SIZE 0\n"
+"#endif\n"
+"#ifndef NODE_COUNT\n"
+"#define NODE_COUNT 1\n"
+"#endif\n"
+"#ifdef HAAR\n"
+"__kernel __attribute__((reqd_work_group_size(LOCAL_SIZE_X,LOCAL_SIZE_Y,1)))\n"
+"void runHaarClassifier(\n"
+"int nscales, __global const ScaleData* scaleData,\n"
+"__global const int* sum,\n"
+"int _sumstep, int sumoffset,\n"
+"__global const OptHaarFeature* optfeatures,\n"
+"__global const Stage* stages,\n"
+"__global const Node* nodes,\n"
+"__global const float* leaves0,\n"
+"volatile __global int* facepos,\n"
+"int4 normrect, int sqofs, int2 windowsize)\n"
+"{\n"
+"int lx = get_local_id(0);\n"
+"int ly = get_local_id(1);\n"
+"int groupIdx = get_group_id(0);\n"
+"int i, ngroups = get_global_size(0)/LOCAL_SIZE_X;\n"
+"int scaleIdx, tileIdx, stageIdx;\n"
+"int sumstep = (int)(_sumstep/sizeof(int));\n"
+"int4 nofs0 = (int4)(mad24(normrect.y, sumstep, normrect.x),\n"
+"mad24(normrect.y, sumstep, normrect.x + normrect.z),\n"
+"mad24(normrect.y + normrect.w, sumstep, normrect.x),\n"
+"mad24(normrect.y + normrect.w, sumstep, normrect.x + normrect.z));\n"
+"int normarea = normrect.z * normrect.w;\n"
+"float invarea = 1.f/normarea;\n"
+"int lidx = ly*LOCAL_SIZE_X + lx;\n"
+"#if SUM_BUF_SIZE > 0\n"
+"int4 nofs = (int4)(mad24(normrect.y, SUM_BUF_STEP, normrect.x),\n"
+"mad24(normrect.y, SUM_BUF_STEP, normrect.x + normrect.z),\n"
+"mad24(normrect.y + normrect.w, SUM_BUF_STEP, normrect.x),\n"
+"mad24(normrect.y + normrect.w, SUM_BUF_STEP, normrect.x + normrect.z));\n"
+"#else\n"
+"int4 nofs = nofs0;\n"
+"#endif\n"
+"#define LOCAL_SIZE (LOCAL_SIZE_X*LOCAL_SIZE_Y)\n"
+"__local int lstore[SUM_BUF_SIZE + LOCAL_SIZE*5/2+1];\n"
+"#if SUM_BUF_SIZE > 0\n"
+"__local int* ibuf = lstore;\n"
+"__local int* lcount = ibuf + SUM_BUF_SIZE;\n"
+"#else\n"
+"__local int* lcount = lstore;\n"
+"#endif\n"
+"__local float* lnf = (__local float*)(lcount + 1);\n"
+"__local float* lpartsum = lnf + LOCAL_SIZE;\n"
+"__local short* lbuf = (__local short*)(lpartsum + LOCAL_SIZE);\n"
+"for( scaleIdx = nscales-1; scaleIdx >= 0; scaleIdx-- )\n"
+"{\n"
+"__global const ScaleData* s = scaleData + scaleIdx;\n"
+"int ystep = s->ystep;\n"
+"int2 worksize = (int2)(max(s->szi_width - windowsize.x, 0), max(s->szi_height - windowsize.y, 0));\n"
+"int2 ntiles = (int2)((worksize.x + LOCAL_SIZE_X-1)/LOCAL_SIZE_X,\n"
+"(worksize.y + LOCAL_SIZE_Y-1)/LOCAL_SIZE_Y);\n"
+"int totalTiles = ntiles.x*ntiles.y;\n"
+"for( tileIdx = groupIdx; tileIdx < totalTiles; tileIdx += ngroups )\n"
+"{\n"
+"int ix0 = (tileIdx % ntiles.x)*LOCAL_SIZE_X;\n"
+"int iy0 = (tileIdx / ntiles.x)*LOCAL_SIZE_Y;\n"
+"int ix = lx, iy = ly;\n"
+"__global const int* psum0 = sum + mad24(iy0, sumstep, ix0) + s->layer_ofs;\n"
+"__global const int* psum1 = psum0 + mad24(iy, sumstep, ix);\n"
+"if( ix0 >= worksize.x || iy0 >= worksize.y )\n"
+"continue;\n"
+"#if SUM_BUF_SIZE > 0\n"
+"for( i = lidx*4; i < SUM_BUF_SIZE; i += LOCAL_SIZE_X*LOCAL_SIZE_Y*4 )\n"
+"{\n"
+"int dy = i/SUM_BUF_STEP, dx = i - dy*SUM_BUF_STEP;\n"
+"vstore4(vload4(0, psum0 + mad24(dy, sumstep, dx)), 0, ibuf+i);\n"
+"}\n"
+"#endif\n"
+"if( lidx == 0 )\n"
+"lcount[0] = 0;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if( ix0 + ix < worksize.x && iy0 + iy < worksize.y )\n"
+"{\n"
+"#if NODE_COUNT==1\n"
+"__global const Stump* stump = (__global const Stump*)nodes;\n"
+"#else\n"
+"__global const Node* node = nodes;\n"
+"__global const float* leaves = leaves0;\n"
+"#endif\n"
+"#if SUM_BUF_SIZE > 0\n"
+"__local const int* psum = ibuf + mad24(iy, SUM_BUF_STEP, ix);\n"
+"#else\n"
+"__global const int* psum = psum1;\n"
+"#endif\n"
+"__global const int* psqsum = (__global const int*)(psum1 + sqofs);\n"
+"float sval = (psum[nofs.x] - psum[nofs.y] - psum[nofs.z] + psum[nofs.w])*invarea;\n"
+"float sqval = (psqsum[nofs0.x] - psqsum[nofs0.y] - psqsum[nofs0.z] + psqsum[nofs0.w])*invarea;\n"
+"float nf = (float)normarea * sqrt(max(sqval - sval * sval, 0.f));\n"
+"nf = nf > 0 ? nf : 1.f;\n"
+"for( stageIdx = 0; stageIdx < SPLIT_STAGE; stageIdx++ )\n"
+"{\n"
+"int ntrees = stages[stageIdx].ntrees;\n"
+"float s = 0.f;\n"
+"#if NODE_COUNT==1\n"
+"for( i = 0; i < ntrees; i++ )\n"
+"{\n"
+"float4 st = stump[i].st;\n"
+"__global const OptHaarFeature* f = optfeatures + as_int(st.x);\n"
+"float4 weight = f->weight;\n"
+"int4 ofs = f->ofs[0];\n"
+"sval = (psum[ofs.x] - psum[ofs.y] - psum[ofs.z] + psum[ofs.w])*weight.x;\n"
+"ofs = f->ofs[1];\n"
+"sval = mad((psum[ofs.x] - psum[ofs.y] - psum[ofs.z] + psum[ofs.w]), weight.y, sval);\n"
+"if( weight.z > 0 )\n"
+"{\n"
+"ofs = f->ofs[2];\n"
+"sval = mad((psum[ofs.x] - psum[ofs.y] - psum[ofs.z] + psum[ofs.w]), weight.z, sval);\n"
+"}\n"
+"s += (sval < st.y*nf) ? st.z : st.w;\n"
+"}\n"
+"stump += ntrees;\n"
+"#else\n"
+"for( i = 0; i < ntrees; i++, node += NODE_COUNT, leaves += NODE_COUNT+1 )\n"
+"{\n"
+"int idx = 0;\n"
+"do\n"
+"{\n"
+"int4 n = node[idx].n;\n"
+"__global const OptHaarFeature* f = optfeatures + n.x;\n"
+"float4 weight = f->weight;\n"
+"int4 ofs = f->ofs[0];\n"
+"sval = (psum[ofs.x] - psum[ofs.y] - psum[ofs.z] + psum[ofs.w])*weight.x;\n"
+"ofs = f->ofs[1];\n"
+"sval = mad((psum[ofs.x] - psum[ofs.y] - psum[ofs.z] + psum[ofs.w]), weight.y, sval);\n"
+"if( weight.z > 0 )\n"
+"{\n"
+"ofs = f->ofs[2];\n"
+"sval = mad((psum[ofs.x] - psum[ofs.y] - psum[ofs.z] + psum[ofs.w]), weight.z, sval);\n"
+"}\n"
+"idx = (sval < as_float(n.y)*nf) ? n.z : n.w;\n"
+"}\n"
+"while(idx > 0);\n"
+"s += leaves[-idx];\n"
+"}\n"
+"#endif\n"
+"if( s < stages[stageIdx].threshold )\n"
+"break;\n"
+"}\n"
+"if( stageIdx == SPLIT_STAGE && (ystep == 1 || ((ix | iy) & 1) == 0) )\n"
+"{\n"
+"int count = atomic_inc(lcount);\n"
+"lbuf[count] = (int)(ix | (iy << 8));\n"
+"lnf[count] = nf;\n"
+"}\n"
+"}\n"
+"for( stageIdx = SPLIT_STAGE; stageIdx < N_STAGES; stageIdx++ )\n"
+"{\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"int nrects = lcount[0];\n"
+"if( nrects == 0 )\n"
+"break;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if( lidx == 0 )\n"
+"lcount[0] = 0;\n"
+"{\n"
+"#if NODE_COUNT == 1\n"
+"__global const Stump* stump = (__global const Stump*)nodes + stages[stageIdx].first;\n"
+"#else\n"
+"__global const Node* node = nodes + stages[stageIdx].first*NODE_COUNT;\n"
+"__global const float* leaves = leaves0 + stages[stageIdx].first*(NODE_COUNT+1);\n"
+"#endif\n"
+"int nparts = LOCAL_SIZE / nrects;\n"
+"int ntrees = stages[stageIdx].ntrees;\n"
+"int ntrees_p = (ntrees + nparts - 1)/nparts;\n"
+"int nr = lidx / nparts;\n"
+"int partidx = -1, idxval = 0;\n"
+"float partsum = 0.f, nf = 0.f;\n"
+"if( nr < nrects )\n"
+"{\n"
+"partidx = lidx % nparts;\n"
+"idxval = lbuf[nr];\n"
+"nf = lnf[nr];\n"
+"{\n"
+"int ntrees0 = ntrees_p*partidx;\n"
+"int ntrees1 = min(ntrees0 + ntrees_p, ntrees);\n"
+"int ix1 = idxval & 255, iy1 = idxval >> 8;\n"
+"#if SUM_BUF_SIZE > 0\n"
+"__local const int* psum = ibuf + mad24(iy1, SUM_BUF_STEP, ix1);\n"
+"#else\n"
+"__global const int* psum = psum0 + mad24(iy1, sumstep, ix1);\n"
+"#endif\n"
+"#if NODE_COUNT == 1\n"
+"for( i = ntrees0; i < ntrees1; i++ )\n"
+"{\n"
+"float4 st = stump[i].st;\n"
+"__global const OptHaarFeature* f = optfeatures + as_int(st.x);\n"
+"float4 weight = f->weight;\n"
+"int4 ofs = f->ofs[0];\n"
+"float sval = (psum[ofs.x] - psum[ofs.y] - psum[ofs.z] + psum[ofs.w])*weight.x;\n"
+"ofs = f->ofs[1];\n"
+"sval = mad((psum[ofs.x] - psum[ofs.y] - psum[ofs.z] + psum[ofs.w]), weight.y, sval);\n"
+"if( fabs(weight.z) > 0 )\n"
+"{\n"
+"ofs = f->ofs[2];\n"
+"sval = mad((psum[ofs.x] - psum[ofs.y] - psum[ofs.z] + psum[ofs.w]), weight.z, sval);\n"
+"}\n"
+"partsum += (sval < st.y*nf) ? st.z : st.w;\n"
+"}\n"
+"#else\n"
+"for( i = ntrees0; i < ntrees1; i++ )\n"
+"{\n"
+"int idx = 0;\n"
+"do\n"
+"{\n"
+"int4 n = node[i*2 + idx].n;\n"
+"__global const OptHaarFeature* f = optfeatures + n.x;\n"
+"float4 weight = f->weight;\n"
+"int4 ofs = f->ofs[0];\n"
+"float sval = (psum[ofs.x] - psum[ofs.y] - psum[ofs.z] + psum[ofs.w])*weight.x;\n"
+"ofs = f->ofs[1];\n"
+"sval = mad((psum[ofs.x] - psum[ofs.y] - psum[ofs.z] + psum[ofs.w]), weight.y, sval);\n"
+"if( weight.z > 0 )\n"
+"{\n"
+"ofs = f->ofs[2];\n"
+"sval = mad((psum[ofs.x] - psum[ofs.y] - psum[ofs.z] + psum[ofs.w]), weight.z, sval);\n"
+"}\n"
+"idx = (sval < as_float(n.y)*nf) ? n.z : n.w;\n"
+"}\n"
+"while(idx > 0);\n"
+"partsum += leaves[i*3-idx];\n"
+"}\n"
+"#endif\n"
+"}\n"
+"}\n"
+"lpartsum[lidx] = partsum;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if( partidx == 0 )\n"
+"{\n"
+"float s = lpartsum[nr*nparts];\n"
+"for( i = 1; i < nparts; i++ )\n"
+"s += lpartsum[i + nr*nparts];\n"
+"if( s >= stages[stageIdx].threshold )\n"
+"{\n"
+"int count = atomic_inc(lcount);\n"
+"lbuf[count] = idxval;\n"
+"lnf[count] = nf;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if( stageIdx == N_STAGES )\n"
+"{\n"
+"int nrects = lcount[0];\n"
+"if( lidx < nrects )\n"
+"{\n"
+"int nfaces = atomic_inc(facepos);\n"
+"if( nfaces < MAX_FACES )\n"
+"{\n"
+"volatile __global int* face = facepos + 1 + nfaces*3;\n"
+"int val = lbuf[lidx];\n"
+"face[0] = scaleIdx;\n"
+"face[1] = ix0 + (val & 255);\n"
+"face[2] = iy0 + (val >> 8);\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"#endif\n"
+"#ifdef LBP\n"
+"#undef CALC_SUM_OFS_\n"
+"#define CALC_SUM_OFS_(p0, p1, p2, p3, ptr) \\\n"
+"((ptr)[p0] - (ptr)[p1] - (ptr)[p2] + (ptr)[p3])\n"
+"__kernel void runLBPClassifierStumpSimple(\n"
+"int nscales, __global const ScaleData* scaleData,\n"
+"__global const int* sum,\n"
+"int _sumstep, int sumoffset,\n"
+"__global const OptLBPFeature* optfeatures,\n"
+"__global const Stage* stages,\n"
+"__global const Stump* stumps,\n"
+"__global const int* bitsets,\n"
+"int bitsetSize,\n"
+"volatile __global int* facepos,\n"
+"int2 windowsize)\n"
+"{\n"
+"int lx = get_local_id(0);\n"
+"int ly = get_local_id(1);\n"
+"int local_size_x = get_local_size(0);\n"
+"int local_size_y = get_local_size(1);\n"
+"int groupIdx = get_group_id(1)*get_num_groups(0) + get_group_id(0);\n"
+"int ngroups = get_num_groups(0)*get_num_groups(1);\n"
+"int scaleIdx, tileIdx, stageIdx;\n"
+"int sumstep = (int)(_sumstep/sizeof(int));\n"
+"for( scaleIdx = nscales-1; scaleIdx >= 0; scaleIdx-- )\n"
+"{\n"
+"__global const ScaleData* s = scaleData + scaleIdx;\n"
+"int ystep = s->ystep;\n"
+"int2 worksize = (int2)(max(s->szi_width - windowsize.x, 0), max(s->szi_height - windowsize.y, 0));\n"
+"int2 ntiles = (int2)((worksize.x/ystep + local_size_x-1)/local_size_x,\n"
+"(worksize.y/ystep + local_size_y-1)/local_size_y);\n"
+"int totalTiles = ntiles.x*ntiles.y;\n"
+"for( tileIdx = groupIdx; tileIdx < totalTiles; tileIdx += ngroups )\n"
+"{\n"
+"int iy = mad24((tileIdx / ntiles.x), local_size_y, ly) * ystep;\n"
+"int ix = mad24((tileIdx % ntiles.x), local_size_x, lx) * ystep;\n"
+"if( ix < worksize.x && iy < worksize.y )\n"
+"{\n"
+"__global const int* p = sum + mad24(iy, sumstep, ix) + s->layer_ofs;\n"
+"__global const Stump* stump = stumps;\n"
+"__global const int* bitset = bitsets;\n"
+"for( stageIdx = 0; stageIdx < N_STAGES; stageIdx++ )\n"
+"{\n"
+"int i, ntrees = stages[stageIdx].ntrees;\n"
+"float s = 0.f;\n"
+"for( i = 0; i < ntrees; i++, stump++, bitset += bitsetSize )\n"
+"{\n"
+"float4 st = stump->st;\n"
+"__global const OptLBPFeature* f = optfeatures + as_int(st.x);\n"
+"int16 ofs = f->ofs;\n"
+"int cval = CALC_SUM_OFS_( ofs.s5, ofs.s6, ofs.s9, ofs.sa, p );\n"
+"int mask, idx = (CALC_SUM_OFS_( ofs.s0, ofs.s1, ofs.s4, ofs.s5, p ) >= cval ? 4 : 0);\n"
+"idx |= (CALC_SUM_OFS_( ofs.s1, ofs.s2, ofs.s5, ofs.s6, p ) >= cval ? 2 : 0);\n"
+"idx |= (CALC_SUM_OFS_( ofs.s2, ofs.s3, ofs.s6, ofs.s7, p ) >= cval ? 1 : 0);\n"
+"mask = (CALC_SUM_OFS_( ofs.s6, ofs.s7, ofs.sa, ofs.sb, p ) >= cval ? 16 : 0);\n"
+"mask |= (CALC_SUM_OFS_( ofs.sa, ofs.sb, ofs.se, ofs.sf, p ) >= cval ? 8 : 0);\n"
+"mask |= (CALC_SUM_OFS_( ofs.s9, ofs.sa, ofs.sd, ofs.se, p ) >= cval ? 4 : 0);\n"
+"mask |= (CALC_SUM_OFS_( ofs.s8, ofs.s9, ofs.sc, ofs.sd, p ) >= cval ? 2 : 0);\n"
+"mask |= (CALC_SUM_OFS_( ofs.s4, ofs.s5, ofs.s8, ofs.s9, p ) >= cval ? 1 : 0);\n"
+"s += (bitset[idx] & (1 << mask)) ? st.z : st.w;\n"
+"}\n"
+"if( s < stages[stageIdx].threshold )\n"
+"break;\n"
+"}\n"
+"if( stageIdx == N_STAGES )\n"
+"{\n"
+"int nfaces = atomic_inc(facepos);\n"
+"if( nfaces < MAX_FACES )\n"
+"{\n"
+"volatile __global int* face = facepos + 1 + nfaces*3;\n"
+"face[0] = scaleIdx;\n"
+"face[1] = ix;\n"
+"face[2] = iy;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel __attribute__((reqd_work_group_size(LOCAL_SIZE_X,LOCAL_SIZE_Y,1)))\n"
+"void runLBPClassifierStump(\n"
+"int nscales, __global const ScaleData* scaleData,\n"
+"__global const int* sum,\n"
+"int _sumstep, int sumoffset,\n"
+"__global const OptLBPFeature* optfeatures,\n"
+"__global const Stage* stages,\n"
+"__global const Stump* stumps,\n"
+"__global const int* bitsets,\n"
+"int bitsetSize,\n"
+"volatile __global int* facepos,\n"
+"int2 windowsize)\n"
+"{\n"
+"int lx = get_local_id(0);\n"
+"int ly = get_local_id(1);\n"
+"int groupIdx = get_group_id(0);\n"
+"int i, ngroups = get_global_size(0)/LOCAL_SIZE_X;\n"
+"int scaleIdx, tileIdx, stageIdx;\n"
+"int sumstep = (int)(_sumstep/sizeof(int));\n"
+"int lidx = ly*LOCAL_SIZE_X + lx;\n"
+"#define LOCAL_SIZE (LOCAL_SIZE_X*LOCAL_SIZE_Y)\n"
+"__local int lstore[SUM_BUF_SIZE + LOCAL_SIZE*3/2+1];\n"
+"#if SUM_BUF_SIZE > 0\n"
+"__local int* ibuf = lstore;\n"
+"__local int* lcount = ibuf + SUM_BUF_SIZE;\n"
+"#else\n"
+"__local int* lcount = lstore;\n"
+"#endif\n"
+"__local float* lpartsum = (__local float*)(lcount + 1);\n"
+"__local short* lbuf = (__local short*)(lpartsum + LOCAL_SIZE);\n"
+"for( scaleIdx = nscales-1; scaleIdx >= 0; scaleIdx-- )\n"
+"{\n"
+"__global const ScaleData* s = scaleData + scaleIdx;\n"
+"int ystep = s->ystep;\n"
+"int2 worksize = (int2)(max(s->szi_width - windowsize.x, 0), max(s->szi_height - windowsize.y, 0));\n"
+"int2 ntiles = (int2)((worksize.x + LOCAL_SIZE_X-1)/LOCAL_SIZE_X,\n"
+"(worksize.y + LOCAL_SIZE_Y-1)/LOCAL_SIZE_Y);\n"
+"int totalTiles = ntiles.x*ntiles.y;\n"
+"for( tileIdx = groupIdx; tileIdx < totalTiles; tileIdx += ngroups )\n"
+"{\n"
+"int ix0 = (tileIdx % ntiles.x)*LOCAL_SIZE_X;\n"
+"int iy0 = (tileIdx / ntiles.x)*LOCAL_SIZE_Y;\n"
+"int ix = lx, iy = ly;\n"
+"__global const int* psum0 = sum + mad24(iy0, sumstep, ix0) + s->layer_ofs;\n"
+"if( ix0 >= worksize.x || iy0 >= worksize.y )\n"
+"continue;\n"
+"#if SUM_BUF_SIZE > 0\n"
+"for( i = lidx*4; i < SUM_BUF_SIZE; i += LOCAL_SIZE_X*LOCAL_SIZE_Y*4 )\n"
+"{\n"
+"int dy = i/SUM_BUF_STEP, dx = i - dy*SUM_BUF_STEP;\n"
+"vstore4(vload4(0, psum0 + mad24(dy, sumstep, dx)), 0, ibuf+i);\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"#endif\n"
+"if( lidx == 0 )\n"
+"lcount[0] = 0;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if( ix0 + ix < worksize.x && iy0 + iy < worksize.y )\n"
+"{\n"
+"__global const Stump* stump = stumps;\n"
+"__global const int* bitset = bitsets;\n"
+"#if SUM_BUF_SIZE > 0\n"
+"__local const int* p = ibuf + mad24(iy, SUM_BUF_STEP, ix);\n"
+"#else\n"
+"__global const int* p = psum0 + mad24(iy, sumstep, ix);\n"
+"#endif\n"
+"for( stageIdx = 0; stageIdx < SPLIT_STAGE; stageIdx++ )\n"
+"{\n"
+"int ntrees = stages[stageIdx].ntrees;\n"
+"float s = 0.f;\n"
+"for( i = 0; i < ntrees; i++, stump++, bitset += bitsetSize )\n"
+"{\n"
+"float4 st = stump->st;\n"
+"__global const OptLBPFeature* f = optfeatures + as_int(st.x);\n"
+"int16 ofs = f->ofs;\n"
+"int cval = CALC_SUM_OFS_( ofs.s5, ofs.s6, ofs.s9, ofs.sa, p );\n"
+"int mask, idx = (CALC_SUM_OFS_( ofs.s0, ofs.s1, ofs.s4, ofs.s5, p ) >= cval ? 4 : 0);\n"
+"idx |= (CALC_SUM_OFS_( ofs.s1, ofs.s2, ofs.s5, ofs.s6, p ) >= cval ? 2 : 0);\n"
+"idx |= (CALC_SUM_OFS_( ofs.s2, ofs.s3, ofs.s6, ofs.s7, p ) >= cval ? 1 : 0);\n"
+"mask = (CALC_SUM_OFS_( ofs.s6, ofs.s7, ofs.sa, ofs.sb, p ) >= cval ? 16 : 0);\n"
+"mask |= (CALC_SUM_OFS_( ofs.sa, ofs.sb, ofs.se, ofs.sf, p ) >= cval ? 8 : 0);\n"
+"mask |= (CALC_SUM_OFS_( ofs.s9, ofs.sa, ofs.sd, ofs.se, p ) >= cval ? 4 : 0);\n"
+"mask |= (CALC_SUM_OFS_( ofs.s8, ofs.s9, ofs.sc, ofs.sd, p ) >= cval ? 2 : 0);\n"
+"mask |= (CALC_SUM_OFS_( ofs.s4, ofs.s5, ofs.s8, ofs.s9, p ) >= cval ? 1 : 0);\n"
+"s += (bitset[idx] & (1 << mask)) ? st.z : st.w;\n"
+"}\n"
+"if( s < stages[stageIdx].threshold )\n"
+"break;\n"
+"}\n"
+"if( stageIdx == SPLIT_STAGE && (ystep == 1 || ((ix | iy) & 1) == 0) )\n"
+"{\n"
+"int count = atomic_inc(lcount);\n"
+"lbuf[count] = (int)(ix | (iy << 8));\n"
+"}\n"
+"}\n"
+"for( stageIdx = SPLIT_STAGE; stageIdx < N_STAGES; stageIdx++ )\n"
+"{\n"
+"int nrects = lcount[0];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if( nrects == 0 )\n"
+"break;\n"
+"if( lidx == 0 )\n"
+"lcount[0] = 0;\n"
+"{\n"
+"__global const Stump* stump = stumps + stages[stageIdx].first;\n"
+"__global const int* bitset = bitsets + stages[stageIdx].first*bitsetSize;\n"
+"int nparts = LOCAL_SIZE / nrects;\n"
+"int ntrees = stages[stageIdx].ntrees;\n"
+"int ntrees_p = (ntrees + nparts - 1)/nparts;\n"
+"int nr = lidx / nparts;\n"
+"int partidx = -1, idxval = 0;\n"
+"float partsum = 0.f, nf = 0.f;\n"
+"if( nr < nrects )\n"
+"{\n"
+"partidx = lidx % nparts;\n"
+"idxval = lbuf[nr];\n"
+"{\n"
+"int ntrees0 = ntrees_p*partidx;\n"
+"int ntrees1 = min(ntrees0 + ntrees_p, ntrees);\n"
+"int ix1 = idxval & 255, iy1 = idxval >> 8;\n"
+"#if SUM_BUF_SIZE > 0\n"
+"__local const int* p = ibuf + mad24(iy1, SUM_BUF_STEP, ix1);\n"
+"#else\n"
+"__global const int* p = psum0 + mad24(iy1, sumstep, ix1);\n"
+"#endif\n"
+"for( i = ntrees0; i < ntrees1; i++ )\n"
+"{\n"
+"float4 st = stump[i].st;\n"
+"__global const OptLBPFeature* f = optfeatures + as_int(st.x);\n"
+"int16 ofs = f->ofs;\n"
+"#define CALC_SUM_OFS_(p0, p1, p2, p3, ptr) \\\n"
+"((ptr)[p0] - (ptr)[p1] - (ptr)[p2] + (ptr)[p3])\n"
+"int cval = CALC_SUM_OFS_( ofs.s5, ofs.s6, ofs.s9, ofs.sa, p );\n"
+"int mask, idx = (CALC_SUM_OFS_( ofs.s0, ofs.s1, ofs.s4, ofs.s5, p ) >= cval ? 4 : 0);\n"
+"idx |= (CALC_SUM_OFS_( ofs.s1, ofs.s2, ofs.s5, ofs.s6, p ) >= cval ? 2 : 0);\n"
+"idx |= (CALC_SUM_OFS_( ofs.s2, ofs.s3, ofs.s6, ofs.s7, p ) >= cval ? 1 : 0);\n"
+"mask = (CALC_SUM_OFS_( ofs.s6, ofs.s7, ofs.sa, ofs.sb, p ) >= cval ? 16 : 0);\n"
+"mask |= (CALC_SUM_OFS_( ofs.sa, ofs.sb, ofs.se, ofs.sf, p ) >= cval ? 8 : 0);\n"
+"mask |= (CALC_SUM_OFS_( ofs.s9, ofs.sa, ofs.sd, ofs.se, p ) >= cval ? 4 : 0);\n"
+"mask |= (CALC_SUM_OFS_( ofs.s8, ofs.s9, ofs.sc, ofs.sd, p ) >= cval ? 2 : 0);\n"
+"mask |= (CALC_SUM_OFS_( ofs.s4, ofs.s5, ofs.s8, ofs.s9, p ) >= cval ? 1 : 0);\n"
+"partsum += (bitset[i*bitsetSize + idx] & (1 << mask)) ? st.z : st.w;\n"
+"}\n"
+"}\n"
+"}\n"
+"lpartsum[lidx] = partsum;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if( partidx == 0 )\n"
+"{\n"
+"float s = lpartsum[nr*nparts];\n"
+"for( i = 1; i < nparts; i++ )\n"
+"s += lpartsum[i + nr*nparts];\n"
+"if( s >= stages[stageIdx].threshold )\n"
+"{\n"
+"int count = atomic_inc(lcount);\n"
+"lbuf[count] = idxval;\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if( stageIdx == N_STAGES )\n"
+"{\n"
+"int nrects = lcount[0];\n"
+"if( lidx < nrects )\n"
+"{\n"
+"int nfaces = atomic_inc(facepos);\n"
+"if( nfaces < MAX_FACES )\n"
+"{\n"
+"volatile __global int* face = facepos + 1 + nfaces*3;\n"
+"int val = lbuf[lidx];\n"
+"face[0] = scaleIdx;\n"
+"face[1] = ix0 + (val & 255);\n"
+"face[2] = iy0 + (val >> 8);\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"}\n"
+"#endif\n"
+, "06c037755dc15a7796c0f3bc7ff05233"};
+ProgramSource cascadedetect_oclsrc(cascadedetect.programStr);
+const struct ProgramEntry objdetect_hog={"objdetect_hog",
+"#define CELL_WIDTH 8\n"
+"#define CELL_HEIGHT 8\n"
+"#define CELLS_PER_BLOCK_X 2\n"
+"#define CELLS_PER_BLOCK_Y 2\n"
+"#define NTHREADS 256\n"
+"#define CV_PI_F M_PI_F\n"
+"#ifdef INTEL_DEVICE\n"
+"#define QANGLE_TYPE int\n"
+"#define QANGLE_TYPE2 int2\n"
+"#else\n"
+"#define QANGLE_TYPE uchar\n"
+"#define QANGLE_TYPE2 uchar2\n"
+"#endif\n"
+"__kernel void compute_hists_lut_kernel(\n"
+"const int cblock_stride_x, const int cblock_stride_y,\n"
+"const int cnbins, const int cblock_hist_size, const int img_block_width,\n"
+"const int blocks_in_group, const int blocks_total,\n"
+"const int grad_quadstep, const int qangle_step,\n"
+"__global const float* grad, __global const QANGLE_TYPE* qangle,\n"
+"__global const float* gauss_w_lut,\n"
+"__global float* block_hists, __local float* smem)\n"
+"{\n"
+"const int lx = get_local_id(0);\n"
+"const int lp = lx / 24; \n"
+"const int gid = get_group_id(0) * blocks_in_group + lp;\n"
+"const int gidY = gid / img_block_width;\n"
+"const int gidX = gid - gidY * img_block_width;\n"
+"const int lidX = lx - lp * 24;\n"
+"const int lidY = get_local_id(1);\n"
+"const int cell_x = lidX / 12;\n"
+"const int cell_y = lidY;\n"
+"const int cell_thread_x = lidX - cell_x * 12;\n"
+"__local float* hists = smem + lp * cnbins * (CELLS_PER_BLOCK_X *\n"
+"CELLS_PER_BLOCK_Y * 12 + CELLS_PER_BLOCK_X * CELLS_PER_BLOCK_Y);\n"
+"__local float* final_hist = hists + cnbins *\n"
+"(CELLS_PER_BLOCK_X * CELLS_PER_BLOCK_Y * 12);\n"
+"const int offset_x = gidX * cblock_stride_x + (cell_x << 2) + cell_thread_x;\n"
+"const int offset_y = gidY * cblock_stride_y + (cell_y << 2);\n"
+"__global const float* grad_ptr = (gid < blocks_total) ?\n"
+"grad + offset_y * grad_quadstep + (offset_x << 1) : grad;\n"
+"__global const QANGLE_TYPE* qangle_ptr = (gid < blocks_total) ?\n"
+"qangle + offset_y * qangle_step + (offset_x << 1) : qangle;\n"
+"__local float* hist = hists + 12 * (cell_y * CELLS_PER_BLOCK_Y + cell_x) +\n"
+"cell_thread_x;\n"
+"for (int bin_id = 0; bin_id < cnbins; ++bin_id)\n"
+"hist[bin_id * 48] = 0.f;\n"
+"const int dist_x = -4 + cell_thread_x - 4 * cell_x;\n"
+"const int dist_center_x = dist_x - 4 * (1 - 2 * cell_x);\n"
+"const int dist_y_begin = -4 - 4 * lidY;\n"
+"for (int dist_y = dist_y_begin; dist_y < dist_y_begin + 12; ++dist_y)\n"
+"{\n"
+"float2 vote = (float2) (grad_ptr[0], grad_ptr[1]);\n"
+"QANGLE_TYPE2 bin = (QANGLE_TYPE2) (qangle_ptr[0], qangle_ptr[1]);\n"
+"grad_ptr += grad_quadstep;\n"
+"qangle_ptr += qangle_step;\n"
+"int dist_center_y = dist_y - 4 * (1 - 2 * cell_y);\n"
+"int idx = (dist_center_y + 8) * 16 + (dist_center_x + 8);\n"
+"float gaussian = gauss_w_lut[idx];\n"
+"idx = (dist_y + 8) * 16 + (dist_x + 8);\n"
+"float interp_weight = gauss_w_lut[256+idx];\n"
+"hist[bin.x * 48] += gaussian * interp_weight * vote.x;\n"
+"hist[bin.y * 48] += gaussian * interp_weight * vote.y;\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"volatile __local float* hist_ = hist;\n"
+"for (int bin_id = 0; bin_id < cnbins; ++bin_id, hist_ += 48)\n"
+"{\n"
+"if (cell_thread_x < 6)\n"
+"hist_[0] += hist_[6];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (cell_thread_x < 3)\n"
+"hist_[0] += hist_[3];\n"
+"#ifdef CPU\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"#endif\n"
+"if (cell_thread_x == 0)\n"
+"final_hist[(cell_x * 2 + cell_y) * cnbins + bin_id] =\n"
+"hist_[0] + hist_[1] + hist_[2];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"int tid = (cell_y * CELLS_PER_BLOCK_Y + cell_x) * 12 + cell_thread_x;\n"
+"if ((tid < cblock_hist_size) && (gid < blocks_total))\n"
+"{\n"
+"__global float* block_hist = block_hists +\n"
+"(gidY * img_block_width + gidX) * cblock_hist_size;\n"
+"block_hist[tid] = final_hist[tid];\n"
+"}\n"
+"}\n"
+"__kernel void normalize_hists_36_kernel(__global float* block_hists,\n"
+"const float threshold, __local float *squares)\n"
+"{\n"
+"const int tid = get_local_id(0);\n"
+"const int gid = get_global_id(0);\n"
+"const int bid = tid / 36; \n"
+"const int boffset = bid * 36; \n"
+"const int hid = tid - boffset; \n"
+"float elem = block_hists[gid];\n"
+"squares[tid] = elem * elem;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"__local float* smem = squares + boffset;\n"
+"float sum = smem[hid];\n"
+"if (hid < 18)\n"
+"smem[hid] = sum = sum + smem[hid + 18];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (hid < 9)\n"
+"smem[hid] = sum = sum + smem[hid + 9];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (hid < 4)\n"
+"smem[hid] = sum + smem[hid + 4];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"sum = smem[0] + smem[1] + smem[2] + smem[3] + smem[8];\n"
+"elem = elem / (sqrt(sum) + 3.6f);\n"
+"elem = min(elem, threshold);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"squares[tid] = elem * elem;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"sum = smem[hid];\n"
+"if (hid < 18)\n"
+"smem[hid] = sum = sum + smem[hid + 18];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (hid < 9)\n"
+"smem[hid] = sum = sum + smem[hid + 9];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (hid < 4)\n"
+"smem[hid] = sum + smem[hid + 4];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"sum = smem[0] + smem[1] + smem[2] + smem[3] + smem[8];\n"
+"block_hists[gid] = elem / (sqrt(sum) + 1e-3f);\n"
+"}\n"
+"inline float reduce_smem(volatile __local float* smem, int size)\n"
+"{\n"
+"unsigned int tid = get_local_id(0);\n"
+"float sum = smem[tid];\n"
+"if (size >= 512) { if (tid < 256) smem[tid] = sum = sum + smem[tid + 256];\n"
+"barrier(CLK_LOCAL_MEM_FENCE); }\n"
+"if (size >= 256) { if (tid < 128) smem[tid] = sum = sum + smem[tid + 128];\n"
+"barrier(CLK_LOCAL_MEM_FENCE); }\n"
+"if (size >= 128) { if (tid < 64) smem[tid] = sum = sum + smem[tid + 64];\n"
+"barrier(CLK_LOCAL_MEM_FENCE); }\n"
+"#ifdef CPU\n"
+"if (size >= 64) { if (tid < 32) smem[tid] = sum = sum + smem[tid + 32];\n"
+"barrier(CLK_LOCAL_MEM_FENCE); }\n"
+"if (size >= 32) { if (tid < 16) smem[tid] = sum = sum + smem[tid + 16];\n"
+"barrier(CLK_LOCAL_MEM_FENCE); }\n"
+"if (size >= 16) { if (tid < 8) smem[tid] = sum = sum + smem[tid + 8];\n"
+"barrier(CLK_LOCAL_MEM_FENCE); }\n"
+"if (size >= 8) { if (tid < 4) smem[tid] = sum = sum + smem[tid + 4];\n"
+"barrier(CLK_LOCAL_MEM_FENCE); }\n"
+"if (size >= 4) { if (tid < 2) smem[tid] = sum = sum + smem[tid + 2];\n"
+"barrier(CLK_LOCAL_MEM_FENCE); }\n"
+"if (size >= 2) { if (tid < 1) smem[tid] = sum = sum + smem[tid + 1];\n"
+"barrier(CLK_LOCAL_MEM_FENCE); }\n"
+"#else\n"
+"if (tid < 32)\n"
+"{\n"
+"if (size >= 64) smem[tid] = sum = sum + smem[tid + 32];\n"
+"#if WAVE_SIZE < 32\n"
+"} barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 16) {\n"
+"#endif\n"
+"if (size >= 32) smem[tid] = sum = sum + smem[tid + 16];\n"
+"if (size >= 16) smem[tid] = sum = sum + smem[tid + 8];\n"
+"if (size >= 8) smem[tid] = sum = sum + smem[tid + 4];\n"
+"if (size >= 4) smem[tid] = sum = sum + smem[tid + 2];\n"
+"if (size >= 2) smem[tid] = sum = sum + smem[tid + 1];\n"
+"}\n"
+"#endif\n"
+"return sum;\n"
+"}\n"
+"__kernel void normalize_hists_kernel(\n"
+"const int nthreads, const int block_hist_size, const int img_block_width,\n"
+"__global float* block_hists, const float threshold, __local float *squares)\n"
+"{\n"
+"const int tid = get_local_id(0);\n"
+"const int gidX = get_group_id(0);\n"
+"const int gidY = get_group_id(1);\n"
+"__global float* hist = block_hists + (gidY * img_block_width + gidX) *\n"
+"block_hist_size + tid;\n"
+"float elem = 0.f;\n"
+"if (tid < block_hist_size)\n"
+"elem = hist[0];\n"
+"squares[tid] = elem * elem;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"float sum = reduce_smem(squares, nthreads);\n"
+"float scale = 1.0f / (sqrt(sum) + 0.1f * block_hist_size);\n"
+"elem = min(elem * scale, threshold);\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"squares[tid] = elem * elem;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"sum = reduce_smem(squares, nthreads);\n"
+"scale = 1.0f / (sqrt(sum) + 1e-3f);\n"
+"if (tid < block_hist_size)\n"
+"hist[0] = elem * scale;\n"
+"}\n"
+"__kernel void classify_hists_180_kernel(\n"
+"const int cdescr_width, const int cdescr_height, const int cblock_hist_size,\n"
+"const int img_win_width, const int img_block_width,\n"
+"const int win_block_stride_x, const int win_block_stride_y,\n"
+"__global const float * block_hists, __global const float* coefs,\n"
+"float free_coef, float threshold, __global uchar* labels)\n"
+"{\n"
+"const int tid = get_local_id(0);\n"
+"const int gidX = get_group_id(0);\n"
+"const int gidY = get_group_id(1);\n"
+"__global const float* hist = block_hists + (gidY * win_block_stride_y *\n"
+"img_block_width + gidX * win_block_stride_x) * cblock_hist_size;\n"
+"float product = 0.f;\n"
+"for (int i = 0; i < cdescr_height; i++)\n"
+"{\n"
+"product += coefs[i * cdescr_width + tid] *\n"
+"hist[i * img_block_width * cblock_hist_size + tid];\n"
+"}\n"
+"__local float products[180];\n"
+"products[tid] = product;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 90) products[tid] = product = product + products[tid + 90];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 45) products[tid] = product = product + products[tid + 45];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"volatile __local float* smem = products;\n"
+"#ifdef CPU\n"
+"if (tid < 13) smem[tid] = product = product + smem[tid + 32];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 16) smem[tid] = product = product + smem[tid + 16];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if(tid<8) smem[tid] = product = product + smem[tid + 8];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if(tid<4) smem[tid] = product = product + smem[tid + 4];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if(tid<2) smem[tid] = product = product + smem[tid + 2];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"#else\n"
+"if (tid < 13)\n"
+"{\n"
+"smem[tid] = product = product + smem[tid + 32];\n"
+"}\n"
+"#if WAVE_SIZE < 32\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"#endif\n"
+"if (tid < 16)\n"
+"{\n"
+"smem[tid] = product = product + smem[tid + 16];\n"
+"smem[tid] = product = product + smem[tid + 8];\n"
+"smem[tid] = product = product + smem[tid + 4];\n"
+"smem[tid] = product = product + smem[tid + 2];\n"
+"}\n"
+"#endif\n"
+"if (tid == 0){\n"
+"product = product + smem[tid + 1];\n"
+"labels[gidY * img_win_width + gidX] = (product + free_coef >= threshold);\n"
+"}\n"
+"}\n"
+"__kernel void classify_hists_252_kernel(\n"
+"const int cdescr_width, const int cdescr_height, const int cblock_hist_size,\n"
+"const int img_win_width, const int img_block_width,\n"
+"const int win_block_stride_x, const int win_block_stride_y,\n"
+"__global const float * block_hists, __global const float* coefs,\n"
+"float free_coef, float threshold, __global uchar* labels)\n"
+"{\n"
+"const int tid = get_local_id(0);\n"
+"const int gidX = get_group_id(0);\n"
+"const int gidY = get_group_id(1);\n"
+"__global const float* hist = block_hists + (gidY * win_block_stride_y *\n"
+"img_block_width + gidX * win_block_stride_x) * cblock_hist_size;\n"
+"float product = 0.f;\n"
+"if (tid < cdescr_width)\n"
+"{\n"
+"for (int i = 0; i < cdescr_height; i++)\n"
+"product += coefs[i * cdescr_width + tid] *\n"
+"hist[i * img_block_width * cblock_hist_size + tid];\n"
+"}\n"
+"__local float products[NTHREADS];\n"
+"products[tid] = product;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 128) products[tid] = product = product + products[tid + 128];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 64) products[tid] = product = product + products[tid + 64];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"volatile __local float* smem = products;\n"
+"#ifdef CPU\n"
+"if(tid<32) smem[tid] = product = product + smem[tid + 32];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if(tid<16) smem[tid] = product = product + smem[tid + 16];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if(tid<8) smem[tid] = product = product + smem[tid + 8];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if(tid<4) smem[tid] = product = product + smem[tid + 4];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if(tid<2) smem[tid] = product = product + smem[tid + 2];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"#else\n"
+"if (tid < 32)\n"
+"{\n"
+"smem[tid] = product = product + smem[tid + 32];\n"
+"#if WAVE_SIZE < 32\n"
+"} barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 16) {\n"
+"#endif\n"
+"smem[tid] = product = product + smem[tid + 16];\n"
+"smem[tid] = product = product + smem[tid + 8];\n"
+"smem[tid] = product = product + smem[tid + 4];\n"
+"smem[tid] = product = product + smem[tid + 2];\n"
+"}\n"
+"#endif\n"
+"if (tid == 0){\n"
+"product = product + smem[tid + 1];\n"
+"labels[gidY * img_win_width + gidX] = (product + free_coef >= threshold);\n"
+"}\n"
+"}\n"
+"__kernel void classify_hists_kernel(\n"
+"const int cdescr_size, const int cdescr_width, const int cblock_hist_size,\n"
+"const int img_win_width, const int img_block_width,\n"
+"const int win_block_stride_x, const int win_block_stride_y,\n"
+"__global const float * block_hists, __global const float* coefs,\n"
+"float free_coef, float threshold, __global uchar* labels)\n"
+"{\n"
+"const int tid = get_local_id(0);\n"
+"const int gidX = get_group_id(0);\n"
+"const int gidY = get_group_id(1);\n"
+"__global const float* hist = block_hists + (gidY * win_block_stride_y *\n"
+"img_block_width + gidX * win_block_stride_x) * cblock_hist_size;\n"
+"float product = 0.f;\n"
+"for (int i = tid; i < cdescr_size; i += NTHREADS)\n"
+"{\n"
+"int offset_y = i / cdescr_width;\n"
+"int offset_x = i - offset_y * cdescr_width;\n"
+"product += coefs[i] *\n"
+"hist[offset_y * img_block_width * cblock_hist_size + offset_x];\n"
+"}\n"
+"__local float products[NTHREADS];\n"
+"products[tid] = product;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 128) products[tid] = product = product + products[tid + 128];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 64) products[tid] = product = product + products[tid + 64];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"volatile __local float* smem = products;\n"
+"#ifdef CPU\n"
+"if(tid<32) smem[tid] = product = product + smem[tid + 32];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if(tid<16) smem[tid] = product = product + smem[tid + 16];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if(tid<8) smem[tid] = product = product + smem[tid + 8];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if(tid<4) smem[tid] = product = product + smem[tid + 4];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if(tid<2) smem[tid] = product = product + smem[tid + 2];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"#else\n"
+"if (tid < 32)\n"
+"{\n"
+"smem[tid] = product = product + smem[tid + 32];\n"
+"#if WAVE_SIZE < 32\n"
+"} barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 16) {\n"
+"#endif\n"
+"smem[tid] = product = product + smem[tid + 16];\n"
+"smem[tid] = product = product + smem[tid + 8];\n"
+"smem[tid] = product = product + smem[tid + 4];\n"
+"smem[tid] = product = product + smem[tid + 2];\n"
+"}\n"
+"#endif\n"
+"if (tid == 0){\n"
+"smem[tid] = product = product + smem[tid + 1];\n"
+"labels[gidY * img_win_width + gidX] = (product + free_coef >= threshold);\n"
+"}\n"
+"}\n"
+"__kernel void extract_descrs_by_rows_kernel(\n"
+"const int cblock_hist_size, const int descriptors_quadstep,\n"
+"const int cdescr_size, const int cdescr_width, const int img_block_width,\n"
+"const int win_block_stride_x, const int win_block_stride_y,\n"
+"__global const float* block_hists, __global float* descriptors)\n"
+"{\n"
+"int tid = get_local_id(0);\n"
+"int gidX = get_group_id(0);\n"
+"int gidY = get_group_id(1);\n"
+"__global const float* hist = block_hists + (gidY * win_block_stride_y *\n"
+"img_block_width + gidX * win_block_stride_x) * cblock_hist_size;\n"
+"__global float* descriptor = descriptors +\n"
+"(gidY * get_num_groups(0) + gidX) * descriptors_quadstep;\n"
+"for (int i = tid; i < cdescr_size; i += NTHREADS)\n"
+"{\n"
+"int offset_y = i / cdescr_width;\n"
+"int offset_x = i - offset_y * cdescr_width;\n"
+"descriptor[i] = hist[offset_y * img_block_width * cblock_hist_size + offset_x];\n"
+"}\n"
+"}\n"
+"__kernel void extract_descrs_by_cols_kernel(\n"
+"const int cblock_hist_size, const int descriptors_quadstep, const int cdescr_size,\n"
+"const int cnblocks_win_x, const int cnblocks_win_y, const int img_block_width,\n"
+"const int win_block_stride_x, const int win_block_stride_y,\n"
+"__global const float* block_hists, __global float* descriptors)\n"
+"{\n"
+"int tid = get_local_id(0);\n"
+"int gidX = get_group_id(0);\n"
+"int gidY = get_group_id(1);\n"
+"__global const float* hist = block_hists + (gidY * win_block_stride_y *\n"
+"img_block_width + gidX * win_block_stride_x) * cblock_hist_size;\n"
+"__global float* descriptor = descriptors +\n"
+"(gidY * get_num_groups(0) + gidX) * descriptors_quadstep;\n"
+"for (int i = tid; i < cdescr_size; i += NTHREADS)\n"
+"{\n"
+"int block_idx = i / cblock_hist_size;\n"
+"int idx_in_block = i - block_idx * cblock_hist_size;\n"
+"int y = block_idx / cnblocks_win_x;\n"
+"int x = block_idx - y * cnblocks_win_x;\n"
+"descriptor[(x * cnblocks_win_y + y) * cblock_hist_size + idx_in_block] =\n"
+"hist[(y * img_block_width + x) * cblock_hist_size + idx_in_block];\n"
+"}\n"
+"}\n"
+"__kernel void compute_gradients_8UC4_kernel(\n"
+"const int height, const int width,\n"
+"const int img_step, const int grad_quadstep, const int qangle_step,\n"
+"const __global uchar4 * img, __global float * grad, __global QANGLE_TYPE * qangle,\n"
+"const float angle_scale, const char correct_gamma, const int cnbins)\n"
+"{\n"
+"const int x = get_global_id(0);\n"
+"const int tid = get_local_id(0);\n"
+"const int gSizeX = get_local_size(0);\n"
+"const int gidY = get_group_id(1);\n"
+"__global const uchar4* row = img + gidY * img_step;\n"
+"__local float sh_row[(NTHREADS + 2) * 3];\n"
+"uchar4 val;\n"
+"if (x < width)\n"
+"val = row[x];\n"
+"else\n"
+"val = row[width - 2];\n"
+"sh_row[tid + 1] = val.x;\n"
+"sh_row[tid + 1 + (NTHREADS + 2)] = val.y;\n"
+"sh_row[tid + 1 + 2 * (NTHREADS + 2)] = val.z;\n"
+"if (tid == 0)\n"
+"{\n"
+"val = row[max(x - 1, 1)];\n"
+"sh_row[0] = val.x;\n"
+"sh_row[(NTHREADS + 2)] = val.y;\n"
+"sh_row[2 * (NTHREADS + 2)] = val.z;\n"
+"}\n"
+"if (tid == gSizeX - 1)\n"
+"{\n"
+"val = row[min(x + 1, width - 2)];\n"
+"sh_row[gSizeX + 1] = val.x;\n"
+"sh_row[gSizeX + 1 + (NTHREADS + 2)] = val.y;\n"
+"sh_row[gSizeX + 1 + 2 * (NTHREADS + 2)] = val.z;\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x < width)\n"
+"{\n"
+"float4 a = (float4) (sh_row[tid], sh_row[tid + (NTHREADS + 2)],\n"
+"sh_row[tid + 2 * (NTHREADS + 2)], 0);\n"
+"float4 b = (float4) (sh_row[tid + 2], sh_row[tid + 2 + (NTHREADS + 2)],\n"
+"sh_row[tid + 2 + 2 * (NTHREADS + 2)], 0);\n"
+"float4 dx;\n"
+"if (correct_gamma == 1)\n"
+"dx = sqrt(b) - sqrt(a);\n"
+"else\n"
+"dx = b - a;\n"
+"float4 dy = (float4) 0.f;\n"
+"if (gidY > 0 && gidY < height - 1)\n"
+"{\n"
+"a = convert_float4(img[(gidY - 1) * img_step + x].xyzw);\n"
+"b = convert_float4(img[(gidY + 1) * img_step + x].xyzw);\n"
+"if (correct_gamma == 1)\n"
+"dy = sqrt(b) - sqrt(a);\n"
+"else\n"
+"dy = b - a;\n"
+"}\n"
+"float4 mag = hypot(dx, dy);\n"
+"float best_dx = dx.x;\n"
+"float best_dy = dy.x;\n"
+"float mag0 = mag.x;\n"
+"if (mag0 < mag.y)\n"
+"{\n"
+"best_dx = dx.y;\n"
+"best_dy = dy.y;\n"
+"mag0 = mag.y;\n"
+"}\n"
+"if (mag0 < mag.z)\n"
+"{\n"
+"best_dx = dx.z;\n"
+"best_dy = dy.z;\n"
+"mag0 = mag.z;\n"
+"}\n"
+"float ang = (atan2(best_dy, best_dx) + CV_PI_F) * angle_scale - 0.5f;\n"
+"int hidx = (int)floor(ang);\n"
+"ang -= hidx;\n"
+"hidx = (hidx + cnbins) % cnbins;\n"
+"qangle[(gidY * qangle_step + x) << 1] = hidx;\n"
+"qangle[((gidY * qangle_step + x) << 1) + 1] = (hidx + 1) % cnbins;\n"
+"grad[(gidY * grad_quadstep + x) << 1] = mag0 * (1.f - ang);\n"
+"grad[((gidY * grad_quadstep + x) << 1) + 1] = mag0 * ang;\n"
+"}\n"
+"}\n"
+"__kernel void compute_gradients_8UC1_kernel(\n"
+"const int height, const int width,\n"
+"const int img_step, const int grad_quadstep, const int qangle_step,\n"
+"__global const uchar * img, __global float * grad, __global QANGLE_TYPE * qangle,\n"
+"const float angle_scale, const char correct_gamma, const int cnbins)\n"
+"{\n"
+"const int x = get_global_id(0);\n"
+"const int tid = get_local_id(0);\n"
+"const int gSizeX = get_local_size(0);\n"
+"const int gidY = get_group_id(1);\n"
+"__global const uchar* row = img + gidY * img_step;\n"
+"__local float sh_row[NTHREADS + 2];\n"
+"if (x < width)\n"
+"sh_row[tid + 1] = row[x];\n"
+"else\n"
+"sh_row[tid + 1] = row[width - 2];\n"
+"if (tid == 0)\n"
+"sh_row[0] = row[max(x - 1, 1)];\n"
+"if (tid == gSizeX - 1)\n"
+"sh_row[gSizeX + 1] = row[min(x + 1, width - 2)];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (x < width)\n"
+"{\n"
+"float dx;\n"
+"if (correct_gamma == 1)\n"
+"dx = sqrt(sh_row[tid + 2]) - sqrt(sh_row[tid]);\n"
+"else\n"
+"dx = sh_row[tid + 2] - sh_row[tid];\n"
+"float dy = 0.f;\n"
+"if (gidY > 0 && gidY < height - 1)\n"
+"{\n"
+"float a = (float) img[ (gidY + 1) * img_step + x ];\n"
+"float b = (float) img[ (gidY - 1) * img_step + x ];\n"
+"if (correct_gamma == 1)\n"
+"dy = sqrt(a) - sqrt(b);\n"
+"else\n"
+"dy = a - b;\n"
+"}\n"
+"float mag = hypot(dx, dy);\n"
+"float ang = (atan2(dy, dx) + CV_PI_F) * angle_scale - 0.5f;\n"
+"int hidx = (int)floor(ang);\n"
+"ang -= hidx;\n"
+"hidx = (hidx + cnbins) % cnbins;\n"
+"qangle[ (gidY * qangle_step + x) << 1 ] = hidx;\n"
+"qangle[ ((gidY * qangle_step + x) << 1) + 1 ] = (hidx + 1) % cnbins;\n"
+"grad[ (gidY * grad_quadstep + x) << 1 ] = mag * (1.f - ang);\n"
+"grad[ ((gidY * grad_quadstep + x) << 1) + 1 ] = mag * ang;\n"
+"}\n"
+"}\n"
+, "bc57f4f75fb81bae73bfe73cc4ca15e4"};
+ProgramSource objdetect_hog_oclsrc(objdetect_hog.programStr);
+}
+}}
diff --git a/modules/objdetect/opencl_kernels_objdetect.hpp b/modules/objdetect/opencl_kernels_objdetect.hpp
new file mode 100644
index 0000000..dac46fb
--- /dev/null
+++ b/modules/objdetect/opencl_kernels_objdetect.hpp
@@ -0,0 +1,19 @@
+// This file is auto-generated. Do not edit!
+
+#include "opencv2/core/ocl.hpp"
+#include "opencv2/core/ocl_genbase.hpp"
+#include "opencv2/core/opencl/ocl_defs.hpp"
+
+namespace cv
+{
+namespace ocl
+{
+namespace objdetect
+{
+
+extern const struct ProgramEntry cascadedetect;
+extern ProgramSource cascadedetect_oclsrc;
+extern const struct ProgramEntry objdetect_hog;
+extern ProgramSource objdetect_hog_oclsrc;
+}
+}}
diff --git a/modules/objdetect/precomp.hpp b/modules/objdetect/precomp.hpp
new file mode 100644
index 0000000..97b976b
--- /dev/null
+++ b/modules/objdetect/precomp.hpp
@@ -0,0 +1,65 @@
+/*M///////////////////////////////////////////////////////////////////////////////////////
+//
+// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+//
+// By downloading, copying, installing or using the software you agree to this license.
+// If you do not agree to this license, do not download, install,
+// copy or use the software.
+//
+//
+// License Agreement
+// For Open Source Computer Vision Library
+//
+// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
+// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// * Redistribution's of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// * Redistribution's in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// * The name of the copyright holders may not be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// This software is provided by the copyright holders and contributors "as is" and
+// any express or implied warranties, including, but not limited to, the implied
+// warranties of merchantability and fitness for a particular purpose are disclaimed.
+// In no event shall the Intel Corporation or contributors be liable for any direct,
+// indirect, incidental, special, exemplary, or consequential damages
+// (including, but not limited to, procurement of substitute goods or services;
+// loss of use, data, or profits; or business interruption) however caused
+// and on any theory of liability, whether in contract, strict liability,
+// or tort (including negligence or otherwise) arising in any way out of
+// the use of this software, even if advised of the possibility of such damage.
+//
+//M*/
+
+#ifndef __OPENCV_PRECOMP_H__
+#define __OPENCV_PRECOMP_H__
+
+#include "opencv2/objdetect.hpp"
+#include "opencv2/imgproc.hpp"
+
+#include "opencv2/ml.hpp"
+
+#include "opencv2/core/utility.hpp"
+#include "opencv2/core/ocl.hpp"
+
+#include "opencv2/opencv_modules.hpp"
+#ifdef HAVE_OPENCV_HIGHGUI
+# include "opencv2/highgui.hpp"
+#endif
+
+#include "opencv2/core/private.hpp"
+
+#ifdef HAVE_TEGRA_OPTIMIZATION
+#include "opencv2/objdetect/objdetect_tegra.hpp"
+#endif
+
+#endif
diff --git a/modules/photo/opencl_kernels_photo.cpp b/modules/photo/opencl_kernels_photo.cpp
new file mode 100644
index 0000000..01871be
--- /dev/null
+++ b/modules/photo/opencl_kernels_photo.cpp
@@ -0,0 +1,258 @@
+// This file is auto-generated. Do not edit!
+
+#include "precomp.hpp"
+#include "opencl_kernels_photo.hpp"
+
+namespace cv
+{
+namespace ocl
+{
+namespace photo
+{
+
+const struct ProgramEntry nlmeans={"nlmeans",
+"#ifdef cl_amd_printf\n"
+"#pragma OPENCL_EXTENSION cl_amd_printf:enable\n"
+"#endif\n"
+"#ifdef DOUBLE_SUPPORT\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined cl_khr_fp64\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#endif\n"
+"#ifdef OP_CALC_WEIGHTS\n"
+"__kernel void calcAlmostDist2Weight(__global wlut_t * almostDist2Weight, int almostMaxDist,\n"
+"FT almostDist2ActualDistMultiplier, int fixedPointMult,\n"
+"w_t den, FT WEIGHT_THRESHOLD)\n"
+"{\n"
+"int almostDist = get_global_id(0);\n"
+"if (almostDist < almostMaxDist)\n"
+"{\n"
+"FT dist = almostDist * almostDist2ActualDistMultiplier;\n"
+"#ifdef ABS\n"
+"w_t w = exp((w_t)(-dist*dist) * den);\n"
+"#else\n"
+"w_t w = exp((w_t)(-dist) * den);\n"
+"#endif\n"
+"wlut_t weight = convert_wlut_t(fixedPointMult * (isnan(w) ? (w_t)1.0 : w));\n"
+"almostDist2Weight[almostDist] =\n"
+"weight < (wlut_t)(WEIGHT_THRESHOLD * fixedPointMult) ? (wlut_t)0 : weight;\n"
+"}\n"
+"}\n"
+"#elif defined OP_CALC_FASTNLMEANS\n"
+"#define noconvert\n"
+"#define SEARCH_SIZE_SQ (SEARCH_SIZE * SEARCH_SIZE)\n"
+"inline int calcDist(pixel_t a, pixel_t b)\n"
+"{\n"
+"#ifdef ABS\n"
+"int_t retval = convert_int_t(abs_diff(a, b));\n"
+"#else\n"
+"int_t diff = convert_int_t(a) - convert_int_t(b);\n"
+"int_t retval = diff * diff;\n"
+"#endif\n"
+"#if cn == 1\n"
+"return retval;\n"
+"#elif cn == 2\n"
+"return retval.x + retval.y;\n"
+"#elif cn == 3\n"
+"return retval.x + retval.y + retval.z;\n"
+"#elif cn == 4\n"
+"return retval.x + retval.y + retval.z + retval.w;\n"
+"#else\n"
+"#error \"cn should be either 1, 2, 3 or 4\"\n"
+"#endif\n"
+"}\n"
+"#ifdef ABS\n"
+"inline int calcDistUpDown(pixel_t down_value, pixel_t down_value_t, pixel_t up_value, pixel_t up_value_t)\n"
+"{\n"
+"return calcDist(down_value, down_value_t) - calcDist(up_value, up_value_t);\n"
+"}\n"
+"#else\n"
+"inline int calcDistUpDown(pixel_t down_value, pixel_t down_value_t, pixel_t up_value, pixel_t up_value_t)\n"
+"{\n"
+"int_t A = convert_int_t(down_value) - convert_int_t(down_value_t);\n"
+"int_t B = convert_int_t(up_value) - convert_int_t(up_value_t);\n"
+"int_t retval = (A - B) * (A + B);\n"
+"#if cn == 1\n"
+"return retval;\n"
+"#elif cn == 2\n"
+"return retval.x + retval.y;\n"
+"#elif cn == 3\n"
+"return retval.x + retval.y + retval.z;\n"
+"#elif cn == 4\n"
+"return retval.x + retval.y + retval.z + retval.w;\n"
+"#else\n"
+"#error \"cn should be either 1, 2, 3 or 4\"\n"
+"#endif\n"
+"}\n"
+"#endif\n"
+"#define COND if (x == 0 && y == 0)\n"
+"inline void calcFirstElementInRow(__global const uchar * src, int src_step, int src_offset,\n"
+"__local int * dists, int y, int x, int id,\n"
+"__global int * col_dists, __global int * up_col_dists)\n"
+"{\n"
+"y -= TEMPLATE_SIZE2;\n"
+"int sx = x - SEARCH_SIZE2, sy = y - SEARCH_SIZE2;\n"
+"int col_dists_current_private[TEMPLATE_SIZE];\n"
+"for (int i = id; i < SEARCH_SIZE_SQ; i += CTA_SIZE)\n"
+"{\n"
+"int dist = 0, value;\n"
+"__global const pixel_t * src_template = (__global const pixel_t *)(src +\n"
+"mad24(sy + i / SEARCH_SIZE, src_step, mad24(psz, sx + i % SEARCH_SIZE, src_offset)));\n"
+"__global const pixel_t * src_current = (__global const pixel_t *)(src + mad24(y, src_step, mad24(psz, x, src_offset)));\n"
+"__global int * col_dists_current = col_dists + i * TEMPLATE_SIZE;\n"
+"#pragma unroll\n"
+"for (int j = 0; j < TEMPLATE_SIZE; ++j)\n"
+"col_dists_current_private[j] = 0;\n"
+"for (int ty = 0; ty < TEMPLATE_SIZE; ++ty)\n"
+"{\n"
+"#pragma unroll\n"
+"for (int tx = -TEMPLATE_SIZE2; tx <= TEMPLATE_SIZE2; ++tx)\n"
+"{\n"
+"value = calcDist(src_template[tx], src_current[tx]);\n"
+"col_dists_current_private[tx + TEMPLATE_SIZE2] += value;\n"
+"dist += value;\n"
+"}\n"
+"src_current = (__global const pixel_t *)((__global const uchar *)src_current + src_step);\n"
+"src_template = (__global const pixel_t *)((__global const uchar *)src_template + src_step);\n"
+"}\n"
+"#pragma unroll\n"
+"for (int j = 0; j < TEMPLATE_SIZE; ++j)\n"
+"col_dists_current[j] = col_dists_current_private[j];\n"
+"dists[i] = dist;\n"
+"up_col_dists[0 + i] = col_dists[TEMPLATE_SIZE - 1];\n"
+"}\n"
+"}\n"
+"inline void calcElementInFirstRow(__global const uchar * src, int src_step, int src_offset,\n"
+"__local int * dists, int y, int x0, int x, int id, int first,\n"
+"__global int * col_dists, __global int * up_col_dists)\n"
+"{\n"
+"x += TEMPLATE_SIZE2;\n"
+"y -= TEMPLATE_SIZE2;\n"
+"int sx = x - SEARCH_SIZE2, sy = y - SEARCH_SIZE2;\n"
+"for (int i = id; i < SEARCH_SIZE_SQ; i += CTA_SIZE)\n"
+"{\n"
+"__global const pixel_t * src_current = (__global const pixel_t *)(src + mad24(y, src_step, mad24(psz, x, src_offset)));\n"
+"__global const pixel_t * src_template = (__global const pixel_t *)(src +\n"
+"mad24(sy + i / SEARCH_SIZE, src_step, mad24(psz, sx + i % SEARCH_SIZE, src_offset)));\n"
+"__global int * col_dists_current = col_dists + TEMPLATE_SIZE * i;\n"
+"int col_dist = 0;\n"
+"#pragma unroll\n"
+"for (int ty = 0; ty < TEMPLATE_SIZE; ++ty)\n"
+"{\n"
+"col_dist += calcDist(src_current[0], src_template[0]);\n"
+"src_current = (__global const pixel_t *)((__global const uchar *)src_current + src_step);\n"
+"src_template = (__global const pixel_t *)((__global const uchar *)src_template + src_step);\n"
+"}\n"
+"dists[i] += col_dist - col_dists_current[first];\n"
+"col_dists_current[first] = col_dist;\n"
+"up_col_dists[mad24(x0, SEARCH_SIZE_SQ, i)] = col_dist;\n"
+"}\n"
+"}\n"
+"inline void calcElement(__global const uchar * src, int src_step, int src_offset,\n"
+"__local int * dists, int y, int x0, int x, int id, int first,\n"
+"__global int * col_dists, __global int * up_col_dists)\n"
+"{\n"
+"int sx = x + TEMPLATE_SIZE2;\n"
+"int sy_up = y - TEMPLATE_SIZE2 - 1;\n"
+"int sy_down = y + TEMPLATE_SIZE2;\n"
+"pixel_t up_value = *(__global const pixel_t *)(src + mad24(sy_up, src_step, mad24(psz, sx, src_offset)));\n"
+"pixel_t down_value = *(__global const pixel_t *)(src + mad24(sy_down, src_step, mad24(psz, sx, src_offset)));\n"
+"sx -= SEARCH_SIZE2;\n"
+"sy_up -= SEARCH_SIZE2;\n"
+"sy_down -= SEARCH_SIZE2;\n"
+"for (int i = id; i < SEARCH_SIZE_SQ; i += CTA_SIZE)\n"
+"{\n"
+"int wx = i % SEARCH_SIZE, wy = i / SEARCH_SIZE;\n"
+"pixel_t up_value_t = *(__global const pixel_t *)(src + mad24(sy_up + wy, src_step, mad24(psz, sx + wx, src_offset)));\n"
+"pixel_t down_value_t = *(__global const pixel_t *)(src + mad24(sy_down + wy, src_step, mad24(psz, sx + wx, src_offset)));\n"
+"__global int * col_dists_current = col_dists + mad24(i, TEMPLATE_SIZE, first);\n"
+"__global int * up_col_dists_current = up_col_dists + mad24(x0, SEARCH_SIZE_SQ, i);\n"
+"int col_dist = up_col_dists_current[0] + calcDistUpDown(down_value, down_value_t, up_value, up_value_t);\n"
+"dists[i] += col_dist - col_dists_current[0];\n"
+"col_dists_current[0] = col_dist;\n"
+"up_col_dists_current[0] = col_dist;\n"
+"}\n"
+"}\n"
+"inline void convolveWindow(__global const uchar * src, int src_step, int src_offset,\n"
+"__local int * dists, __global const wlut_t * almostDist2Weight,\n"
+"__global uchar * dst, int dst_step, int dst_offset,\n"
+"int y, int x, int id, __local weight_t * weights_local,\n"
+"__local sum_t * weighted_sum_local, int almostTemplateWindowSizeSqBinShift)\n"
+"{\n"
+"int sx = x - SEARCH_SIZE2, sy = y - SEARCH_SIZE2;\n"
+"weight_t weights = (weight_t)0;\n"
+"sum_t weighted_sum = (sum_t)0;\n"
+"for (int i = id; i < SEARCH_SIZE_SQ; i += CTA_SIZE)\n"
+"{\n"
+"int src_index = mad24(sy + i / SEARCH_SIZE, src_step, mad24(i % SEARCH_SIZE + sx, psz, src_offset));\n"
+"sum_t src_value = convert_sum_t(*(__global const pixel_t *)(src + src_index));\n"
+"int almostAvgDist = dists[i] >> almostTemplateWindowSizeSqBinShift;\n"
+"weight_t weight = convert_weight_t(almostDist2Weight[almostAvgDist]);\n"
+"weights += weight;\n"
+"weighted_sum += (sum_t)weight * src_value;\n"
+"}\n"
+"weights_local[id] = weights;\n"
+"weighted_sum_local[id] = weighted_sum;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"for (int lsize = CTA_SIZE >> 1; lsize > 2; lsize >>= 1)\n"
+"{\n"
+"if (id < lsize)\n"
+"{\n"
+"int id2 = lsize + id;\n"
+"weights_local[id] += weights_local[id2];\n"
+"weighted_sum_local[id] += weighted_sum_local[id2];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"if (id == 0)\n"
+"{\n"
+"int dst_index = mad24(y, dst_step, mad24(psz, x, dst_offset));\n"
+"sum_t weighted_sum_local_0 = weighted_sum_local[0] + weighted_sum_local[1] +\n"
+"weighted_sum_local[2] + weighted_sum_local[3];\n"
+"weight_t weights_local_0 = weights_local[0] + weights_local[1] + weights_local[2] + weights_local[3];\n"
+"*(__global pixel_t *)(dst + dst_index) = convert_pixel_t(weighted_sum_local_0 / (sum_t)weights_local_0);\n"
+"}\n"
+"}\n"
+"__kernel void fastNlMeansDenoising(__global const uchar * src, int src_step, int src_offset,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"__global const wlut_t * almostDist2Weight, __global uchar * buffer,\n"
+"int almostTemplateWindowSizeSqBinShift)\n"
+"{\n"
+"int block_x = get_group_id(0), nblocks_x = get_num_groups(0);\n"
+"int block_y = get_group_id(1);\n"
+"int id = get_local_id(0), first;\n"
+"__local int dists[SEARCH_SIZE_SQ];\n"
+"__local weight_t weights[CTA_SIZE];\n"
+"__local sum_t weighted_sum[CTA_SIZE];\n"
+"int x0 = block_x * BLOCK_COLS, x1 = min(x0 + BLOCK_COLS, dst_cols);\n"
+"int y0 = block_y * BLOCK_ROWS, y1 = min(y0 + BLOCK_ROWS, dst_rows);\n"
+"int block_data_start = SEARCH_SIZE_SQ * (mad24(block_y, dst_cols, x0) + mad24(block_y, nblocks_x, block_x) * TEMPLATE_SIZE);\n"
+"__global int * col_dists = (__global int *)(buffer + block_data_start * sizeof(int));\n"
+"__global int * up_col_dists = col_dists + SEARCH_SIZE_SQ * TEMPLATE_SIZE;\n"
+"for (int y = y0; y < y1; ++y)\n"
+"for (int x = x0; x < x1; ++x)\n"
+"{\n"
+"if (x == x0)\n"
+"{\n"
+"calcFirstElementInRow(src, src_step, src_offset, dists, y, x, id, col_dists, up_col_dists);\n"
+"first = 0;\n"
+"}\n"
+"else\n"
+"{\n"
+"if (y == y0)\n"
+"calcElementInFirstRow(src, src_step, src_offset, dists, y, x - x0, x, id, first, col_dists, up_col_dists);\n"
+"else\n"
+"calcElement(src, src_step, src_offset, dists, y, x - x0, x, id, first, col_dists, up_col_dists);\n"
+"first = (first + 1) % TEMPLATE_SIZE;\n"
+"}\n"
+"convolveWindow(src, src_step, src_offset, dists, almostDist2Weight, dst, dst_step, dst_offset,\n"
+"y, x, id, weights, weighted_sum, almostTemplateWindowSizeSqBinShift);\n"
+"}\n"
+"}\n"
+"#endif\n"
+, "094aea838a917cea483f77e19dd39de3"};
+ProgramSource nlmeans_oclsrc(nlmeans.programStr);
+}
+}}
diff --git a/modules/photo/opencl_kernels_photo.hpp b/modules/photo/opencl_kernels_photo.hpp
new file mode 100644
index 0000000..9d51baf
--- /dev/null
+++ b/modules/photo/opencl_kernels_photo.hpp
@@ -0,0 +1,17 @@
+// This file is auto-generated. Do not edit!
+
+#include "opencv2/core/ocl.hpp"
+#include "opencv2/core/ocl_genbase.hpp"
+#include "opencv2/core/opencl/ocl_defs.hpp"
+
+namespace cv
+{
+namespace ocl
+{
+namespace photo
+{
+
+extern const struct ProgramEntry nlmeans;
+extern ProgramSource nlmeans_oclsrc;
+}
+}}
diff --git a/modules/photo/precomp.hpp b/modules/photo/precomp.hpp
new file mode 100644
index 0000000..4355f13
--- /dev/null
+++ b/modules/photo/precomp.hpp
@@ -0,0 +1,56 @@
+/*M///////////////////////////////////////////////////////////////////////////////////////
+//
+// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+//
+// By downloading, copying, installing or using the software you agree to this license.
+// If you do not agree to this license, do not download, install,
+// copy or use the software.
+//
+//
+// License Agreement
+// For Open Source Computer Vision Library
+//
+// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
+// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// * Redistribution's of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// * Redistribution's in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// * The name of the copyright holders may not be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// This software is provided by the copyright holders and contributors "as is" and
+// any express or implied warranties, including, but not limited to, the implied
+// warranties of merchantability and fitness for a particular purpose are disclaimed.
+// In no event shall the Intel Corporation or contributors be liable for any direct,
+// indirect, incidental, special, exemplary, or consequential damages
+// (including, but not limited to, procurement of substitute goods or services;
+// loss of use, data, or profits; or business interruption) however caused
+// and on any theory of liability, whether in contract, strict liability,
+// or tort (including negligence or otherwise) arising in any way out of
+// the use of this software, even if advised of the possibility of such damage.
+//
+//M*/
+
+#ifndef __OPENCV_PRECOMP_H__
+#define __OPENCV_PRECOMP_H__
+
+#include "opencv2/core/private.hpp"
+#include "opencv2/core/utility.hpp"
+#include "opencv2/photo.hpp"
+#include "opencv2/core/ocl.hpp"
+#include "opencv2/imgproc.hpp"
+
+#ifdef HAVE_TEGRA_OPTIMIZATION
+#include "opencv2/photo/photo_tegra.hpp"
+#endif
+
+#endif
diff --git a/modules/python/src2/hdr_parser.pyc b/modules/python/src2/hdr_parser.pyc
new file mode 100644
index 0000000..23096d6
--- /dev/null
+++ b/modules/python/src2/hdr_parser.pyc
Binary files differ
diff --git a/modules/shape/precomp.hpp b/modules/shape/precomp.hpp
new file mode 100644
index 0000000..bc00e59
--- /dev/null
+++ b/modules/shape/precomp.hpp
@@ -0,0 +1,59 @@
+/*M///////////////////////////////////////////////////////////////////////////////////////
+//
+// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+//
+// By downloading, copying, installing or using the software you agree to this license.
+// If you do not agree to this license, do not download, install,
+// copy or use the software.
+//
+//
+// License Agreement
+// For Open Source Computer Vision Library
+//
+// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
+// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// * Redistribution's of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// * Redistribution's in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// * The name of the copyright holders may not be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// This software is provided by the copyright holders and contributors "as is" and
+// any express or implied warranties, including, but not limited to, the implied
+// warranties of merchantability and fitness for a particular purpose are disclaimed.
+// In no event shall the Intel Corporation or contributors be liable for any direct,
+// indirect, incidental, special, exemplary, or consequential damages
+// (including, but not limited to, procurement of substitute goods or services;
+// loss of use, data, or profits; or business interruption) however caused
+// and on any theory of liability, whether in contract, strict liability,
+// or tort (including negligence or otherwise) arising in any way out of
+// the use of this software, even if advised of the possibility of such damage.
+//
+//M*/
+
+#ifndef __OPENCV_PRECOMP_H__
+#define __OPENCV_PRECOMP_H__
+
+#include <vector>
+#include <cmath>
+#include <iostream>
+
+#include "opencv2/video/tracking.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/shape.hpp"
+
+#include "opencv2/core/utility.hpp"
+#include "opencv2/core/private.hpp"
+
+#include "opencv2/opencv_modules.hpp"
+
+#endif
diff --git a/modules/stitching/opencl_kernels_stitching.cpp b/modules/stitching/opencl_kernels_stitching.cpp
new file mode 100644
index 0000000..35b658f
--- /dev/null
+++ b/modules/stitching/opencl_kernels_stitching.cpp
@@ -0,0 +1,332 @@
+// This file is auto-generated. Do not edit!
+
+#include "precomp.hpp"
+#include "opencl_kernels_stitching.hpp"
+
+namespace cv
+{
+namespace ocl
+{
+namespace stitching
+{
+
+const struct ProgramEntry multibandblend={"multibandblend",
+"#ifndef NL\n"
+"#define NL\n"
+"#endif\n"
+"#define REF(x) x\n"
+"#define __CAT(x, y) x##y\n"
+"#define CAT(x, y) __CAT(x, y)\n"
+"#define DECLARE_MAT_ARG(name) \\\n"
+"__global uchar* restrict name ## Ptr, \\\n"
+"int name ## StepBytes, \\\n"
+"int name ## Offset, \\\n"
+"int name ## Height, \\\n"
+"int name ## Width NL\n"
+"#define MAT_BYTE_OFFSET(name, x, y) mad24((y), name ## StepBytes, ((x)) * (int)(name ## _TSIZE) + name ## Offset)\n"
+"#define MAT_RELATIVE_BYTE_OFFSET(name, x, y) mad24(y, name ## StepBytes, (x) * (int)(name ## _TSIZE))\n"
+"#define __LOAD_MAT_AT(name, byteOffset) *((const __global name ## _T*)(name ## Ptr + (byteOffset)))\n"
+"#define __vload_CN__(name_cn) vload ## name_cn\n"
+"#define __vload_CN_(name_cn) __vload_CN__(name_cn)\n"
+"#define __vload_CN(name) __vload_CN_(name ## _CN)\n"
+"#define __LOAD_MAT_AT_vload(name, byteOffset) __vload_CN(name)(0, ((const __global name ## _T1*)(name ## Ptr + (byteOffset))))\n"
+"#define __LOAD_MAT_AT_1 __LOAD_MAT_AT\n"
+"#define __LOAD_MAT_AT_2 __LOAD_MAT_AT\n"
+"#define __LOAD_MAT_AT_3 __LOAD_MAT_AT_vload\n"
+"#define __LOAD_MAT_AT_4 __LOAD_MAT_AT\n"
+"#define __LOAD_MAT_AT_CN__(name_cn) __LOAD_MAT_AT_ ## name_cn\n"
+"#define __LOAD_MAT_AT_CN_(name_cn) __LOAD_MAT_AT_CN__(name_cn)\n"
+"#define __LOAD_MAT_AT_CN(name) __LOAD_MAT_AT_CN_(name ## _CN)\n"
+"#define LOAD_MAT_AT(name, byteOffset) __LOAD_MAT_AT_CN(name)(name, byteOffset)\n"
+"#define __STORE_MAT_AT(name, byteOffset, v) *((__global name ## _T*)(name ## Ptr + (byteOffset))) = v\n"
+"#define __vstore_CN__(name_cn) vstore ## name_cn\n"
+"#define __vstore_CN_(name_cn) __vstore_CN__(name_cn)\n"
+"#define __vstore_CN(name) __vstore_CN_(name ## _CN)\n"
+"#define __STORE_MAT_AT_vstore(name, byteOffset, v) __vstore_CN(name)(v, 0, ((__global name ## _T1*)(name ## Ptr + (byteOffset))))\n"
+"#define __STORE_MAT_AT_1 __STORE_MAT_AT\n"
+"#define __STORE_MAT_AT_2 __STORE_MAT_AT\n"
+"#define __STORE_MAT_AT_3 __STORE_MAT_AT_vstore\n"
+"#define __STORE_MAT_AT_4 __STORE_MAT_AT\n"
+"#define __STORE_MAT_AT_CN__(name_cn) __STORE_MAT_AT_ ## name_cn\n"
+"#define __STORE_MAT_AT_CN_(name_cn) __STORE_MAT_AT_CN__(name_cn)\n"
+"#define __STORE_MAT_AT_CN(name) __STORE_MAT_AT_CN_(name ## _CN)\n"
+"#define STORE_MAT_AT(name, byteOffset, v) __STORE_MAT_AT_CN(name)(name, byteOffset, v)\n"
+"#define T1_uchar uchar\n"
+"#define T1_uchar2 uchar\n"
+"#define T1_uchar3 uchar\n"
+"#define T1_uchar4 uchar\n"
+"#define T1_char char\n"
+"#define T1_char2 char\n"
+"#define T1_char3 char\n"
+"#define T1_char4 char\n"
+"#define T1_ushort ushort\n"
+"#define T1_ushort2 ushort\n"
+"#define T1_ushort3 ushort\n"
+"#define T1_ushort4 ushort\n"
+"#define T1_short short\n"
+"#define T1_short2 short\n"
+"#define T1_short3 short\n"
+"#define T1_short4 short\n"
+"#define T1_int int\n"
+"#define T1_int2 int\n"
+"#define T1_int3 int\n"
+"#define T1_int4 int\n"
+"#define T1_float float\n"
+"#define T1_float2 float\n"
+"#define T1_float3 float\n"
+"#define T1_float4 float\n"
+"#define T1_double double\n"
+"#define T1_double2 double\n"
+"#define T1_double3 double\n"
+"#define T1_double4 double\n"
+"#define T1(type) REF(CAT(T1_, REF(type)))\n"
+"#define uchar1 uchar\n"
+"#define char1 char\n"
+"#define short1 short\n"
+"#define ushort1 ushort\n"
+"#define int1 int\n"
+"#define float1 float\n"
+"#define double1 double\n"
+"#define TYPE(type, cn) REF(CAT(REF(type), REF(cn)))\n"
+"#define __CONVERT_MODE_uchar_uchar __NO_CONVERT\n"
+"#define __CONVERT_MODE_uchar_char __CONVERT_sat\n"
+"#define __CONVERT_MODE_uchar_ushort __CONVERT\n"
+"#define __CONVERT_MODE_uchar_short __CONVERT\n"
+"#define __CONVERT_MODE_uchar_int __CONVERT\n"
+"#define __CONVERT_MODE_uchar_float __CONVERT\n"
+"#define __CONVERT_MODE_uchar_double __CONVERT\n"
+"#define __CONVERT_MODE_char_uchar __CONVERT_sat\n"
+"#define __CONVERT_MODE_char_char __NO_CONVERT\n"
+"#define __CONVERT_MODE_char_ushort __CONVERT_sat\n"
+"#define __CONVERT_MODE_char_short __CONVERT\n"
+"#define __CONVERT_MODE_char_int __CONVERT\n"
+"#define __CONVERT_MODE_char_float __CONVERT\n"
+"#define __CONVERT_MODE_char_double __CONVERT\n"
+"#define __CONVERT_MODE_ushort_uchar __CONVERT_sat\n"
+"#define __CONVERT_MODE_ushort_char __CONVERT_sat\n"
+"#define __CONVERT_MODE_ushort_ushort __NO_CONVERT\n"
+"#define __CONVERT_MODE_ushort_short __CONVERT_sat\n"
+"#define __CONVERT_MODE_ushort_int __CONVERT\n"
+"#define __CONVERT_MODE_ushort_float __CONVERT\n"
+"#define __CONVERT_MODE_ushort_double __CONVERT\n"
+"#define __CONVERT_MODE_short_uchar __CONVERT_sat\n"
+"#define __CONVERT_MODE_short_char __CONVERT_sat\n"
+"#define __CONVERT_MODE_short_ushort __CONVERT_sat\n"
+"#define __CONVERT_MODE_short_short __NO_CONVERT\n"
+"#define __CONVERT_MODE_short_int __CONVERT\n"
+"#define __CONVERT_MODE_short_float __CONVERT\n"
+"#define __CONVERT_MODE_short_double __CONVERT\n"
+"#define __CONVERT_MODE_int_uchar __CONVERT_sat\n"
+"#define __CONVERT_MODE_int_char __CONVERT_sat\n"
+"#define __CONVERT_MODE_int_ushort __CONVERT_sat\n"
+"#define __CONVERT_MODE_int_short __CONVERT_sat\n"
+"#define __CONVERT_MODE_int_int __NO_CONVERT\n"
+"#define __CONVERT_MODE_int_float __CONVERT\n"
+"#define __CONVERT_MODE_int_double __CONVERT\n"
+"#define __CONVERT_MODE_float_uchar __CONVERT_sat_rte\n"
+"#define __CONVERT_MODE_float_char __CONVERT_sat_rte\n"
+"#define __CONVERT_MODE_float_ushort __CONVERT_sat_rte\n"
+"#define __CONVERT_MODE_float_short __CONVERT_sat_rte\n"
+"#define __CONVERT_MODE_float_int __CONVERT_rte\n"
+"#define __CONVERT_MODE_float_float __NO_CONVERT\n"
+"#define __CONVERT_MODE_float_double __CONVERT\n"
+"#define __CONVERT_MODE_double_uchar __CONVERT_sat_rte\n"
+"#define __CONVERT_MODE_double_char __CONVERT_sat_rte\n"
+"#define __CONVERT_MODE_double_ushort __CONVERT_sat_rte\n"
+"#define __CONVERT_MODE_double_short __CONVERT_sat_rte\n"
+"#define __CONVERT_MODE_double_int __CONVERT_rte\n"
+"#define __CONVERT_MODE_double_float __CONVERT\n"
+"#define __CONVERT_MODE_double_double __NO_CONVERT\n"
+"#define __CONVERT_MODE(srcType, dstType) CAT(__CONVERT_MODE_, CAT(REF(T1(srcType)), CAT(_, REF(T1(dstType)))))\n"
+"#define __ROUND_MODE__NO_CONVERT\n"
+"#define __ROUND_MODE__CONVERT\n"
+"#define __ROUND_MODE__CONVERT_rte _rte\n"
+"#define __ROUND_MODE__CONVERT_sat _sat\n"
+"#define __ROUND_MODE__CONVERT_sat_rte _sat_rte\n"
+"#define ROUND_MODE(srcType, dstType) CAT(__ROUND_MODE_, __CONVERT_MODE(srcType, dstType))\n"
+"#define __CONVERT_ROUND(dstType, roundMode) CAT(CAT(convert_, REF(dstType)), roundMode)\n"
+"#define __NO_CONVERT(dstType)\n"
+"#define __CONVERT(dstType) __CONVERT_ROUND(dstType,)\n"
+"#define __CONVERT_rte(dstType) __CONVERT_ROUND(dstType,_rte)\n"
+"#define __CONVERT_sat(dstType) __CONVERT_ROUND(dstType,_sat)\n"
+"#define __CONVERT_sat_rte(dstType) __CONVERT_ROUND(dstType,_sat_rte)\n"
+"#define CONVERT(srcType, dstType) REF(__CONVERT_MODE(srcType,dstType))(dstType)\n"
+"#define CONVERT_TO(dstType) __CONVERT_ROUND(dstType,)\n"
+"#define CV_8U 0\n"
+"#define CV_8S 1\n"
+"#define CV_16U 2\n"
+"#define CV_16S 3\n"
+"#define CV_32S 4\n"
+"#define CV_32F 5\n"
+"#define CV_64F 6\n"
+"#if defined(DEFINE_feed)\n"
+"#define workType TYPE(weight_T1, src_CN)\n"
+"#if src_DEPTH == 3 && src_CN == 3\n"
+"#define convertSrcToWorkType convert_float3\n"
+"#else\n"
+"#define convertSrcToWorkType CONVERT_TO(workType)\n"
+"#endif\n"
+"#if dst_DEPTH == 3 && dst_CN == 3\n"
+"#define convertToDstType convert_short3\n"
+"#else\n"
+"#define convertToDstType CONVERT_TO(dst_T)\n"
+"#endif\n"
+"__kernel void feed(\n"
+"DECLARE_MAT_ARG(src), DECLARE_MAT_ARG(weight),\n"
+"DECLARE_MAT_ARG(dst), DECLARE_MAT_ARG(dstWeight)\n"
+")\n"
+"{\n"
+"const int x = get_global_id(0);\n"
+"const int y = get_global_id(1);\n"
+"if (x < srcWidth && y < srcHeight)\n"
+"{\n"
+"int src_byteOffset = MAT_BYTE_OFFSET(src, x, y);\n"
+"int weight_byteOffset = MAT_BYTE_OFFSET(weight, x, y);\n"
+"int dst_byteOffset = MAT_BYTE_OFFSET(dst, x, y);\n"
+"int dstWeight_byteOffset = MAT_BYTE_OFFSET(dstWeight, x, y);\n"
+"weight_T w = LOAD_MAT_AT(weight, weight_byteOffset);\n"
+"workType src_value = convertSrcToWorkType(LOAD_MAT_AT(src, src_byteOffset));\n"
+"STORE_MAT_AT(dst, dst_byteOffset, LOAD_MAT_AT(dst, dst_byteOffset) + convertToDstType(src_value * w));\n"
+"STORE_MAT_AT(dstWeight, dstWeight_byteOffset, LOAD_MAT_AT(dstWeight, dstWeight_byteOffset) + w);\n"
+"}\n"
+"}\n"
+"#endif\n"
+"#if defined(DEFINE_normalizeUsingWeightMap)\n"
+"#if mat_DEPTH == 3 && mat_CN == 3\n"
+"#define workType float3\n"
+"#define convertSrcToWorkType convert_float3\n"
+"#define convertToDstType convert_short3\n"
+"#else\n"
+"#define workType TYPE(weight_T1, mat_CN)\n"
+"#define convertSrcToWorkType CONVERT_TO(workType)\n"
+"#define convertToDstType CONVERT_TO(mat_T)\n"
+"#endif\n"
+"#if weight_DEPTH >= CV_32F\n"
+"#define WEIGHT_EPS 1e-5f\n"
+"#else\n"
+"#define WEIGHT_EPS 0\n"
+"#endif\n"
+"__kernel void normalizeUsingWeightMap(\n"
+"DECLARE_MAT_ARG(mat), DECLARE_MAT_ARG(weight)\n"
+")\n"
+"{\n"
+"const int x = get_global_id(0);\n"
+"const int y = get_global_id(1);\n"
+"if (x < matWidth && y < matHeight)\n"
+"{\n"
+"int mat_byteOffset = MAT_BYTE_OFFSET(mat, x, y);\n"
+"int weight_byteOffset = MAT_BYTE_OFFSET(weight, x, y);\n"
+"weight_T w = LOAD_MAT_AT(weight, weight_byteOffset);\n"
+"workType value = convertSrcToWorkType(LOAD_MAT_AT(mat, mat_byteOffset));\n"
+"value = value / (w + WEIGHT_EPS);\n"
+"STORE_MAT_AT(mat, mat_byteOffset, convertToDstType(value));\n"
+"}\n"
+"}\n"
+"#endif\n"
+, "3320d5f13a357c8ee3c223e66d598244"};
+ProgramSource multibandblend_oclsrc(multibandblend.programStr);
+const struct ProgramEntry warpers={"warpers",
+"__kernel void buildWarpPlaneMaps(__global uchar * xmapptr, int xmap_step, int xmap_offset,\n"
+"__global uchar * ymapptr, int ymap_step, int ymap_offset, int rows, int cols,\n"
+"__constant float * ck_rinv, __constant float * ct,\n"
+"int tl_u, int tl_v, float scale, int rowsPerWI)\n"
+"{\n"
+"int du = get_global_id(0);\n"
+"int dv0 = get_global_id(1) * rowsPerWI;\n"
+"if (du < cols)\n"
+"{\n"
+"int xmap_index = mad24(dv0, xmap_step, mad24(du, (int)sizeof(float), xmap_offset));\n"
+"int ymap_index = mad24(dv0, ymap_step, mad24(du, (int)sizeof(float), ymap_offset));\n"
+"float u = tl_u + du;\n"
+"float x_ = fma(u, scale, -ct[0]);\n"
+"float ct1 = 1 - ct[2];\n"
+"for (int dv = dv0, dv1 = min(rows, dv0 + rowsPerWI); dv < dv1; ++dv, xmap_index += xmap_step,\n"
+"ymap_index += ymap_step)\n"
+"{\n"
+"__global float * xmap = (__global float *)(xmapptr + xmap_index);\n"
+"__global float * ymap = (__global float *)(ymapptr + ymap_index);\n"
+"float v = tl_v + dv;\n"
+"float y_ = fma(v, scale, -ct[1]);\n"
+"float x = fma(ck_rinv[0], x_, fma(ck_rinv[1], y_, ck_rinv[2] * ct1));\n"
+"float y = fma(ck_rinv[3], x_, fma(ck_rinv[4], y_, ck_rinv[5] * ct1));\n"
+"float z = fma(ck_rinv[6], x_, fma(ck_rinv[7], y_, ck_rinv[8] * ct1));\n"
+"if (z != 0)\n"
+"x /= z, y /= z;\n"
+"else\n"
+"x = y = -1;\n"
+"xmap[0] = x;\n"
+"ymap[0] = y;\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void buildWarpCylindricalMaps(__global uchar * xmapptr, int xmap_step, int xmap_offset,\n"
+"__global uchar * ymapptr, int ymap_step, int ymap_offset, int rows, int cols,\n"
+"__constant float * ck_rinv, int tl_u, int tl_v, float scale, int rowsPerWI)\n"
+"{\n"
+"int du = get_global_id(0);\n"
+"int dv0 = get_global_id(1) * rowsPerWI;\n"
+"if (du < cols)\n"
+"{\n"
+"int xmap_index = mad24(dv0, xmap_step, mad24(du, (int)sizeof(float), xmap_offset));\n"
+"int ymap_index = mad24(dv0, ymap_step, mad24(du, (int)sizeof(float), ymap_offset));\n"
+"float u = (tl_u + du) * scale;\n"
+"float x_, z_;\n"
+"x_ = sincos(u, &z_);\n"
+"for (int dv = dv0, dv1 = min(rows, dv0 + rowsPerWI); dv < dv1; ++dv, xmap_index += xmap_step,\n"
+"ymap_index += ymap_step)\n"
+"{\n"
+"__global float * xmap = (__global float *)(xmapptr + xmap_index);\n"
+"__global float * ymap = (__global float *)(ymapptr + ymap_index);\n"
+"float y_ = (tl_v + dv) * scale;\n"
+"float x, y, z;\n"
+"x = fma(ck_rinv[0], x_, fma(ck_rinv[1], y_, ck_rinv[2] * z_));\n"
+"y = fma(ck_rinv[3], x_, fma(ck_rinv[4], y_, ck_rinv[5] * z_));\n"
+"z = fma(ck_rinv[6], x_, fma(ck_rinv[7], y_, ck_rinv[8] * z_));\n"
+"if (z > 0)\n"
+"x /= z, y /= z;\n"
+"else\n"
+"x = y = -1;\n"
+"xmap[0] = x;\n"
+"ymap[0] = y;\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void buildWarpSphericalMaps(__global uchar * xmapptr, int xmap_step, int xmap_offset,\n"
+"__global uchar * ymapptr, int ymap_step, int ymap_offset, int rows, int cols,\n"
+"__constant float * ck_rinv, int tl_u, int tl_v, float scale, int rowsPerWI)\n"
+"{\n"
+"int du = get_global_id(0);\n"
+"int dv0 = get_global_id(1) * rowsPerWI;\n"
+"if (du < cols)\n"
+"{\n"
+"int xmap_index = mad24(dv0, xmap_step, mad24(du, (int)sizeof(float), xmap_offset));\n"
+"int ymap_index = mad24(dv0, ymap_step, mad24(du, (int)sizeof(float), ymap_offset));\n"
+"float u = (tl_u + du) * scale;\n"
+"float cosu, sinu = sincos(u, &cosu);\n"
+"for (int dv = dv0, dv1 = min(rows, dv0 + rowsPerWI); dv < dv1; ++dv, xmap_index += xmap_step,\n"
+"ymap_index += ymap_step)\n"
+"{\n"
+"__global float * xmap = (__global float *)(xmapptr + xmap_index);\n"
+"__global float * ymap = (__global float *)(ymapptr + ymap_index);\n"
+"float v = (tl_v + dv) * scale;\n"
+"float cosv, sinv = sincos(v, &cosv);\n"
+"float x_ = sinv * sinu;\n"
+"float y_ = -cosv;\n"
+"float z_ = sinv * cosu;\n"
+"float x, y, z;\n"
+"x = fma(ck_rinv[0], x_, fma(ck_rinv[1], y_, ck_rinv[2] * z_));\n"
+"y = fma(ck_rinv[3], x_, fma(ck_rinv[4], y_, ck_rinv[5] * z_));\n"
+"z = fma(ck_rinv[6], x_, fma(ck_rinv[7], y_, ck_rinv[8] * z_));\n"
+"if (z > 0)\n"
+"x /= z, y /= z;\n"
+"else\n"
+"x = y = -1;\n"
+"xmap[0] = x;\n"
+"ymap[0] = y;\n"
+"}\n"
+"}\n"
+"}\n"
+, "83a61a49d8be5dcc09a00d8d4651c4f8"};
+ProgramSource warpers_oclsrc(warpers.programStr);
+}
+}}
diff --git a/modules/stitching/opencl_kernels_stitching.hpp b/modules/stitching/opencl_kernels_stitching.hpp
new file mode 100644
index 0000000..81ac62d
--- /dev/null
+++ b/modules/stitching/opencl_kernels_stitching.hpp
@@ -0,0 +1,19 @@
+// This file is auto-generated. Do not edit!
+
+#include "opencv2/core/ocl.hpp"
+#include "opencv2/core/ocl_genbase.hpp"
+#include "opencv2/core/opencl/ocl_defs.hpp"
+
+namespace cv
+{
+namespace ocl
+{
+namespace stitching
+{
+
+extern const struct ProgramEntry multibandblend;
+extern ProgramSource multibandblend_oclsrc;
+extern const struct ProgramEntry warpers;
+extern ProgramSource warpers_oclsrc;
+}
+}}
diff --git a/modules/stitching/precomp.hpp b/modules/stitching/precomp.hpp
new file mode 100644
index 0000000..70636b6
--- /dev/null
+++ b/modules/stitching/precomp.hpp
@@ -0,0 +1,102 @@
+/*M///////////////////////////////////////////////////////////////////////////////////////
+//
+// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+//
+// By downloading, copying, installing or using the software you agree to this license.
+// If you do not agree to this license, do not download, install,
+// copy or use the software.
+//
+//
+// License Agreement
+// For Open Source Computer Vision Library
+//
+// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
+// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// * Redistribution's of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// * Redistribution's in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// * The name of the copyright holders may not be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// This software is provided by the copyright holders and contributors "as is" and
+// any express or implied warranties, including, but not limited to, the implied
+// warranties of merchantability and fitness for a particular purpose are disclaimed.
+// In no event shall the Intel Corporation or contributors be liable for any direct,
+// indirect, incidental, special, exemplary, or consequential damages
+// (including, but not limited to, procurement of substitute goods or services;
+// loss of use, data, or profits; or business interruption) however caused
+// and on any theory of liability, whether in contract, strict liability,
+// or tort (including negligence or otherwise) arising in any way out of
+// the use of this software, even if advised of the possibility of such damage.
+//
+//M*/
+
+#ifndef __OPENCV_STITCHING_PRECOMP_H__
+#define __OPENCV_STITCHING_PRECOMP_H__
+
+#include "opencv2/opencv_modules.hpp"
+
+#include <vector>
+#include <algorithm>
+#include <utility>
+#include <set>
+#include <functional>
+#include <sstream>
+#include <iostream>
+#include <cmath>
+#include "opencv2/core.hpp"
+#include "opencv2/core/ocl.hpp"
+#include "opencv2/core/utility.hpp"
+#include "opencv2/stitching.hpp"
+#include "opencv2/stitching/detail/autocalib.hpp"
+#include "opencv2/stitching/detail/blenders.hpp"
+#include "opencv2/stitching/detail/timelapsers.hpp"
+#include "opencv2/stitching/detail/camera.hpp"
+#include "opencv2/stitching/detail/exposure_compensate.hpp"
+#include "opencv2/stitching/detail/matchers.hpp"
+#include "opencv2/stitching/detail/motion_estimators.hpp"
+#include "opencv2/stitching/detail/seam_finders.hpp"
+#include "opencv2/stitching/detail/util.hpp"
+#include "opencv2/stitching/detail/warpers.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/features2d.hpp"
+#include "opencv2/calib3d.hpp"
+
+#ifdef HAVE_OPENCV_CUDAARITHM
+# include "opencv2/cudaarithm.hpp"
+#endif
+
+#ifdef HAVE_OPENCV_CUDAWARPING
+# include "opencv2/cudawarping.hpp"
+#endif
+
+#ifdef HAVE_OPENCV_CUDAFEATURES2D
+# include "opencv2/cudafeatures2d.hpp"
+#endif
+
+#ifdef HAVE_OPENCV_CUDALEGACY
+# include "opencv2/cudalegacy.hpp"
+#endif
+
+#ifdef HAVE_OPENCV_XFEATURES2D
+# include "opencv2/xfeatures2d/cuda.hpp"
+#endif
+
+#include "../../imgproc/src/gcgraph.hpp"
+
+#include "opencv2/core/private.hpp"
+
+#ifdef HAVE_TEGRA_OPTIMIZATION
+# include "opencv2/stitching/stitching_tegra.hpp"
+#endif
+
+#endif
diff --git a/modules/superres/opencl_kernels_superres.cpp b/modules/superres/opencl_kernels_superres.cpp
new file mode 100644
index 0000000..bfea4d7
--- /dev/null
+++ b/modules/superres/opencl_kernels_superres.cpp
@@ -0,0 +1,127 @@
+// This file is auto-generated. Do not edit!
+
+#include "precomp.hpp"
+#include "opencl_kernels_superres.hpp"
+
+namespace cv
+{
+namespace ocl
+{
+namespace superres
+{
+
+const struct ProgramEntry superres_btvl1={"superres_btvl1",
+"#ifndef cn\n"
+"#define cn 1\n"
+"#endif\n"
+"#define sz (int)sizeof(float)\n"
+"#define src_elem_at(_src, y, step, x) *(__global const float *)(_src + mad24(y, step, (x) * sz))\n"
+"#define dst_elem_at(_dst, y, step, x) *(__global float *)(_dst + mad24(y, step, (x) * sz))\n"
+"__kernel void buildMotionMaps(__global const uchar * forwardMotionPtr, int forwardMotion_step, int forwardMotion_offset,\n"
+"__global const uchar * backwardMotionPtr, int backwardMotion_step, int backwardMotion_offset,\n"
+"__global const uchar * forwardMapPtr, int forwardMap_step, int forwardMap_offset,\n"
+"__global const uchar * backwardMapPtr, int backwardMap_step, int backwardMap_offset,\n"
+"int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (x < cols && y < rows)\n"
+"{\n"
+"int forwardMotion_index = mad24(forwardMotion_step, y, (int)sizeof(float2) * x + forwardMotion_offset);\n"
+"int backwardMotion_index = mad24(backwardMotion_step, y, (int)sizeof(float2) * x + backwardMotion_offset);\n"
+"int forwardMap_index = mad24(forwardMap_step, y, (int)sizeof(float2) * x + forwardMap_offset);\n"
+"int backwardMap_index = mad24(backwardMap_step, y, (int)sizeof(float2) * x + backwardMap_offset);\n"
+"float2 forwardMotion = *(__global const float2 *)(forwardMotionPtr + forwardMotion_index);\n"
+"float2 backwardMotion = *(__global const float2 *)(backwardMotionPtr + backwardMotion_index);\n"
+"__global float2 * forwardMap = (__global float2 *)(forwardMapPtr + forwardMap_index);\n"
+"__global float2 * backwardMap = (__global float2 *)(backwardMapPtr + backwardMap_index);\n"
+"float2 basePoint = (float2)(x, y);\n"
+"forwardMap[0] = basePoint + backwardMotion;\n"
+"backwardMap[0] = basePoint + forwardMotion;\n"
+"}\n"
+"}\n"
+"__kernel void upscale(__global const uchar * srcptr, int src_step, int src_offset, int src_rows, int src_cols,\n"
+"__global uchar * dstptr, int dst_step, int dst_offset, int scale)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (x < src_cols && y < src_rows)\n"
+"{\n"
+"int src_index = mad24(y, src_step, sz * x * cn + src_offset);\n"
+"int dst_index = mad24(y * scale, dst_step, sz * x * scale * cn + dst_offset);\n"
+"__global const float * src = (__global const float *)(srcptr + src_index);\n"
+"__global float * dst = (__global float *)(dstptr + dst_index);\n"
+"#pragma unroll\n"
+"for (int c = 0; c < cn; ++c)\n"
+"dst[c] = src[c];\n"
+"}\n"
+"}\n"
+"inline float diffSign1(float a, float b)\n"
+"{\n"
+"return a > b ? 1.0f : a < b ? -1.0f : 0.0f;\n"
+"}\n"
+"inline float3 diffSign3(float3 a, float3 b)\n"
+"{\n"
+"float3 pos;\n"
+"pos.x = a.x > b.x ? 1.0f : a.x < b.x ? -1.0f : 0.0f;\n"
+"pos.y = a.y > b.y ? 1.0f : a.y < b.y ? -1.0f : 0.0f;\n"
+"pos.z = a.z > b.z ? 1.0f : a.z < b.z ? -1.0f : 0.0f;\n"
+"return pos;\n"
+"}\n"
+"__kernel void diffSign(__global const uchar * src1, int src1_step, int src1_offset,\n"
+"__global const uchar * src2, int src2_step, int src2_offset,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int rows, int cols)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if (x < cols && y < rows)\n"
+"*(__global float *)(dst + mad24(y, dst_step, sz * x + dst_offset)) =\n"
+"diffSign1(*(__global const float *)(src1 + mad24(y, src1_step, sz * x + src1_offset)),\n"
+"*(__global const float *)(src2 + mad24(y, src2_step, sz * x + src2_offset)));\n"
+"}\n"
+"__kernel void calcBtvRegularization(__global const uchar * src, int src_step, int src_offset,\n"
+"__global uchar * dst, int dst_step, int dst_offset, int dst_rows, int dst_cols,\n"
+"int ksize, __constant float * c_btvRegWeights)\n"
+"{\n"
+"int x = get_global_id(0) + ksize;\n"
+"int y = get_global_id(1) + ksize;\n"
+"if (y < dst_rows - ksize && x < dst_cols - ksize)\n"
+"{\n"
+"src += src_offset;\n"
+"#if cn == 1\n"
+"const float srcVal = src_elem_at(src, y, src_step, x);\n"
+"float dstVal = 0.0f;\n"
+"for (int m = 0, count = 0; m <= ksize; ++m)\n"
+"for (int l = ksize; l + m >= 0; --l, ++count)\n"
+"{\n"
+"dstVal += c_btvRegWeights[count] * (diffSign1(srcVal, src_elem_at(src, y + m, src_step, x + l))\n"
+"- diffSign1(src_elem_at(src, y - m, src_step, x - l), srcVal));\n"
+"}\n"
+"dst_elem_at(dst, y, dst_step, x) = dstVal;\n"
+"#elif cn == 3\n"
+"__global const float * src0ptr = (__global const float *)(src + mad24(y, src_step, 3 * sz * x + src_offset));\n"
+"float3 srcVal = (float3)(src0ptr[0], src0ptr[1], src0ptr[2]), dstVal = 0.f;\n"
+"for (int m = 0, count = 0; m <= ksize; ++m)\n"
+"{\n"
+"for (int l = ksize; l + m >= 0; --l, ++count)\n"
+"{\n"
+"__global const float * src1ptr = (__global const float *)(src + mad24(y + m, src_step, 3 * sz * (x + l) + src_offset));\n"
+"__global const float * src2ptr = (__global const float *)(src + mad24(y - m, src_step, 3 * sz * (x - l) + src_offset));\n"
+"float3 src1 = (float3)(src1ptr[0], src1ptr[1], src1ptr[2]);\n"
+"float3 src2 = (float3)(src2ptr[0], src2ptr[1], src2ptr[2]);\n"
+"dstVal += c_btvRegWeights[count] * (diffSign3(srcVal, src1) - diffSign3(src2, srcVal));\n"
+"}\n"
+"}\n"
+"__global float * dstptr = (__global float *)(dst + mad24(y, dst_step, 3 * sz * x + dst_offset + 0));\n"
+"dstptr[0] = dstVal.x;\n"
+"dstptr[1] = dstVal.y;\n"
+"dstptr[2] = dstVal.z;\n"
+"#else\n"
+"#error \"Number of channels should be either 1 of 3\"\n"
+"#endif\n"
+"}\n"
+"}\n"
+, "747d707919dd581b14986fa59ef19f88"};
+ProgramSource superres_btvl1_oclsrc(superres_btvl1.programStr);
+}
+}}
diff --git a/modules/superres/opencl_kernels_superres.hpp b/modules/superres/opencl_kernels_superres.hpp
new file mode 100644
index 0000000..6d202ce
--- /dev/null
+++ b/modules/superres/opencl_kernels_superres.hpp
@@ -0,0 +1,17 @@
+// This file is auto-generated. Do not edit!
+
+#include "opencv2/core/ocl.hpp"
+#include "opencv2/core/ocl_genbase.hpp"
+#include "opencv2/core/opencl/ocl_defs.hpp"
+
+namespace cv
+{
+namespace ocl
+{
+namespace superres
+{
+
+extern const struct ProgramEntry superres_btvl1;
+extern ProgramSource superres_btvl1_oclsrc;
+}
+}}
diff --git a/modules/superres/precomp.hpp b/modules/superres/precomp.hpp
new file mode 100644
index 0000000..9f12c24
--- /dev/null
+++ b/modules/superres/precomp.hpp
@@ -0,0 +1,97 @@
+/*M///////////////////////////////////////////////////////////////////////////////////////
+//
+// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+//
+// By downloading, copying, installing or using the software you agree to this license.
+// If you do not agree to this license, do not download, install,
+// copy or use the software.
+//
+//
+// License Agreement
+// For Open Source Computer Vision Library
+//
+// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
+// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// * Redistribution's of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// * Redistribution's in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// * The name of the copyright holders may not be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// This software is provided by the copyright holders and contributors "as is" and
+// any express or implied warranties, including, but not limited to, the implied
+// warranties of merchantability and fitness for a particular purpose are disclaimed.
+// In no event shall the Intel Corporation or contributors be liable for any direct,
+// indirect, incidental, special, exemplary, or consequential damages
+// (including, but not limited to, procurement of substitute goods or services;
+// loss of use, data, or profits; or business interruption) however caused
+// and on any theory of liability, whether in contract, strict liability,
+// or tort (including negligence or otherwise) arising in any way out of
+// the use of this software, even if advised of the possibility of such damage.
+//
+//M*/
+
+#ifndef __OPENCV_PRECOMP_H__
+#define __OPENCV_PRECOMP_H__
+
+#include <vector>
+#include <limits>
+
+#include "opencv2/opencv_modules.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/core/cuda.hpp"
+#include "opencv2/core/opengl.hpp"
+#include "opencv2/core/utility.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/video/tracking.hpp"
+#include "opencv2/core/private.hpp"
+
+#include "opencv2/core/private.cuda.hpp"
+#include "opencv2/core/ocl.hpp"
+
+#ifdef HAVE_OPENCV_CUDAARITHM
+# include "opencv2/cudaarithm.hpp"
+#endif
+
+#ifdef HAVE_OPENCV_CUDAWARPING
+# include "opencv2/cudawarping.hpp"
+#endif
+
+#ifdef HAVE_OPENCV_CUDAFILTERS
+# include "opencv2/cudafilters.hpp"
+#endif
+
+#ifdef HAVE_OPENCV_CUDAIMGPROC
+# include "opencv2/cudaimgproc.hpp"
+#endif
+
+#ifdef HAVE_OPENCV_CUDAOPTFLOW
+# include "opencv2/cudaoptflow.hpp"
+#endif
+
+#ifdef HAVE_OPENCV_CUDACODEC
+# include "opencv2/cudacodec.hpp"
+#endif
+
+#ifdef HAVE_OPENCV_VIDEOIO
+ #include "opencv2/videoio.hpp"
+#endif
+
+#include "opencv2/superres.hpp"
+#include "opencv2/superres/optical_flow.hpp"
+#include "input_array_utility.hpp"
+
+#include "ring_buffer.hpp"
+
+#include "opencv2/core/private.hpp"
+
+#endif /* __OPENCV_PRECOMP_H__ */
diff --git a/modules/ts/precomp.hpp b/modules/ts/precomp.hpp
new file mode 100644
index 0000000..fbb13ec
--- /dev/null
+++ b/modules/ts/precomp.hpp
@@ -0,0 +1,8 @@
+#include "opencv2/core/utility.hpp"
+#include "opencv2/core/private.hpp"
+#include "opencv2/ts.hpp"
+#include "cvconfig.h"
+
+#ifdef GTEST_LINKED_AS_SHARED_LIBRARY
+#error ts module should not have GTEST_LINKED_AS_SHARED_LIBRARY defined
+#endif
diff --git a/modules/video/opencl_kernels_video.cpp b/modules/video/opencl_kernels_video.cpp
new file mode 100644
index 0000000..755d8e2
--- /dev/null
+++ b/modules/video/opencl_kernels_video.cpp
@@ -0,0 +1,1239 @@
+// This file is auto-generated. Do not edit!
+
+#include "precomp.hpp"
+#include "opencl_kernels_video.hpp"
+
+namespace cv
+{
+namespace ocl
+{
+namespace video
+{
+
+const struct ProgramEntry bgfg_mog2={"bgfg_mog2",
+"#if CN==1\n"
+"#define T_MEAN float\n"
+"#define F_ZERO (0.0f)\n"
+"#define cnMode 1\n"
+"#define frameToMean(a, b) (b) = *(a);\n"
+"#define meanToFrame(a, b) *b = convert_uchar_sat(a);\n"
+"inline float sum(float val)\n"
+"{\n"
+"return val;\n"
+"}\n"
+"#else\n"
+"#define T_MEAN float4\n"
+"#define F_ZERO (0.0f, 0.0f, 0.0f, 0.0f)\n"
+"#define cnMode 4\n"
+"#define meanToFrame(a, b)\\\n"
+"b[0] = convert_uchar_sat(a.x); \\\n"
+"b[1] = convert_uchar_sat(a.y); \\\n"
+"b[2] = convert_uchar_sat(a.z);\n"
+"#define frameToMean(a, b)\\\n"
+"b.x = a[0]; \\\n"
+"b.y = a[1]; \\\n"
+"b.z = a[2]; \\\n"
+"b.w = 0.0f;\n"
+"inline float sum(const float4 val)\n"
+"{\n"
+"return (val.x + val.y + val.z);\n"
+"}\n"
+"#endif\n"
+"__kernel void mog2_kernel(__global const uchar* frame, int frame_step, int frame_offset, int frame_row, int frame_col,\n"
+"__global uchar* modesUsed,\n"
+"__global uchar* weight,\n"
+"__global uchar* mean,\n"
+"__global uchar* variance,\n"
+"__global uchar* fgmask, int fgmask_step, int fgmask_offset,\n"
+"float alphaT, float alpha1, float prune,\n"
+"float c_Tb, float c_TB, float c_Tg, float c_varMin,\n"
+"float c_varMax, float c_varInit, float c_tau\n"
+"#ifdef SHADOW_DETECT\n"
+", uchar c_shadowVal\n"
+"#endif\n"
+")\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if( x < frame_col && y < frame_row)\n"
+"{\n"
+"__global const uchar* _frame = (frame + mad24(y, frame_step, mad24(x, CN, frame_offset)));\n"
+"T_MEAN pix;\n"
+"frameToMean(_frame, pix);\n"
+"uchar foreground = 255;\n"
+"bool fitsPDF = false;\n"
+"int pt_idx = mad24(y, frame_col, x);\n"
+"int idx_step = frame_row * frame_col;\n"
+"__global uchar* _modesUsed = modesUsed + pt_idx;\n"
+"uchar nmodes = _modesUsed[0];\n"
+"float totalWeight = 0.0f;\n"
+"__global float* _weight = (__global float*)(weight);\n"
+"__global float* _variance = (__global float*)(variance);\n"
+"__global T_MEAN* _mean = (__global T_MEAN*)(mean);\n"
+"uchar mode = 0;\n"
+"for (; mode < nmodes; ++mode)\n"
+"{\n"
+"int mode_idx = mad24(mode, idx_step, pt_idx);\n"
+"float c_weight = mad(alpha1, _weight[mode_idx], prune);\n"
+"float c_var = _variance[mode_idx];\n"
+"T_MEAN c_mean = _mean[mode_idx];\n"
+"T_MEAN diff = c_mean - pix;\n"
+"float dist2 = dot(diff, diff);\n"
+"if (totalWeight < c_TB && dist2 < c_Tb * c_var)\n"
+"foreground = 0;\n"
+"if (dist2 < c_Tg * c_var)\n"
+"{\n"
+"fitsPDF = true;\n"
+"c_weight += alphaT;\n"
+"float k = alphaT / c_weight;\n"
+"T_MEAN mean_new = mad((T_MEAN)-k, diff, c_mean);\n"
+"float variance_new = clamp(mad(k, (dist2 - c_var), c_var), c_varMin, c_varMax);\n"
+"for (int i = mode; i > 0; --i)\n"
+"{\n"
+"int prev_idx = mode_idx - idx_step;\n"
+"if (c_weight < _weight[prev_idx])\n"
+"break;\n"
+"_weight[mode_idx] = _weight[prev_idx];\n"
+"_variance[mode_idx] = _variance[prev_idx];\n"
+"_mean[mode_idx] = _mean[prev_idx];\n"
+"mode_idx = prev_idx;\n"
+"}\n"
+"_mean[mode_idx] = mean_new;\n"
+"_variance[mode_idx] = variance_new;\n"
+"_weight[mode_idx] = c_weight;\n"
+"totalWeight += c_weight;\n"
+"mode ++;\n"
+"break;\n"
+"}\n"
+"if (c_weight < -prune)\n"
+"c_weight = 0.0f;\n"
+"_weight[mode_idx] = c_weight;\n"
+"totalWeight += c_weight;\n"
+"}\n"
+"for (; mode < nmodes; ++mode)\n"
+"{\n"
+"int mode_idx = mad24(mode, idx_step, pt_idx);\n"
+"float c_weight = mad(alpha1, _weight[mode_idx], prune);\n"
+"if (c_weight < -prune)\n"
+"{\n"
+"c_weight = 0.0f;\n"
+"nmodes = mode;\n"
+"break;\n"
+"}\n"
+"_weight[mode_idx] = c_weight;\n"
+"totalWeight += c_weight;\n"
+"}\n"
+"if (0.f < totalWeight)\n"
+"{\n"
+"totalWeight = 1.f / totalWeight;\n"
+"for (int mode = 0; mode < nmodes; ++mode)\n"
+"_weight[mad24(mode, idx_step, pt_idx)] *= totalWeight;\n"
+"}\n"
+"if (!fitsPDF)\n"
+"{\n"
+"uchar mode = nmodes == (NMIXTURES) ? (NMIXTURES) - 1 : nmodes++;\n"
+"int mode_idx = mad24(mode, idx_step, pt_idx);\n"
+"if (nmodes == 1)\n"
+"_weight[mode_idx] = 1.f;\n"
+"else\n"
+"{\n"
+"_weight[mode_idx] = alphaT;\n"
+"for (int i = pt_idx; i < mode_idx; i += idx_step)\n"
+"_weight[i] *= alpha1;\n"
+"}\n"
+"for (int i = nmodes - 1; i > 0; --i)\n"
+"{\n"
+"int prev_idx = mode_idx - idx_step;\n"
+"if (alphaT < _weight[prev_idx])\n"
+"break;\n"
+"_weight[mode_idx] = _weight[prev_idx];\n"
+"_variance[mode_idx] = _variance[prev_idx];\n"
+"_mean[mode_idx] = _mean[prev_idx];\n"
+"mode_idx = prev_idx;\n"
+"}\n"
+"_mean[mode_idx] = pix;\n"
+"_variance[mode_idx] = c_varInit;\n"
+"}\n"
+"_modesUsed[0] = nmodes;\n"
+"#ifdef SHADOW_DETECT\n"
+"if (foreground)\n"
+"{\n"
+"float tWeight = 0.0f;\n"
+"for (uchar mode = 0; mode < nmodes; ++mode)\n"
+"{\n"
+"int mode_idx = mad24(mode, idx_step, pt_idx);\n"
+"T_MEAN c_mean = _mean[mode_idx];\n"
+"T_MEAN pix_mean = pix * c_mean;\n"
+"float numerator = sum(pix_mean);\n"
+"float denominator = dot(c_mean, c_mean);\n"
+"if (denominator == 0)\n"
+"break;\n"
+"if (numerator <= denominator && numerator >= c_tau * denominator)\n"
+"{\n"
+"float a = numerator / denominator;\n"
+"T_MEAN dD = mad(a, c_mean, -pix);\n"
+"if (dot(dD, dD) < c_Tb * _variance[mode_idx] * a * a)\n"
+"{\n"
+"foreground = c_shadowVal;\n"
+"break;\n"
+"}\n"
+"}\n"
+"tWeight += _weight[mode_idx];\n"
+"if (tWeight > c_TB)\n"
+"break;\n"
+"}\n"
+"}\n"
+"#endif\n"
+"__global uchar* _fgmask = fgmask + mad24(y, fgmask_step, x + fgmask_offset);\n"
+"*_fgmask = (uchar)foreground;\n"
+"}\n"
+"}\n"
+"__kernel void getBackgroundImage2_kernel(__global const uchar* modesUsed,\n"
+"__global const uchar* weight,\n"
+"__global const uchar* mean,\n"
+"__global uchar* dst, int dst_step, int dst_offset, int dst_row, int dst_col,\n"
+"float c_TB)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if(x < dst_col && y < dst_row)\n"
+"{\n"
+"int pt_idx = mad24(y, dst_col, x);\n"
+"__global const uchar* _modesUsed = modesUsed + pt_idx;\n"
+"uchar nmodes = _modesUsed[0];\n"
+"T_MEAN meanVal = (T_MEAN)F_ZERO;\n"
+"float totalWeight = 0.0f;\n"
+"__global const float* _weight = (__global const float*)weight;\n"
+"__global const T_MEAN* _mean = (__global const T_MEAN*)(mean);\n"
+"int idx_step = dst_row * dst_col;\n"
+"for (uchar mode = 0; mode < nmodes; ++mode)\n"
+"{\n"
+"int mode_idx = mad24(mode, idx_step, pt_idx);\n"
+"float c_weight = _weight[mode_idx];\n"
+"T_MEAN c_mean = _mean[mode_idx];\n"
+"meanVal = mad(c_weight, c_mean, meanVal);\n"
+"totalWeight += c_weight;\n"
+"if (totalWeight > c_TB)\n"
+"break;\n"
+"}\n"
+"if (0.f < totalWeight)\n"
+"meanVal = meanVal / totalWeight;\n"
+"else\n"
+"meanVal = (T_MEAN)(0.f);\n"
+"__global uchar* _dst = dst + mad24(y, dst_step, mad24(x, CN, dst_offset));\n"
+"meanToFrame(meanVal, _dst);\n"
+"}\n"
+"}\n"
+, "b6e3850899862b7f0ab67cb32f1d52e9"};
+ProgramSource bgfg_mog2_oclsrc(bgfg_mog2.programStr);
+const struct ProgramEntry optical_flow_farneback={"optical_flow_farneback",
+"#define tx (int)get_local_id(0)\n"
+"#define ty get_local_id(1)\n"
+"#define bx get_group_id(0)\n"
+"#define bdx (int)get_local_size(0)\n"
+"#define BORDER_SIZE 5\n"
+"#define MAX_KSIZE_HALF 100\n"
+"#ifndef polyN\n"
+"#define polyN 5\n"
+"#endif\n"
+"#if USE_DOUBLE\n"
+"#ifdef cl_amd_fp64\n"
+"#pragma OPENCL EXTENSION cl_amd_fp64:enable\n"
+"#elif defined (cl_khr_fp64)\n"
+"#pragma OPENCL EXTENSION cl_khr_fp64:enable\n"
+"#endif\n"
+"#define TYPE double\n"
+"#define VECTYPE double4\n"
+"#else\n"
+"#define TYPE float\n"
+"#define VECTYPE float4\n"
+"#endif\n"
+"__kernel void polynomialExpansion(__global __const float * src, int srcStep,\n"
+"__global float * dst, int dstStep,\n"
+"const int rows, const int cols,\n"
+"__global __const float * c_g,\n"
+"__global __const float * c_xg,\n"
+"__global __const float * c_xxg,\n"
+"__local float * smem,\n"
+"const VECTYPE ig)\n"
+"{\n"
+"const int y = get_global_id(1);\n"
+"const int x = bx * (bdx - 2*polyN) + tx - polyN;\n"
+"int xWarped;\n"
+"__local float *row = smem + tx;\n"
+"if (y < rows && y >= 0)\n"
+"{\n"
+"xWarped = min(max(x, 0), cols - 1);\n"
+"row[0] = src[mad24(y, srcStep, xWarped)] * c_g[0];\n"
+"row[bdx] = 0.f;\n"
+"row[2*bdx] = 0.f;\n"
+"#pragma unroll\n"
+"for (int k = 1; k <= polyN; ++k)\n"
+"{\n"
+"float t0 = src[mad24(max(y - k, 0), srcStep, xWarped)];\n"
+"float t1 = src[mad24(min(y + k, rows - 1), srcStep, xWarped)];\n"
+"row[0] += c_g[k] * (t0 + t1);\n"
+"row[bdx] += c_xg[k] * (t1 - t0);\n"
+"row[2*bdx] += c_xxg[k] * (t0 + t1);\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (y < rows && y >= 0 && tx >= polyN && tx + polyN < bdx && x < cols)\n"
+"{\n"
+"TYPE b1 = c_g[0] * row[0];\n"
+"TYPE b3 = c_g[0] * row[bdx];\n"
+"TYPE b5 = c_g[0] * row[2*bdx];\n"
+"TYPE b2 = 0, b4 = 0, b6 = 0;\n"
+"#pragma unroll\n"
+"for (int k = 1; k <= polyN; ++k)\n"
+"{\n"
+"b1 += (row[k] + row[-k]) * c_g[k];\n"
+"b4 += (row[k] + row[-k]) * c_xxg[k];\n"
+"b2 += (row[k] - row[-k]) * c_xg[k];\n"
+"b3 += (row[k + bdx] + row[-k + bdx]) * c_g[k];\n"
+"b6 += (row[k + bdx] - row[-k + bdx]) * c_xg[k];\n"
+"b5 += (row[k + 2*bdx] + row[-k + 2*bdx]) * c_g[k];\n"
+"}\n"
+"dst[mad24(y, dstStep, xWarped)] = (float)(b3*ig.s0);\n"
+"dst[mad24(rows + y, dstStep, xWarped)] = (float)(b2*ig.s0);\n"
+"dst[mad24(2*rows + y, dstStep, xWarped)] = (float)(b1*ig.s1 + b5*ig.s2);\n"
+"dst[mad24(3*rows + y, dstStep, xWarped)] = (float)(b1*ig.s1 + b4*ig.s2);\n"
+"dst[mad24(4*rows + y, dstStep, xWarped)] = (float)(b6*ig.s3);\n"
+"}\n"
+"}\n"
+"inline int idx_row_low(const int y, const int last_row)\n"
+"{\n"
+"return abs(y) % (last_row + 1);\n"
+"}\n"
+"inline int idx_row_high(const int y, const int last_row)\n"
+"{\n"
+"return abs(last_row - abs(last_row - y)) % (last_row + 1);\n"
+"}\n"
+"inline int idx_col_low(const int x, const int last_col)\n"
+"{\n"
+"return abs(x) % (last_col + 1);\n"
+"}\n"
+"inline int idx_col_high(const int x, const int last_col)\n"
+"{\n"
+"return abs(last_col - abs(last_col - x)) % (last_col + 1);\n"
+"}\n"
+"inline int idx_col(const int x, const int last_col)\n"
+"{\n"
+"return idx_col_low(idx_col_high(x, last_col), last_col);\n"
+"}\n"
+"__kernel void gaussianBlur(__global const float * src, int srcStep,\n"
+"__global float * dst, int dstStep, const int rows, const int cols,\n"
+"__global const float * c_gKer, const int ksizeHalf,\n"
+"__local float * smem)\n"
+"{\n"
+"const int y = get_global_id(1);\n"
+"const int x = get_global_id(0);\n"
+"__local float *row = smem + ty * (bdx + 2*ksizeHalf);\n"
+"if (y < rows)\n"
+"{\n"
+"for (int i = tx; i < bdx + 2*ksizeHalf; i += bdx)\n"
+"{\n"
+"int xExt = (int)(bx * bdx) + i - ksizeHalf;\n"
+"xExt = idx_col(xExt, cols - 1);\n"
+"row[i] = src[mad24(y, srcStep, xExt)] * c_gKer[0];\n"
+"for (int j = 1; j <= ksizeHalf; ++j)\n"
+"row[i] += (src[mad24(idx_row_low(y - j, rows - 1), srcStep, xExt)]\n"
+"+ src[mad24(idx_row_high(y + j, rows - 1), srcStep, xExt)]) * c_gKer[j];\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (y < rows && y >= 0 && x < cols && x >= 0)\n"
+"{\n"
+"row += tx + ksizeHalf;\n"
+"float res = row[0] * c_gKer[0];\n"
+"for (int i = 1; i <= ksizeHalf; ++i)\n"
+"res += (row[-i] + row[i]) * c_gKer[i];\n"
+"dst[mad24(y, dstStep, x)] = res;\n"
+"}\n"
+"}\n"
+"__kernel void gaussianBlur5(__global const float * src, int srcStep,\n"
+"__global float * dst, int dstStep,\n"
+"const int rows, const int cols,\n"
+"__global const float * c_gKer, const int ksizeHalf,\n"
+"__local float * smem)\n"
+"{\n"
+"const int y = get_global_id(1);\n"
+"const int x = get_global_id(0);\n"
+"const int smw = bdx + 2*ksizeHalf;\n"
+"__local volatile float *row = smem + 5 * ty * smw;\n"
+"if (y < rows)\n"
+"{\n"
+"for (int i = tx; i < bdx + 2*ksizeHalf; i += bdx)\n"
+"{\n"
+"int xExt = (int)(bx * bdx) + i - ksizeHalf;\n"
+"xExt = idx_col(xExt, cols - 1);\n"
+"#pragma unroll\n"
+"for (int k = 0; k < 5; ++k)\n"
+"row[k*smw + i] = src[mad24(k*rows + y, srcStep, xExt)] * c_gKer[0];\n"
+"for (int j = 1; j <= ksizeHalf; ++j)\n"
+"#pragma unroll\n"
+"for (int k = 0; k < 5; ++k)\n"
+"row[k*smw + i] +=\n"
+"(src[mad24(k*rows + idx_row_low(y - j, rows - 1), srcStep, xExt)] +\n"
+"src[mad24(k*rows + idx_row_high(y + j, rows - 1), srcStep, xExt)]) * c_gKer[j];\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (y < rows && y >= 0 && x < cols && x >= 0)\n"
+"{\n"
+"row += tx + ksizeHalf;\n"
+"float res[5];\n"
+"#pragma unroll\n"
+"for (int k = 0; k < 5; ++k)\n"
+"res[k] = row[k*smw] * c_gKer[0];\n"
+"for (int i = 1; i <= ksizeHalf; ++i)\n"
+"#pragma unroll\n"
+"for (int k = 0; k < 5; ++k)\n"
+"res[k] += (row[k*smw - i] + row[k*smw + i]) * c_gKer[i];\n"
+"#pragma unroll\n"
+"for (int k = 0; k < 5; ++k)\n"
+"dst[mad24(k*rows + y, dstStep, x)] = res[k];\n"
+"}\n"
+"}\n"
+"__constant float c_border[BORDER_SIZE + 1] = { 0.14f, 0.14f, 0.4472f, 0.4472f, 0.4472f, 1.f };\n"
+"__kernel void updateMatrices(__global const float * flowx, int xStep,\n"
+"__global const float * flowy, int yStep,\n"
+"const int rows, const int cols,\n"
+"__global const float * R0, int R0Step,\n"
+"__global const float * R1, int R1Step,\n"
+"__global float * M, int mStep)\n"
+"{\n"
+"const int y = get_global_id(1);\n"
+"const int x = get_global_id(0);\n"
+"if (y < rows && y >= 0 && x < cols && x >= 0)\n"
+"{\n"
+"float dx = flowx[mad24(y, xStep, x)];\n"
+"float dy = flowy[mad24(y, yStep, x)];\n"
+"float fx = x + dx;\n"
+"float fy = y + dy;\n"
+"int x1 = convert_int(floor(fx));\n"
+"int y1 = convert_int(floor(fy));\n"
+"fx -= x1;\n"
+"fy -= y1;\n"
+"float r2, r3, r4, r5, r6;\n"
+"if (x1 >= 0 && y1 >= 0 && x1 < cols - 1 && y1 < rows - 1)\n"
+"{\n"
+"float a00 = (1.f - fx) * (1.f - fy);\n"
+"float a01 = fx * (1.f - fy);\n"
+"float a10 = (1.f - fx) * fy;\n"
+"float a11 = fx * fy;\n"
+"r2 = a00 * R1[mad24(y1, R1Step, x1)] +\n"
+"a01 * R1[mad24(y1, R1Step, x1 + 1)] +\n"
+"a10 * R1[mad24(y1 + 1, R1Step, x1)] +\n"
+"a11 * R1[mad24(y1 + 1, R1Step, x1 + 1)];\n"
+"r3 = a00 * R1[mad24(rows + y1, R1Step, x1)] +\n"
+"a01 * R1[mad24(rows + y1, R1Step, x1 + 1)] +\n"
+"a10 * R1[mad24(rows + y1 + 1, R1Step, x1)] +\n"
+"a11 * R1[mad24(rows + y1 + 1, R1Step, x1 + 1)];\n"
+"r4 = a00 * R1[mad24(2*rows + y1, R1Step, x1)] +\n"
+"a01 * R1[mad24(2*rows + y1, R1Step, x1 + 1)] +\n"
+"a10 * R1[mad24(2*rows + y1 + 1, R1Step, x1)] +\n"
+"a11 * R1[mad24(2*rows + y1 + 1, R1Step, x1 + 1)];\n"
+"r5 = a00 * R1[mad24(3*rows + y1, R1Step, x1)] +\n"
+"a01 * R1[mad24(3*rows + y1, R1Step, x1 + 1)] +\n"
+"a10 * R1[mad24(3*rows + y1 + 1, R1Step, x1)] +\n"
+"a11 * R1[mad24(3*rows + y1 + 1, R1Step, x1 + 1)];\n"
+"r6 = a00 * R1[mad24(4*rows + y1, R1Step, x1)] +\n"
+"a01 * R1[mad24(4*rows + y1, R1Step, x1 + 1)] +\n"
+"a10 * R1[mad24(4*rows + y1 + 1, R1Step, x1)] +\n"
+"a11 * R1[mad24(4*rows + y1 + 1, R1Step, x1 + 1)];\n"
+"r4 = (R0[mad24(2*rows + y, R0Step, x)] + r4) * 0.5f;\n"
+"r5 = (R0[mad24(3*rows + y, R0Step, x)] + r5) * 0.5f;\n"
+"r6 = (R0[mad24(4*rows + y, R0Step, x)] + r6) * 0.25f;\n"
+"}\n"
+"else\n"
+"{\n"
+"r2 = r3 = 0.f;\n"
+"r4 = R0[mad24(2*rows + y, R0Step, x)];\n"
+"r5 = R0[mad24(3*rows + y, R0Step, x)];\n"
+"r6 = R0[mad24(4*rows + y, R0Step, x)] * 0.5f;\n"
+"}\n"
+"r2 = (R0[mad24(y, R0Step, x)] - r2) * 0.5f;\n"
+"r3 = (R0[mad24(rows + y, R0Step, x)] - r3) * 0.5f;\n"
+"r2 += r4*dy + r6*dx;\n"
+"r3 += r6*dy + r5*dx;\n"
+"float scale =\n"
+"c_border[min(x, BORDER_SIZE)] *\n"
+"c_border[min(y, BORDER_SIZE)] *\n"
+"c_border[min(cols - x - 1, BORDER_SIZE)] *\n"
+"c_border[min(rows - y - 1, BORDER_SIZE)];\n"
+"r2 *= scale;\n"
+"r3 *= scale;\n"
+"r4 *= scale;\n"
+"r5 *= scale;\n"
+"r6 *= scale;\n"
+"M[mad24(y, mStep, x)] = r4*r4 + r6*r6;\n"
+"M[mad24(rows + y, mStep, x)] = (r4 + r5)*r6;\n"
+"M[mad24(2*rows + y, mStep, x)] = r5*r5 + r6*r6;\n"
+"M[mad24(3*rows + y, mStep, x)] = r4*r2 + r6*r3;\n"
+"M[mad24(4*rows + y, mStep, x)] = r6*r2 + r5*r3;\n"
+"}\n"
+"}\n"
+"__kernel void boxFilter5(__global const float * src, int srcStep,\n"
+"__global float * dst, int dstStep,\n"
+"const int rows, const int cols,\n"
+"const int ksizeHalf,\n"
+"__local float * smem)\n"
+"{\n"
+"const int y = get_global_id(1);\n"
+"const int x = get_global_id(0);\n"
+"const float boxAreaInv = 1.f / ((1 + 2*ksizeHalf) * (1 + 2*ksizeHalf));\n"
+"const int smw = bdx + 2*ksizeHalf;\n"
+"__local float *row = smem + 5 * ty * smw;\n"
+"if (y < rows)\n"
+"{\n"
+"for (int i = tx; i < bdx + 2*ksizeHalf; i += bdx)\n"
+"{\n"
+"int xExt = (int)(bx * bdx) + i - ksizeHalf;\n"
+"xExt = min(max(xExt, 0), cols - 1);\n"
+"#pragma unroll\n"
+"for (int k = 0; k < 5; ++k)\n"
+"row[k*smw + i] = src[mad24(k*rows + y, srcStep, xExt)];\n"
+"for (int j = 1; j <= ksizeHalf; ++j)\n"
+"#pragma unroll\n"
+"for (int k = 0; k < 5; ++k)\n"
+"row[k*smw + i] +=\n"
+"src[mad24(k*rows + max(y - j, 0), srcStep, xExt)] +\n"
+"src[mad24(k*rows + min(y + j, rows - 1), srcStep, xExt)];\n"
+"}\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (y < rows && y >= 0 && x < cols && x >= 0)\n"
+"{\n"
+"row += tx + ksizeHalf;\n"
+"float res[5];\n"
+"#pragma unroll\n"
+"for (int k = 0; k < 5; ++k)\n"
+"res[k] = row[k*smw];\n"
+"for (int i = 1; i <= ksizeHalf; ++i)\n"
+"#pragma unroll\n"
+"for (int k = 0; k < 5; ++k)\n"
+"res[k] += row[k*smw - i] + row[k*smw + i];\n"
+"#pragma unroll\n"
+"for (int k = 0; k < 5; ++k)\n"
+"dst[mad24(k*rows + y, dstStep, x)] = res[k] * boxAreaInv;\n"
+"}\n"
+"}\n"
+"__kernel void updateFlow(__global const float * M, int mStep,\n"
+"__global float * flowx, int xStep,\n"
+"__global float * flowy, int yStep,\n"
+"const int rows, const int cols)\n"
+"{\n"
+"const int y = get_global_id(1);\n"
+"const int x = get_global_id(0);\n"
+"if (y < rows && y >= 0 && x < cols && x >= 0)\n"
+"{\n"
+"float g11 = M[mad24(y, mStep, x)];\n"
+"float g12 = M[mad24(rows + y, mStep, x)];\n"
+"float g22 = M[mad24(2*rows + y, mStep, x)];\n"
+"float h1 = M[mad24(3*rows + y, mStep, x)];\n"
+"float h2 = M[mad24(4*rows + y, mStep, x)];\n"
+"float detInv = 1.f / (g11*g22 - g12*g12 + 1e-3f);\n"
+"flowx[mad24(y, xStep, x)] = (g11*h2 - g12*h1) * detInv;\n"
+"flowy[mad24(y, yStep, x)] = (g22*h1 - g12*h2) * detInv;\n"
+"}\n"
+"}\n"
+, "529300e6242f574f83d11a089cc120c0"};
+ProgramSource optical_flow_farneback_oclsrc(optical_flow_farneback.programStr);
+const struct ProgramEntry optical_flow_tvl1={"optical_flow_tvl1",
+"__kernel void centeredGradientKernel(__global const float* src_ptr, int src_col, int src_row, int src_step,\n"
+"__global float* dx, __global float* dy, int d_step)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if((x < src_col)&&(y < src_row))\n"
+"{\n"
+"int src_x1 = (x + 1) < (src_col -1)? (x + 1) : (src_col - 1);\n"
+"int src_x2 = (x - 1) > 0 ? (x -1) : 0;\n"
+"dx[y * d_step+ x] = 0.5f * (src_ptr[y * src_step + src_x1] - src_ptr[y * src_step+ src_x2]);\n"
+"int src_y1 = (y+1) < (src_row - 1) ? (y + 1) : (src_row - 1);\n"
+"int src_y2 = (y - 1) > 0 ? (y - 1) : 0;\n"
+"dy[y * d_step+ x] = 0.5f * (src_ptr[src_y1 * src_step + x] - src_ptr[src_y2 * src_step+ x]);\n"
+"}\n"
+"}\n"
+"inline float bicubicCoeff(float x_)\n"
+"{\n"
+"float x = fabs(x_);\n"
+"if (x <= 1.0f)\n"
+"return x * x * (1.5f * x - 2.5f) + 1.0f;\n"
+"else if (x < 2.0f)\n"
+"return x * (x * (-0.5f * x + 2.5f) - 4.0f) + 2.0f;\n"
+"else\n"
+"return 0.0f;\n"
+"}\n"
+"__kernel void warpBackwardKernel(__global const float* I0, int I0_step, int I0_col, int I0_row,\n"
+"image2d_t tex_I1, image2d_t tex_I1x, image2d_t tex_I1y,\n"
+"__global const float* u1, int u1_step,\n"
+"__global const float* u2,\n"
+"__global float* I1w,\n"
+"__global float* I1wx, \n"
+"__global float* I1wy, \n"
+"__global float* grad, \n"
+"__global float* rho,\n"
+"int I1w_step,\n"
+"int u2_step,\n"
+"int u1_offset_x,\n"
+"int u1_offset_y,\n"
+"int u2_offset_x,\n"
+"int u2_offset_y)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if(x < I0_col&&y < I0_row)\n"
+"{\n"
+"float u1Val = u1[(y + u1_offset_y) * u1_step + x + u1_offset_x];\n"
+"float u2Val = u2[(y + u2_offset_y) * u2_step + x + u2_offset_x];\n"
+"float wx = x + u1Val;\n"
+"float wy = y + u2Val;\n"
+"int xmin = ceil(wx - 2.0f);\n"
+"int xmax = floor(wx + 2.0f);\n"
+"int ymin = ceil(wy - 2.0f);\n"
+"int ymax = floor(wy + 2.0f);\n"
+"float sum = 0.0f;\n"
+"float sumx = 0.0f;\n"
+"float sumy = 0.0f;\n"
+"float wsum = 0.0f;\n"
+"sampler_t sampleri = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP_TO_EDGE | CLK_FILTER_NEAREST;\n"
+"for (int cy = ymin; cy <= ymax; ++cy)\n"
+"{\n"
+"for (int cx = xmin; cx <= xmax; ++cx)\n"
+"{\n"
+"float w = bicubicCoeff(wx - cx) * bicubicCoeff(wy - cy);\n"
+"int2 cood = (int2)(cx, cy);\n"
+"sum += w * read_imagef(tex_I1, sampleri, cood).x;\n"
+"sumx += w * read_imagef(tex_I1x, sampleri, cood).x;\n"
+"sumy += w * read_imagef(tex_I1y, sampleri, cood).x;\n"
+"wsum += w;\n"
+"}\n"
+"}\n"
+"float coeff = 1.0f / wsum;\n"
+"float I1wVal = sum * coeff;\n"
+"float I1wxVal = sumx * coeff;\n"
+"float I1wyVal = sumy * coeff;\n"
+"I1w[y * I1w_step + x] = I1wVal;\n"
+"I1wx[y * I1w_step + x] = I1wxVal;\n"
+"I1wy[y * I1w_step + x] = I1wyVal;\n"
+"float Ix2 = I1wxVal * I1wxVal;\n"
+"float Iy2 = I1wyVal * I1wyVal;\n"
+"grad[y * I1w_step + x] = Ix2 + Iy2;\n"
+"float I0Val = I0[y * I0_step + x];\n"
+"rho[y * I1w_step + x] = I1wVal - I1wxVal * u1Val - I1wyVal * u2Val - I0Val;\n"
+"}\n"
+"}\n"
+"inline float readImage(__global float *image, int x, int y, int rows, int cols, int elemCntPerRow)\n"
+"{\n"
+"int i0 = clamp(x, 0, cols - 1);\n"
+"int j0 = clamp(y, 0, rows - 1);\n"
+"return image[j0 * elemCntPerRow + i0];\n"
+"}\n"
+"__kernel void warpBackwardKernelNoImage2d(__global const float* I0, int I0_step, int I0_col, int I0_row,\n"
+"__global const float* tex_I1, __global const float* tex_I1x, __global const float* tex_I1y,\n"
+"__global const float* u1, int u1_step,\n"
+"__global const float* u2,\n"
+"__global float* I1w,\n"
+"__global float* I1wx, \n"
+"__global float* I1wy, \n"
+"__global float* grad, \n"
+"__global float* rho,\n"
+"int I1w_step,\n"
+"int u2_step,\n"
+"int I1_step,\n"
+"int I1x_step)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if(x < I0_col&&y < I0_row)\n"
+"{\n"
+"float u1Val = u1[y * u1_step + x];\n"
+"float u2Val = u2[y * u2_step + x];\n"
+"float wx = x + u1Val;\n"
+"float wy = y + u2Val;\n"
+"int xmin = ceil(wx - 2.0f);\n"
+"int xmax = floor(wx + 2.0f);\n"
+"int ymin = ceil(wy - 2.0f);\n"
+"int ymax = floor(wy + 2.0f);\n"
+"float sum = 0.0f;\n"
+"float sumx = 0.0f;\n"
+"float sumy = 0.0f;\n"
+"float wsum = 0.0f;\n"
+"for (int cy = ymin; cy <= ymax; ++cy)\n"
+"{\n"
+"for (int cx = xmin; cx <= xmax; ++cx)\n"
+"{\n"
+"float w = bicubicCoeff(wx - cx) * bicubicCoeff(wy - cy);\n"
+"int2 cood = (int2)(cx, cy);\n"
+"sum += w * readImage(tex_I1, cood.x, cood.y, I0_col, I0_row, I1_step);\n"
+"sumx += w * readImage(tex_I1x, cood.x, cood.y, I0_col, I0_row, I1x_step);\n"
+"sumy += w * readImage(tex_I1y, cood.x, cood.y, I0_col, I0_row, I1x_step);\n"
+"wsum += w;\n"
+"}\n"
+"}\n"
+"float coeff = 1.0f / wsum;\n"
+"float I1wVal = sum * coeff;\n"
+"float I1wxVal = sumx * coeff;\n"
+"float I1wyVal = sumy * coeff;\n"
+"I1w[y * I1w_step + x] = I1wVal;\n"
+"I1wx[y * I1w_step + x] = I1wxVal;\n"
+"I1wy[y * I1w_step + x] = I1wyVal;\n"
+"float Ix2 = I1wxVal * I1wxVal;\n"
+"float Iy2 = I1wyVal * I1wyVal;\n"
+"grad[y * I1w_step + x] = Ix2 + Iy2;\n"
+"float I0Val = I0[y * I0_step + x];\n"
+"rho[y * I1w_step + x] = I1wVal - I1wxVal * u1Val - I1wyVal * u2Val - I0Val;\n"
+"}\n"
+"}\n"
+"__kernel void estimateDualVariablesKernel(__global const float* u1, int u1_col, int u1_row, int u1_step,\n"
+"__global const float* u2,\n"
+"__global float* p11, int p11_step,\n"
+"__global float* p12,\n"
+"__global float* p21,\n"
+"__global float* p22,\n"
+"float taut,\n"
+"int u2_step,\n"
+"int u1_offset_x,\n"
+"int u1_offset_y,\n"
+"int u2_offset_x,\n"
+"int u2_offset_y)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if(x < u1_col && y < u1_row)\n"
+"{\n"
+"int src_x1 = (x + 1) < (u1_col - 1) ? (x + 1) : (u1_col - 1);\n"
+"float u1x = u1[(y + u1_offset_y) * u1_step + src_x1 + u1_offset_x] - u1[(y + u1_offset_y) * u1_step + x + u1_offset_x];\n"
+"int src_y1 = (y + 1) < (u1_row - 1) ? (y + 1) : (u1_row - 1);\n"
+"float u1y = u1[(src_y1 + u1_offset_y) * u1_step + x + u1_offset_x] - u1[(y + u1_offset_y) * u1_step + x + u1_offset_x];\n"
+"int src_x2 = (x + 1) < (u1_col - 1) ? (x + 1) : (u1_col - 1);\n"
+"float u2x = u2[(y + u2_offset_y) * u2_step + src_x2 + u2_offset_x] - u2[(y + u2_offset_y) * u2_step + x + u2_offset_x];\n"
+"int src_y2 = (y + 1) < (u1_row - 1) ? (y + 1) : (u1_row - 1);\n"
+"float u2y = u2[(src_y2 + u2_offset_y) * u2_step + x + u2_offset_x] - u2[(y + u2_offset_y) * u2_step + x + u2_offset_x];\n"
+"float g1 = hypot(u1x, u1y);\n"
+"float g2 = hypot(u2x, u2y);\n"
+"float ng1 = 1.0f + taut * g1;\n"
+"float ng2 = 1.0f + taut * g2;\n"
+"p11[y * p11_step + x] = (p11[y * p11_step + x] + taut * u1x) / ng1;\n"
+"p12[y * p11_step + x] = (p12[y * p11_step + x] + taut * u1y) / ng1;\n"
+"p21[y * p11_step + x] = (p21[y * p11_step + x] + taut * u2x) / ng2;\n"
+"p22[y * p11_step + x] = (p22[y * p11_step + x] + taut * u2y) / ng2;\n"
+"}\n"
+"}\n"
+"inline float divergence(__global const float* v1, __global const float* v2, int y, int x, int v1_step, int v2_step)\n"
+"{\n"
+"if (x > 0 && y > 0)\n"
+"{\n"
+"float v1x = v1[y * v1_step + x] - v1[y * v1_step + x - 1];\n"
+"float v2y = v2[y * v2_step + x] - v2[(y - 1) * v2_step + x];\n"
+"return v1x + v2y;\n"
+"}\n"
+"else\n"
+"{\n"
+"if (y > 0)\n"
+"return v1[y * v1_step + 0] + v2[y * v2_step + 0] - v2[(y - 1) * v2_step + 0];\n"
+"else\n"
+"{\n"
+"if (x > 0)\n"
+"return v1[0 * v1_step + x] - v1[0 * v1_step + x - 1] + v2[0 * v2_step + x];\n"
+"else\n"
+"return v1[0 * v1_step + 0] + v2[0 * v2_step + 0];\n"
+"}\n"
+"}\n"
+"}\n"
+"__kernel void estimateUKernel(__global const float* I1wx, int I1wx_col, int I1wx_row, int I1wx_step,\n"
+"__global const float* I1wy, \n"
+"__global const float* grad, \n"
+"__global const float* rho_c, \n"
+"__global const float* p11, \n"
+"__global const float* p12, \n"
+"__global const float* p21, \n"
+"__global const float* p22, \n"
+"__global float* u1, int u1_step,\n"
+"__global float* u2,\n"
+"__global float* error, float l_t, float theta, int u2_step,\n"
+"int u1_offset_x,\n"
+"int u1_offset_y,\n"
+"int u2_offset_x,\n"
+"int u2_offset_y,\n"
+"char calc_error)\n"
+"{\n"
+"int x = get_global_id(0);\n"
+"int y = get_global_id(1);\n"
+"if(x < I1wx_col && y < I1wx_row)\n"
+"{\n"
+"float I1wxVal = I1wx[y * I1wx_step + x];\n"
+"float I1wyVal = I1wy[y * I1wx_step + x];\n"
+"float gradVal = grad[y * I1wx_step + x];\n"
+"float u1OldVal = u1[(y + u1_offset_y) * u1_step + x + u1_offset_x];\n"
+"float u2OldVal = u2[(y + u2_offset_y) * u2_step + x + u2_offset_x];\n"
+"float rho = rho_c[y * I1wx_step + x] + (I1wxVal * u1OldVal + I1wyVal * u2OldVal);\n"
+"float d1 = 0.0f;\n"
+"float d2 = 0.0f;\n"
+"if (rho < -l_t * gradVal)\n"
+"{\n"
+"d1 = l_t * I1wxVal;\n"
+"d2 = l_t * I1wyVal;\n"
+"}\n"
+"else if (rho > l_t * gradVal)\n"
+"{\n"
+"d1 = -l_t * I1wxVal;\n"
+"d2 = -l_t * I1wyVal;\n"
+"}\n"
+"else if (gradVal > 1.192092896e-07f)\n"
+"{\n"
+"float fi = -rho / gradVal;\n"
+"d1 = fi * I1wxVal;\n"
+"d2 = fi * I1wyVal;\n"
+"}\n"
+"float v1 = u1OldVal + d1;\n"
+"float v2 = u2OldVal + d2;\n"
+"float div_p1 = divergence(p11, p12, y, x, I1wx_step, I1wx_step);\n"
+"float div_p2 = divergence(p21, p22, y, x, I1wx_step, I1wx_step);\n"
+"float u1NewVal = v1 + theta * div_p1;\n"
+"float u2NewVal = v2 + theta * div_p2;\n"
+"u1[(y + u1_offset_y) * u1_step + x + u1_offset_x] = u1NewVal;\n"
+"u2[(y + u2_offset_y) * u2_step + x + u2_offset_x] = u2NewVal;\n"
+"if(calc_error)\n"
+"{\n"
+"float n1 = (u1OldVal - u1NewVal) * (u1OldVal - u1NewVal);\n"
+"float n2 = (u2OldVal - u2NewVal) * (u2OldVal - u2NewVal);\n"
+"error[y * I1wx_step + x] = n1 + n2;\n"
+"}\n"
+"}\n"
+"}\n"
+, "a9d306a49b405703820fae23312ebd28"};
+ProgramSource optical_flow_tvl1_oclsrc(optical_flow_tvl1.programStr);
+const struct ProgramEntry pyrlk={"pyrlk",
+"#define GRIDSIZE 3\n"
+"#define LSx 8\n"
+"#define LSy 8\n"
+"#define LM_W (LSx*GRIDSIZE+2)\n"
+"#define LM_H (LSy*GRIDSIZE+2)\n"
+"#define BUFFER (LSx*LSy)\n"
+"#define BUFFER2 BUFFER>>1\n"
+"#ifndef WAVE_SIZE\n"
+"#define WAVE_SIZE 1\n"
+"#endif\n"
+"#ifdef CPU\n"
+"inline void reduce3(float val1, float val2, float val3, __local float* smem1, __local float* smem2, __local float* smem3, int tid)\n"
+"{\n"
+"smem1[tid] = val1;\n"
+"smem2[tid] = val2;\n"
+"smem3[tid] = val3;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"for(int i = BUFFER2; i > 0; i >>= 1)\n"
+"{\n"
+"if(tid < i)\n"
+"{\n"
+"smem1[tid] += smem1[tid + i];\n"
+"smem2[tid] += smem2[tid + i];\n"
+"smem3[tid] += smem3[tid + i];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"}\n"
+"inline void reduce2(float val1, float val2, volatile __local float* smem1, volatile __local float* smem2, int tid)\n"
+"{\n"
+"smem1[tid] = val1;\n"
+"smem2[tid] = val2;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"for(int i = BUFFER2; i > 0; i >>= 1)\n"
+"{\n"
+"if(tid < i)\n"
+"{\n"
+"smem1[tid] += smem1[tid + i];\n"
+"smem2[tid] += smem2[tid + i];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"}\n"
+"inline void reduce1(float val1, volatile __local float* smem1, int tid)\n"
+"{\n"
+"smem1[tid] = val1;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"for(int i = BUFFER2; i > 0; i >>= 1)\n"
+"{\n"
+"if(tid < i)\n"
+"{\n"
+"smem1[tid] += smem1[tid + i];\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"}\n"
+"#else\n"
+"inline void reduce3(float val1, float val2, float val3,\n"
+"__local volatile float* smem1, __local volatile float* smem2, __local volatile float* smem3, int tid)\n"
+"{\n"
+"smem1[tid] = val1;\n"
+"smem2[tid] = val2;\n"
+"smem3[tid] = val3;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 32)\n"
+"{\n"
+"smem1[tid] += smem1[tid + 32];\n"
+"smem2[tid] += smem2[tid + 32];\n"
+"smem3[tid] += smem3[tid + 32];\n"
+"#if WAVE_SIZE < 32\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 16)\n"
+"{\n"
+"#endif\n"
+"smem1[tid] += smem1[tid + 16];\n"
+"smem2[tid] += smem2[tid + 16];\n"
+"smem3[tid] += smem3[tid + 16];\n"
+"#if WAVE_SIZE <16\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid<1)\n"
+"{\n"
+"#endif\n"
+"local float8* m1 = (local float8*)smem1;\n"
+"local float8* m2 = (local float8*)smem2;\n"
+"local float8* m3 = (local float8*)smem3;\n"
+"float8 t1 = m1[0]+m1[1];\n"
+"float8 t2 = m2[0]+m2[1];\n"
+"float8 t3 = m3[0]+m3[1];\n"
+"float4 t14 = t1.lo + t1.hi;\n"
+"float4 t24 = t2.lo + t2.hi;\n"
+"float4 t34 = t3.lo + t3.hi;\n"
+"smem1[0] = t14.x+t14.y+t14.z+t14.w;\n"
+"smem2[0] = t24.x+t24.y+t24.z+t24.w;\n"
+"smem3[0] = t34.x+t34.y+t34.z+t34.w;\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"inline void reduce2(float val1, float val2, __local volatile float* smem1, __local volatile float* smem2, int tid)\n"
+"{\n"
+"smem1[tid] = val1;\n"
+"smem2[tid] = val2;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 32)\n"
+"{\n"
+"smem1[tid] += smem1[tid + 32];\n"
+"smem2[tid] += smem2[tid + 32];\n"
+"#if WAVE_SIZE < 32\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 16)\n"
+"{\n"
+"#endif\n"
+"smem1[tid] += smem1[tid + 16];\n"
+"smem2[tid] += smem2[tid + 16];\n"
+"#if WAVE_SIZE <16\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid<1)\n"
+"{\n"
+"#endif\n"
+"local float8* m1 = (local float8*)smem1;\n"
+"local float8* m2 = (local float8*)smem2;\n"
+"float8 t1 = m1[0]+m1[1];\n"
+"float8 t2 = m2[0]+m2[1];\n"
+"float4 t14 = t1.lo + t1.hi;\n"
+"float4 t24 = t2.lo + t2.hi;\n"
+"smem1[0] = t14.x+t14.y+t14.z+t14.w;\n"
+"smem2[0] = t24.x+t24.y+t24.z+t24.w;\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"inline void reduce1(float val1, __local volatile float* smem1, int tid)\n"
+"{\n"
+"smem1[tid] = val1;\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 32)\n"
+"{\n"
+"smem1[tid] += smem1[tid + 32];\n"
+"#if WAVE_SIZE < 32\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid < 16)\n"
+"{\n"
+"#endif\n"
+"smem1[tid] += smem1[tid + 16];\n"
+"#if WAVE_SIZE <16\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"if (tid<1)\n"
+"{\n"
+"#endif\n"
+"local float8* m1 = (local float8*)smem1;\n"
+"float8 t1 = m1[0]+m1[1];\n"
+"float4 t14 = t1.lo + t1.hi;\n"
+"smem1[0] = t14.x+t14.y+t14.z+t14.w;\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"#endif\n"
+"#define SCALE (1.0f / (1 << 20))\n"
+"#define THRESHOLD 0.01f\n"
+"__constant sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP_TO_EDGE | CLK_FILTER_LINEAR;\n"
+"#define VAL(_y,_x,_yy,_xx) (IPatchLocal[(yid+((_y)*LSy)+1+(_yy))*LM_W+(xid+((_x)*LSx)+1+(_xx))])\n"
+"inline void SetPatch(local float* IPatchLocal, int TileY, int TileX,\n"
+"float* Pch, float* Dx, float* Dy,\n"
+"float* A11, float* A12, float* A22, float w)\n"
+"{\n"
+"unsigned int xid=get_local_id(0);\n"
+"unsigned int yid=get_local_id(1);\n"
+"*Pch = VAL(TileY,TileX,0,0);\n"
+"float dIdx = (3.0f*VAL(TileY,TileX,-1,1)+10.0f*VAL(TileY,TileX,0,1)+3.0f*VAL(TileY,TileX,+1,1))-(3.0f*VAL(TileY,TileX,-1,-1)+10.0f*VAL(TileY,TileX,0,-1)+3.0f*VAL(TileY,TileX,+1,-1));\n"
+"float dIdy = (3.0f*VAL(TileY,TileX,1,-1)+10.0f*VAL(TileY,TileX,1,0)+3.0f*VAL(TileY,TileX,1,+1))-(3.0f*VAL(TileY,TileX,-1,-1)+10.0f*VAL(TileY,TileX,-1,0)+3.0f*VAL(TileY,TileX,-1,+1));\n"
+"dIdx *= w;\n"
+"dIdy *= w;\n"
+"*Dx = dIdx;\n"
+"*Dy = dIdy;\n"
+"*A11 += dIdx * dIdx;\n"
+"*A12 += dIdx * dIdy;\n"
+"*A22 += dIdy * dIdy;\n"
+"}\n"
+"#undef VAL\n"
+"inline void GetPatch(image2d_t J, float x, float y,\n"
+"float* Pch, float* Dx, float* Dy,\n"
+"float* b1, float* b2)\n"
+"{\n"
+"float J_val = read_imagef(J, sampler, (float2)(x, y)).x;\n"
+"float diff = (J_val - *Pch) * 32.0f;\n"
+"*b1 += diff**Dx;\n"
+"*b2 += diff**Dy;\n"
+"}\n"
+"inline void GetError(image2d_t J, const float x, const float y, const float* Pch, float* errval)\n"
+"{\n"
+"float diff = read_imagef(J, sampler, (float2)(x,y)).x-*Pch;\n"
+"*errval += fabs(diff);\n"
+"}\n"
+"#define READI(_y,_x) IPatchLocal[(yid+((_y)*LSy))*LM_W+(xid+((_x)*LSx))] = read_imagef(I, sampler, (float2)(Point.x + xid+(_x)*LSx + 0.5f-1, Point.y + yid+(_y)*LSy+ 0.5f-1)).x;\n"
+"void ReadPatchIToLocalMem(image2d_t I, float2 Point, local float* IPatchLocal)\n"
+"{\n"
+"unsigned int xid=get_local_id(0);\n"
+"unsigned int yid=get_local_id(1);\n"
+"READI(0,0);READI(0,1);READI(0,2);\n"
+"READI(1,0);READI(1,1);READI(1,2);\n"
+"READI(2,0);READI(2,1);READI(2,2);\n"
+"if(xid<2)\n"
+"{\n"
+"READI(0,3);\n"
+"READI(1,3);\n"
+"READI(2,3);\n"
+"}\n"
+"if(yid<2)\n"
+"{\n"
+"READI(3,0);READI(3,1);READI(3,2);\n"
+"}\n"
+"if(yid<2 && xid<2)\n"
+"{\n"
+"READI(3,3);\n"
+"}\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"}\n"
+"#undef READI\n"
+"__attribute__((reqd_work_group_size(LSx, LSy, 1)))\n"
+"__kernel void lkSparse(image2d_t I, image2d_t J,\n"
+"__global const float2* prevPts, __global float2* nextPts, __global uchar* status, __global float* err,\n"
+"const int level, const int rows, const int cols, int PATCH_X, int PATCH_Y, int c_winSize_x, int c_winSize_y, int c_iters, char calcErr)\n"
+"{\n"
+"__local float smem1[BUFFER];\n"
+"__local float smem2[BUFFER];\n"
+"__local float smem3[BUFFER];\n"
+"unsigned int xid=get_local_id(0);\n"
+"unsigned int yid=get_local_id(1);\n"
+"unsigned int gid=get_group_id(0);\n"
+"unsigned int xsize=get_local_size(0);\n"
+"unsigned int ysize=get_local_size(1);\n"
+"int xBase, yBase, k;\n"
+"float wx = ((xid+2*xsize)<c_winSize_x)?1:0;\n"
+"float wy = ((yid+2*ysize)<c_winSize_y)?1:0;\n"
+"float2 c_halfWin = (float2)((c_winSize_x - 1)>>1, (c_winSize_y - 1)>>1);\n"
+"const int tid = mad24(yid, xsize, xid);\n"
+"float2 prevPt = prevPts[gid] / (float2)(1 << level);\n"
+"if (prevPt.x < 0 || prevPt.x >= cols || prevPt.y < 0 || prevPt.y >= rows)\n"
+"{\n"
+"if (tid == 0 && level == 0)\n"
+"{\n"
+"status[gid] = 0;\n"
+"}\n"
+"return;\n"
+"}\n"
+"prevPt -= c_halfWin;\n"
+"float A11 = 0;\n"
+"float A12 = 0;\n"
+"float A22 = 0;\n"
+"float I_patch[GRIDSIZE][GRIDSIZE];\n"
+"float dIdx_patch[GRIDSIZE][GRIDSIZE];\n"
+"float dIdy_patch[GRIDSIZE][GRIDSIZE];\n"
+"local float IPatchLocal[LM_W*LM_H];\n"
+"ReadPatchIToLocalMem(I,prevPt,IPatchLocal);\n"
+"{\n"
+"SetPatch(IPatchLocal, 0, 0,\n"
+"&I_patch[0][0], &dIdx_patch[0][0], &dIdy_patch[0][0],\n"
+"&A11, &A12, &A22,1);\n"
+"SetPatch(IPatchLocal, 0, 1,\n"
+"&I_patch[0][1], &dIdx_patch[0][1], &dIdy_patch[0][1],\n"
+"&A11, &A12, &A22,1);\n"
+"SetPatch(IPatchLocal, 0, 2,\n"
+"&I_patch[0][2], &dIdx_patch[0][2], &dIdy_patch[0][2],\n"
+"&A11, &A12, &A22,wx);\n"
+"}\n"
+"{\n"
+"SetPatch(IPatchLocal, 1, 0,\n"
+"&I_patch[1][0], &dIdx_patch[1][0], &dIdy_patch[1][0],\n"
+"&A11, &A12, &A22,1);\n"
+"SetPatch(IPatchLocal, 1,1,\n"
+"&I_patch[1][1], &dIdx_patch[1][1], &dIdy_patch[1][1],\n"
+"&A11, &A12, &A22,1);\n"
+"SetPatch(IPatchLocal, 1,2,\n"
+"&I_patch[1][2], &dIdx_patch[1][2], &dIdy_patch[1][2],\n"
+"&A11, &A12, &A22,wx);\n"
+"}\n"
+"{\n"
+"SetPatch(IPatchLocal, 2,0,\n"
+"&I_patch[2][0], &dIdx_patch[2][0], &dIdy_patch[2][0],\n"
+"&A11, &A12, &A22,wy);\n"
+"SetPatch(IPatchLocal, 2,1,\n"
+"&I_patch[2][1], &dIdx_patch[2][1], &dIdy_patch[2][1],\n"
+"&A11, &A12, &A22,wy);\n"
+"SetPatch(IPatchLocal, 2,2,\n"
+"&I_patch[2][2], &dIdx_patch[2][2], &dIdy_patch[2][2],\n"
+"&A11, &A12, &A22,wx*wy);\n"
+"}\n"
+"reduce3(A11, A12, A22, smem1, smem2, smem3, tid);\n"
+"A11 = smem1[0];\n"
+"A12 = smem2[0];\n"
+"A22 = smem3[0];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"float D = A11 * A22 - A12 * A12;\n"
+"if (D < 1.192092896e-07f)\n"
+"{\n"
+"if (tid == 0 && level == 0)\n"
+"status[gid] = 0;\n"
+"return;\n"
+"}\n"
+"A11 /= D;\n"
+"A12 /= D;\n"
+"A22 /= D;\n"
+"prevPt = nextPts[gid] * 2.0f - c_halfWin;\n"
+"for (k = 0; k < c_iters; ++k)\n"
+"{\n"
+"if (prevPt.x < -c_halfWin.x || prevPt.x >= cols || prevPt.y < -c_halfWin.y || prevPt.y >= rows)\n"
+"{\n"
+"if (tid == 0 && level == 0)\n"
+"status[gid] = 0;\n"
+"break;\n"
+"}\n"
+"float b1 = 0;\n"
+"float b2 = 0;\n"
+"yBase=yid;\n"
+"{\n"
+"xBase=xid;\n"
+"GetPatch(J, prevPt.x + xBase + 0.5f, prevPt.y + yBase + 0.5f,\n"
+"&I_patch[0][0], &dIdx_patch[0][0], &dIdy_patch[0][0],\n"
+"&b1, &b2);\n"
+"xBase+=xsize;\n"
+"GetPatch(J, prevPt.x + xBase + 0.5f, prevPt.y + yBase + 0.5f,\n"
+"&I_patch[0][1], &dIdx_patch[0][1], &dIdy_patch[0][1],\n"
+"&b1, &b2);\n"
+"xBase+=xsize;\n"
+"GetPatch(J, prevPt.x + xBase + 0.5f, prevPt.y + yBase + 0.5f,\n"
+"&I_patch[0][2], &dIdx_patch[0][2], &dIdy_patch[0][2],\n"
+"&b1, &b2);\n"
+"}\n"
+"yBase+=ysize;\n"
+"{\n"
+"xBase=xid;\n"
+"GetPatch(J, prevPt.x + xBase + 0.5f, prevPt.y + yBase + 0.5f,\n"
+"&I_patch[1][0], &dIdx_patch[1][0], &dIdy_patch[1][0],\n"
+"&b1, &b2);\n"
+"xBase+=xsize;\n"
+"GetPatch(J, prevPt.x + xBase + 0.5f, prevPt.y + yBase + 0.5f,\n"
+"&I_patch[1][1], &dIdx_patch[1][1], &dIdy_patch[1][1],\n"
+"&b1, &b2);\n"
+"xBase+=xsize;\n"
+"GetPatch(J, prevPt.x + xBase + 0.5f, prevPt.y + yBase + 0.5f,\n"
+"&I_patch[1][2], &dIdx_patch[1][2], &dIdy_patch[1][2],\n"
+"&b1, &b2);\n"
+"}\n"
+"yBase+=ysize;\n"
+"{\n"
+"xBase=xid;\n"
+"GetPatch(J, prevPt.x + xBase + 0.5f, prevPt.y + yBase + 0.5f,\n"
+"&I_patch[2][0], &dIdx_patch[2][0], &dIdy_patch[2][0],\n"
+"&b1, &b2);\n"
+"xBase+=xsize;\n"
+"GetPatch(J, prevPt.x + xBase + 0.5f, prevPt.y + yBase + 0.5f,\n"
+"&I_patch[2][1], &dIdx_patch[2][1], &dIdy_patch[2][1],\n"
+"&b1, &b2);\n"
+"xBase+=xsize;\n"
+"GetPatch(J, prevPt.x + xBase + 0.5f, prevPt.y + yBase + 0.5f,\n"
+"&I_patch[2][2], &dIdx_patch[2][2], &dIdy_patch[2][2],\n"
+"&b1, &b2);\n"
+"}\n"
+"reduce2(b1, b2, smem1, smem2, tid);\n"
+"b1 = smem1[0];\n"
+"b2 = smem2[0];\n"
+"barrier(CLK_LOCAL_MEM_FENCE);\n"
+"float2 delta;\n"
+"delta.x = A12 * b2 - A22 * b1;\n"
+"delta.y = A12 * b1 - A11 * b2;\n"
+"prevPt += delta;\n"
+"if (fabs(delta.x) < THRESHOLD && fabs(delta.y) < THRESHOLD)\n"
+"break;\n"
+"}\n"
+"D = 0.0f;\n"
+"if (calcErr)\n"
+"{\n"
+"yBase=yid;\n"
+"{\n"
+"xBase=xid;\n"
+"GetError(J, prevPt.x + xBase + 0.5f, prevPt.y + yBase + 0.5f,\n"
+"&I_patch[0][0], &D);\n"
+"xBase+=xsize;\n"
+"GetError(J, prevPt.x + xBase + 0.5f, prevPt.y + yBase + 0.5f,\n"
+"&I_patch[0][1], &D);\n"
+"xBase+=xsize;\n"
+"if(xBase<c_winSize_x)\n"
+"GetError(J, prevPt.x + xBase + 0.5f, prevPt.y + yBase + 0.5f,\n"
+"&I_patch[0][2], &D);\n"
+"}\n"
+"yBase+=ysize;\n"
+"{\n"
+"xBase=xid;\n"
+"GetError(J, prevPt.x + xBase + 0.5f, prevPt.y + yBase + 0.5f,\n"
+"&I_patch[1][0], &D);\n"
+"xBase+=xsize;\n"
+"GetError(J, prevPt.x + xBase + 0.5f, prevPt.y + yBase + 0.5f,\n"
+"&I_patch[1][1], &D);\n"
+"xBase+=xsize;\n"
+"if(xBase<c_winSize_x)\n"
+"GetError(J, prevPt.x + xBase + 0.5f, prevPt.y + yBase + 0.5f,\n"
+"&I_patch[1][2], &D);\n"
+"}\n"
+"yBase+=ysize;\n"
+"if(yBase<c_winSize_y)\n"
+"{\n"
+"xBase=xid;\n"
+"GetError(J, prevPt.x + xBase + 0.5f, prevPt.y + yBase + 0.5f,\n"
+"&I_patch[2][0], &D);\n"
+"xBase+=xsize;\n"
+"GetError(J, prevPt.x + xBase + 0.5f, prevPt.y + yBase + 0.5f,\n"
+"&I_patch[2][1], &D);\n"
+"xBase+=xsize;\n"
+"if(xBase<c_winSize_x)\n"
+"GetError(J, prevPt.x + xBase + 0.5f, prevPt.y + yBase + 0.5f,\n"
+"&I_patch[2][2], &D);\n"
+"}\n"
+"reduce1(D, smem1, tid);\n"
+"}\n"
+"if (tid == 0)\n"
+"{\n"
+"prevPt += c_halfWin;\n"
+"nextPts[gid] = prevPt;\n"
+"if (calcErr)\n"
+"err[gid] = smem1[0] / (float)(c_winSize_x * c_winSize_y);\n"
+"}\n"
+"}\n"
+, "b7099fcbc60bd5528dacc491eadd88c1"};
+ProgramSource pyrlk_oclsrc(pyrlk.programStr);
+}
+}}
diff --git a/modules/video/opencl_kernels_video.hpp b/modules/video/opencl_kernels_video.hpp
new file mode 100644
index 0000000..f96e918
--- /dev/null
+++ b/modules/video/opencl_kernels_video.hpp
@@ -0,0 +1,23 @@
+// This file is auto-generated. Do not edit!
+
+#include "opencv2/core/ocl.hpp"
+#include "opencv2/core/ocl_genbase.hpp"
+#include "opencv2/core/opencl/ocl_defs.hpp"
+
+namespace cv
+{
+namespace ocl
+{
+namespace video
+{
+
+extern const struct ProgramEntry bgfg_mog2;
+extern ProgramSource bgfg_mog2_oclsrc;
+extern const struct ProgramEntry optical_flow_farneback;
+extern ProgramSource optical_flow_farneback_oclsrc;
+extern const struct ProgramEntry optical_flow_tvl1;
+extern ProgramSource optical_flow_tvl1_oclsrc;
+extern const struct ProgramEntry pyrlk;
+extern ProgramSource pyrlk_oclsrc;
+}
+}}
diff --git a/modules/video/precomp.hpp b/modules/video/precomp.hpp
new file mode 100644
index 0000000..5f1bbf8
--- /dev/null
+++ b/modules/video/precomp.hpp
@@ -0,0 +1,56 @@
+/*M///////////////////////////////////////////////////////////////////////////////////////
+//
+// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+//
+// By downloading, copying, installing or using the software you agree to this license.
+// If you do not agree to this license, do not download, install,
+// copy or use the software.
+//
+//
+// License Agreement
+// For Open Source Computer Vision Library
+//
+// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
+// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// * Redistribution's of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// * Redistribution's in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// * The name of the copyright holders may not be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// This software is provided by the copyright holders and contributors "as is" and
+// any express or implied warranties, including, but not limited to, the implied
+// warranties of merchantability and fitness for a particular purpose are disclaimed.
+// In no event shall the Intel Corporation or contributors be liable for any direct,
+// indirect, incidental, special, exemplary, or consequential damages
+// (including, but not limited to, procurement of substitute goods or services;
+// loss of use, data, or profits; or business interruption) however caused
+// and on any theory of liability, whether in contract, strict liability,
+// or tort (including negligence or otherwise) arising in any way out of
+// the use of this software, even if advised of the possibility of such damage.
+//
+//M*/
+
+#ifndef __OPENCV_PRECOMP_H__
+#define __OPENCV_PRECOMP_H__
+
+#include "opencv2/video.hpp"
+#include "opencv2/core/utility.hpp"
+#include "opencv2/core/private.hpp"
+#include "opencv2/core/ocl.hpp"
+#include "opencv2/core.hpp"
+
+#ifdef HAVE_TEGRA_OPTIMIZATION
+#include "opencv2/video/video_tegra.hpp"
+#endif
+
+#endif
diff --git a/modules/videoio/precomp.hpp b/modules/videoio/precomp.hpp
new file mode 100644
index 0000000..8bfc4f8
--- /dev/null
+++ b/modules/videoio/precomp.hpp
@@ -0,0 +1,194 @@
+/*M///////////////////////////////////////////////////////////////////////////////////////
+//
+// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+//
+// By downloading, copying, installing or using the software you agree to this license.
+// If you do not agree to this license, do not download, install,
+// copy or use the software.
+//
+//
+// Intel License Agreement
+// For Open Source Computer Vision Library
+//
+// Copyright (C) 2000, Intel Corporation, all rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// * Redistribution's of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// * Redistribution's in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// * The name of Intel Corporation may not be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// This software is provided by the copyright holders and contributors "as is" and
+// any express or implied warranties, including, but not limited to, the implied
+// warranties of merchantability and fitness for a particular purpose are disclaimed.
+// In no event shall the Intel Corporation or contributors be liable for any direct,
+// indirect, incidental, special, exemplary, or consequential damages
+// (including, but not limited to, procurement of substitute goods or services;
+// loss of use, data, or profits; or business interruption) however caused
+// and on any theory of liability, whether in contract, strict liability,
+// or tort (including negligence or otherwise) arising in any way out of
+// the use of this software, even if advised of the possibility of such damage.
+//
+//M*/
+
+#ifndef __VIDEOIO_H_
+#define __VIDEOIO_H_
+
+#include "opencv2/videoio.hpp"
+
+#include "opencv2/core/utility.hpp"
+#include "opencv2/core/private.hpp"
+
+#include "opencv2/imgcodecs.hpp"
+
+#include "opencv2/imgproc/imgproc_c.h"
+#include "opencv2/imgcodecs/imgcodecs_c.h"
+#include "opencv2/videoio/videoio_c.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <limits.h>
+#include <ctype.h>
+#include <assert.h>
+
+#if defined WIN32 || defined WINCE
+ #if !defined _WIN32_WINNT
+ #ifdef HAVE_MSMF
+ #define _WIN32_WINNT 0x0600 // Windows Vista
+ #else
+ #define _WIN32_WINNT 0x0500 // Windows 2000
+ #endif
+ #endif
+
+ #include <windows.h>
+ #undef small
+ #undef min
+ #undef max
+ #undef abs
+#endif
+
+#define __BEGIN__ __CV_BEGIN__
+#define __END__ __CV_END__
+#define EXIT __CV_EXIT__
+
+/***************************** CvCapture structure ******************************/
+
+struct CvCapture
+{
+ virtual ~CvCapture() {}
+ virtual double getProperty(int) const { return 0; }
+ virtual bool setProperty(int, double) { return 0; }
+ virtual bool grabFrame() { return true; }
+ virtual IplImage* retrieveFrame(int) { return 0; }
+ virtual int getCaptureDomain() { return CV_CAP_ANY; } // Return the type of the capture object: CV_CAP_VFW, etc...
+};
+
+/*************************** CvVideoWriter structure ****************************/
+
+struct CvVideoWriter
+{
+ virtual ~CvVideoWriter() {}
+ virtual bool writeFrame(const IplImage*) { return false; }
+};
+
+CvCapture * cvCreateCameraCapture_V4L( int index );
+CvCapture * cvCreateCameraCapture_DC1394( int index );
+CvCapture * cvCreateCameraCapture_DC1394_2( int index );
+CvCapture* cvCreateCameraCapture_MIL( int index );
+CvCapture* cvCreateCameraCapture_Giganetix( int index );
+CvCapture * cvCreateCameraCapture_CMU( int index );
+CV_IMPL CvCapture * cvCreateCameraCapture_TYZX( int index );
+CvCapture* cvCreateFileCapture_Win32( const char* filename );
+CvCapture* cvCreateCameraCapture_VFW( int index );
+CvCapture* cvCreateFileCapture_VFW( const char* filename );
+CvVideoWriter* cvCreateVideoWriter_Win32( const char* filename, int fourcc,
+ double fps, CvSize frameSize, int is_color );
+CvVideoWriter* cvCreateVideoWriter_VFW( const char* filename, int fourcc,
+ double fps, CvSize frameSize, int is_color );
+CvCapture* cvCreateCameraCapture_DShow( int index );
+CvCapture* cvCreateCameraCapture_MSMF( int index );
+CvCapture* cvCreateFileCapture_MSMF (const char* filename);
+CvVideoWriter* cvCreateVideoWriter_MSMF( const char* filename, int fourcc,
+ double fps, CvSize frameSize, int is_color );
+CvCapture* cvCreateCameraCapture_OpenNI( int index );
+CvCapture* cvCreateFileCapture_OpenNI( const char* filename );
+CvCapture* cvCreateCameraCapture_Android( int index );
+CvCapture* cvCreateCameraCapture_XIMEA( int index );
+CvCapture* cvCreateCameraCapture_AVFoundation(int index);
+
+CvCapture* cvCreateFileCapture_Images(const char* filename);
+CvVideoWriter* cvCreateVideoWriter_Images(const char* filename);
+
+CvCapture* cvCreateFileCapture_XINE (const char* filename);
+
+
+#define CV_CAP_GSTREAMER_1394 0
+#define CV_CAP_GSTREAMER_V4L 1
+#define CV_CAP_GSTREAMER_V4L2 2
+#define CV_CAP_GSTREAMER_FILE 3
+
+CvCapture* cvCreateCapture_GStreamer(int type, const char *filename);
+CvCapture* cvCreateFileCapture_FFMPEG_proxy(const char* filename);
+
+
+CvVideoWriter* cvCreateVideoWriter_FFMPEG_proxy( const char* filename, int fourcc,
+ double fps, CvSize frameSize, int is_color );
+
+CvCapture * cvCreateFileCapture_QT (const char * filename);
+CvCapture * cvCreateCameraCapture_QT (const int index);
+
+CvVideoWriter* cvCreateVideoWriter_QT ( const char* filename, int fourcc,
+ double fps, CvSize frameSize, int is_color );
+
+CvCapture* cvCreateFileCapture_AVFoundation (const char * filename);
+CvVideoWriter* cvCreateVideoWriter_AVFoundation( const char* filename, int fourcc,
+ double fps, CvSize frameSize, int is_color );
+
+
+CvCapture * cvCreateCameraCapture_Unicap (const int index);
+CvCapture * cvCreateCameraCapture_PvAPI (const int index);
+CvVideoWriter* cvCreateVideoWriter_GStreamer( const char* filename, int fourcc,
+ double fps, CvSize frameSize, int is_color );
+
+namespace cv
+{
+ class IVideoCapture
+ {
+ public:
+ virtual ~IVideoCapture() {}
+ virtual double getProperty(int) const { return 0; }
+ virtual bool setProperty(int, double) { return false; }
+ virtual bool grabFrame() = 0;
+ virtual bool retrieveFrame(int, OutputArray) = 0;
+ virtual bool isOpened() const = 0;
+ virtual int getCaptureDomain() { return CAP_ANY; } // Return the type of the capture object: CAP_VFW, etc...
+ };
+
+ class IVideoWriter
+ {
+ public:
+ virtual ~IVideoWriter() {}
+ virtual double getProperty(int) const { return 0; }
+ virtual bool setProperty(int, double) { return false; }
+
+ virtual bool isOpened() const = 0;
+ virtual void write(InputArray) = 0;
+ };
+
+ Ptr<IVideoCapture> createMotionJpegCapture(const String& filename);
+ Ptr<IVideoWriter> createMotionJpegWriter( const String& filename, double fps, Size frameSize, bool iscolor );
+
+ Ptr<IVideoCapture> createGPhoto2Capture(int index);
+ Ptr<IVideoCapture> createGPhoto2Capture(const String& deviceName);
+};
+
+#endif /* __VIDEOIO_H_ */
diff --git a/opencv2/cvconfig.h b/opencv2/cvconfig.h
new file mode 100644
index 0000000..7442235
--- /dev/null
+++ b/opencv2/cvconfig.h
@@ -0,0 +1,183 @@
+/* OpenCV compiled as static or dynamic libs */
+/* #undef BUILD_SHARED_LIBS */
+
+/* Compile for 'real' NVIDIA GPU architectures */
+#define CUDA_ARCH_BIN ""
+
+/* Create PTX or BIN for 1.0 compute capability */
+/* #undef CUDA_ARCH_BIN_OR_PTX_10 */
+
+/* NVIDIA GPU features are used */
+#define CUDA_ARCH_FEATURES ""
+
+/* Compile for 'virtual' NVIDIA PTX architectures */
+#define CUDA_ARCH_PTX ""
+
+/* AVFoundation video libraries */
+/* #undef HAVE_AVFOUNDATION */
+
+/* V4L capturing support */
+/* #undef HAVE_CAMV4L */
+
+/* V4L2 capturing support */
+/* #undef HAVE_CAMV4L2 */
+
+/* Carbon windowing environment */
+/* #undef HAVE_CARBON */
+
+/* AMD's Basic Linear Algebra Subprograms Library*/
+/* #undef HAVE_CLAMDBLAS */
+
+/* AMD's OpenCL Fast Fourier Transform Library*/
+/* #undef HAVE_CLAMDFFT */
+
+/* Clp support */
+/* #undef HAVE_CLP */
+
+/* Cocoa API */
+/* #undef HAVE_COCOA */
+
+/* C= */
+/* #undef HAVE_CSTRIPES */
+
+/* NVidia Cuda Basic Linear Algebra Subprograms (BLAS) API*/
+/* #undef HAVE_CUBLAS */
+
+/* NVidia Cuda Runtime API*/
+/* #undef HAVE_CUDA */
+
+/* NVidia Cuda Fast Fourier Transform (FFT) API*/
+/* #undef HAVE_CUFFT */
+
+/* IEEE1394 capturing support */
+/* #undef HAVE_DC1394 */
+
+/* IEEE1394 capturing support - libdc1394 v2.x */
+/* #undef HAVE_DC1394_2 */
+
+/* DirectX */
+/* #undef HAVE_DIRECTX */
+/* #undef HAVE_D3D11 */
+/* #undef HAVE_D3D10 */
+/* #undef HAVE_D3D9 */
+
+/* DirectShow Video Capture library */
+/* #undef HAVE_DSHOW */
+
+/* Eigen Matrix & Linear Algebra Library */
+/* #undef HAVE_EIGEN */
+
+/* FFMpeg video library */
+/* #undef HAVE_FFMPEG */
+
+/* ffmpeg's libswscale */
+/* #undef HAVE_FFMPEG_SWSCALE */
+
+/* ffmpeg in Gentoo */
+/* #undef HAVE_GENTOO_FFMPEG */
+
+/* Geospatial Data Abstraction Library */
+/* #undef HAVE_GDAL */
+
+/* GStreamer multimedia framework */
+/* #undef HAVE_GSTREAMER */
+
+/* GTK+ 2.0 Thread support */
+/* #undef HAVE_GTHREAD */
+
+/* GTK+ 2.x toolkit */
+/* #undef HAVE_GTK */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+/* #undef HAVE_INTTYPES_H */
+
+/* Intel Perceptual Computing SDK library */
+/* #undef HAVE_INTELPERC */
+
+/* Intel Integrated Performance Primitives */
+/* #undef HAVE_IPP */
+/* #undef HAVE_IPP_ICV_ONLY */
+
+/* Intel IPP Async */
+/* #undef HAVE_IPP_A */
+
+/* JPEG-2000 codec */
+#define HAVE_JASPER
+
+/* IJG JPEG codec */
+#define HAVE_JPEG
+
+/* libpng/png.h needs to be included */
+/* #undef HAVE_LIBPNG_PNG_H */
+
+/* V4L/V4L2 capturing support via libv4l */
+/* #undef HAVE_LIBV4L */
+
+/* Microsoft Media Foundation Capture library */
+/* #undef HAVE_MSMF */
+
+/* NVidia Video Decoding API*/
+/* #undef HAVE_NVCUVID */
+
+/* OpenCL Support */
+/* #undef HAVE_OPENCL */
+/* #undef HAVE_OPENCL_STATIC */
+/* #undef HAVE_OPENCL_SVM */
+
+/* OpenEXR codec */
+#define HAVE_OPENEXR
+
+/* OpenGL support*/
+/* #undef HAVE_OPENGL */
+
+/* OpenNI library */
+/* #undef HAVE_OPENNI */
+
+/* OpenNI library */
+/* #undef HAVE_OPENNI2 */
+
+/* PNG codec */
+#define HAVE_PNG
+
+/* Qt support */
+/* #undef HAVE_QT */
+
+/* Qt OpenGL support */
+/* #undef HAVE_QT_OPENGL */
+
+/* QuickTime video libraries */
+/* #undef HAVE_QUICKTIME */
+
+/* QTKit video libraries */
+/* #undef HAVE_QTKIT */
+
+/* Intel Threading Building Blocks */
+/* #undef HAVE_TBB */
+
+/* TIFF codec */
+#define HAVE_TIFF
+
+/* Unicap video capture library */
+/* #undef HAVE_UNICAP */
+
+/* Video for Windows support */
+/* #undef HAVE_VFW */
+
+/* V4L2 capturing support in videoio.h */
+/* #undef HAVE_VIDEOIO */
+
+/* Win32 UI */
+/* #undef HAVE_WIN32UI */
+
+/* XIMEA camera support */
+/* #undef HAVE_XIMEA */
+
+/* Xine video library */
+/* #undef HAVE_XINE */
+
+/* Define if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+/* #undef WORDS_BIGENDIAN */
+
+/* gPhoto2 library */
+/* #undef HAVE_GPHOTO2 */
diff --git a/opencv2/opencv_modules.hpp b/opencv2/opencv_modules.hpp
new file mode 100644
index 0000000..ebca30a
--- /dev/null
+++ b/opencv2/opencv_modules.hpp
@@ -0,0 +1,27 @@
+/*
+ * ** File generated automatically, do not modify **
+ *
+ * This file defines the list of modules available in current build configuration
+ *
+ *
+*/
+
+#define HAVE_OPENCV_CALIB3D
+#define HAVE_OPENCV_CORE
+#define HAVE_OPENCV_FEATURES2D
+#define HAVE_OPENCV_FLANN
+#define HAVE_OPENCV_HAL
+#define HAVE_OPENCV_HIGHGUI
+#define HAVE_OPENCV_IMGCODECS
+#define HAVE_OPENCV_IMGPROC
+#define HAVE_OPENCV_ML
+#define HAVE_OPENCV_OBJDETECT
+#define HAVE_OPENCV_PHOTO
+#define HAVE_OPENCV_SHAPE
+#define HAVE_OPENCV_STITCHING
+#define HAVE_OPENCV_SUPERRES
+#define HAVE_OPENCV_VIDEO
+#define HAVE_OPENCV_VIDEOIO
+#define HAVE_OPENCV_VIDEOSTAB
+
+