FocusModes = params.getSupportedFocusModes();
+ if (FocusModes != null && FocusModes.contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO))
+ {
+ params.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);
+ }
+
+ mCamera.setParameters(params);
+ params = mCamera.getParameters();
+
+ mFrameWidth = params.getPreviewSize().width;
+ mFrameHeight = params.getPreviewSize().height;
+
+ if ((getLayoutParams().width == LayoutParams.MATCH_PARENT) && (getLayoutParams().height == LayoutParams.MATCH_PARENT))
+ mScale = Math.min(((float)height)/mFrameHeight, ((float)width)/mFrameWidth);
+ else
+ mScale = 0;
+
+ if (mFpsMeter != null) {
+ mFpsMeter.setResolution(mFrameWidth, mFrameHeight);
+ }
+
+ int size = mFrameWidth * mFrameHeight;
+ size = size * ImageFormat.getBitsPerPixel(params.getPreviewFormat()) / 8;
+ mBuffer = new byte[size];
+
+ mCamera.addCallbackBuffer(mBuffer);
+ mCamera.setPreviewCallbackWithBuffer(this);
+
+ mFrameChain = new Mat[2];
+ mFrameChain[0] = new Mat(mFrameHeight + (mFrameHeight/2), mFrameWidth, CvType.CV_8UC1);
+ mFrameChain[1] = new Mat(mFrameHeight + (mFrameHeight/2), mFrameWidth, CvType.CV_8UC1);
+
+ AllocateCache();
+
+ mCameraFrame = new JavaCameraFrame[2];
+ mCameraFrame[0] = new JavaCameraFrame(mFrameChain[0], mFrameWidth, mFrameHeight);
+ mCameraFrame[1] = new JavaCameraFrame(mFrameChain[1], mFrameWidth, mFrameHeight);
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
+ mSurfaceTexture = new SurfaceTexture(MAGIC_TEXTURE_ID);
+ mCamera.setPreviewTexture(mSurfaceTexture);
+ } else
+ mCamera.setPreviewDisplay(null);
+
+ /* Finally we are ready to start the preview */
+ Log.d(TAG, "startPreview");
+ mCamera.startPreview();
+ }
+ else
+ result = false;
+ } catch (Exception e) {
+ result = false;
+ e.printStackTrace();
+ }
+ }
+
+ return result;
+ }
+
+ protected void releaseCamera() {
+ synchronized (this) {
+ if (mCamera != null) {
+ mCamera.stopPreview();
+ mCamera.setPreviewCallback(null);
+
+ mCamera.release();
+ }
+ mCamera = null;
+ if (mFrameChain != null) {
+ mFrameChain[0].release();
+ mFrameChain[1].release();
+ }
+ if (mCameraFrame != null) {
+ mCameraFrame[0].release();
+ mCameraFrame[1].release();
+ }
+ }
+ }
+
+ private boolean mCameraFrameReady = false;
+
+ @Override
+ protected boolean connectCamera(int width, int height) {
+
+ /* 1. We need to instantiate camera
+ * 2. We need to start thread which will be getting frames
+ */
+ /* First step - initialize camera connection */
+ Log.d(TAG, "Connecting to camera");
+ if (!initializeCamera(width, height))
+ return false;
+
+ mCameraFrameReady = false;
+
+ /* now we can start update thread */
+ Log.d(TAG, "Starting processing thread");
+ mStopThread = false;
+ mThread = new Thread(new CameraWorker());
+ mThread.start();
+
+ return true;
+ }
+
+ @Override
+ protected void disconnectCamera() {
+ /* 1. We need to stop thread which updating the frames
+ * 2. Stop camera and release it
+ */
+ Log.d(TAG, "Disconnecting from camera");
+ try {
+ mStopThread = true;
+ Log.d(TAG, "Notify thread");
+ synchronized (this) {
+ this.notify();
+ }
+ Log.d(TAG, "Waiting for thread");
+ if (mThread != null)
+ mThread.join();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } finally {
+ mThread = null;
+ }
+
+ /* Now release camera */
+ releaseCamera();
+
+ mCameraFrameReady = false;
+ }
+
+ @Override
+ public void onPreviewFrame(byte[] frame, Camera arg1) {
+ if (BuildConfig.DEBUG)
+ Log.d(TAG, "Preview Frame received. Frame size: " + frame.length);
+ synchronized (this) {
+ mFrameChain[mChainIdx].put(0, 0, frame);
+ mCameraFrameReady = true;
+ this.notify();
+ }
+ if (mCamera != null)
+ mCamera.addCallbackBuffer(mBuffer);
+ }
+
+ private class JavaCameraFrame implements CvCameraViewFrame {
+ @Override
+ public Mat gray() {
+ return mYuvFrameData.submat(0, mHeight, 0, mWidth);
+ }
+
+ @Override
+ public Mat rgba() {
+ if (mPreviewFormat == ImageFormat.NV21)
+ Imgproc.cvtColor(mYuvFrameData, mRgba, Imgproc.COLOR_YUV2RGBA_NV21, 4);
+ else if (mPreviewFormat == ImageFormat.YV12)
+ Imgproc.cvtColor(mYuvFrameData, mRgba, Imgproc.COLOR_YUV2RGB_I420, 4); // COLOR_YUV2RGBA_YV12 produces inverted colors
+ else
+ throw new IllegalArgumentException("Preview Format can be NV21 or YV12");
+
+ return mRgba;
+ }
+
+ public JavaCameraFrame(Mat Yuv420sp, int width, int height) {
+ super();
+ mWidth = width;
+ mHeight = height;
+ mYuvFrameData = Yuv420sp;
+ mRgba = new Mat();
+ }
+
+ public void release() {
+ mRgba.release();
+ }
+
+ private Mat mYuvFrameData;
+ private Mat mRgba;
+ private int mWidth;
+ private int mHeight;
+ };
+
+ private class CameraWorker implements Runnable {
+
+ @Override
+ public void run() {
+ do {
+ boolean hasFrame = false;
+ synchronized (JavaCameraView.this) {
+ try {
+ while (!mCameraFrameReady && !mStopThread) {
+ JavaCameraView.this.wait();
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ if (mCameraFrameReady)
+ {
+ mChainIdx = 1 - mChainIdx;
+ mCameraFrameReady = false;
+ hasFrame = true;
+ }
+ }
+
+ if (!mStopThread && hasFrame) {
+ if (!mFrameChain[1 - mChainIdx].empty())
+ deliverAndDrawFrame(mCameraFrame[1 - mChainIdx]);
+ }
+ } while (!mStopThread);
+ Log.d(TAG, "Finish processing thread");
+ }
+ }
+}
diff --git a/library/src/main/java/org/opencv/android/LoaderCallbackInterface.java b/library/src/main/java/org/opencv/android/LoaderCallbackInterface.java
new file mode 100644
index 0000000..a941e83
--- /dev/null
+++ b/library/src/main/java/org/opencv/android/LoaderCallbackInterface.java
@@ -0,0 +1,40 @@
+package org.opencv.android;
+
+/**
+ * Interface for callback object in case of asynchronous initialization of OpenCV.
+ */
+public interface LoaderCallbackInterface
+{
+ /**
+ * OpenCV initialization finished successfully.
+ */
+ static final int SUCCESS = 0;
+ /**
+ * Google Play Market cannot be invoked.
+ */
+ static final int MARKET_ERROR = 2;
+ /**
+ * OpenCV library installation has been canceled by the user.
+ */
+ static final int INSTALL_CANCELED = 3;
+ /**
+ * This version of OpenCV Manager Service is incompatible with the app. Possibly, a service update is required.
+ */
+ static final int INCOMPATIBLE_MANAGER_VERSION = 4;
+ /**
+ * OpenCV library initialization has failed.
+ */
+ static final int INIT_FAILED = 0xff;
+
+ /**
+ * Callback method, called after OpenCV library initialization.
+ * @param status status of initialization (see initialization status constants).
+ */
+ public void onManagerConnected(int status);
+
+ /**
+ * Callback method, called in case the package installation is needed.
+ * @param callback answer object with approve and cancel methods and the package description.
+ */
+ public void onPackageInstall(final int operation, InstallCallbackInterface callback);
+};
diff --git a/library/src/main/java/org/opencv/android/OpenCVLoader.java b/library/src/main/java/org/opencv/android/OpenCVLoader.java
new file mode 100644
index 0000000..ae52503
--- /dev/null
+++ b/library/src/main/java/org/opencv/android/OpenCVLoader.java
@@ -0,0 +1,127 @@
+package org.opencv.android;
+
+import android.content.Context;
+
+/**
+ * Helper class provides common initialization methods for OpenCV library.
+ */
+public class OpenCVLoader
+{
+ /**
+ * OpenCV Library version 2.4.2.
+ */
+ public static final String OPENCV_VERSION_2_4_2 = "2.4.2";
+
+ /**
+ * OpenCV Library version 2.4.3.
+ */
+ public static final String OPENCV_VERSION_2_4_3 = "2.4.3";
+
+ /**
+ * OpenCV Library version 2.4.4.
+ */
+ public static final String OPENCV_VERSION_2_4_4 = "2.4.4";
+
+ /**
+ * OpenCV Library version 2.4.5.
+ */
+ public static final String OPENCV_VERSION_2_4_5 = "2.4.5";
+
+ /**
+ * OpenCV Library version 2.4.6.
+ */
+ public static final String OPENCV_VERSION_2_4_6 = "2.4.6";
+
+ /**
+ * OpenCV Library version 2.4.7.
+ */
+ public static final String OPENCV_VERSION_2_4_7 = "2.4.7";
+
+ /**
+ * OpenCV Library version 2.4.8.
+ */
+ public static final String OPENCV_VERSION_2_4_8 = "2.4.8";
+
+ /**
+ * OpenCV Library version 2.4.9.
+ */
+ public static final String OPENCV_VERSION_2_4_9 = "2.4.9";
+
+ /**
+ * OpenCV Library version 2.4.10.
+ */
+ public static final String OPENCV_VERSION_2_4_10 = "2.4.10";
+
+ /**
+ * OpenCV Library version 2.4.11.
+ */
+ public static final String OPENCV_VERSION_2_4_11 = "2.4.11";
+
+ /**
+ * OpenCV Library version 2.4.12.
+ */
+ public static final String OPENCV_VERSION_2_4_12 = "2.4.12";
+
+ /**
+ * OpenCV Library version 2.4.13.
+ */
+ public static final String OPENCV_VERSION_2_4_13 = "2.4.13";
+
+ /**
+ * OpenCV Library version 3.0.0.
+ */
+ public static final String OPENCV_VERSION_3_0_0 = "3.0.0";
+
+ /**
+ * OpenCV Library version 3.1.0.
+ */
+ public static final String OPENCV_VERSION_3_1_0 = "3.1.0";
+
+ /**
+ * OpenCV Library version 3.2.0.
+ */
+ public static final String OPENCV_VERSION_3_2_0 = "3.2.0";
+
+ /**
+ * OpenCV Library version 3.3.0.
+ */
+ public static final String OPENCV_VERSION_3_3_0 = "3.3.0";
+
+ /**
+ * Current OpenCV Library version
+ */
+ public static final String OPENCV_VERSION = "3.3.1";
+
+
+ /**
+ * Loads and initializes OpenCV library from current application package. Roughly, it's an analog of system.loadLibrary("opencv_java").
+ * @return Returns true is initialization of OpenCV was successful.
+ */
+ public static boolean initDebug()
+ {
+ return StaticHelper.initOpenCV(false);
+ }
+
+ /**
+ * Loads and initializes OpenCV library from current application package. Roughly, it's an analog of system.loadLibrary("opencv_java").
+ * @param InitCuda load and initialize CUDA runtime libraries.
+ * @return Returns true is initialization of OpenCV was successful.
+ */
+ public static boolean initDebug(boolean InitCuda)
+ {
+ return StaticHelper.initOpenCV(InitCuda);
+ }
+
+ /**
+ * Loads and initializes OpenCV library using OpenCV Engine service.
+ * @param Version OpenCV library version.
+ * @param AppContext application context for connecting to the service.
+ * @param Callback object, that implements LoaderCallbackInterface for handling the connection status.
+ * @return Returns true if initialization of OpenCV is successful.
+ */
+ public static boolean initAsync(String Version, Context AppContext,
+ LoaderCallbackInterface Callback)
+ {
+ return AsyncServiceHelper.initOpenCV(Version, AppContext, Callback);
+ }
+}
diff --git a/library/src/main/java/org/opencv/android/StaticHelper.java b/library/src/main/java/org/opencv/android/StaticHelper.java
new file mode 100644
index 0000000..36f9f6f
--- /dev/null
+++ b/library/src/main/java/org/opencv/android/StaticHelper.java
@@ -0,0 +1,104 @@
+package org.opencv.android;
+
+import org.opencv.core.Core;
+
+import java.util.StringTokenizer;
+import android.util.Log;
+
+class StaticHelper {
+
+ public static boolean initOpenCV(boolean InitCuda)
+ {
+ boolean result;
+ String libs = "";
+
+ if(InitCuda)
+ {
+ loadLibrary("cudart");
+ loadLibrary("nppc");
+ loadLibrary("nppi");
+ loadLibrary("npps");
+ loadLibrary("cufft");
+ loadLibrary("cublas");
+ }
+
+ Log.d(TAG, "Trying to get library list");
+
+ try
+ {
+ System.loadLibrary("opencv_info");
+ libs = getLibraryList();
+ }
+ catch(UnsatisfiedLinkError e)
+ {
+ Log.e(TAG, "OpenCV error: Cannot load info library for OpenCV");
+ }
+
+ Log.d(TAG, "Library list: \"" + libs + "\"");
+ Log.d(TAG, "First attempt to load libs");
+ if (initOpenCVLibs(libs))
+ {
+ Log.d(TAG, "First attempt to load libs is OK");
+ String eol = System.getProperty("line.separator");
+ for (String str : Core.getBuildInformation().split(eol))
+ Log.i(TAG, str);
+
+ result = true;
+ }
+ else
+ {
+ Log.d(TAG, "First attempt to load libs fails");
+ result = false;
+ }
+
+ return result;
+ }
+
+ private static boolean loadLibrary(String Name)
+ {
+ boolean result = true;
+
+ Log.d(TAG, "Trying to load library " + Name);
+ try
+ {
+ System.loadLibrary(Name);
+ Log.d(TAG, "Library " + Name + " loaded");
+ }
+ catch(UnsatisfiedLinkError e)
+ {
+ Log.d(TAG, "Cannot load library \"" + Name + "\"");
+ e.printStackTrace();
+ result &= false;
+ }
+
+ return result;
+ }
+
+ private static boolean initOpenCVLibs(String Libs)
+ {
+ Log.d(TAG, "Trying to init OpenCV libs");
+
+ boolean result = true;
+
+ if ((null != Libs) && (Libs.length() != 0))
+ {
+ Log.d(TAG, "Trying to load libs by dependency list");
+ StringTokenizer splitter = new StringTokenizer(Libs, ";");
+ while(splitter.hasMoreTokens())
+ {
+ result &= loadLibrary(splitter.nextToken());
+ }
+ }
+ else
+ {
+ // If dependencies list is not defined or empty.
+ result &= loadLibrary("opencv_java3");
+ }
+
+ return result;
+ }
+
+ private static final String TAG = "OpenCV/StaticHelper";
+
+ private static native String getLibraryList();
+}
diff --git a/library/src/main/java/org/opencv/android/Utils.java b/library/src/main/java/org/opencv/android/Utils.java
new file mode 100644
index 0000000..404c986
--- /dev/null
+++ b/library/src/main/java/org/opencv/android/Utils.java
@@ -0,0 +1,139 @@
+package org.opencv.android;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+
+import org.opencv.core.CvException;
+import org.opencv.core.CvType;
+import org.opencv.core.Mat;
+import org.opencv.imgcodecs.Imgcodecs;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class Utils {
+
+ public static String exportResource(Context context, int resourceId) {
+ return exportResource(context, resourceId, "OpenCV_data");
+ }
+
+ public static String exportResource(Context context, int resourceId, String dirname) {
+ String fullname = context.getResources().getString(resourceId);
+ String resName = fullname.substring(fullname.lastIndexOf("/") + 1);
+ try {
+ InputStream is = context.getResources().openRawResource(resourceId);
+ File resDir = context.getDir(dirname, Context.MODE_PRIVATE);
+ File resFile = new File(resDir, resName);
+
+ FileOutputStream os = new FileOutputStream(resFile);
+
+ byte[] buffer = new byte[4096];
+ int bytesRead;
+ while ((bytesRead = is.read(buffer)) != -1) {
+ os.write(buffer, 0, bytesRead);
+ }
+ is.close();
+ os.close();
+
+ return resFile.getAbsolutePath();
+ } catch (IOException e) {
+ e.printStackTrace();
+ throw new CvException("Failed to export resource " + resName
+ + ". Exception thrown: " + e);
+ }
+ }
+
+ public static Mat loadResource(Context context, int resourceId) throws IOException
+ {
+ return loadResource(context, resourceId, -1);
+ }
+
+ public static Mat loadResource(Context context, int resourceId, int flags) throws IOException
+ {
+ InputStream is = context.getResources().openRawResource(resourceId);
+ ByteArrayOutputStream os = new ByteArrayOutputStream(is.available());
+
+ byte[] buffer = new byte[4096];
+ int bytesRead;
+ while ((bytesRead = is.read(buffer)) != -1) {
+ os.write(buffer, 0, bytesRead);
+ }
+ is.close();
+
+ Mat encoded = new Mat(1, os.size(), CvType.CV_8U);
+ encoded.put(0, 0, os.toByteArray());
+ os.close();
+
+ Mat decoded = Imgcodecs.imdecode(encoded, flags);
+ encoded.release();
+
+ return decoded;
+ }
+
+ /**
+ * Converts Android Bitmap to OpenCV Mat.
+ *
+ * This function converts an Android Bitmap image to the OpenCV Mat.
+ *
'ARGB_8888' and 'RGB_565' input Bitmap formats are supported.
+ *
The output Mat is always created of the same size as the input Bitmap and of the 'CV_8UC4' type,
+ * it keeps the image in RGBA format.
+ *
This function throws an exception if the conversion fails.
+ * @param bmp is a valid input Bitmap object of the type 'ARGB_8888' or 'RGB_565'.
+ * @param mat is a valid output Mat object, it will be reallocated if needed, so it may be empty.
+ * @param unPremultiplyAlpha is a flag, that determines, whether the bitmap needs to be converted from alpha premultiplied format (like Android keeps 'ARGB_8888' ones) to regular one; this flag is ignored for 'RGB_565' bitmaps.
+ */
+ public static void bitmapToMat(Bitmap bmp, Mat mat, boolean unPremultiplyAlpha) {
+ if (bmp == null)
+ throw new java.lang.IllegalArgumentException("bmp == null");
+ if (mat == null)
+ throw new java.lang.IllegalArgumentException("mat == null");
+ nBitmapToMat2(bmp, mat.nativeObj, unPremultiplyAlpha);
+ }
+
+ /**
+ * Short form of the bitmapToMat(bmp, mat, unPremultiplyAlpha=false).
+ * @param bmp is a valid input Bitmap object of the type 'ARGB_8888' or 'RGB_565'.
+ * @param mat is a valid output Mat object, it will be reallocated if needed, so Mat may be empty.
+ */
+ public static void bitmapToMat(Bitmap bmp, Mat mat) {
+ bitmapToMat(bmp, mat, false);
+ }
+
+
+ /**
+ * Converts OpenCV Mat to Android Bitmap.
+ *
+ *
This function converts an image in the OpenCV Mat representation to the Android Bitmap.
+ *
The input Mat object has to be of the types 'CV_8UC1' (gray-scale), 'CV_8UC3' (RGB) or 'CV_8UC4' (RGBA).
+ *
The output Bitmap object has to be of the same size as the input Mat and of the types 'ARGB_8888' or 'RGB_565'.
+ *
This function throws an exception if the conversion fails.
+ *
+ * @param mat is a valid input Mat object of types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
+ * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
+ * @param premultiplyAlpha is a flag, that determines, whether the Mat needs to be converted to alpha premultiplied format (like Android keeps 'ARGB_8888' bitmaps); the flag is ignored for 'RGB_565' bitmaps.
+ */
+ public static void matToBitmap(Mat mat, Bitmap bmp, boolean premultiplyAlpha) {
+ if (mat == null)
+ throw new java.lang.IllegalArgumentException("mat == null");
+ if (bmp == null)
+ throw new java.lang.IllegalArgumentException("bmp == null");
+ nMatToBitmap2(mat.nativeObj, bmp, premultiplyAlpha);
+ }
+
+ /**
+ * Short form of the matToBitmap(mat, bmp, premultiplyAlpha=false)
+ * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
+ * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
+ */
+ public static void matToBitmap(Mat mat, Bitmap bmp) {
+ matToBitmap(mat, bmp, false);
+ }
+
+
+ private static native void nBitmapToMat2(Bitmap b, long m_addr, boolean unPremultiplyAlpha);
+
+ private static native void nMatToBitmap2(long m_addr, Bitmap b, boolean premultiplyAlpha);
+}
diff --git a/library/src/main/java/org/opencv/calib3d/Calib3d.java b/library/src/main/java/org/opencv/calib3d/Calib3d.java
new file mode 100644
index 0000000..0453c4f
--- /dev/null
+++ b/library/src/main/java/org/opencv/calib3d/Calib3d.java
@@ -0,0 +1,1571 @@
+
+//
+// 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,
+ SOLVEPNP_AP3P = 5,
+ SOLVEPNP_MAX_COUNT = 5+1,
+ 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_TILTED_MODEL = 0x40000,
+ CALIB_FIX_TAUX_TAUY = 0x80000,
+ CALIB_USE_QR = 0x100000,
+ CALIB_FIX_TANGENT_DIST = 0x200000,
+ CALIB_SAME_FOCAL_LENGTH = 0x00200,
+ CALIB_ZERO_DISPARITY = 0x00400,
+ CALIB_USE_LU = (1 << 17),
+ FM_7POINT = 1,
+ FM_8POINT = 2,
+ FM_LMEDS = 4,
+ FM_RANSAC = 8;
+
+
+ //
+ // C++: Mat estimateAffine2D(Mat from, Mat to, Mat& inliers = Mat(), int method = RANSAC, double ransacReprojThreshold = 3, size_t maxIters = 2000, double confidence = 0.99, size_t refineIters = 10)
+ //
+
+ //javadoc: estimateAffine2D(from, to, inliers, method, ransacReprojThreshold, maxIters, confidence, refineIters)
+ public static Mat estimateAffine2D(Mat from, Mat to, Mat inliers, int method, double ransacReprojThreshold, long maxIters, double confidence, long refineIters)
+ {
+
+ Mat retVal = new Mat(estimateAffine2D_0(from.nativeObj, to.nativeObj, inliers.nativeObj, method, ransacReprojThreshold, maxIters, confidence, refineIters));
+
+ return retVal;
+ }
+
+ //javadoc: estimateAffine2D(from, to)
+ public static Mat estimateAffine2D(Mat from, Mat to)
+ {
+
+ Mat retVal = new Mat(estimateAffine2D_1(from.nativeObj, to.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat estimateAffinePartial2D(Mat from, Mat to, Mat& inliers = Mat(), int method = RANSAC, double ransacReprojThreshold = 3, size_t maxIters = 2000, double confidence = 0.99, size_t refineIters = 10)
+ //
+
+ //javadoc: estimateAffinePartial2D(from, to, inliers, method, ransacReprojThreshold, maxIters, confidence, refineIters)
+ public static Mat estimateAffinePartial2D(Mat from, Mat to, Mat inliers, int method, double ransacReprojThreshold, long maxIters, double confidence, long refineIters)
+ {
+
+ Mat retVal = new Mat(estimateAffinePartial2D_0(from.nativeObj, to.nativeObj, inliers.nativeObj, method, ransacReprojThreshold, maxIters, confidence, refineIters));
+
+ return retVal;
+ }
+
+ //javadoc: estimateAffinePartial2D(from, to)
+ public static Mat estimateAffinePartial2D(Mat from, Mat to)
+ {
+
+ Mat retVal = new Mat(estimateAffinePartial2D_1(from.nativeObj, to.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat findEssentialMat(Mat points1, Mat points2, Mat cameraMatrix, int method = RANSAC, double prob = 0.999, double threshold = 1.0, Mat& mask = Mat())
+ //
+
+ //javadoc: findEssentialMat(points1, points2, cameraMatrix, method, prob, threshold, mask)
+ public static Mat findEssentialMat(Mat points1, Mat points2, Mat cameraMatrix, int method, double prob, double threshold, Mat mask)
+ {
+
+ Mat retVal = new Mat(findEssentialMat_0(points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, method, prob, threshold, mask.nativeObj));
+
+ return retVal;
+ }
+
+ //javadoc: findEssentialMat(points1, points2, cameraMatrix, method, prob, threshold)
+ public static Mat findEssentialMat(Mat points1, Mat points2, Mat cameraMatrix, int method, double prob, double threshold)
+ {
+
+ Mat retVal = new Mat(findEssentialMat_1(points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, method, prob, threshold));
+
+ return retVal;
+ }
+
+ //javadoc: findEssentialMat(points1, points2, cameraMatrix)
+ public static Mat findEssentialMat(Mat points1, Mat points2, Mat cameraMatrix)
+ {
+
+ Mat retVal = new Mat(findEssentialMat_2(points1.nativeObj, points2.nativeObj, cameraMatrix.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_3(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_4(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_5(points1.nativeObj, points2.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // 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 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++: 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++: 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 objectPoints, List imagePoints, Size imageSize, double aspectRatio)
+ {
+ List objectPoints_tmplm = new ArrayList((objectPoints != null) ? objectPoints.size() : 0);
+ Mat objectPoints_mat = Converters.vector_vector_Point3f_to_Mat(objectPoints, objectPoints_tmplm);
+ List imagePoints_tmplm = new ArrayList((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 objectPoints, List imagePoints, Size imageSize)
+ {
+ List objectPoints_tmplm = new ArrayList((objectPoints != null) ? objectPoints.size() : 0);
+ Mat objectPoints_mat = Converters.vector_vector_Point3f_to_Mat(objectPoints, objectPoints_tmplm);
+ List imagePoints_tmplm = new ArrayList((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++: 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++: 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++: 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++: bool findCirclesGrid(Mat image, Size patternSize, Mat& centers, int flags, Ptr_FeatureDetector blobDetector, CirclesGridFinderParameters parameters)
+ //
+
+ // Unknown type 'Ptr_FeatureDetector' (I), skipping the function
+
+
+ //
+ // 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++: bool findCirclesGrid2(Mat image, Size patternSize, Mat& centers, int flags, Ptr_FeatureDetector blobDetector, CirclesGridFinderParameters2 parameters)
+ //
+
+ // Unknown type 'Ptr_FeatureDetector' (I), skipping the function
+
+
+ //
+ // 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++: 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++: double calibrateCamera(vector_Mat objectPoints, vector_Mat imagePoints, Size imageSize, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, Mat& stdDeviationsIntrinsics, Mat& stdDeviationsExtrinsics, Mat& perViewErrors, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
+ //
+
+ //javadoc: calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, stdDeviationsIntrinsics, stdDeviationsExtrinsics, perViewErrors, flags, criteria)
+ public static double calibrateCameraExtended(List objectPoints, List imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List rvecs, List tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors, 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 = calibrateCameraExtended_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, stdDeviationsIntrinsics.nativeObj, stdDeviationsExtrinsics.nativeObj, perViewErrors.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, stdDeviationsIntrinsics, stdDeviationsExtrinsics, perViewErrors, flags)
+ public static double calibrateCameraExtended(List objectPoints, List imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List rvecs, List tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors, 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 = calibrateCameraExtended_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, stdDeviationsIntrinsics.nativeObj, stdDeviationsExtrinsics.nativeObj, perViewErrors.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, stdDeviationsIntrinsics, stdDeviationsExtrinsics, perViewErrors)
+ public static double calibrateCameraExtended(List objectPoints, List imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List rvecs, List tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors)
+ {
+ 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 = calibrateCameraExtended_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, stdDeviationsIntrinsics.nativeObj, stdDeviationsExtrinsics.nativeObj, perViewErrors.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++: 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 objectPoints, List imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List rvecs, List 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 objectPoints, List imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List rvecs, List 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 objectPoints, List imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List rvecs, List 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++: double sampsonDistance(Mat pt1, Mat pt2, Mat F)
+ //
+
+ //javadoc: sampsonDistance(pt1, pt2, F)
+ public static double sampsonDistance(Mat pt1, Mat pt2, Mat F)
+ {
+
+ double retVal = sampsonDistance_0(pt1.nativeObj, pt2.nativeObj, F.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // 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 objectPoints, List imagePoints1, List 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_0(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 objectPoints, List imagePoints1, List 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_1(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 objectPoints, List imagePoints1, List 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_2(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++: 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 objectPoints, List imagePoints, Size image_size, Mat K, Mat D, List rvecs, List 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 objectPoints, List imagePoints, Size image_size, Mat K, Mat D, List rvecs, List 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 objectPoints, List imagePoints, Size image_size, Mat K, Mat D, List rvecs, List 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++: 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 objectPoints, List imagePoints1, List 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_3(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 objectPoints, List imagePoints1, List 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_4(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 objectPoints, List imagePoints1, List 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_5(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++: 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 imgpt1, List 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++: 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 rotations, List translations, List 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++: 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 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++: int recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat& R, Mat& t, Mat& mask = Mat())
+ //
+
+ //javadoc: recoverPose(E, points1, points2, cameraMatrix, R, t, mask)
+ public static int recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat R, Mat t, Mat mask)
+ {
+
+ int retVal = recoverPose_3(E.nativeObj, points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, R.nativeObj, t.nativeObj, mask.nativeObj);
+
+ return retVal;
+ }
+
+ //javadoc: recoverPose(E, points1, points2, cameraMatrix, R, t)
+ public static int recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat R, Mat t)
+ {
+
+ int retVal = recoverPose_4(E.nativeObj, points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, R.nativeObj, t.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat& R, Mat& t, double distanceThresh, Mat& mask = Mat(), Mat& triangulatedPoints = Mat())
+ //
+
+ //javadoc: recoverPose(E, points1, points2, cameraMatrix, R, t, distanceThresh, mask, triangulatedPoints)
+ public static int recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat R, Mat t, double distanceThresh, Mat mask, Mat triangulatedPoints)
+ {
+
+ int retVal = recoverPose_5(E.nativeObj, points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, R.nativeObj, t.nativeObj, distanceThresh, mask.nativeObj, triangulatedPoints.nativeObj);
+
+ return retVal;
+ }
+
+ //javadoc: recoverPose(E, points1, points2, cameraMatrix, R, t, distanceThresh)
+ public static int recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat R, Mat t, double distanceThresh)
+ {
+
+ int retVal = recoverPose_6(E.nativeObj, points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, R.nativeObj, t.nativeObj, distanceThresh);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int solveP3P(Mat objectPoints, Mat imagePoints, Mat cameraMatrix, Mat distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, int flags)
+ //
+
+ //javadoc: solveP3P(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvecs, tvecs, flags)
+ public static int solveP3P(Mat objectPoints, Mat imagePoints, Mat cameraMatrix, Mat distCoeffs, List rvecs, List tvecs, int flags)
+ {
+ Mat rvecs_mat = new Mat();
+ Mat tvecs_mat = new Mat();
+ int retVal = solveP3P_0(objectPoints.nativeObj, imagePoints.nativeObj, 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;
+ }
+
+
+ //
+ // 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++: 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++: 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 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 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++: 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 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 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++: 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 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++: 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++: 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 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_0(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_1(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj);
+
+ 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++: 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_0(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_1(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++: 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 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 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 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++: 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 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_2(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_3(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, K.nativeObj, D.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // 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_2(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_3(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++: 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 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++: Mat estimateAffine2D(Mat from, Mat to, Mat& inliers = Mat(), int method = RANSAC, double ransacReprojThreshold = 3, size_t maxIters = 2000, double confidence = 0.99, size_t refineIters = 10)
+ private static native long estimateAffine2D_0(long from_nativeObj, long to_nativeObj, long inliers_nativeObj, int method, double ransacReprojThreshold, long maxIters, double confidence, long refineIters);
+ private static native long estimateAffine2D_1(long from_nativeObj, long to_nativeObj);
+
+ // C++: Mat estimateAffinePartial2D(Mat from, Mat to, Mat& inliers = Mat(), int method = RANSAC, double ransacReprojThreshold = 3, size_t maxIters = 2000, double confidence = 0.99, size_t refineIters = 10)
+ private static native long estimateAffinePartial2D_0(long from_nativeObj, long to_nativeObj, long inliers_nativeObj, int method, double ransacReprojThreshold, long maxIters, double confidence, long refineIters);
+ private static native long estimateAffinePartial2D_1(long from_nativeObj, long to_nativeObj);
+
+ // C++: Mat findEssentialMat(Mat points1, Mat points2, Mat cameraMatrix, 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, long cameraMatrix_nativeObj, int method, double prob, double threshold, long mask_nativeObj);
+ private static native long findEssentialMat_1(long points1_nativeObj, long points2_nativeObj, long cameraMatrix_nativeObj, int method, double prob, double threshold);
+ private static native long findEssentialMat_2(long points1_nativeObj, long points2_nativeObj, long cameraMatrix_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_3(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_4(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_5(long points1_nativeObj, long points2_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 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++: 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++: 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++: 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++: 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++: 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++: 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++: 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++: 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++: double calibrateCamera(vector_Mat objectPoints, vector_Mat imagePoints, Size imageSize, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, Mat& stdDeviationsIntrinsics, Mat& stdDeviationsExtrinsics, Mat& perViewErrors, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
+ private static native double calibrateCameraExtended_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, long stdDeviationsIntrinsics_nativeObj, long stdDeviationsExtrinsics_nativeObj, long perViewErrors_nativeObj, int flags, int criteria_type, int criteria_maxCount, double criteria_epsilon);
+ private static native double calibrateCameraExtended_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, long stdDeviationsIntrinsics_nativeObj, long stdDeviationsExtrinsics_nativeObj, long perViewErrors_nativeObj, int flags);
+ private static native double calibrateCameraExtended_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, long stdDeviationsIntrinsics_nativeObj, long stdDeviationsExtrinsics_nativeObj, long perViewErrors_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++: double sampsonDistance(Mat pt1, Mat pt2, Mat F)
+ private static native double sampsonDistance_0(long pt1_nativeObj, long pt2_nativeObj, long F_nativeObj);
+
+ // 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_0(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_1(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_2(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++: 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++: 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_3(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_4(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_5(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++: 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++: 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);
+
+ // 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 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++: int recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat& R, Mat& t, Mat& mask = Mat())
+ private static native int recoverPose_3(long E_nativeObj, long points1_nativeObj, long points2_nativeObj, long cameraMatrix_nativeObj, long R_nativeObj, long t_nativeObj, long mask_nativeObj);
+ private static native int recoverPose_4(long E_nativeObj, long points1_nativeObj, long points2_nativeObj, long cameraMatrix_nativeObj, long R_nativeObj, long t_nativeObj);
+
+ // C++: int recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat& R, Mat& t, double distanceThresh, Mat& mask = Mat(), Mat& triangulatedPoints = Mat())
+ private static native int recoverPose_5(long E_nativeObj, long points1_nativeObj, long points2_nativeObj, long cameraMatrix_nativeObj, long R_nativeObj, long t_nativeObj, double distanceThresh, long mask_nativeObj, long triangulatedPoints_nativeObj);
+ private static native int recoverPose_6(long E_nativeObj, long points1_nativeObj, long points2_nativeObj, long cameraMatrix_nativeObj, long R_nativeObj, long t_nativeObj, double distanceThresh);
+
+ // C++: int solveP3P(Mat objectPoints, Mat imagePoints, Mat cameraMatrix, Mat distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, int flags)
+ private static native int solveP3P_0(long objectPoints_nativeObj, long imagePoints_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long rvecs_mat_nativeObj, long tvecs_mat_nativeObj, int flags);
+
+ // 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++: 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++: 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 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 convertPointsFromHomogeneous(Mat src, Mat& dst)
+ private static native void convertPointsFromHomogeneous_0(long src_nativeObj, long dst_nativeObj);
+
+ // C++: void convertPointsToHomogeneous(Mat src, Mat& dst)
+ private static native void convertPointsToHomogeneous_0(long src_nativeObj, long dst_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 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++: 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 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++: 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++: 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 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_0(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_1(long objectPoints_mat_nativeObj, long rvec_nativeObj, long tvec_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_mat_nativeObj, long imagePoints_mat_nativeObj);
+
+ // 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++: 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_0(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_1(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++: 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 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 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 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++: 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 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_2(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_3(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, long rvec_nativeObj, long tvec_nativeObj, long K_nativeObj, long D_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_2(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_3(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++: 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 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);
+
+}
diff --git a/library/src/main/java/org/opencv/calib3d/StereoBM.java b/library/src/main/java/org/opencv/calib3d/StereoBM.java
new file mode 100644
index 0000000..18aba05
--- /dev/null
+++ b/library/src/main/java/org/opencv/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++: 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;
+ }
+
+
+ //
+ // C++: Rect getROI1()
+ //
+
+ //javadoc: StereoBM::getROI1()
+ public Rect getROI1()
+ {
+
+ Rect retVal = new Rect(getROI1_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Rect getROI2()
+ //
+
+ //javadoc: StereoBM::getROI2()
+ public Rect getROI2()
+ {
+
+ Rect retVal = new Rect(getROI2_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getPreFilterCap()
+ //
+
+ //javadoc: StereoBM::getPreFilterCap()
+ public int getPreFilterCap()
+ {
+
+ int retVal = getPreFilterCap_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getPreFilterSize()
+ //
+
+ //javadoc: StereoBM::getPreFilterSize()
+ public int getPreFilterSize()
+ {
+
+ int retVal = getPreFilterSize_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getPreFilterType()
+ //
+
+ //javadoc: StereoBM::getPreFilterType()
+ public int getPreFilterType()
+ {
+
+ int retVal = getPreFilterType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getSmallerBlockSize()
+ //
+
+ //javadoc: StereoBM::getSmallerBlockSize()
+ public int getSmallerBlockSize()
+ {
+
+ int retVal = getSmallerBlockSize_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getTextureThreshold()
+ //
+
+ //javadoc: StereoBM::getTextureThreshold()
+ public int getTextureThreshold()
+ {
+
+ int retVal = getTextureThreshold_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getUniquenessRatio()
+ //
+
+ //javadoc: StereoBM::getUniquenessRatio()
+ public int getUniquenessRatio()
+ {
+
+ int retVal = getUniquenessRatio_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setPreFilterCap(int preFilterCap)
+ //
+
+ //javadoc: StereoBM::setPreFilterCap(preFilterCap)
+ public void setPreFilterCap(int preFilterCap)
+ {
+
+ setPreFilterCap_0(nativeObj, preFilterCap);
+
+ return;
+ }
+
+
+ //
+ // C++: void setPreFilterSize(int preFilterSize)
+ //
+
+ //javadoc: StereoBM::setPreFilterSize(preFilterSize)
+ public void setPreFilterSize(int preFilterSize)
+ {
+
+ setPreFilterSize_0(nativeObj, preFilterSize);
+
+ return;
+ }
+
+
+ //
+ // C++: void setPreFilterType(int preFilterType)
+ //
+
+ //javadoc: StereoBM::setPreFilterType(preFilterType)
+ public void setPreFilterType(int preFilterType)
+ {
+
+ setPreFilterType_0(nativeObj, preFilterType);
+
+ return;
+ }
+
+
+ //
+ // 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++: 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++: void setSmallerBlockSize(int blockSize)
+ //
+
+ //javadoc: StereoBM::setSmallerBlockSize(blockSize)
+ public void setSmallerBlockSize(int blockSize)
+ {
+
+ setSmallerBlockSize_0(nativeObj, blockSize);
+
+ return;
+ }
+
+
+ //
+ // C++: void setTextureThreshold(int textureThreshold)
+ //
+
+ //javadoc: StereoBM::setTextureThreshold(textureThreshold)
+ public void setTextureThreshold(int textureThreshold)
+ {
+
+ setTextureThreshold_0(nativeObj, textureThreshold);
+
+ return;
+ }
+
+
+ //
+ // C++: void setUniquenessRatio(int uniquenessRatio)
+ //
+
+ //javadoc: StereoBM::setUniquenessRatio(uniquenessRatio)
+ public void setUniquenessRatio(int uniquenessRatio)
+ {
+
+ setUniquenessRatio_0(nativeObj, uniquenessRatio);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // 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();
+
+ // C++: Rect getROI1()
+ private static native double[] getROI1_0(long nativeObj);
+
+ // C++: Rect getROI2()
+ private static native double[] getROI2_0(long nativeObj);
+
+ // C++: int getPreFilterCap()
+ private static native int getPreFilterCap_0(long nativeObj);
+
+ // C++: int getPreFilterSize()
+ private static native int getPreFilterSize_0(long nativeObj);
+
+ // C++: int getPreFilterType()
+ private static native int getPreFilterType_0(long nativeObj);
+
+ // C++: int getSmallerBlockSize()
+ private static native int getSmallerBlockSize_0(long nativeObj);
+
+ // C++: int getTextureThreshold()
+ private static native int getTextureThreshold_0(long nativeObj);
+
+ // C++: int getUniquenessRatio()
+ private static native int getUniquenessRatio_0(long nativeObj);
+
+ // C++: void setPreFilterCap(int preFilterCap)
+ private static native void setPreFilterCap_0(long nativeObj, int preFilterCap);
+
+ // C++: void setPreFilterSize(int preFilterSize)
+ private static native void setPreFilterSize_0(long nativeObj, int preFilterSize);
+
+ // C++: void setPreFilterType(int preFilterType)
+ private static native void setPreFilterType_0(long nativeObj, int preFilterType);
+
+ // 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++: 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++: void setSmallerBlockSize(int blockSize)
+ private static native void setSmallerBlockSize_0(long nativeObj, int blockSize);
+
+ // C++: void setTextureThreshold(int textureThreshold)
+ private static native void setTextureThreshold_0(long nativeObj, int textureThreshold);
+
+ // C++: void setUniquenessRatio(int uniquenessRatio)
+ private static native void setUniquenessRatio_0(long nativeObj, int uniquenessRatio);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/calib3d/StereoMatcher.java b/library/src/main/java/org/opencv/calib3d/StereoMatcher.java
new file mode 100644
index 0000000..6b3c4f6
--- /dev/null
+++ b/library/src/main/java/org/opencv/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++: int getBlockSize()
+ //
+
+ //javadoc: StereoMatcher::getBlockSize()
+ public int getBlockSize()
+ {
+
+ int retVal = getBlockSize_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getDisp12MaxDiff()
+ //
+
+ //javadoc: StereoMatcher::getDisp12MaxDiff()
+ public int getDisp12MaxDiff()
+ {
+
+ int retVal = getDisp12MaxDiff_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getMinDisparity()
+ //
+
+ //javadoc: StereoMatcher::getMinDisparity()
+ public int getMinDisparity()
+ {
+
+ int retVal = getMinDisparity_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getNumDisparities()
+ //
+
+ //javadoc: StereoMatcher::getNumDisparities()
+ public int getNumDisparities()
+ {
+
+ int retVal = getNumDisparities_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getSpeckleRange()
+ //
+
+ //javadoc: StereoMatcher::getSpeckleRange()
+ public int getSpeckleRange()
+ {
+
+ int retVal = getSpeckleRange_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getSpeckleWindowSize()
+ //
+
+ //javadoc: StereoMatcher::getSpeckleWindowSize()
+ public int getSpeckleWindowSize()
+ {
+
+ int retVal = getSpeckleWindowSize_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // 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++: void setBlockSize(int blockSize)
+ //
+
+ //javadoc: StereoMatcher::setBlockSize(blockSize)
+ public void setBlockSize(int blockSize)
+ {
+
+ setBlockSize_0(nativeObj, blockSize);
+
+ return;
+ }
+
+
+ //
+ // C++: void setDisp12MaxDiff(int disp12MaxDiff)
+ //
+
+ //javadoc: StereoMatcher::setDisp12MaxDiff(disp12MaxDiff)
+ public void setDisp12MaxDiff(int disp12MaxDiff)
+ {
+
+ setDisp12MaxDiff_0(nativeObj, disp12MaxDiff);
+
+ return;
+ }
+
+
+ //
+ // C++: void setMinDisparity(int minDisparity)
+ //
+
+ //javadoc: StereoMatcher::setMinDisparity(minDisparity)
+ public void setMinDisparity(int minDisparity)
+ {
+
+ setMinDisparity_0(nativeObj, minDisparity);
+
+ return;
+ }
+
+
+ //
+ // C++: void setNumDisparities(int numDisparities)
+ //
+
+ //javadoc: StereoMatcher::setNumDisparities(numDisparities)
+ public void setNumDisparities(int numDisparities)
+ {
+
+ setNumDisparities_0(nativeObj, numDisparities);
+
+ return;
+ }
+
+
+ //
+ // C++: void setSpeckleRange(int speckleRange)
+ //
+
+ //javadoc: StereoMatcher::setSpeckleRange(speckleRange)
+ public void setSpeckleRange(int speckleRange)
+ {
+
+ setSpeckleRange_0(nativeObj, speckleRange);
+
+ return;
+ }
+
+
+ //
+ // C++: void setSpeckleWindowSize(int speckleWindowSize)
+ //
+
+ //javadoc: StereoMatcher::setSpeckleWindowSize(speckleWindowSize)
+ public void setSpeckleWindowSize(int speckleWindowSize)
+ {
+
+ setSpeckleWindowSize_0(nativeObj, speckleWindowSize);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: int getBlockSize()
+ private static native int getBlockSize_0(long nativeObj);
+
+ // C++: int getDisp12MaxDiff()
+ private static native int getDisp12MaxDiff_0(long nativeObj);
+
+ // C++: int getMinDisparity()
+ private static native int getMinDisparity_0(long nativeObj);
+
+ // C++: int getNumDisparities()
+ private static native int getNumDisparities_0(long nativeObj);
+
+ // C++: int getSpeckleRange()
+ private static native int getSpeckleRange_0(long nativeObj);
+
+ // C++: int getSpeckleWindowSize()
+ private static native int getSpeckleWindowSize_0(long 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++: void setBlockSize(int blockSize)
+ private static native void setBlockSize_0(long nativeObj, int blockSize);
+
+ // C++: void setDisp12MaxDiff(int disp12MaxDiff)
+ private static native void setDisp12MaxDiff_0(long nativeObj, int disp12MaxDiff);
+
+ // C++: void setMinDisparity(int minDisparity)
+ private static native void setMinDisparity_0(long nativeObj, int minDisparity);
+
+ // C++: void setNumDisparities(int numDisparities)
+ private static native void setNumDisparities_0(long nativeObj, int numDisparities);
+
+ // C++: void setSpeckleRange(int speckleRange)
+ private static native void setSpeckleRange_0(long nativeObj, int speckleRange);
+
+ // C++: void setSpeckleWindowSize(int speckleWindowSize)
+ private static native void setSpeckleWindowSize_0(long nativeObj, int speckleWindowSize);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/calib3d/StereoSGBM.java b/library/src/main/java/org/opencv/calib3d/StereoSGBM.java
new file mode 100644
index 0000000..d1d7b59
--- /dev/null
+++ b/library/src/main/java/org/opencv/calib3d/StereoSGBM.java
@@ -0,0 +1,230 @@
+
+//
+// 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,
+ MODE_SGBM_3WAY = 2,
+ MODE_HH4 = 3;
+
+
+ //
+ // C++: static Ptr_StereoSGBM create(int minDisparity = 0, int numDisparities = 16, int blockSize = 3, 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()
+ public static StereoSGBM create()
+ {
+
+ StereoSGBM retVal = new StereoSGBM(create_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getMode()
+ //
+
+ //javadoc: StereoSGBM::getMode()
+ public int getMode()
+ {
+
+ int retVal = getMode_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getP1()
+ //
+
+ //javadoc: StereoSGBM::getP1()
+ public int getP1()
+ {
+
+ int retVal = getP1_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getP2()
+ //
+
+ //javadoc: StereoSGBM::getP2()
+ public int getP2()
+ {
+
+ int retVal = getP2_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getPreFilterCap()
+ //
+
+ //javadoc: StereoSGBM::getPreFilterCap()
+ public int getPreFilterCap()
+ {
+
+ int retVal = getPreFilterCap_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getUniquenessRatio()
+ //
+
+ //javadoc: StereoSGBM::getUniquenessRatio()
+ public int getUniquenessRatio()
+ {
+
+ int retVal = getUniquenessRatio_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setMode(int mode)
+ //
+
+ //javadoc: StereoSGBM::setMode(mode)
+ public void setMode(int mode)
+ {
+
+ setMode_0(nativeObj, mode);
+
+ return;
+ }
+
+
+ //
+ // C++: void setP1(int P1)
+ //
+
+ //javadoc: StereoSGBM::setP1(P1)
+ public void setP1(int P1)
+ {
+
+ setP1_0(nativeObj, P1);
+
+ return;
+ }
+
+
+ //
+ // C++: void setP2(int P2)
+ //
+
+ //javadoc: StereoSGBM::setP2(P2)
+ public void setP2(int P2)
+ {
+
+ setP2_0(nativeObj, P2);
+
+ return;
+ }
+
+
+ //
+ // C++: void setPreFilterCap(int preFilterCap)
+ //
+
+ //javadoc: StereoSGBM::setPreFilterCap(preFilterCap)
+ public void setPreFilterCap(int preFilterCap)
+ {
+
+ setPreFilterCap_0(nativeObj, preFilterCap);
+
+ return;
+ }
+
+
+ //
+ // C++: void setUniquenessRatio(int uniquenessRatio)
+ //
+
+ //javadoc: StereoSGBM::setUniquenessRatio(uniquenessRatio)
+ public void setUniquenessRatio(int uniquenessRatio)
+ {
+
+ setUniquenessRatio_0(nativeObj, uniquenessRatio);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: static Ptr_StereoSGBM create(int minDisparity = 0, int numDisparities = 16, int blockSize = 3, 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();
+
+ // C++: int getMode()
+ private static native int getMode_0(long nativeObj);
+
+ // C++: int getP1()
+ private static native int getP1_0(long nativeObj);
+
+ // C++: int getP2()
+ private static native int getP2_0(long nativeObj);
+
+ // C++: int getPreFilterCap()
+ private static native int getPreFilterCap_0(long nativeObj);
+
+ // C++: int getUniquenessRatio()
+ private static native int getUniquenessRatio_0(long nativeObj);
+
+ // C++: void setMode(int mode)
+ private static native void setMode_0(long nativeObj, int mode);
+
+ // C++: void setP1(int P1)
+ private static native void setP1_0(long nativeObj, int P1);
+
+ // C++: void setP2(int P2)
+ private static native void setP2_0(long nativeObj, int P2);
+
+ // C++: void setPreFilterCap(int preFilterCap)
+ private static native void setPreFilterCap_0(long nativeObj, int preFilterCap);
+
+ // C++: void setUniquenessRatio(int uniquenessRatio)
+ private static native void setUniquenessRatio_0(long nativeObj, int uniquenessRatio);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/core/Algorithm.java b/library/src/main/java/org/opencv/core/Algorithm.java
new file mode 100644
index 0000000..8437104
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/Algorithm.java
@@ -0,0 +1,79 @@
+
+//
+// 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; }
+
+ public long getNativeObjAddr() { return nativeObj; }
+
+ //
+ // C++: String getDefaultName()
+ //
+
+ //javadoc: Algorithm::getDefaultName()
+ public String getDefaultName()
+ {
+
+ String retVal = getDefaultName_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // 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;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: String getDefaultName()
+ private static native String getDefaultName_0(long 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);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/core/Core.java b/library/src/main/java/org/opencv/core/Core.java
new file mode 100644
index 0000000..5f63c0b
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/Core.java
@@ -0,0 +1,2742 @@
+
+//
+// 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.3.1"; }
+ private static String getNativeLibraryName() { return "opencv_java331"; }
+ private static int getVersionMajor() { return 3; }
+ private static int getVersionMinor() { return 3; }
+ private static int getVersionRevision() { return 1; }
+ private static String getVersionStatus() { return ""; }
+
+ 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,
+ DFT_COMPLEX_INPUT = 64,
+ 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,
+ ROTATE_90_CLOCKWISE = 0,
+ ROTATE_180 = 1,
+ ROTATE_90_COUNTERCLOCKWISE = 2,
+ TYPE_GENERAL = 0,
+ TYPE_MARKER = 0+1,
+ TYPE_WRAPPER = 0+2,
+ TYPE_FUN = 0+3,
+ IMPL_PLAIN = 0,
+ IMPL_IPP = 0+1,
+ IMPL_OPENCL = 0+2,
+ FLAGS_NONE = 0,
+ FLAGS_MAPPING = 0x01,
+ FLAGS_EXPAND_SAME_NAMES = 0x02;
+
+
+ //
+ // 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++: Scalar sum(Mat src)
+ //
+
+ //javadoc: sum(src)
+ public static Scalar sumElems(Mat src)
+ {
+
+ Scalar retVal = new Scalar(sumElems_0(src.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++: String getBuildInformation()
+ //
+
+ //javadoc: getBuildInformation()
+ public static String getBuildInformation()
+ {
+
+ String retVal = getBuildInformation_0();
+
+ return retVal;
+ }
+
+
+ //
+ // C++: String getIppVersion()
+ //
+
+ //javadoc: getIppVersion()
+ public static String getIppVersion()
+ {
+
+ String retVal = getIppVersion_0();
+
+ return retVal;
+ }
+
+
+ //
+ // 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++: 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++: 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++: bool useIPP()
+ //
+
+ //javadoc: useIPP()
+ public static boolean useIPP()
+ {
+
+ boolean retVal = useIPP_0();
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool useIPP_NE()
+ //
+
+ //javadoc: useIPP_NE()
+ public static boolean useIPP_NE()
+ {
+
+ boolean retVal = useIPP_NE_0();
+
+ return retVal;
+ }
+
+
+ //
+ // 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++: 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++: double determinant(Mat mtx)
+ //
+
+ //javadoc: determinant(mtx)
+ public static double determinant(Mat mtx)
+ {
+
+ double retVal = determinant_0(mtx.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double getTickFrequency()
+ //
+
+ //javadoc: getTickFrequency()
+ public static double getTickFrequency()
+ {
+
+ double retVal = getTickFrequency_0();
+
+ 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++: 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++: 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_0(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_1(src1.nativeObj, src2.nativeObj, normType);
+
+ return retVal;
+ }
+
+ //javadoc: norm(src1, src2)
+ public static double norm(Mat src1, Mat src2)
+ {
+
+ double retVal = norm_2(src1.nativeObj, src2.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // 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_3(src1.nativeObj, normType, mask.nativeObj);
+
+ return retVal;
+ }
+
+ //javadoc: norm(src1, normType)
+ public static double norm(Mat src1, int normType)
+ {
+
+ double retVal = norm_4(src1.nativeObj, normType);
+
+ return retVal;
+ }
+
+ //javadoc: norm(src1)
+ public static double norm(Mat src1)
+ {
+
+ double retVal = norm_5(src1.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++: 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++: 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++: int countNonZero(Mat src)
+ //
+
+ //javadoc: countNonZero(src)
+ public static int countNonZero(Mat src)
+ {
+
+ int retVal = countNonZero_0(src.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getNumThreads()
+ //
+
+ //javadoc: getNumThreads()
+ public static int getNumThreads()
+ {
+
+ int retVal = getNumThreads_0();
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getNumberOfCPUs()
+ //
+
+ //javadoc: getNumberOfCPUs()
+ public static int getNumberOfCPUs()
+ {
+
+ int retVal = getNumberOfCPUs_0();
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getOptimalDFTSize(int vecsize)
+ //
+
+ //javadoc: getOptimalDFTSize(vecsize)
+ public static int getOptimalDFTSize(int vecsize)
+ {
+
+ int retVal = getOptimalDFTSize_0(vecsize);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getThreadNum()
+ //
+
+ //javadoc: getThreadNum()
+ public static int getThreadNum()
+ {
+
+ int retVal = getThreadNum_0();
+
+ return retVal;
+ }
+
+
+ //
+ // 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++: int64 getCPUTickCount()
+ //
+
+ //javadoc: getCPUTickCount()
+ public static long getCPUTickCount()
+ {
+
+ long retVal = getCPUTickCount_0();
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int64 getTickCount()
+ //
+
+ //javadoc: getTickCount()
+ public static long getTickCount()
+ {
+
+ long retVal = getTickCount_0();
+
+ 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 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 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_0(data.nativeObj, mean.nativeObj, eigenvectors.nativeObj, retainedVariance);
+
+ 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_1(data.nativeObj, mean.nativeObj, eigenvectors.nativeObj, maxComponents);
+
+ return;
+ }
+
+ //javadoc: PCACompute(data, mean, eigenvectors)
+ public static void PCACompute(Mat data, Mat mean, Mat eigenvectors)
+ {
+
+ PCACompute_2(data.nativeObj, mean.nativeObj, eigenvectors.nativeObj);
+
+ 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 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++: 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 absdiff(Mat src1, Mat src2, Mat& dst)
+ //
+
+ //javadoc: absdiff(src1, src2, dst)
+ public static void absdiff(Mat src1, Mat src2, Mat dst)
+ {
+
+ absdiff_0(src1.nativeObj, src2.nativeObj, 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_1(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj);
+
+ 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 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 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 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++: 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_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 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 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 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 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_0(src1.nativeObj, src2.nativeObj, dst.nativeObj, cmpop);
+
+ 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_1(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj, cmpop);
+
+ 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 convertFp16(Mat src, Mat& dst)
+ //
+
+ //javadoc: convertFp16(src, dst)
+ public static void convertFp16(Mat src, Mat dst)
+ {
+
+ convertFp16_0(src.nativeObj, 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++: 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 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 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 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(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_3(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_4(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_5(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], 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_6(scale, src2.nativeObj, dst.nativeObj, dtype);
+
+ return;
+ }
+
+ //javadoc: divide(scale, src2, dst)
+ public static void divide(double scale, Mat src2, Mat dst)
+ {
+
+ divide_7(scale, src2.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void eigenNonSymmetric(Mat src, Mat& eigenvalues, Mat& eigenvectors)
+ //
+
+ //javadoc: eigenNonSymmetric(src, eigenvalues, eigenvectors)
+ public static void eigenNonSymmetric(Mat src, Mat eigenvalues, Mat eigenvectors)
+ {
+
+ eigenNonSymmetric_0(src.nativeObj, eigenvalues.nativeObj, eigenvectors.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 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 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++: 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 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 hconcat(vector_Mat src, Mat& dst)
+ //
+
+ //javadoc: hconcat(src, dst)
+ public static void hconcat(List src, Mat dst)
+ {
+ Mat src_mat = Converters.vector_Mat_to_Mat(src);
+ hconcat_0(src_mat.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;
+ }
+
+
+ //
+ // 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 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 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 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 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++: void max(Mat src1, Mat src2, Mat& dst)
+ //
+
+ //javadoc: max(src1, src2, dst)
+ public static void max(Mat src1, Mat src2, Mat dst)
+ {
+
+ max_0(src1.nativeObj, src2.nativeObj, 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_1(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // 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++: void merge(vector_Mat mv, Mat& dst)
+ //
+
+ //javadoc: merge(mv, dst)
+ public static void merge(List mv, Mat dst)
+ {
+ Mat mv_mat = Converters.vector_Mat_to_Mat(mv);
+ merge_0(mv_mat.nativeObj, dst.nativeObj);
+
+ 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_0(src1.nativeObj, src2.nativeObj, dst.nativeObj);
+
+ 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_1(src1.nativeObj, src2.val[0], src2.val[1], src2.val[2], src2.val[3], dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void mixChannels(vector_Mat src, vector_Mat dst, vector_int fromTo)
+ //
+
+ //javadoc: mixChannels(src, dst, fromTo)
+ public static void mixChannels(List src, List 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 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++: 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 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 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 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 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 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 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 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 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 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++: 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 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 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++: 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 rotate(Mat src, Mat& dst, int rotateCode)
+ //
+
+ //javadoc: rotate(src, dst, rotateCode)
+ public static void rotate(Mat src, Mat dst, int rotateCode)
+ {
+
+ rotate_0(src.nativeObj, dst.nativeObj, rotateCode);
+
+ 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 setErrorVerbosity(bool verbose)
+ //
+
+ //javadoc: setErrorVerbosity(verbose)
+ public static void setErrorVerbosity(boolean verbose)
+ {
+
+ setErrorVerbosity_0(verbose);
+
+ 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++: void setNumThreads(int nthreads)
+ //
+
+ //javadoc: setNumThreads(nthreads)
+ public static void setNumThreads(int nthreads)
+ {
+
+ setNumThreads_0(nthreads);
+
+ return;
+ }
+
+
+ //
+ // C++: void setRNGSeed(int seed)
+ //
+
+ //javadoc: setRNGSeed(seed)
+ public static void setRNGSeed(int seed)
+ {
+
+ setRNGSeed_0(seed);
+
+ return;
+ }
+
+
+ //
+ // 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++: void split(Mat m, vector_Mat& mv)
+ //
+
+ //javadoc: split(m, mv)
+ public static void split(Mat m, List 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 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 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 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 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 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 vconcat(vector_Mat src, Mat& dst)
+ //
+
+ //javadoc: vconcat(src, dst)
+ public static void vconcat(List src, Mat dst)
+ {
+ Mat src_mat = Converters.vector_Mat_to_Mat(src);
+ vconcat_0(src_mat.nativeObj, dst.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void setUseIPP(bool flag)
+ //
+
+ //javadoc: setUseIPP(flag)
+ public static void setUseIPP(boolean flag)
+ {
+
+ setUseIPP_0(flag);
+
+ return;
+ }
+
+
+ //
+ // C++: void setUseIPP_NE(bool flag)
+ //
+
+ //javadoc: setUseIPP_NE(flag)
+ public static void setUseIPP_NE(boolean flag)
+ {
+
+ setUseIPP_NE_0(flag);
+
+ 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++: 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++: Scalar sum(Mat src)
+ private static native double[] sumElems_0(long src_nativeObj);
+
+ // C++: Scalar trace(Mat mtx)
+ private static native double[] trace_0(long mtx_nativeObj);
+
+ // C++: String getBuildInformation()
+ private static native String getBuildInformation_0();
+
+ // C++: String getIppVersion()
+ private static native String getIppVersion_0();
+
+ // 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++: 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++: 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++: bool useIPP()
+ private static native boolean useIPP_0();
+
+ // C++: bool useIPP_NE()
+ private static native boolean useIPP_NE_0();
+
+ // 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++: double PSNR(Mat src1, Mat src2)
+ private static native double PSNR_0(long src1_nativeObj, long src2_nativeObj);
+
+ // C++: double determinant(Mat mtx)
+ private static native double determinant_0(long mtx_nativeObj);
+
+ // C++: double getTickFrequency()
+ private static native double getTickFrequency_0();
+
+ // 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++: 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++: double norm(Mat src1, Mat src2, int normType = NORM_L2, Mat mask = Mat())
+ private static native double norm_0(long src1_nativeObj, long src2_nativeObj, int normType, long mask_nativeObj);
+ private static native double norm_1(long src1_nativeObj, long src2_nativeObj, int normType);
+ private static native double norm_2(long src1_nativeObj, long src2_nativeObj);
+
+ // C++: double norm(Mat src1, int normType = NORM_L2, Mat mask = Mat())
+ private static native double norm_3(long src1_nativeObj, int normType, long mask_nativeObj);
+ private static native double norm_4(long src1_nativeObj, int normType);
+ private static native double norm_5(long src1_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++: 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++: int borderInterpolate(int p, int len, int borderType)
+ private static native int borderInterpolate_0(int p, int len, int borderType);
+
+ // C++: int countNonZero(Mat src)
+ private static native int countNonZero_0(long src_nativeObj);
+
+ // C++: int getNumThreads()
+ private static native int getNumThreads_0();
+
+ // C++: int getNumberOfCPUs()
+ private static native int getNumberOfCPUs_0();
+
+ // C++: int getOptimalDFTSize(int vecsize)
+ private static native int getOptimalDFTSize_0(int vecsize);
+
+ // C++: int getThreadNum()
+ private static native int getThreadNum_0();
+
+ // C++: int solveCubic(Mat coeffs, Mat& roots)
+ private static native int solveCubic_0(long coeffs_nativeObj, long roots_nativeObj);
+
+ // C++: int64 getCPUTickCount()
+ private static native long getCPUTickCount_0();
+
+ // C++: int64 getTickCount()
+ private static native long getTickCount_0();
+
+ // 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 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 PCACompute(Mat data, Mat& mean, Mat& eigenvectors, double retainedVariance)
+ private static native void PCACompute_0(long data_nativeObj, long mean_nativeObj, long eigenvectors_nativeObj, double retainedVariance);
+
+ // C++: void PCACompute(Mat data, Mat& mean, Mat& eigenvectors, int maxComponents = 0)
+ private static native void PCACompute_1(long data_nativeObj, long mean_nativeObj, long eigenvectors_nativeObj, int maxComponents);
+ private static native void PCACompute_2(long data_nativeObj, long mean_nativeObj, long eigenvectors_nativeObj);
+
+ // 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 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++: 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 absdiff(Mat src1, Mat src2, Mat& dst)
+ private static native void absdiff_0(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+ // C++: void absdiff(Mat src1, Scalar src2, Mat& dst)
+ private static native void absdiff_1(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj);
+
+ // 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 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 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 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++: 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_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 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 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 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 compare(Mat src1, Mat src2, Mat& dst, int cmpop)
+ private static native void compare_0(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj, int cmpop);
+
+ // C++: void compare(Mat src1, Scalar src2, Mat& dst, int cmpop)
+ private static native void compare_1(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj, int cmpop);
+
+ // 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 convertFp16(Mat src, Mat& dst)
+ private static native void convertFp16_0(long src_nativeObj, 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++: 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 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 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 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(Mat src1, Scalar src2, Mat& dst, double scale = 1, int dtype = -1)
+ private static native void divide_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 divide_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 divide_5(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_nativeObj);
+
+ // C++: void divide(double scale, Mat src2, Mat& dst, int dtype = -1)
+ private static native void divide_6(double scale, long src2_nativeObj, long dst_nativeObj, int dtype);
+ private static native void divide_7(double scale, long src2_nativeObj, long dst_nativeObj);
+
+ // C++: void eigenNonSymmetric(Mat src, Mat& eigenvalues, Mat& eigenvectors)
+ private static native void eigenNonSymmetric_0(long src_nativeObj, long eigenvalues_nativeObj, long eigenvectors_nativeObj);
+
+ // C++: void exp(Mat src, Mat& dst)
+ private static native void exp_0(long src_nativeObj, long dst_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 findNonZero(Mat src, Mat& idx)
+ private static native void findNonZero_0(long src_nativeObj, long idx_nativeObj);
+
+ // 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 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 hconcat(vector_Mat src, Mat& dst)
+ private static native void hconcat_0(long src_mat_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);
+
+ // 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 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 insertChannel(Mat src, Mat& dst, int coi)
+ private static native void insertChannel_0(long src_nativeObj, long dst_nativeObj, int coi);
+
+ // C++: void log(Mat src, Mat& dst)
+ private static native void log_0(long src_nativeObj, long dst_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++: void max(Mat src1, Mat src2, Mat& dst)
+ private static native void max_0(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+ // C++: void max(Mat src1, Scalar src2, Mat& dst)
+ private static native void max_1(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_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++: void merge(vector_Mat mv, Mat& dst)
+ private static native void merge_0(long mv_mat_nativeObj, long dst_nativeObj);
+
+ // C++: void min(Mat src1, Mat src2, Mat& dst)
+ private static native void min_0(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+ // C++: void min(Mat src1, Scalar src2, Mat& dst)
+ private static native void min_1(long src1_nativeObj, double src2_val0, double src2_val1, double src2_val2, double src2_val3, long dst_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 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++: 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 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 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 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 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 perspectiveTransform(Mat src, Mat& dst, Mat m)
+ private static native void perspectiveTransform_0(long src_nativeObj, long dst_nativeObj, long m_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 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 pow(Mat src, double power, Mat& dst)
+ private static native void pow_0(long src_nativeObj, double power, long dst_nativeObj);
+
+ // 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++: void randn(Mat& dst, double mean, double stddev)
+ private static native void randn_0(long dst_nativeObj, double mean, double stddev);
+
+ // C++: void randu(Mat& dst, double low, double high)
+ private static native void randu_0(long dst_nativeObj, double low, double high);
+
+ // 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++: 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 rotate(Mat src, Mat& dst, int rotateCode)
+ private static native void rotate_0(long src_nativeObj, long dst_nativeObj, int rotateCode);
+
+ // 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 setErrorVerbosity(bool verbose)
+ private static native void setErrorVerbosity_0(boolean verbose);
+
+ // 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++: void setNumThreads(int nthreads)
+ private static native void setNumThreads_0(int nthreads);
+
+ // C++: void setRNGSeed(int seed)
+ private static native void setRNGSeed_0(int seed);
+
+ // 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++: void split(Mat m, vector_Mat& mv)
+ private static native void split_0(long m_nativeObj, long mv_mat_nativeObj);
+
+ // C++: void sqrt(Mat src, Mat& dst)
+ private static native void sqrt_0(long src_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 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 transform(Mat src, Mat& dst, Mat m)
+ private static native void transform_0(long src_nativeObj, long dst_nativeObj, long m_nativeObj);
+
+ // C++: void transpose(Mat src, Mat& dst)
+ private static native void transpose_0(long src_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 setUseIPP(bool flag)
+ private static native void setUseIPP_0(boolean flag);
+
+ // C++: void setUseIPP_NE(bool flag)
+ private static native void setUseIPP_NE_0(boolean flag);
+private static native double[] n_minMaxLocManual(long src_nativeObj, long mask_nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/core/CvException.java b/library/src/main/java/org/opencv/core/CvException.java
new file mode 100644
index 0000000..e9241e6
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/CvException.java
@@ -0,0 +1,15 @@
+package org.opencv.core;
+
+public class CvException extends RuntimeException {
+
+ private static final long serialVersionUID = 1L;
+
+ public CvException(String msg) {
+ super(msg);
+ }
+
+ @Override
+ public String toString() {
+ return "CvException [" + super.toString() + "]";
+ }
+}
diff --git a/library/src/main/java/org/opencv/core/CvType.java b/library/src/main/java/org/opencv/core/CvType.java
new file mode 100644
index 0000000..748c1cd
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/CvType.java
@@ -0,0 +1,136 @@
+package org.opencv.core;
+
+public final class CvType {
+
+ // type depth constants
+ public 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;
+
+ // predefined type constants
+ public static final int
+ CV_8UC1 = CV_8UC(1), CV_8UC2 = CV_8UC(2), CV_8UC3 = CV_8UC(3), CV_8UC4 = CV_8UC(4),
+ CV_8SC1 = CV_8SC(1), CV_8SC2 = CV_8SC(2), CV_8SC3 = CV_8SC(3), CV_8SC4 = CV_8SC(4),
+ CV_16UC1 = CV_16UC(1), CV_16UC2 = CV_16UC(2), CV_16UC3 = CV_16UC(3), CV_16UC4 = CV_16UC(4),
+ CV_16SC1 = CV_16SC(1), CV_16SC2 = CV_16SC(2), CV_16SC3 = CV_16SC(3), CV_16SC4 = CV_16SC(4),
+ CV_32SC1 = CV_32SC(1), CV_32SC2 = CV_32SC(2), CV_32SC3 = CV_32SC(3), CV_32SC4 = CV_32SC(4),
+ CV_32FC1 = CV_32FC(1), CV_32FC2 = CV_32FC(2), CV_32FC3 = CV_32FC(3), CV_32FC4 = CV_32FC(4),
+ CV_64FC1 = CV_64FC(1), CV_64FC2 = CV_64FC(2), CV_64FC3 = CV_64FC(3), CV_64FC4 = CV_64FC(4);
+
+ private static final int CV_CN_MAX = 512, CV_CN_SHIFT = 3, CV_DEPTH_MAX = (1 << CV_CN_SHIFT);
+
+ public static final int makeType(int depth, int channels) {
+ if (channels <= 0 || channels >= CV_CN_MAX) {
+ throw new java.lang.UnsupportedOperationException(
+ "Channels count should be 1.." + (CV_CN_MAX - 1));
+ }
+ if (depth < 0 || depth >= CV_DEPTH_MAX) {
+ throw new java.lang.UnsupportedOperationException(
+ "Data type depth should be 0.." + (CV_DEPTH_MAX - 1));
+ }
+ return (depth & (CV_DEPTH_MAX - 1)) + ((channels - 1) << CV_CN_SHIFT);
+ }
+
+ public static final int CV_8UC(int ch) {
+ return makeType(CV_8U, ch);
+ }
+
+ public static final int CV_8SC(int ch) {
+ return makeType(CV_8S, ch);
+ }
+
+ public static final int CV_16UC(int ch) {
+ return makeType(CV_16U, ch);
+ }
+
+ public static final int CV_16SC(int ch) {
+ return makeType(CV_16S, ch);
+ }
+
+ public static final int CV_32SC(int ch) {
+ return makeType(CV_32S, ch);
+ }
+
+ public static final int CV_32FC(int ch) {
+ return makeType(CV_32F, ch);
+ }
+
+ public static final int CV_64FC(int ch) {
+ return makeType(CV_64F, ch);
+ }
+
+ public static final int channels(int type) {
+ return (type >> CV_CN_SHIFT) + 1;
+ }
+
+ public static final int depth(int type) {
+ return type & (CV_DEPTH_MAX - 1);
+ }
+
+ public static final boolean isInteger(int type) {
+ return depth(type) < CV_32F;
+ }
+
+ public static final int ELEM_SIZE(int type) {
+ switch (depth(type)) {
+ case CV_8U:
+ case CV_8S:
+ return channels(type);
+ case CV_16U:
+ case CV_16S:
+ return 2 * channels(type);
+ case CV_32S:
+ case CV_32F:
+ return 4 * channels(type);
+ case CV_64F:
+ return 8 * channels(type);
+ default:
+ throw new java.lang.UnsupportedOperationException(
+ "Unsupported CvType value: " + type);
+ }
+ }
+
+ public static final String typeToString(int type) {
+ String s;
+ switch (depth(type)) {
+ case CV_8U:
+ s = "CV_8U";
+ break;
+ case CV_8S:
+ s = "CV_8S";
+ break;
+ case CV_16U:
+ s = "CV_16U";
+ break;
+ case CV_16S:
+ s = "CV_16S";
+ break;
+ case CV_32S:
+ s = "CV_32S";
+ break;
+ case CV_32F:
+ s = "CV_32F";
+ break;
+ case CV_64F:
+ s = "CV_64F";
+ break;
+ case CV_USRTYPE1:
+ s = "CV_USRTYPE1";
+ break;
+ default:
+ throw new java.lang.UnsupportedOperationException(
+ "Unsupported CvType value: " + type);
+ }
+
+ int ch = channels(type);
+ if (ch <= 4)
+ return s + "C" + ch;
+ else
+ return s + "C(" + ch + ")";
+ }
+
+}
diff --git a/library/src/main/java/org/opencv/core/DMatch.java b/library/src/main/java/org/opencv/core/DMatch.java
new file mode 100644
index 0000000..db44d9a
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/DMatch.java
@@ -0,0 +1,58 @@
+package org.opencv.core;
+
+//C++: class DMatch
+
+/**
+ * Structure for matching: query descriptor index, train descriptor index, train
+ * image index and distance between descriptors.
+ */
+public class DMatch {
+
+ /**
+ * Query descriptor index.
+ */
+ public int queryIdx;
+ /**
+ * Train descriptor index.
+ */
+ public int trainIdx;
+ /**
+ * Train image index.
+ */
+ public int imgIdx;
+
+ // javadoc: DMatch::distance
+ public float distance;
+
+ // javadoc: DMatch::DMatch()
+ public DMatch() {
+ this(-1, -1, Float.MAX_VALUE);
+ }
+
+ // javadoc: DMatch::DMatch(_queryIdx, _trainIdx, _distance)
+ public DMatch(int _queryIdx, int _trainIdx, float _distance) {
+ queryIdx = _queryIdx;
+ trainIdx = _trainIdx;
+ imgIdx = -1;
+ distance = _distance;
+ }
+
+ // javadoc: DMatch::DMatch(_queryIdx, _trainIdx, _imgIdx, _distance)
+ public DMatch(int _queryIdx, int _trainIdx, int _imgIdx, float _distance) {
+ queryIdx = _queryIdx;
+ trainIdx = _trainIdx;
+ imgIdx = _imgIdx;
+ distance = _distance;
+ }
+
+ public boolean lessThan(DMatch it) {
+ return distance < it.distance;
+ }
+
+ @Override
+ public String toString() {
+ return "DMatch [queryIdx=" + queryIdx + ", trainIdx=" + trainIdx
+ + ", imgIdx=" + imgIdx + ", distance=" + distance + "]";
+ }
+
+}
diff --git a/library/src/main/java/org/opencv/core/KeyPoint.java b/library/src/main/java/org/opencv/core/KeyPoint.java
new file mode 100644
index 0000000..de5b215
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/KeyPoint.java
@@ -0,0 +1,83 @@
+package org.opencv.core;
+
+import org.opencv.core.Point;
+
+//javadoc: KeyPoint
+public class KeyPoint {
+
+ /**
+ * Coordinates of the keypoint.
+ */
+ public Point pt;
+ /**
+ * Diameter of the useful keypoint adjacent area.
+ */
+ public float size;
+ /**
+ * Computed orientation of the keypoint (-1 if not applicable).
+ */
+ public float angle;
+ /**
+ * The response, by which the strongest keypoints have been selected. Can
+ * be used for further sorting or subsampling.
+ */
+ public float response;
+ /**
+ * Octave (pyramid layer), from which the keypoint has been extracted.
+ */
+ public int octave;
+ /**
+ * Object ID, that can be used to cluster keypoints by an object they
+ * belong to.
+ */
+ public int class_id;
+
+ // javadoc:KeyPoint::KeyPoint(x,y,_size,_angle,_response,_octave,_class_id)
+ public KeyPoint(float x, float y, float _size, float _angle, float _response, int _octave, int _class_id)
+ {
+ pt = new Point(x, y);
+ size = _size;
+ angle = _angle;
+ response = _response;
+ octave = _octave;
+ class_id = _class_id;
+ }
+
+ // javadoc: KeyPoint::KeyPoint()
+ public KeyPoint()
+ {
+ this(0, 0, 0, -1, 0, 0, -1);
+ }
+
+ // javadoc: KeyPoint::KeyPoint(x, y, _size, _angle, _response, _octave)
+ public KeyPoint(float x, float y, float _size, float _angle, float _response, int _octave)
+ {
+ this(x, y, _size, _angle, _response, _octave, -1);
+ }
+
+ // javadoc: KeyPoint::KeyPoint(x, y, _size, _angle, _response)
+ public KeyPoint(float x, float y, float _size, float _angle, float _response)
+ {
+ this(x, y, _size, _angle, _response, 0, -1);
+ }
+
+ // javadoc: KeyPoint::KeyPoint(x, y, _size, _angle)
+ public KeyPoint(float x, float y, float _size, float _angle)
+ {
+ this(x, y, _size, _angle, 0, 0, -1);
+ }
+
+ // javadoc: KeyPoint::KeyPoint(x, y, _size)
+ public KeyPoint(float x, float y, float _size)
+ {
+ this(x, y, _size, -1, 0, 0, -1);
+ }
+
+ @Override
+ public String toString() {
+ return "KeyPoint [pt=" + pt + ", size=" + size + ", angle=" + angle
+ + ", response=" + response + ", octave=" + octave
+ + ", class_id=" + class_id + "]";
+ }
+
+}
diff --git a/library/src/main/java/org/opencv/core/Mat.java b/library/src/main/java/org/opencv/core/Mat.java
new file mode 100644
index 0000000..6db2554
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/Mat.java
@@ -0,0 +1,1316 @@
+package org.opencv.core;
+
+// C++: class Mat
+//javadoc: Mat
+public class Mat {
+
+ public final long nativeObj;
+
+ public Mat(long addr)
+ {
+ if (addr == 0)
+ throw new java.lang.UnsupportedOperationException("Native object address is NULL");
+ nativeObj = addr;
+ }
+
+ //
+ // C++: Mat::Mat()
+ //
+
+ // javadoc: Mat::Mat()
+ public Mat()
+ {
+
+ nativeObj = n_Mat();
+
+ return;
+ }
+
+ //
+ // C++: Mat::Mat(int rows, int cols, int type)
+ //
+
+ // javadoc: Mat::Mat(rows, cols, type)
+ public Mat(int rows, int cols, int type)
+ {
+
+ nativeObj = n_Mat(rows, cols, type);
+
+ return;
+ }
+
+ //
+ // C++: Mat::Mat(Size size, int type)
+ //
+
+ // javadoc: Mat::Mat(size, type)
+ public Mat(Size size, int type)
+ {
+
+ nativeObj = n_Mat(size.width, size.height, type);
+
+ return;
+ }
+
+ //
+ // C++: Mat::Mat(int rows, int cols, int type, Scalar s)
+ //
+
+ // javadoc: Mat::Mat(rows, cols, type, s)
+ public Mat(int rows, int cols, int type, Scalar s)
+ {
+
+ nativeObj = n_Mat(rows, cols, type, s.val[0], s.val[1], s.val[2], s.val[3]);
+
+ return;
+ }
+
+ //
+ // C++: Mat::Mat(Size size, int type, Scalar s)
+ //
+
+ // javadoc: Mat::Mat(size, type, s)
+ public Mat(Size size, int type, Scalar s)
+ {
+
+ nativeObj = n_Mat(size.width, size.height, type, s.val[0], s.val[1], s.val[2], s.val[3]);
+
+ return;
+ }
+
+ //
+ // C++: Mat::Mat(Mat m, Range rowRange, Range colRange = Range::all())
+ //
+
+ // javadoc: Mat::Mat(m, rowRange, colRange)
+ public Mat(Mat m, Range rowRange, Range colRange)
+ {
+
+ nativeObj = n_Mat(m.nativeObj, rowRange.start, rowRange.end, colRange.start, colRange.end);
+
+ return;
+ }
+
+ // javadoc: Mat::Mat(m, rowRange)
+ public Mat(Mat m, Range rowRange)
+ {
+
+ nativeObj = n_Mat(m.nativeObj, rowRange.start, rowRange.end);
+
+ return;
+ }
+
+ //
+ // C++: Mat::Mat(Mat m, Rect roi)
+ //
+
+ // javadoc: Mat::Mat(m, roi)
+ public Mat(Mat m, Rect roi)
+ {
+
+ nativeObj = n_Mat(m.nativeObj, roi.y, roi.y + roi.height, roi.x, roi.x + roi.width);
+
+ return;
+ }
+
+ //
+ // C++: Mat Mat::adjustROI(int dtop, int dbottom, int dleft, int dright)
+ //
+
+ // javadoc: Mat::adjustROI(dtop, dbottom, dleft, dright)
+ public Mat adjustROI(int dtop, int dbottom, int dleft, int dright)
+ {
+
+ Mat retVal = new Mat(n_adjustROI(nativeObj, dtop, dbottom, dleft, dright));
+
+ return retVal;
+ }
+
+ //
+ // C++: void Mat::assignTo(Mat m, int type = -1)
+ //
+
+ // javadoc: Mat::assignTo(m, type)
+ public void assignTo(Mat m, int type)
+ {
+
+ n_assignTo(nativeObj, m.nativeObj, type);
+
+ return;
+ }
+
+ // javadoc: Mat::assignTo(m)
+ public void assignTo(Mat m)
+ {
+
+ n_assignTo(nativeObj, m.nativeObj);
+
+ return;
+ }
+
+ //
+ // C++: int Mat::channels()
+ //
+
+ // javadoc: Mat::channels()
+ public int channels()
+ {
+
+ int retVal = n_channels(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: int Mat::checkVector(int elemChannels, int depth = -1, bool
+ // requireContinuous = true)
+ //
+
+ // javadoc: Mat::checkVector(elemChannels, depth, requireContinuous)
+ public int checkVector(int elemChannels, int depth, boolean requireContinuous)
+ {
+
+ int retVal = n_checkVector(nativeObj, elemChannels, depth, requireContinuous);
+
+ return retVal;
+ }
+
+ // javadoc: Mat::checkVector(elemChannels, depth)
+ public int checkVector(int elemChannels, int depth)
+ {
+
+ int retVal = n_checkVector(nativeObj, elemChannels, depth);
+
+ return retVal;
+ }
+
+ // javadoc: Mat::checkVector(elemChannels)
+ public int checkVector(int elemChannels)
+ {
+
+ int retVal = n_checkVector(nativeObj, elemChannels);
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::clone()
+ //
+
+ // javadoc: Mat::clone()
+ public Mat clone()
+ {
+
+ Mat retVal = new Mat(n_clone(nativeObj));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::col(int x)
+ //
+
+ // javadoc: Mat::col(x)
+ public Mat col(int x)
+ {
+
+ Mat retVal = new Mat(n_col(nativeObj, x));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::colRange(int startcol, int endcol)
+ //
+
+ // javadoc: Mat::colRange(startcol, endcol)
+ public Mat colRange(int startcol, int endcol)
+ {
+
+ Mat retVal = new Mat(n_colRange(nativeObj, startcol, endcol));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::colRange(Range r)
+ //
+
+ // javadoc: Mat::colRange(r)
+ public Mat colRange(Range r)
+ {
+
+ Mat retVal = new Mat(n_colRange(nativeObj, r.start, r.end));
+
+ return retVal;
+ }
+
+ //
+ // C++: int Mat::dims()
+ //
+
+ // javadoc: Mat::dims()
+ public int dims()
+ {
+
+ int retVal = n_dims(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: int Mat::cols()
+ //
+
+ // javadoc: Mat::cols()
+ public int cols()
+ {
+
+ int retVal = n_cols(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: void Mat::convertTo(Mat& m, int rtype, double alpha = 1, double beta
+ // = 0)
+ //
+
+ // javadoc: Mat::convertTo(m, rtype, alpha, beta)
+ public void convertTo(Mat m, int rtype, double alpha, double beta)
+ {
+
+ n_convertTo(nativeObj, m.nativeObj, rtype, alpha, beta);
+
+ return;
+ }
+
+ // javadoc: Mat::convertTo(m, rtype, alpha)
+ public void convertTo(Mat m, int rtype, double alpha)
+ {
+
+ n_convertTo(nativeObj, m.nativeObj, rtype, alpha);
+
+ return;
+ }
+
+ // javadoc: Mat::convertTo(m, rtype)
+ public void convertTo(Mat m, int rtype)
+ {
+
+ n_convertTo(nativeObj, m.nativeObj, rtype);
+
+ return;
+ }
+
+ //
+ // C++: void Mat::copyTo(Mat& m)
+ //
+
+ // javadoc: Mat::copyTo(m)
+ public void copyTo(Mat m)
+ {
+
+ n_copyTo(nativeObj, m.nativeObj);
+
+ return;
+ }
+
+ //
+ // C++: void Mat::copyTo(Mat& m, Mat mask)
+ //
+
+ // javadoc: Mat::copyTo(m, mask)
+ public void copyTo(Mat m, Mat mask)
+ {
+
+ n_copyTo(nativeObj, m.nativeObj, mask.nativeObj);
+
+ return;
+ }
+
+ //
+ // C++: void Mat::create(int rows, int cols, int type)
+ //
+
+ // javadoc: Mat::create(rows, cols, type)
+ public void create(int rows, int cols, int type)
+ {
+
+ n_create(nativeObj, rows, cols, type);
+
+ return;
+ }
+
+ //
+ // C++: void Mat::create(Size size, int type)
+ //
+
+ // javadoc: Mat::create(size, type)
+ public void create(Size size, int type)
+ {
+
+ n_create(nativeObj, size.width, size.height, type);
+
+ return;
+ }
+
+ //
+ // C++: Mat Mat::cross(Mat m)
+ //
+
+ // javadoc: Mat::cross(m)
+ public Mat cross(Mat m)
+ {
+
+ Mat retVal = new Mat(n_cross(nativeObj, m.nativeObj));
+
+ return retVal;
+ }
+
+ //
+ // C++: long Mat::dataAddr()
+ //
+
+ // javadoc: Mat::dataAddr()
+ public long dataAddr()
+ {
+
+ long retVal = n_dataAddr(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: int Mat::depth()
+ //
+
+ // javadoc: Mat::depth()
+ public int depth()
+ {
+
+ int retVal = n_depth(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::diag(int d = 0)
+ //
+
+ // javadoc: Mat::diag(d)
+ public Mat diag(int d)
+ {
+
+ Mat retVal = new Mat(n_diag(nativeObj, d));
+
+ return retVal;
+ }
+
+ // javadoc: Mat::diag()
+ public Mat diag()
+ {
+
+ Mat retVal = new Mat(n_diag(nativeObj, 0));
+
+ return retVal;
+ }
+
+ //
+ // C++: static Mat Mat::diag(Mat d)
+ //
+
+ // javadoc: Mat::diag(d)
+ public static Mat diag(Mat d)
+ {
+
+ Mat retVal = new Mat(n_diag(d.nativeObj));
+
+ return retVal;
+ }
+
+ //
+ // C++: double Mat::dot(Mat m)
+ //
+
+ // javadoc: Mat::dot(m)
+ public double dot(Mat m)
+ {
+
+ double retVal = n_dot(nativeObj, m.nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: size_t Mat::elemSize()
+ //
+
+ // javadoc: Mat::elemSize()
+ public long elemSize()
+ {
+
+ long retVal = n_elemSize(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: size_t Mat::elemSize1()
+ //
+
+ // javadoc: Mat::elemSize1()
+ public long elemSize1()
+ {
+
+ long retVal = n_elemSize1(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: bool Mat::empty()
+ //
+
+ // javadoc: Mat::empty()
+ public boolean empty()
+ {
+
+ boolean retVal = n_empty(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: static Mat Mat::eye(int rows, int cols, int type)
+ //
+
+ // javadoc: Mat::eye(rows, cols, type)
+ public static Mat eye(int rows, int cols, int type)
+ {
+
+ Mat retVal = new Mat(n_eye(rows, cols, type));
+
+ return retVal;
+ }
+
+ //
+ // C++: static Mat Mat::eye(Size size, int type)
+ //
+
+ // javadoc: Mat::eye(size, type)
+ public static Mat eye(Size size, int type)
+ {
+
+ Mat retVal = new Mat(n_eye(size.width, size.height, type));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::inv(int method = DECOMP_LU)
+ //
+
+ // javadoc: Mat::inv(method)
+ public Mat inv(int method)
+ {
+
+ Mat retVal = new Mat(n_inv(nativeObj, method));
+
+ return retVal;
+ }
+
+ // javadoc: Mat::inv()
+ public Mat inv()
+ {
+
+ Mat retVal = new Mat(n_inv(nativeObj));
+
+ return retVal;
+ }
+
+ //
+ // C++: bool Mat::isContinuous()
+ //
+
+ // javadoc: Mat::isContinuous()
+ public boolean isContinuous()
+ {
+
+ boolean retVal = n_isContinuous(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: bool Mat::isSubmatrix()
+ //
+
+ // javadoc: Mat::isSubmatrix()
+ public boolean isSubmatrix()
+ {
+
+ boolean retVal = n_isSubmatrix(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: void Mat::locateROI(Size wholeSize, Point ofs)
+ //
+
+ // javadoc: Mat::locateROI(wholeSize, ofs)
+ public void locateROI(Size wholeSize, Point ofs)
+ {
+ double[] wholeSize_out = new double[2];
+ double[] ofs_out = new double[2];
+ locateROI_0(nativeObj, wholeSize_out, ofs_out);
+ if(wholeSize!=null){ wholeSize.width = wholeSize_out[0]; wholeSize.height = wholeSize_out[1]; }
+ if(ofs!=null){ ofs.x = ofs_out[0]; ofs.y = ofs_out[1]; }
+ return;
+ }
+
+ //
+ // C++: Mat Mat::mul(Mat m, double scale = 1)
+ //
+
+ // javadoc: Mat::mul(m, scale)
+ public Mat mul(Mat m, double scale)
+ {
+
+ Mat retVal = new Mat(n_mul(nativeObj, m.nativeObj, scale));
+
+ return retVal;
+ }
+
+ // javadoc: Mat::mul(m)
+ public Mat mul(Mat m)
+ {
+
+ Mat retVal = new Mat(n_mul(nativeObj, m.nativeObj));
+
+ return retVal;
+ }
+
+ //
+ // C++: static Mat Mat::ones(int rows, int cols, int type)
+ //
+
+ // javadoc: Mat::ones(rows, cols, type)
+ public static Mat ones(int rows, int cols, int type)
+ {
+
+ Mat retVal = new Mat(n_ones(rows, cols, type));
+
+ return retVal;
+ }
+
+ //
+ // C++: static Mat Mat::ones(Size size, int type)
+ //
+
+ // javadoc: Mat::ones(size, type)
+ public static Mat ones(Size size, int type)
+ {
+
+ Mat retVal = new Mat(n_ones(size.width, size.height, type));
+
+ return retVal;
+ }
+
+ //
+ // C++: void Mat::push_back(Mat m)
+ //
+
+ // javadoc: Mat::push_back(m)
+ public void push_back(Mat m)
+ {
+
+ n_push_back(nativeObj, m.nativeObj);
+
+ return;
+ }
+
+ //
+ // C++: void Mat::release()
+ //
+
+ // javadoc: Mat::release()
+ public void release()
+ {
+
+ n_release(nativeObj);
+
+ return;
+ }
+
+ //
+ // C++: Mat Mat::reshape(int cn, int rows = 0)
+ //
+
+ // javadoc: Mat::reshape(cn, rows)
+ public Mat reshape(int cn, int rows)
+ {
+
+ Mat retVal = new Mat(n_reshape(nativeObj, cn, rows));
+
+ return retVal;
+ }
+
+ // javadoc: Mat::reshape(cn)
+ public Mat reshape(int cn)
+ {
+
+ Mat retVal = new Mat(n_reshape(nativeObj, cn));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::row(int y)
+ //
+
+ // javadoc: Mat::row(y)
+ public Mat row(int y)
+ {
+
+ Mat retVal = new Mat(n_row(nativeObj, y));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::rowRange(int startrow, int endrow)
+ //
+
+ // javadoc: Mat::rowRange(startrow, endrow)
+ public Mat rowRange(int startrow, int endrow)
+ {
+
+ Mat retVal = new Mat(n_rowRange(nativeObj, startrow, endrow));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::rowRange(Range r)
+ //
+
+ // javadoc: Mat::rowRange(r)
+ public Mat rowRange(Range r)
+ {
+
+ Mat retVal = new Mat(n_rowRange(nativeObj, r.start, r.end));
+
+ return retVal;
+ }
+
+ //
+ // C++: int Mat::rows()
+ //
+
+ // javadoc: Mat::rows()
+ public int rows()
+ {
+
+ int retVal = n_rows(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::operator =(Scalar s)
+ //
+
+ // javadoc: Mat::operator =(s)
+ public Mat setTo(Scalar s)
+ {
+
+ Mat retVal = new Mat(n_setTo(nativeObj, s.val[0], s.val[1], s.val[2], s.val[3]));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::setTo(Scalar value, Mat mask = Mat())
+ //
+
+ // javadoc: Mat::setTo(value, mask)
+ public Mat setTo(Scalar value, Mat mask)
+ {
+
+ Mat retVal = new Mat(n_setTo(nativeObj, value.val[0], value.val[1], value.val[2], value.val[3], mask.nativeObj));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::setTo(Mat value, Mat mask = Mat())
+ //
+
+ // javadoc: Mat::setTo(value, mask)
+ public Mat setTo(Mat value, Mat mask)
+ {
+
+ Mat retVal = new Mat(n_setTo(nativeObj, value.nativeObj, mask.nativeObj));
+
+ return retVal;
+ }
+
+ // javadoc: Mat::setTo(value)
+ public Mat setTo(Mat value)
+ {
+
+ Mat retVal = new Mat(n_setTo(nativeObj, value.nativeObj));
+
+ return retVal;
+ }
+
+ //
+ // C++: Size Mat::size()
+ //
+
+ // javadoc: Mat::size()
+ public Size size()
+ {
+
+ Size retVal = new Size(n_size(nativeObj));
+
+ return retVal;
+ }
+
+ //
+ // C++: size_t Mat::step1(int i = 0)
+ //
+
+ // javadoc: Mat::step1(i)
+ public long step1(int i)
+ {
+
+ long retVal = n_step1(nativeObj, i);
+
+ return retVal;
+ }
+
+ // javadoc: Mat::step1()
+ public long step1()
+ {
+
+ long retVal = n_step1(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::operator()(int rowStart, int rowEnd, int colStart, int
+ // colEnd)
+ //
+
+ // javadoc: Mat::operator()(rowStart, rowEnd, colStart, colEnd)
+ public Mat submat(int rowStart, int rowEnd, int colStart, int colEnd)
+ {
+
+ Mat retVal = new Mat(n_submat_rr(nativeObj, rowStart, rowEnd, colStart, colEnd));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::operator()(Range rowRange, Range colRange)
+ //
+
+ // javadoc: Mat::operator()(rowRange, colRange)
+ public Mat submat(Range rowRange, Range colRange)
+ {
+
+ Mat retVal = new Mat(n_submat_rr(nativeObj, rowRange.start, rowRange.end, colRange.start, colRange.end));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::operator()(Rect roi)
+ //
+
+ // javadoc: Mat::operator()(roi)
+ public Mat submat(Rect roi)
+ {
+
+ Mat retVal = new Mat(n_submat(nativeObj, roi.x, roi.y, roi.width, roi.height));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::t()
+ //
+
+ // javadoc: Mat::t()
+ public Mat t()
+ {
+
+ Mat retVal = new Mat(n_t(nativeObj));
+
+ return retVal;
+ }
+
+ //
+ // C++: size_t Mat::total()
+ //
+
+ // javadoc: Mat::total()
+ public long total()
+ {
+
+ long retVal = n_total(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: int Mat::type()
+ //
+
+ // javadoc: Mat::type()
+ public int type()
+ {
+
+ int retVal = n_type(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: static Mat Mat::zeros(int rows, int cols, int type)
+ //
+
+ // javadoc: Mat::zeros(rows, cols, type)
+ public static Mat zeros(int rows, int cols, int type)
+ {
+
+ Mat retVal = new Mat(n_zeros(rows, cols, type));
+
+ return retVal;
+ }
+
+ //
+ // C++: static Mat Mat::zeros(Size size, int type)
+ //
+
+ // javadoc: Mat::zeros(size, type)
+ public static Mat zeros(Size size, int type)
+ {
+
+ Mat retVal = new Mat(n_zeros(size.width, size.height, type));
+
+ return retVal;
+ }
+
+ @Override
+ protected void finalize() throws Throwable {
+ n_delete(nativeObj);
+ super.finalize();
+ }
+
+ // javadoc:Mat::toString()
+ @Override
+ public String toString() {
+ return "Mat [ " +
+ rows() + "*" + cols() + "*" + CvType.typeToString(type()) +
+ ", isCont=" + isContinuous() + ", isSubmat=" + isSubmatrix() +
+ ", nativeObj=0x" + Long.toHexString(nativeObj) +
+ ", dataAddr=0x" + Long.toHexString(dataAddr()) +
+ " ]";
+ }
+
+ // javadoc:Mat::dump()
+ public String dump() {
+ return nDump(nativeObj);
+ }
+
+ // javadoc:Mat::put(row,col,data)
+ public int put(int row, int col, double... data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ return nPutD(nativeObj, row, col, data.length, data);
+ }
+
+ // javadoc:Mat::put(row,col,data)
+ public int put(int row, int col, float[] data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ if (CvType.depth(t) == CvType.CV_32F) {
+ return nPutF(nativeObj, row, col, data.length, data);
+ }
+ throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+ }
+
+ // javadoc:Mat::put(row,col,data)
+ public int put(int row, int col, int[] data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ if (CvType.depth(t) == CvType.CV_32S) {
+ return nPutI(nativeObj, row, col, data.length, data);
+ }
+ throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+ }
+
+ // javadoc:Mat::put(row,col,data)
+ public int put(int row, int col, short[] data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ if (CvType.depth(t) == CvType.CV_16U || CvType.depth(t) == CvType.CV_16S) {
+ return nPutS(nativeObj, row, col, data.length, data);
+ }
+ throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+ }
+
+ // javadoc:Mat::put(row,col,data)
+ public int put(int row, int col, byte[] data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ if (CvType.depth(t) == CvType.CV_8U || CvType.depth(t) == CvType.CV_8S) {
+ return nPutB(nativeObj, row, col, data.length, data);
+ }
+ throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+ }
+
+ // javadoc:Mat::get(row,col,data)
+ public int get(int row, int col, byte[] data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ if (CvType.depth(t) == CvType.CV_8U || CvType.depth(t) == CvType.CV_8S) {
+ return nGetB(nativeObj, row, col, data.length, data);
+ }
+ throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+ }
+
+ // javadoc:Mat::get(row,col,data)
+ public int get(int row, int col, short[] data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ if (CvType.depth(t) == CvType.CV_16U || CvType.depth(t) == CvType.CV_16S) {
+ return nGetS(nativeObj, row, col, data.length, data);
+ }
+ throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+ }
+
+ // javadoc:Mat::get(row,col,data)
+ public int get(int row, int col, int[] data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ if (CvType.depth(t) == CvType.CV_32S) {
+ return nGetI(nativeObj, row, col, data.length, data);
+ }
+ throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+ }
+
+ // javadoc:Mat::get(row,col,data)
+ public int get(int row, int col, float[] data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ if (CvType.depth(t) == CvType.CV_32F) {
+ return nGetF(nativeObj, row, col, data.length, data);
+ }
+ throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+ }
+
+ // javadoc:Mat::get(row,col,data)
+ public int get(int row, int col, double[] data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ if (CvType.depth(t) == CvType.CV_64F) {
+ return nGetD(nativeObj, row, col, data.length, data);
+ }
+ throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+ }
+
+ // javadoc:Mat::get(row,col)
+ public double[] get(int row, int col) {
+ return nGet(nativeObj, row, col);
+ }
+
+ // javadoc:Mat::height()
+ public int height() {
+ return rows();
+ }
+
+ // javadoc:Mat::width()
+ public int width() {
+ return cols();
+ }
+
+ // javadoc:Mat::getNativeObjAddr()
+ public long getNativeObjAddr() {
+ return nativeObj;
+ }
+
+ // C++: Mat::Mat()
+ private static native long n_Mat();
+
+ // C++: Mat::Mat(int rows, int cols, int type)
+ private static native long n_Mat(int rows, int cols, int type);
+
+ // C++: Mat::Mat(Size size, int type)
+ private static native long n_Mat(double size_width, double size_height, int type);
+
+ // C++: Mat::Mat(int rows, int cols, int type, Scalar s)
+ private static native long n_Mat(int rows, int cols, int type, double s_val0, double s_val1, double s_val2, double s_val3);
+
+ // C++: Mat::Mat(Size size, int type, Scalar s)
+ private static native long n_Mat(double size_width, double size_height, int type, double s_val0, double s_val1, double s_val2, double s_val3);
+
+ // C++: Mat::Mat(Mat m, Range rowRange, Range colRange = Range::all())
+ private static native long n_Mat(long m_nativeObj, int rowRange_start, int rowRange_end, int colRange_start, int colRange_end);
+
+ private static native long n_Mat(long m_nativeObj, int rowRange_start, int rowRange_end);
+
+ // C++: Mat Mat::adjustROI(int dtop, int dbottom, int dleft, int dright)
+ private static native long n_adjustROI(long nativeObj, int dtop, int dbottom, int dleft, int dright);
+
+ // C++: void Mat::assignTo(Mat m, int type = -1)
+ private static native void n_assignTo(long nativeObj, long m_nativeObj, int type);
+
+ private static native void n_assignTo(long nativeObj, long m_nativeObj);
+
+ // C++: int Mat::channels()
+ private static native int n_channels(long nativeObj);
+
+ // C++: int Mat::checkVector(int elemChannels, int depth = -1, bool
+ // requireContinuous = true)
+ private static native int n_checkVector(long nativeObj, int elemChannels, int depth, boolean requireContinuous);
+
+ private static native int n_checkVector(long nativeObj, int elemChannels, int depth);
+
+ private static native int n_checkVector(long nativeObj, int elemChannels);
+
+ // C++: Mat Mat::clone()
+ private static native long n_clone(long nativeObj);
+
+ // C++: Mat Mat::col(int x)
+ private static native long n_col(long nativeObj, int x);
+
+ // C++: Mat Mat::colRange(int startcol, int endcol)
+ private static native long n_colRange(long nativeObj, int startcol, int endcol);
+
+ // C++: int Mat::dims()
+ private static native int n_dims(long nativeObj);
+
+ // C++: int Mat::cols()
+ private static native int n_cols(long nativeObj);
+
+ // C++: void Mat::convertTo(Mat& m, int rtype, double alpha = 1, double beta
+ // = 0)
+ private static native void n_convertTo(long nativeObj, long m_nativeObj, int rtype, double alpha, double beta);
+
+ private static native void n_convertTo(long nativeObj, long m_nativeObj, int rtype, double alpha);
+
+ private static native void n_convertTo(long nativeObj, long m_nativeObj, int rtype);
+
+ // C++: void Mat::copyTo(Mat& m)
+ private static native void n_copyTo(long nativeObj, long m_nativeObj);
+
+ // C++: void Mat::copyTo(Mat& m, Mat mask)
+ private static native void n_copyTo(long nativeObj, long m_nativeObj, long mask_nativeObj);
+
+ // C++: void Mat::create(int rows, int cols, int type)
+ private static native void n_create(long nativeObj, int rows, int cols, int type);
+
+ // C++: void Mat::create(Size size, int type)
+ private static native void n_create(long nativeObj, double size_width, double size_height, int type);
+
+ // C++: Mat Mat::cross(Mat m)
+ private static native long n_cross(long nativeObj, long m_nativeObj);
+
+ // C++: long Mat::dataAddr()
+ private static native long n_dataAddr(long nativeObj);
+
+ // C++: int Mat::depth()
+ private static native int n_depth(long nativeObj);
+
+ // C++: Mat Mat::diag(int d = 0)
+ private static native long n_diag(long nativeObj, int d);
+
+ // C++: static Mat Mat::diag(Mat d)
+ private static native long n_diag(long d_nativeObj);
+
+ // C++: double Mat::dot(Mat m)
+ private static native double n_dot(long nativeObj, long m_nativeObj);
+
+ // C++: size_t Mat::elemSize()
+ private static native long n_elemSize(long nativeObj);
+
+ // C++: size_t Mat::elemSize1()
+ private static native long n_elemSize1(long nativeObj);
+
+ // C++: bool Mat::empty()
+ private static native boolean n_empty(long nativeObj);
+
+ // C++: static Mat Mat::eye(int rows, int cols, int type)
+ private static native long n_eye(int rows, int cols, int type);
+
+ // C++: static Mat Mat::eye(Size size, int type)
+ private static native long n_eye(double size_width, double size_height, int type);
+
+ // C++: Mat Mat::inv(int method = DECOMP_LU)
+ private static native long n_inv(long nativeObj, int method);
+
+ private static native long n_inv(long nativeObj);
+
+ // C++: bool Mat::isContinuous()
+ private static native boolean n_isContinuous(long nativeObj);
+
+ // C++: bool Mat::isSubmatrix()
+ private static native boolean n_isSubmatrix(long nativeObj);
+
+ // C++: void Mat::locateROI(Size wholeSize, Point ofs)
+ private static native void locateROI_0(long nativeObj, double[] wholeSize_out, double[] ofs_out);
+
+ // C++: Mat Mat::mul(Mat m, double scale = 1)
+ private static native long n_mul(long nativeObj, long m_nativeObj, double scale);
+
+ private static native long n_mul(long nativeObj, long m_nativeObj);
+
+ // C++: static Mat Mat::ones(int rows, int cols, int type)
+ private static native long n_ones(int rows, int cols, int type);
+
+ // C++: static Mat Mat::ones(Size size, int type)
+ private static native long n_ones(double size_width, double size_height, int type);
+
+ // C++: void Mat::push_back(Mat m)
+ private static native void n_push_back(long nativeObj, long m_nativeObj);
+
+ // C++: void Mat::release()
+ private static native void n_release(long nativeObj);
+
+ // C++: Mat Mat::reshape(int cn, int rows = 0)
+ private static native long n_reshape(long nativeObj, int cn, int rows);
+
+ private static native long n_reshape(long nativeObj, int cn);
+
+ // C++: Mat Mat::row(int y)
+ private static native long n_row(long nativeObj, int y);
+
+ // C++: Mat Mat::rowRange(int startrow, int endrow)
+ private static native long n_rowRange(long nativeObj, int startrow, int endrow);
+
+ // C++: int Mat::rows()
+ private static native int n_rows(long nativeObj);
+
+ // C++: Mat Mat::operator =(Scalar s)
+ private static native long n_setTo(long nativeObj, double s_val0, double s_val1, double s_val2, double s_val3);
+
+ // C++: Mat Mat::setTo(Scalar value, Mat mask = Mat())
+ private static native long n_setTo(long nativeObj, double s_val0, double s_val1, double s_val2, double s_val3, long mask_nativeObj);
+
+ // C++: Mat Mat::setTo(Mat value, Mat mask = Mat())
+ private static native long n_setTo(long nativeObj, long value_nativeObj, long mask_nativeObj);
+
+ private static native long n_setTo(long nativeObj, long value_nativeObj);
+
+ // C++: Size Mat::size()
+ private static native double[] n_size(long nativeObj);
+
+ // C++: size_t Mat::step1(int i = 0)
+ private static native long n_step1(long nativeObj, int i);
+
+ private static native long n_step1(long nativeObj);
+
+ // C++: Mat Mat::operator()(Range rowRange, Range colRange)
+ private static native long n_submat_rr(long nativeObj, int rowRange_start, int rowRange_end, int colRange_start, int colRange_end);
+
+ // C++: Mat Mat::operator()(Rect roi)
+ private static native long n_submat(long nativeObj, int roi_x, int roi_y, int roi_width, int roi_height);
+
+ // C++: Mat Mat::t()
+ private static native long n_t(long nativeObj);
+
+ // C++: size_t Mat::total()
+ private static native long n_total(long nativeObj);
+
+ // C++: int Mat::type()
+ private static native int n_type(long nativeObj);
+
+ // C++: static Mat Mat::zeros(int rows, int cols, int type)
+ private static native long n_zeros(int rows, int cols, int type);
+
+ // C++: static Mat Mat::zeros(Size size, int type)
+ private static native long n_zeros(double size_width, double size_height, int type);
+
+ // native support for java finalize()
+ private static native void n_delete(long nativeObj);
+
+ private static native int nPutD(long self, int row, int col, int count, double[] data);
+
+ private static native int nPutF(long self, int row, int col, int count, float[] data);
+
+ private static native int nPutI(long self, int row, int col, int count, int[] data);
+
+ private static native int nPutS(long self, int row, int col, int count, short[] data);
+
+ private static native int nPutB(long self, int row, int col, int count, byte[] data);
+
+ private static native int nGetB(long self, int row, int col, int count, byte[] vals);
+
+ private static native int nGetS(long self, int row, int col, int count, short[] vals);
+
+ private static native int nGetI(long self, int row, int col, int count, int[] vals);
+
+ private static native int nGetF(long self, int row, int col, int count, float[] vals);
+
+ private static native int nGetD(long self, int row, int col, int count, double[] vals);
+
+ private static native double[] nGet(long self, int row, int col);
+
+ private static native String nDump(long self);
+}
diff --git a/library/src/main/java/org/opencv/core/MatOfByte.java b/library/src/main/java/org/opencv/core/MatOfByte.java
new file mode 100644
index 0000000..7756eb9
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/MatOfByte.java
@@ -0,0 +1,79 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class MatOfByte extends Mat {
+ // 8UC(x)
+ private static final int _depth = CvType.CV_8U;
+ private static final int _channels = 1;
+
+ public MatOfByte() {
+ super();
+ }
+
+ protected MatOfByte(long addr) {
+ super(addr);
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public static MatOfByte fromNativeAddr(long addr) {
+ return new MatOfByte(addr);
+ }
+
+ public MatOfByte(Mat m) {
+ super(m, Range.all());
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public MatOfByte(byte...a) {
+ super();
+ fromArray(a);
+ }
+
+ public void alloc(int elemNumber) {
+ if(elemNumber>0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(byte...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length / _channels;
+ alloc(num);
+ put(0, 0, a); //TODO: check ret val!
+ }
+
+ public byte[] toArray() {
+ int num = checkVector(_channels, _depth);
+ if(num < 0)
+ throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
+ byte[] a = new byte[num * _channels];
+ if(num == 0)
+ return a;
+ get(0, 0, a); //TODO: check ret val!
+ return a;
+ }
+
+ public void fromList(List lb) {
+ if(lb==null || lb.size()==0)
+ return;
+ Byte ab[] = lb.toArray(new Byte[0]);
+ byte a[] = new byte[ab.length];
+ for(int i=0; i toList() {
+ byte[] a = toArray();
+ Byte ab[] = new Byte[a.length];
+ for(int i=0; i0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+
+ public void fromArray(DMatch...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length;
+ alloc(num);
+ float buff[] = new float[num * _channels];
+ for(int i=0; i ldm) {
+ DMatch adm[] = ldm.toArray(new DMatch[0]);
+ fromArray(adm);
+ }
+
+ public List toList() {
+ DMatch[] adm = toArray();
+ return Arrays.asList(adm);
+ }
+}
diff --git a/library/src/main/java/org/opencv/core/MatOfDouble.java b/library/src/main/java/org/opencv/core/MatOfDouble.java
new file mode 100644
index 0000000..1a8e23c
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/MatOfDouble.java
@@ -0,0 +1,79 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class MatOfDouble extends Mat {
+ // 64FC(x)
+ private static final int _depth = CvType.CV_64F;
+ private static final int _channels = 1;
+
+ public MatOfDouble() {
+ super();
+ }
+
+ protected MatOfDouble(long addr) {
+ super(addr);
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public static MatOfDouble fromNativeAddr(long addr) {
+ return new MatOfDouble(addr);
+ }
+
+ public MatOfDouble(Mat m) {
+ super(m, Range.all());
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public MatOfDouble(double...a) {
+ super();
+ fromArray(a);
+ }
+
+ public void alloc(int elemNumber) {
+ if(elemNumber>0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(double...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length / _channels;
+ alloc(num);
+ put(0, 0, a); //TODO: check ret val!
+ }
+
+ public double[] toArray() {
+ int num = checkVector(_channels, _depth);
+ if(num < 0)
+ throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
+ double[] a = new double[num * _channels];
+ if(num == 0)
+ return a;
+ get(0, 0, a); //TODO: check ret val!
+ return a;
+ }
+
+ public void fromList(List lb) {
+ if(lb==null || lb.size()==0)
+ return;
+ Double ab[] = lb.toArray(new Double[0]);
+ double a[] = new double[ab.length];
+ for(int i=0; i toList() {
+ double[] a = toArray();
+ Double ab[] = new Double[a.length];
+ for(int i=0; i0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(float...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length / _channels;
+ alloc(num);
+ put(0, 0, a); //TODO: check ret val!
+ }
+
+ public float[] toArray() {
+ int num = checkVector(_channels, _depth);
+ if(num < 0)
+ throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
+ float[] a = new float[num * _channels];
+ if(num == 0)
+ return a;
+ get(0, 0, a); //TODO: check ret val!
+ return a;
+ }
+
+ public void fromList(List lb) {
+ if(lb==null || lb.size()==0)
+ return;
+ Float ab[] = lb.toArray(new Float[0]);
+ float a[] = new float[ab.length];
+ for(int i=0; i toList() {
+ float[] a = toArray();
+ Float ab[] = new Float[a.length];
+ for(int i=0; i0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(float...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length / _channels;
+ alloc(num);
+ put(0, 0, a); //TODO: check ret val!
+ }
+
+ public float[] toArray() {
+ int num = checkVector(_channels, _depth);
+ if(num < 0)
+ throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
+ float[] a = new float[num * _channels];
+ if(num == 0)
+ return a;
+ get(0, 0, a); //TODO: check ret val!
+ return a;
+ }
+
+ public void fromList(List lb) {
+ if(lb==null || lb.size()==0)
+ return;
+ Float ab[] = lb.toArray(new Float[0]);
+ float a[] = new float[ab.length];
+ for(int i=0; i toList() {
+ float[] a = toArray();
+ Float ab[] = new Float[a.length];
+ for(int i=0; i0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(float...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length / _channels;
+ alloc(num);
+ put(0, 0, a); //TODO: check ret val!
+ }
+
+ public float[] toArray() {
+ int num = checkVector(_channels, _depth);
+ if(num < 0)
+ throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
+ float[] a = new float[num * _channels];
+ if(num == 0)
+ return a;
+ get(0, 0, a); //TODO: check ret val!
+ return a;
+ }
+
+ public void fromList(List lb) {
+ if(lb==null || lb.size()==0)
+ return;
+ Float ab[] = lb.toArray(new Float[0]);
+ float a[] = new float[ab.length];
+ for(int i=0; i toList() {
+ float[] a = toArray();
+ Float ab[] = new Float[a.length];
+ for(int i=0; i0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(int...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length / _channels;
+ alloc(num);
+ put(0, 0, a); //TODO: check ret val!
+ }
+
+ public int[] toArray() {
+ int num = checkVector(_channels, _depth);
+ if(num < 0)
+ throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
+ int[] a = new int[num * _channels];
+ if(num == 0)
+ return a;
+ get(0, 0, a); //TODO: check ret val!
+ return a;
+ }
+
+ public void fromList(List lb) {
+ if(lb==null || lb.size()==0)
+ return;
+ Integer ab[] = lb.toArray(new Integer[0]);
+ int a[] = new int[ab.length];
+ for(int i=0; i toList() {
+ int[] a = toArray();
+ Integer ab[] = new Integer[a.length];
+ for(int i=0; i0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(int...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length / _channels;
+ alloc(num);
+ put(0, 0, a); //TODO: check ret val!
+ }
+
+ public int[] toArray() {
+ int num = checkVector(_channels, _depth);
+ if(num < 0)
+ throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
+ int[] a = new int[num * _channels];
+ if(num == 0)
+ return a;
+ get(0, 0, a); //TODO: check ret val!
+ return a;
+ }
+
+ public void fromList(List lb) {
+ if(lb==null || lb.size()==0)
+ return;
+ Integer ab[] = lb.toArray(new Integer[0]);
+ int a[] = new int[ab.length];
+ for(int i=0; i toList() {
+ int[] a = toArray();
+ Integer ab[] = new Integer[a.length];
+ for(int i=0; i0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(KeyPoint...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length;
+ alloc(num);
+ float buff[] = new float[num * _channels];
+ for(int i=0; i lkp) {
+ KeyPoint akp[] = lkp.toArray(new KeyPoint[0]);
+ fromArray(akp);
+ }
+
+ public List toList() {
+ KeyPoint[] akp = toArray();
+ return Arrays.asList(akp);
+ }
+}
diff --git a/library/src/main/java/org/opencv/core/MatOfPoint.java b/library/src/main/java/org/opencv/core/MatOfPoint.java
new file mode 100644
index 0000000..f4d573b
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/MatOfPoint.java
@@ -0,0 +1,78 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class MatOfPoint extends Mat {
+ // 32SC2
+ private static final int _depth = CvType.CV_32S;
+ private static final int _channels = 2;
+
+ public MatOfPoint() {
+ super();
+ }
+
+ protected MatOfPoint(long addr) {
+ super(addr);
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public static MatOfPoint fromNativeAddr(long addr) {
+ return new MatOfPoint(addr);
+ }
+
+ public MatOfPoint(Mat m) {
+ super(m, Range.all());
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public MatOfPoint(Point...a) {
+ super();
+ fromArray(a);
+ }
+
+ public void alloc(int elemNumber) {
+ if(elemNumber>0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(Point...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length;
+ alloc(num);
+ int buff[] = new int[num * _channels];
+ for(int i=0; i lp) {
+ Point ap[] = lp.toArray(new Point[0]);
+ fromArray(ap);
+ }
+
+ public List toList() {
+ Point[] ap = toArray();
+ return Arrays.asList(ap);
+ }
+}
diff --git a/library/src/main/java/org/opencv/core/MatOfPoint2f.java b/library/src/main/java/org/opencv/core/MatOfPoint2f.java
new file mode 100644
index 0000000..4b8c926
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/MatOfPoint2f.java
@@ -0,0 +1,78 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class MatOfPoint2f extends Mat {
+ // 32FC2
+ private static final int _depth = CvType.CV_32F;
+ private static final int _channels = 2;
+
+ public MatOfPoint2f() {
+ super();
+ }
+
+ protected MatOfPoint2f(long addr) {
+ super(addr);
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public static MatOfPoint2f fromNativeAddr(long addr) {
+ return new MatOfPoint2f(addr);
+ }
+
+ public MatOfPoint2f(Mat m) {
+ super(m, Range.all());
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public MatOfPoint2f(Point...a) {
+ super();
+ fromArray(a);
+ }
+
+ public void alloc(int elemNumber) {
+ if(elemNumber>0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(Point...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length;
+ alloc(num);
+ float buff[] = new float[num * _channels];
+ for(int i=0; i lp) {
+ Point ap[] = lp.toArray(new Point[0]);
+ fromArray(ap);
+ }
+
+ public List toList() {
+ Point[] ap = toArray();
+ return Arrays.asList(ap);
+ }
+}
diff --git a/library/src/main/java/org/opencv/core/MatOfPoint3.java b/library/src/main/java/org/opencv/core/MatOfPoint3.java
new file mode 100644
index 0000000..3b50561
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/MatOfPoint3.java
@@ -0,0 +1,79 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class MatOfPoint3 extends Mat {
+ // 32SC3
+ private static final int _depth = CvType.CV_32S;
+ private static final int _channels = 3;
+
+ public MatOfPoint3() {
+ super();
+ }
+
+ protected MatOfPoint3(long addr) {
+ super(addr);
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public static MatOfPoint3 fromNativeAddr(long addr) {
+ return new MatOfPoint3(addr);
+ }
+
+ public MatOfPoint3(Mat m) {
+ super(m, Range.all());
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public MatOfPoint3(Point3...a) {
+ super();
+ fromArray(a);
+ }
+
+ public void alloc(int elemNumber) {
+ if(elemNumber>0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(Point3...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length;
+ alloc(num);
+ int buff[] = new int[num * _channels];
+ for(int i=0; i lp) {
+ Point3 ap[] = lp.toArray(new Point3[0]);
+ fromArray(ap);
+ }
+
+ public List toList() {
+ Point3[] ap = toArray();
+ return Arrays.asList(ap);
+ }
+}
diff --git a/library/src/main/java/org/opencv/core/MatOfPoint3f.java b/library/src/main/java/org/opencv/core/MatOfPoint3f.java
new file mode 100644
index 0000000..fc5fee4
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/MatOfPoint3f.java
@@ -0,0 +1,79 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class MatOfPoint3f extends Mat {
+ // 32FC3
+ private static final int _depth = CvType.CV_32F;
+ private static final int _channels = 3;
+
+ public MatOfPoint3f() {
+ super();
+ }
+
+ protected MatOfPoint3f(long addr) {
+ super(addr);
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public static MatOfPoint3f fromNativeAddr(long addr) {
+ return new MatOfPoint3f(addr);
+ }
+
+ public MatOfPoint3f(Mat m) {
+ super(m, Range.all());
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public MatOfPoint3f(Point3...a) {
+ super();
+ fromArray(a);
+ }
+
+ public void alloc(int elemNumber) {
+ if(elemNumber>0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(Point3...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length;
+ alloc(num);
+ float buff[] = new float[num * _channels];
+ for(int i=0; i lp) {
+ Point3 ap[] = lp.toArray(new Point3[0]);
+ fromArray(ap);
+ }
+
+ public List toList() {
+ Point3[] ap = toArray();
+ return Arrays.asList(ap);
+ }
+}
diff --git a/library/src/main/java/org/opencv/core/MatOfRect.java b/library/src/main/java/org/opencv/core/MatOfRect.java
new file mode 100644
index 0000000..ec0fb01
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/MatOfRect.java
@@ -0,0 +1,81 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+
+public class MatOfRect extends Mat {
+ // 32SC4
+ private static final int _depth = CvType.CV_32S;
+ private static final int _channels = 4;
+
+ public MatOfRect() {
+ super();
+ }
+
+ protected MatOfRect(long addr) {
+ super(addr);
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public static MatOfRect fromNativeAddr(long addr) {
+ return new MatOfRect(addr);
+ }
+
+ public MatOfRect(Mat m) {
+ super(m, Range.all());
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public MatOfRect(Rect...a) {
+ super();
+ fromArray(a);
+ }
+
+ public void alloc(int elemNumber) {
+ if(elemNumber>0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(Rect...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length;
+ alloc(num);
+ int buff[] = new int[num * _channels];
+ for(int i=0; i lr) {
+ Rect ap[] = lr.toArray(new Rect[0]);
+ fromArray(ap);
+ }
+
+ public List toList() {
+ Rect[] ar = toArray();
+ return Arrays.asList(ar);
+ }
+}
diff --git a/library/src/main/java/org/opencv/core/MatOfRect2d.java b/library/src/main/java/org/opencv/core/MatOfRect2d.java
new file mode 100644
index 0000000..71c4b1a
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/MatOfRect2d.java
@@ -0,0 +1,81 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+
+public class MatOfRect2d extends Mat {
+ // 64FC4
+ private static final int _depth = CvType.CV_64F;
+ private static final int _channels = 4;
+
+ public MatOfRect2d() {
+ super();
+ }
+
+ protected MatOfRect2d(long addr) {
+ super(addr);
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public static MatOfRect2d fromNativeAddr(long addr) {
+ return new MatOfRect2d(addr);
+ }
+
+ public MatOfRect2d(Mat m) {
+ super(m, Range.all());
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public MatOfRect2d(Rect2d...a) {
+ super();
+ fromArray(a);
+ }
+
+ public void alloc(int elemNumber) {
+ if(elemNumber>0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(Rect2d...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length;
+ alloc(num);
+ double buff[] = new double[num * _channels];
+ for(int i=0; i lr) {
+ Rect2d ap[] = lr.toArray(new Rect2d[0]);
+ fromArray(ap);
+ }
+
+ public List toList() {
+ Rect2d[] ar = toArray();
+ return Arrays.asList(ar);
+ }
+}
diff --git a/library/src/main/java/org/opencv/core/Point.java b/library/src/main/java/org/opencv/core/Point.java
new file mode 100644
index 0000000..ce493d7
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/Point.java
@@ -0,0 +1,68 @@
+package org.opencv.core;
+
+//javadoc:Point_
+public class Point {
+
+ public double x, y;
+
+ public Point(double x, double y) {
+ this.x = x;
+ this.y = y;
+ }
+
+ public Point() {
+ this(0, 0);
+ }
+
+ public Point(double[] vals) {
+ this();
+ set(vals);
+ }
+
+ public void set(double[] vals) {
+ if (vals != null) {
+ x = vals.length > 0 ? vals[0] : 0;
+ y = vals.length > 1 ? vals[1] : 0;
+ } else {
+ x = 0;
+ y = 0;
+ }
+ }
+
+ public Point clone() {
+ return new Point(x, y);
+ }
+
+ public double dot(Point p) {
+ return x * p.x + y * p.y;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ long temp;
+ temp = Double.doubleToLongBits(x);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(y);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (!(obj instanceof Point)) return false;
+ Point it = (Point) obj;
+ return x == it.x && y == it.y;
+ }
+
+ public boolean inside(Rect r) {
+ return r.contains(this);
+ }
+
+ @Override
+ public String toString() {
+ return "{" + x + ", " + y + "}";
+ }
+}
diff --git a/library/src/main/java/org/opencv/core/Point3.java b/library/src/main/java/org/opencv/core/Point3.java
new file mode 100644
index 0000000..14b91c6
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/Point3.java
@@ -0,0 +1,79 @@
+package org.opencv.core;
+
+//javadoc:Point3_
+public class Point3 {
+
+ public double x, y, z;
+
+ public Point3(double x, double y, double z) {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ }
+
+ public Point3() {
+ this(0, 0, 0);
+ }
+
+ public Point3(Point p) {
+ x = p.x;
+ y = p.y;
+ z = 0;
+ }
+
+ public Point3(double[] vals) {
+ this();
+ set(vals);
+ }
+
+ public void set(double[] vals) {
+ if (vals != null) {
+ x = vals.length > 0 ? vals[0] : 0;
+ y = vals.length > 1 ? vals[1] : 0;
+ z = vals.length > 2 ? vals[2] : 0;
+ } else {
+ x = 0;
+ y = 0;
+ z = 0;
+ }
+ }
+
+ public Point3 clone() {
+ return new Point3(x, y, z);
+ }
+
+ public double dot(Point3 p) {
+ return x * p.x + y * p.y + z * p.z;
+ }
+
+ public Point3 cross(Point3 p) {
+ return new Point3(y * p.z - z * p.y, z * p.x - x * p.z, x * p.y - y * p.x);
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ long temp;
+ temp = Double.doubleToLongBits(x);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(y);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(z);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (!(obj instanceof Point3)) return false;
+ Point3 it = (Point3) obj;
+ return x == it.x && y == it.y && z == it.z;
+ }
+
+ @Override
+ public String toString() {
+ return "{" + x + ", " + y + ", " + z + "}";
+ }
+}
diff --git a/library/src/main/java/org/opencv/core/Range.java b/library/src/main/java/org/opencv/core/Range.java
new file mode 100644
index 0000000..f7eee4d
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/Range.java
@@ -0,0 +1,82 @@
+package org.opencv.core;
+
+//javadoc:Range
+public class Range {
+
+ public int start, end;
+
+ public Range(int s, int e) {
+ this.start = s;
+ this.end = e;
+ }
+
+ public Range() {
+ this(0, 0);
+ }
+
+ public Range(double[] vals) {
+ set(vals);
+ }
+
+ public void set(double[] vals) {
+ if (vals != null) {
+ start = vals.length > 0 ? (int) vals[0] : 0;
+ end = vals.length > 1 ? (int) vals[1] : 0;
+ } else {
+ start = 0;
+ end = 0;
+ }
+
+ }
+
+ public int size() {
+ return empty() ? 0 : end - start;
+ }
+
+ public boolean empty() {
+ return end <= start;
+ }
+
+ public static Range all() {
+ return new Range(Integer.MIN_VALUE, Integer.MAX_VALUE);
+ }
+
+ public Range intersection(Range r1) {
+ Range r = new Range(Math.max(r1.start, this.start), Math.min(r1.end, this.end));
+ r.end = Math.max(r.end, r.start);
+ return r;
+ }
+
+ public Range shift(int delta) {
+ return new Range(start + delta, end + delta);
+ }
+
+ public Range clone() {
+ return new Range(start, end);
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ long temp;
+ temp = Double.doubleToLongBits(start);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(end);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (!(obj instanceof Range)) return false;
+ Range it = (Range) obj;
+ return start == it.start && end == it.end;
+ }
+
+ @Override
+ public String toString() {
+ return "[" + start + ", " + end + ")";
+ }
+}
diff --git a/library/src/main/java/org/opencv/core/Rect.java b/library/src/main/java/org/opencv/core/Rect.java
new file mode 100644
index 0000000..c68e818
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/Rect.java
@@ -0,0 +1,104 @@
+package org.opencv.core;
+
+//javadoc:Rect_
+public class Rect {
+
+ public int x, y, width, height;
+
+ public Rect(int x, int y, int width, int height) {
+ this.x = x;
+ this.y = y;
+ this.width = width;
+ this.height = height;
+ }
+
+ public Rect() {
+ this(0, 0, 0, 0);
+ }
+
+ public Rect(Point p1, Point p2) {
+ x = (int) (p1.x < p2.x ? p1.x : p2.x);
+ y = (int) (p1.y < p2.y ? p1.y : p2.y);
+ width = (int) (p1.x > p2.x ? p1.x : p2.x) - x;
+ height = (int) (p1.y > p2.y ? p1.y : p2.y) - y;
+ }
+
+ public Rect(Point p, Size s) {
+ this((int) p.x, (int) p.y, (int) s.width, (int) s.height);
+ }
+
+ public Rect(double[] vals) {
+ set(vals);
+ }
+
+ public void set(double[] vals) {
+ if (vals != null) {
+ x = vals.length > 0 ? (int) vals[0] : 0;
+ y = vals.length > 1 ? (int) vals[1] : 0;
+ width = vals.length > 2 ? (int) vals[2] : 0;
+ height = vals.length > 3 ? (int) vals[3] : 0;
+ } else {
+ x = 0;
+ y = 0;
+ width = 0;
+ height = 0;
+ }
+ }
+
+ public Rect clone() {
+ return new Rect(x, y, width, height);
+ }
+
+ public Point tl() {
+ return new Point(x, y);
+ }
+
+ public Point br() {
+ return new Point(x + width, y + height);
+ }
+
+ public Size size() {
+ return new Size(width, height);
+ }
+
+ public double area() {
+ return width * height;
+ }
+
+ public boolean empty() {
+ return width <= 0 || height <= 0;
+ }
+
+ public boolean contains(Point p) {
+ return x <= p.x && p.x < x + width && y <= p.y && p.y < y + height;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ long temp;
+ temp = Double.doubleToLongBits(height);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(width);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(x);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(y);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (!(obj instanceof Rect)) return false;
+ Rect it = (Rect) obj;
+ return x == it.x && y == it.y && width == it.width && height == it.height;
+ }
+
+ @Override
+ public String toString() {
+ return "{" + x + ", " + y + ", " + width + "x" + height + "}";
+ }
+}
diff --git a/library/src/main/java/org/opencv/core/Rect2d.java b/library/src/main/java/org/opencv/core/Rect2d.java
new file mode 100644
index 0000000..4c27869
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/Rect2d.java
@@ -0,0 +1,104 @@
+package org.opencv.core;
+
+//javadoc:Rect2d_
+public class Rect2d {
+
+ public double x, y, width, height;
+
+ public Rect2d(double x, double y, double width, double height) {
+ this.x = x;
+ this.y = y;
+ this.width = width;
+ this.height = height;
+ }
+
+ public Rect2d() {
+ this(0, 0, 0, 0);
+ }
+
+ public Rect2d(Point p1, Point p2) {
+ x = (double) (p1.x < p2.x ? p1.x : p2.x);
+ y = (double) (p1.y < p2.y ? p1.y : p2.y);
+ width = (double) (p1.x > p2.x ? p1.x : p2.x) - x;
+ height = (double) (p1.y > p2.y ? p1.y : p2.y) - y;
+ }
+
+ public Rect2d(Point p, Size s) {
+ this((double) p.x, (double) p.y, (double) s.width, (double) s.height);
+ }
+
+ public Rect2d(double[] vals) {
+ set(vals);
+ }
+
+ public void set(double[] vals) {
+ if (vals != null) {
+ x = vals.length > 0 ? (double) vals[0] : 0;
+ y = vals.length > 1 ? (double) vals[1] : 0;
+ width = vals.length > 2 ? (double) vals[2] : 0;
+ height = vals.length > 3 ? (double) vals[3] : 0;
+ } else {
+ x = 0;
+ y = 0;
+ width = 0;
+ height = 0;
+ }
+ }
+
+ public Rect2d clone() {
+ return new Rect2d(x, y, width, height);
+ }
+
+ public Point tl() {
+ return new Point(x, y);
+ }
+
+ public Point br() {
+ return new Point(x + width, y + height);
+ }
+
+ public Size size() {
+ return new Size(width, height);
+ }
+
+ public double area() {
+ return width * height;
+ }
+
+ public boolean empty() {
+ return width <= 0 || height <= 0;
+ }
+
+ public boolean contains(Point p) {
+ return x <= p.x && p.x < x + width && y <= p.y && p.y < y + height;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ long temp;
+ temp = Double.doubleToLongBits(height);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(width);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(x);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(y);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (!(obj instanceof Rect2d)) return false;
+ Rect2d it = (Rect2d) obj;
+ return x == it.x && y == it.y && width == it.width && height == it.height;
+ }
+
+ @Override
+ public String toString() {
+ return "{" + x + ", " + y + ", " + width + "x" + height + "}";
+ }
+}
diff --git a/library/src/main/java/org/opencv/core/RotatedRect.java b/library/src/main/java/org/opencv/core/RotatedRect.java
new file mode 100644
index 0000000..f6d1163
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/RotatedRect.java
@@ -0,0 +1,113 @@
+package org.opencv.core;
+
+//javadoc:RotatedRect_
+public class RotatedRect {
+
+ public Point center;
+ public Size size;
+ public double angle;
+
+ public RotatedRect() {
+ this.center = new Point();
+ this.size = new Size();
+ this.angle = 0;
+ }
+
+ public RotatedRect(Point c, Size s, double a) {
+ this.center = c.clone();
+ this.size = s.clone();
+ this.angle = a;
+ }
+
+ public RotatedRect(double[] vals) {
+ this();
+ set(vals);
+ }
+
+ public void set(double[] vals) {
+ if (vals != null) {
+ center.x = vals.length > 0 ? (double) vals[0] : 0;
+ center.y = vals.length > 1 ? (double) vals[1] : 0;
+ size.width = vals.length > 2 ? (double) vals[2] : 0;
+ size.height = vals.length > 3 ? (double) vals[3] : 0;
+ angle = vals.length > 4 ? (double) vals[4] : 0;
+ } else {
+ center.x = 0;
+ center.x = 0;
+ size.width = 0;
+ size.height = 0;
+ angle = 0;
+ }
+ }
+
+ public void points(Point pt[])
+ {
+ double _angle = angle * Math.PI / 180.0;
+ double b = (double) Math.cos(_angle) * 0.5f;
+ double a = (double) Math.sin(_angle) * 0.5f;
+
+ pt[0] = new Point(
+ center.x - a * size.height - b * size.width,
+ center.y + b * size.height - a * size.width);
+
+ pt[1] = new Point(
+ center.x + a * size.height - b * size.width,
+ center.y - b * size.height - a * size.width);
+
+ pt[2] = new Point(
+ 2 * center.x - pt[0].x,
+ 2 * center.y - pt[0].y);
+
+ pt[3] = new Point(
+ 2 * center.x - pt[1].x,
+ 2 * center.y - pt[1].y);
+ }
+
+ public Rect boundingRect()
+ {
+ Point pt[] = new Point[4];
+ points(pt);
+ Rect r = new Rect((int) Math.floor(Math.min(Math.min(Math.min(pt[0].x, pt[1].x), pt[2].x), pt[3].x)),
+ (int) Math.floor(Math.min(Math.min(Math.min(pt[0].y, pt[1].y), pt[2].y), pt[3].y)),
+ (int) Math.ceil(Math.max(Math.max(Math.max(pt[0].x, pt[1].x), pt[2].x), pt[3].x)),
+ (int) Math.ceil(Math.max(Math.max(Math.max(pt[0].y, pt[1].y), pt[2].y), pt[3].y)));
+ r.width -= r.x - 1;
+ r.height -= r.y - 1;
+ return r;
+ }
+
+ public RotatedRect clone() {
+ return new RotatedRect(center, size, angle);
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ long temp;
+ temp = Double.doubleToLongBits(center.x);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(center.y);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(size.width);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(size.height);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(angle);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (!(obj instanceof RotatedRect)) return false;
+ RotatedRect it = (RotatedRect) obj;
+ return center.equals(it.center) && size.equals(it.size) && angle == it.angle;
+ }
+
+ @Override
+ public String toString() {
+ return "{ " + center + " " + size + " * " + angle + " }";
+ }
+}
diff --git a/library/src/main/java/org/opencv/core/Scalar.java b/library/src/main/java/org/opencv/core/Scalar.java
new file mode 100644
index 0000000..01676e4
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/Scalar.java
@@ -0,0 +1,90 @@
+package org.opencv.core;
+
+//javadoc:Scalar_
+public class Scalar {
+
+ public double val[];
+
+ public Scalar(double v0, double v1, double v2, double v3) {
+ val = new double[] { v0, v1, v2, v3 };
+ }
+
+ public Scalar(double v0, double v1, double v2) {
+ val = new double[] { v0, v1, v2, 0 };
+ }
+
+ public Scalar(double v0, double v1) {
+ val = new double[] { v0, v1, 0, 0 };
+ }
+
+ public Scalar(double v0) {
+ val = new double[] { v0, 0, 0, 0 };
+ }
+
+ public Scalar(double[] vals) {
+ if (vals != null && vals.length == 4)
+ val = vals.clone();
+ else {
+ val = new double[4];
+ set(vals);
+ }
+ }
+
+ public void set(double[] vals) {
+ if (vals != null) {
+ val[0] = vals.length > 0 ? vals[0] : 0;
+ val[1] = vals.length > 1 ? vals[1] : 0;
+ val[2] = vals.length > 2 ? vals[2] : 0;
+ val[3] = vals.length > 3 ? vals[3] : 0;
+ } else
+ val[0] = val[1] = val[2] = val[3] = 0;
+ }
+
+ public static Scalar all(double v) {
+ return new Scalar(v, v, v, v);
+ }
+
+ public Scalar clone() {
+ return new Scalar(val);
+ }
+
+ public Scalar mul(Scalar it, double scale) {
+ return new Scalar(val[0] * it.val[0] * scale, val[1] * it.val[1] * scale,
+ val[2] * it.val[2] * scale, val[3] * it.val[3] * scale);
+ }
+
+ public Scalar mul(Scalar it) {
+ return mul(it, 1);
+ }
+
+ public Scalar conj() {
+ return new Scalar(val[0], -val[1], -val[2], -val[3]);
+ }
+
+ public boolean isReal() {
+ return val[1] == 0 && val[2] == 0 && val[3] == 0;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + java.util.Arrays.hashCode(val);
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (!(obj instanceof Scalar)) return false;
+ Scalar it = (Scalar) obj;
+ if (!java.util.Arrays.equals(val, it.val)) return false;
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ return "[" + val[0] + ", " + val[1] + ", " + val[2] + ", " + val[3] + "]";
+ }
+
+}
diff --git a/library/src/main/java/org/opencv/core/Size.java b/library/src/main/java/org/opencv/core/Size.java
new file mode 100644
index 0000000..f7d69f3
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/Size.java
@@ -0,0 +1,73 @@
+package org.opencv.core;
+
+//javadoc:Size_
+public class Size {
+
+ public double width, height;
+
+ public Size(double width, double height) {
+ this.width = width;
+ this.height = height;
+ }
+
+ public Size() {
+ this(0, 0);
+ }
+
+ public Size(Point p) {
+ width = p.x;
+ height = p.y;
+ }
+
+ public Size(double[] vals) {
+ set(vals);
+ }
+
+ public void set(double[] vals) {
+ if (vals != null) {
+ width = vals.length > 0 ? vals[0] : 0;
+ height = vals.length > 1 ? vals[1] : 0;
+ } else {
+ width = 0;
+ height = 0;
+ }
+ }
+
+ public double area() {
+ return width * height;
+ }
+
+ public boolean empty() {
+ return width <= 0 || height <= 0;
+ }
+
+ public Size clone() {
+ return new Size(width, height);
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ long temp;
+ temp = Double.doubleToLongBits(height);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(width);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (!(obj instanceof Size)) return false;
+ Size it = (Size) obj;
+ return width == it.width && height == it.height;
+ }
+
+ @Override
+ public String toString() {
+ return (int)width + "x" + (int)height;
+ }
+
+}
diff --git a/library/src/main/java/org/opencv/core/TermCriteria.java b/library/src/main/java/org/opencv/core/TermCriteria.java
new file mode 100644
index 0000000..c67e51e
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/TermCriteria.java
@@ -0,0 +1,92 @@
+package org.opencv.core;
+
+//javadoc:TermCriteria
+public class TermCriteria {
+
+ /**
+ * The maximum number of iterations or elements to compute
+ */
+ public static final int COUNT = 1;
+ /**
+ * The maximum number of iterations or elements to compute
+ */
+ public static final int MAX_ITER = COUNT;
+ /**
+ * The desired accuracy threshold or change in parameters at which the iterative algorithm is terminated.
+ */
+ public static final int EPS = 2;
+
+ public int type;
+ public int maxCount;
+ public double epsilon;
+
+ /**
+ * Termination criteria for iterative algorithms.
+ *
+ * @param type
+ * the type of termination criteria: COUNT, EPS or COUNT + EPS.
+ * @param maxCount
+ * the maximum number of iterations/elements.
+ * @param epsilon
+ * the desired accuracy.
+ */
+ public TermCriteria(int type, int maxCount, double epsilon) {
+ this.type = type;
+ this.maxCount = maxCount;
+ this.epsilon = epsilon;
+ }
+
+ /**
+ * Termination criteria for iterative algorithms.
+ */
+ public TermCriteria() {
+ this(0, 0, 0.0);
+ }
+
+ public TermCriteria(double[] vals) {
+ set(vals);
+ }
+
+ public void set(double[] vals) {
+ if (vals != null) {
+ type = vals.length > 0 ? (int) vals[0] : 0;
+ maxCount = vals.length > 1 ? (int) vals[1] : 0;
+ epsilon = vals.length > 2 ? (double) vals[2] : 0;
+ } else {
+ type = 0;
+ maxCount = 0;
+ epsilon = 0;
+ }
+ }
+
+ public TermCriteria clone() {
+ return new TermCriteria(type, maxCount, epsilon);
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ long temp;
+ temp = Double.doubleToLongBits(type);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(maxCount);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(epsilon);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (!(obj instanceof TermCriteria)) return false;
+ TermCriteria it = (TermCriteria) obj;
+ return type == it.type && maxCount == it.maxCount && epsilon == it.epsilon;
+ }
+
+ @Override
+ public String toString() {
+ return "{ type: " + type + ", maxCount: " + maxCount + ", epsilon: " + epsilon + "}";
+ }
+}
diff --git a/library/src/main/java/org/opencv/core/TickMeter.java b/library/src/main/java/org/opencv/core/TickMeter.java
new file mode 100644
index 0000000..1ab5a56
--- /dev/null
+++ b/library/src/main/java/org/opencv/core/TickMeter.java
@@ -0,0 +1,181 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.core;
+
+
+
+// C++: class TickMeter
+//javadoc: TickMeter
+public class TickMeter {
+
+ protected final long nativeObj;
+ protected TickMeter(long addr) { nativeObj = addr; }
+
+ public long getNativeObjAddr() { return nativeObj; }
+
+ //
+ // C++: TickMeter()
+ //
+
+ //javadoc: TickMeter::TickMeter()
+ public TickMeter()
+ {
+
+ nativeObj = TickMeter_0();
+
+ return;
+ }
+
+
+ //
+ // C++: double getTimeMicro()
+ //
+
+ //javadoc: TickMeter::getTimeMicro()
+ public double getTimeMicro()
+ {
+
+ double retVal = getTimeMicro_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double getTimeMilli()
+ //
+
+ //javadoc: TickMeter::getTimeMilli()
+ public double getTimeMilli()
+ {
+
+ double retVal = getTimeMilli_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double getTimeSec()
+ //
+
+ //javadoc: TickMeter::getTimeSec()
+ public double getTimeSec()
+ {
+
+ double retVal = getTimeSec_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int64 getCounter()
+ //
+
+ //javadoc: TickMeter::getCounter()
+ public long getCounter()
+ {
+
+ long retVal = getCounter_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int64 getTimeTicks()
+ //
+
+ //javadoc: TickMeter::getTimeTicks()
+ public long getTimeTicks()
+ {
+
+ long retVal = getTimeTicks_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void reset()
+ //
+
+ //javadoc: TickMeter::reset()
+ public void reset()
+ {
+
+ reset_0(nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void start()
+ //
+
+ //javadoc: TickMeter::start()
+ public void start()
+ {
+
+ start_0(nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void stop()
+ //
+
+ //javadoc: TickMeter::stop()
+ public void stop()
+ {
+
+ stop_0(nativeObj);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: TickMeter()
+ private static native long TickMeter_0();
+
+ // C++: double getTimeMicro()
+ private static native double getTimeMicro_0(long nativeObj);
+
+ // C++: double getTimeMilli()
+ private static native double getTimeMilli_0(long nativeObj);
+
+ // C++: double getTimeSec()
+ private static native double getTimeSec_0(long nativeObj);
+
+ // C++: int64 getCounter()
+ private static native long getCounter_0(long nativeObj);
+
+ // C++: int64 getTimeTicks()
+ private static native long getTimeTicks_0(long nativeObj);
+
+ // C++: void reset()
+ private static native void reset_0(long nativeObj);
+
+ // C++: void start()
+ private static native void start_0(long nativeObj);
+
+ // C++: void stop()
+ private static native void stop_0(long nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/dnn/DictValue.java b/library/src/main/java/org/opencv/dnn/DictValue.java
new file mode 100644
index 0000000..87c76a2
--- /dev/null
+++ b/library/src/main/java/org/opencv/dnn/DictValue.java
@@ -0,0 +1,211 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.dnn;
+
+import java.lang.String;
+
+// C++: class DictValue
+//javadoc: DictValue
+public class DictValue {
+
+ protected final long nativeObj;
+ protected DictValue(long addr) { nativeObj = addr; }
+
+ public long getNativeObjAddr() { return nativeObj; }
+
+ //
+ // C++: DictValue(String s)
+ //
+
+ //javadoc: DictValue::DictValue(s)
+ public DictValue(String s)
+ {
+
+ nativeObj = DictValue_0(s);
+
+ return;
+ }
+
+
+ //
+ // C++: DictValue(double p)
+ //
+
+ //javadoc: DictValue::DictValue(p)
+ public DictValue(double p)
+ {
+
+ nativeObj = DictValue_1(p);
+
+ return;
+ }
+
+
+ //
+ // C++: DictValue(int i)
+ //
+
+ //javadoc: DictValue::DictValue(i)
+ public DictValue(int i)
+ {
+
+ nativeObj = DictValue_2(i);
+
+ return;
+ }
+
+
+ //
+ // C++: String getStringValue(int idx = -1)
+ //
+
+ //javadoc: DictValue::getStringValue(idx)
+ public String getStringValue(int idx)
+ {
+
+ String retVal = getStringValue_0(nativeObj, idx);
+
+ return retVal;
+ }
+
+ //javadoc: DictValue::getStringValue()
+ public String getStringValue()
+ {
+
+ String retVal = getStringValue_1(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool isInt()
+ //
+
+ //javadoc: DictValue::isInt()
+ public boolean isInt()
+ {
+
+ boolean retVal = isInt_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool isReal()
+ //
+
+ //javadoc: DictValue::isReal()
+ public boolean isReal()
+ {
+
+ boolean retVal = isReal_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool isString()
+ //
+
+ //javadoc: DictValue::isString()
+ public boolean isString()
+ {
+
+ boolean retVal = isString_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double getRealValue(int idx = -1)
+ //
+
+ //javadoc: DictValue::getRealValue(idx)
+ public double getRealValue(int idx)
+ {
+
+ double retVal = getRealValue_0(nativeObj, idx);
+
+ return retVal;
+ }
+
+ //javadoc: DictValue::getRealValue()
+ public double getRealValue()
+ {
+
+ double retVal = getRealValue_1(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getIntValue(int idx = -1)
+ //
+
+ //javadoc: DictValue::getIntValue(idx)
+ public int getIntValue(int idx)
+ {
+
+ int retVal = getIntValue_0(nativeObj, idx);
+
+ return retVal;
+ }
+
+ //javadoc: DictValue::getIntValue()
+ public int getIntValue()
+ {
+
+ int retVal = getIntValue_1(nativeObj);
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: DictValue(String s)
+ private static native long DictValue_0(String s);
+
+ // C++: DictValue(double p)
+ private static native long DictValue_1(double p);
+
+ // C++: DictValue(int i)
+ private static native long DictValue_2(int i);
+
+ // C++: String getStringValue(int idx = -1)
+ private static native String getStringValue_0(long nativeObj, int idx);
+ private static native String getStringValue_1(long nativeObj);
+
+ // C++: bool isInt()
+ private static native boolean isInt_0(long nativeObj);
+
+ // C++: bool isReal()
+ private static native boolean isReal_0(long nativeObj);
+
+ // C++: bool isString()
+ private static native boolean isString_0(long nativeObj);
+
+ // C++: double getRealValue(int idx = -1)
+ private static native double getRealValue_0(long nativeObj, int idx);
+ private static native double getRealValue_1(long nativeObj);
+
+ // C++: int getIntValue(int idx = -1)
+ private static native int getIntValue_0(long nativeObj, int idx);
+ private static native int getIntValue_1(long nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/dnn/Dnn.java b/library/src/main/java/org/opencv/dnn/Dnn.java
new file mode 100644
index 0000000..7985cb5
--- /dev/null
+++ b/library/src/main/java/org/opencv/dnn/Dnn.java
@@ -0,0 +1,303 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.dnn;
+
+import java.lang.String;
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.Scalar;
+import org.opencv.core.Size;
+import org.opencv.utils.Converters;
+
+public class Dnn {
+
+ public static final int
+ DNN_BACKEND_DEFAULT = 0,
+ DNN_BACKEND_HALIDE = 1,
+ DNN_TARGET_CPU = 0,
+ DNN_TARGET_OPENCL = 1;
+
+
+ //
+ // C++: Mat blobFromImage(Mat image, double scalefactor = 1.0, Size size = Size(), Scalar mean = Scalar(), bool swapRB = true, bool crop = true)
+ //
+
+ //javadoc: blobFromImage(image, scalefactor, size, mean, swapRB, crop)
+ public static Mat blobFromImage(Mat image, double scalefactor, Size size, Scalar mean, boolean swapRB, boolean crop)
+ {
+
+ Mat retVal = new Mat(blobFromImage_0(image.nativeObj, scalefactor, size.width, size.height, mean.val[0], mean.val[1], mean.val[2], mean.val[3], swapRB, crop));
+
+ return retVal;
+ }
+
+ //javadoc: blobFromImage(image)
+ public static Mat blobFromImage(Mat image)
+ {
+
+ Mat retVal = new Mat(blobFromImage_1(image.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat blobFromImages(vector_Mat images, double scalefactor = 1.0, Size size = Size(), Scalar mean = Scalar(), bool swapRB = true, bool crop = true)
+ //
+
+ //javadoc: blobFromImages(images, scalefactor, size, mean, swapRB, crop)
+ public static Mat blobFromImages(List images, double scalefactor, Size size, Scalar mean, boolean swapRB, boolean crop)
+ {
+ Mat images_mat = Converters.vector_Mat_to_Mat(images);
+ Mat retVal = new Mat(blobFromImages_0(images_mat.nativeObj, scalefactor, size.width, size.height, mean.val[0], mean.val[1], mean.val[2], mean.val[3], swapRB, crop));
+
+ return retVal;
+ }
+
+ //javadoc: blobFromImages(images)
+ public static Mat blobFromImages(List images)
+ {
+ Mat images_mat = Converters.vector_Mat_to_Mat(images);
+ Mat retVal = new Mat(blobFromImages_1(images_mat.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat readTorchBlob(String filename, bool isBinary = true)
+ //
+
+ //javadoc: readTorchBlob(filename, isBinary)
+ public static Mat readTorchBlob(String filename, boolean isBinary)
+ {
+
+ Mat retVal = new Mat(readTorchBlob_0(filename, isBinary));
+
+ return retVal;
+ }
+
+ //javadoc: readTorchBlob(filename)
+ public static Mat readTorchBlob(String filename)
+ {
+
+ Mat retVal = new Mat(readTorchBlob_1(filename));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Net readNetFromCaffe(String prototxt, String caffeModel = String())
+ //
+
+ //javadoc: readNetFromCaffe(prototxt, caffeModel)
+ public static Net readNetFromCaffe(String prototxt, String caffeModel)
+ {
+
+ Net retVal = new Net(readNetFromCaffe_0(prototxt, caffeModel));
+
+ return retVal;
+ }
+
+ //javadoc: readNetFromCaffe(prototxt)
+ public static Net readNetFromCaffe(String prototxt)
+ {
+
+ Net retVal = new Net(readNetFromCaffe_1(prototxt));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Net readNetFromDarknet(String cfgFile, String darknetModel = String())
+ //
+
+ //javadoc: readNetFromDarknet(cfgFile, darknetModel)
+ public static Net readNetFromDarknet(String cfgFile, String darknetModel)
+ {
+
+ Net retVal = new Net(readNetFromDarknet_0(cfgFile, darknetModel));
+
+ return retVal;
+ }
+
+ //javadoc: readNetFromDarknet(cfgFile)
+ public static Net readNetFromDarknet(String cfgFile)
+ {
+
+ Net retVal = new Net(readNetFromDarknet_1(cfgFile));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Net readNetFromTensorflow(String model, String config = String())
+ //
+
+ //javadoc: readNetFromTensorflow(model, config)
+ public static Net readNetFromTensorflow(String model, String config)
+ {
+
+ Net retVal = new Net(readNetFromTensorflow_0(model, config));
+
+ return retVal;
+ }
+
+ //javadoc: readNetFromTensorflow(model)
+ public static Net readNetFromTensorflow(String model)
+ {
+
+ Net retVal = new Net(readNetFromTensorflow_1(model));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Net readNetFromTorch(String model, bool isBinary = true)
+ //
+
+ //javadoc: readNetFromTorch(model, isBinary)
+ public static Net readNetFromTorch(String model, boolean isBinary)
+ {
+
+ Net retVal = new Net(readNetFromTorch_0(model, isBinary));
+
+ return retVal;
+ }
+
+ //javadoc: readNetFromTorch(model)
+ public static Net readNetFromTorch(String model)
+ {
+
+ Net retVal = new Net(readNetFromTorch_1(model));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Ptr_Importer createCaffeImporter(String prototxt, String caffeModel = String())
+ //
+
+ //javadoc: createCaffeImporter(prototxt, caffeModel)
+ public static Importer createCaffeImporter(String prototxt, String caffeModel)
+ {
+
+ Importer retVal = new Importer(createCaffeImporter_0(prototxt, caffeModel));
+
+ return retVal;
+ }
+
+ //javadoc: createCaffeImporter(prototxt)
+ public static Importer createCaffeImporter(String prototxt)
+ {
+
+ Importer retVal = new Importer(createCaffeImporter_1(prototxt));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Ptr_Importer createTensorflowImporter(String model)
+ //
+
+ //javadoc: createTensorflowImporter(model)
+ public static Importer createTensorflowImporter(String model)
+ {
+
+ Importer retVal = new Importer(createTensorflowImporter_0(model));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Ptr_Importer createTorchImporter(String filename, bool isBinary = true)
+ //
+
+ //javadoc: createTorchImporter(filename, isBinary)
+ public static Importer createTorchImporter(String filename, boolean isBinary)
+ {
+
+ Importer retVal = new Importer(createTorchImporter_0(filename, isBinary));
+
+ return retVal;
+ }
+
+ //javadoc: createTorchImporter(filename)
+ public static Importer createTorchImporter(String filename)
+ {
+
+ Importer retVal = new Importer(createTorchImporter_1(filename));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void shrinkCaffeModel(String src, String dst)
+ //
+
+ //javadoc: shrinkCaffeModel(src, dst)
+ public static void shrinkCaffeModel(String src, String dst)
+ {
+
+ shrinkCaffeModel_0(src, dst);
+
+ return;
+ }
+
+
+
+
+ // C++: Mat blobFromImage(Mat image, double scalefactor = 1.0, Size size = Size(), Scalar mean = Scalar(), bool swapRB = true, bool crop = true)
+ private static native long blobFromImage_0(long image_nativeObj, double scalefactor, double size_width, double size_height, double mean_val0, double mean_val1, double mean_val2, double mean_val3, boolean swapRB, boolean crop);
+ private static native long blobFromImage_1(long image_nativeObj);
+
+ // C++: Mat blobFromImages(vector_Mat images, double scalefactor = 1.0, Size size = Size(), Scalar mean = Scalar(), bool swapRB = true, bool crop = true)
+ private static native long blobFromImages_0(long images_mat_nativeObj, double scalefactor, double size_width, double size_height, double mean_val0, double mean_val1, double mean_val2, double mean_val3, boolean swapRB, boolean crop);
+ private static native long blobFromImages_1(long images_mat_nativeObj);
+
+ // C++: Mat readTorchBlob(String filename, bool isBinary = true)
+ private static native long readTorchBlob_0(String filename, boolean isBinary);
+ private static native long readTorchBlob_1(String filename);
+
+ // C++: Net readNetFromCaffe(String prototxt, String caffeModel = String())
+ private static native long readNetFromCaffe_0(String prototxt, String caffeModel);
+ private static native long readNetFromCaffe_1(String prototxt);
+
+ // C++: Net readNetFromDarknet(String cfgFile, String darknetModel = String())
+ private static native long readNetFromDarknet_0(String cfgFile, String darknetModel);
+ private static native long readNetFromDarknet_1(String cfgFile);
+
+ // C++: Net readNetFromTensorflow(String model, String config = String())
+ private static native long readNetFromTensorflow_0(String model, String config);
+ private static native long readNetFromTensorflow_1(String model);
+
+ // C++: Net readNetFromTorch(String model, bool isBinary = true)
+ private static native long readNetFromTorch_0(String model, boolean isBinary);
+ private static native long readNetFromTorch_1(String model);
+
+ // C++: Ptr_Importer createCaffeImporter(String prototxt, String caffeModel = String())
+ private static native long createCaffeImporter_0(String prototxt, String caffeModel);
+ private static native long createCaffeImporter_1(String prototxt);
+
+ // C++: Ptr_Importer createTensorflowImporter(String model)
+ private static native long createTensorflowImporter_0(String model);
+
+ // C++: Ptr_Importer createTorchImporter(String filename, bool isBinary = true)
+ private static native long createTorchImporter_0(String filename, boolean isBinary);
+ private static native long createTorchImporter_1(String filename);
+
+ // C++: void shrinkCaffeModel(String src, String dst)
+ private static native void shrinkCaffeModel_0(String src, String dst);
+
+}
diff --git a/library/src/main/java/org/opencv/dnn/Importer.java b/library/src/main/java/org/opencv/dnn/Importer.java
new file mode 100644
index 0000000..8aca7c4
--- /dev/null
+++ b/library/src/main/java/org/opencv/dnn/Importer.java
@@ -0,0 +1,43 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.dnn;
+
+import org.opencv.core.Algorithm;
+
+// C++: class Importer
+//javadoc: Importer
+public class Importer extends Algorithm {
+
+ protected Importer(long addr) { super(addr); }
+
+
+ //
+ // C++: void populateNet(Net net)
+ //
+
+ //javadoc: Importer::populateNet(net)
+ public void populateNet(Net net)
+ {
+
+ populateNet_0(nativeObj, net.nativeObj);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: void populateNet(Net net)
+ private static native void populateNet_0(long nativeObj, long net_nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/dnn/Layer.java b/library/src/main/java/org/opencv/dnn/Layer.java
new file mode 100644
index 0000000..5643694
--- /dev/null
+++ b/library/src/main/java/org/opencv/dnn/Layer.java
@@ -0,0 +1,197 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.dnn;
+
+import java.lang.String;
+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 Layer
+//javadoc: Layer
+public class Layer extends Algorithm {
+
+ protected Layer(long addr) { super(addr); }
+
+
+ //
+ // C++: vector_Mat finalize(vector_Mat inputs)
+ //
+
+ //javadoc: Layer::finalize(inputs)
+ public List finalize(List inputs)
+ {
+ Mat inputs_mat = Converters.vector_Mat_to_Mat(inputs);
+ List retVal = new ArrayList();
+ Mat retValMat = new Mat(finalize_0(nativeObj, inputs_mat.nativeObj));
+ Converters.Mat_to_vector_Mat(retValMat, retVal);
+ return retVal;
+ }
+
+
+ //
+ // C++: void finalize(vector_Mat inputs, vector_Mat& outputs)
+ //
+
+ //javadoc: Layer::finalize(inputs, outputs)
+ public void finalize(List inputs, List outputs)
+ {
+ Mat inputs_mat = Converters.vector_Mat_to_Mat(inputs);
+ Mat outputs_mat = new Mat();
+ finalize_1(nativeObj, inputs_mat.nativeObj, outputs_mat.nativeObj);
+ Converters.Mat_to_vector_Mat(outputs_mat, outputs);
+ outputs_mat.release();
+ return;
+ }
+
+
+ //
+ // C++: void forward(vector_Mat inputs, vector_Mat& outputs, vector_Mat& internals)
+ //
+
+ //javadoc: Layer::forward(inputs, outputs, internals)
+ public void forward(List inputs, List outputs, List internals)
+ {
+ Mat inputs_mat = Converters.vector_Mat_to_Mat(inputs);
+ Mat outputs_mat = Converters.vector_Mat_to_Mat(outputs);
+ Mat internals_mat = Converters.vector_Mat_to_Mat(internals);
+ forward_0(nativeObj, inputs_mat.nativeObj, outputs_mat.nativeObj, internals_mat.nativeObj);
+ Converters.Mat_to_vector_Mat(outputs_mat, outputs);
+ outputs_mat.release();
+ Converters.Mat_to_vector_Mat(internals_mat, internals);
+ internals_mat.release();
+ return;
+ }
+
+
+ //
+ // C++: void run(vector_Mat inputs, vector_Mat& outputs, vector_Mat& internals)
+ //
+
+ //javadoc: Layer::run(inputs, outputs, internals)
+ public void run(List inputs, List outputs, List internals)
+ {
+ Mat inputs_mat = Converters.vector_Mat_to_Mat(inputs);
+ Mat outputs_mat = new Mat();
+ Mat internals_mat = Converters.vector_Mat_to_Mat(internals);
+ run_0(nativeObj, inputs_mat.nativeObj, outputs_mat.nativeObj, internals_mat.nativeObj);
+ Converters.Mat_to_vector_Mat(outputs_mat, outputs);
+ outputs_mat.release();
+ Converters.Mat_to_vector_Mat(internals_mat, internals);
+ internals_mat.release();
+ return;
+ }
+
+
+ //
+ // C++: vector_Mat Layer::blobs
+ //
+
+ //javadoc: Layer::get_blobs()
+ public List get_blobs()
+ {
+ List retVal = new ArrayList();
+ Mat retValMat = new Mat(get_blobs_0(nativeObj));
+ Converters.Mat_to_vector_Mat(retValMat, retVal);
+ return retVal;
+ }
+
+
+ //
+ // C++: void Layer::blobs
+ //
+
+ //javadoc: Layer::set_blobs(blobs)
+ public void set_blobs(List blobs)
+ {
+ Mat blobs_mat = Converters.vector_Mat_to_Mat(blobs);
+ set_blobs_0(nativeObj, blobs_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: String Layer::name
+ //
+
+ //javadoc: Layer::get_name()
+ public String get_name()
+ {
+
+ String retVal = get_name_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: String Layer::type
+ //
+
+ //javadoc: Layer::get_type()
+ public String get_type()
+ {
+
+ String retVal = get_type_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int Layer::preferableTarget
+ //
+
+ //javadoc: Layer::get_preferableTarget()
+ public int get_preferableTarget()
+ {
+
+ int retVal = get_preferableTarget_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: vector_Mat finalize(vector_Mat inputs)
+ private static native long finalize_0(long nativeObj, long inputs_mat_nativeObj);
+
+ // C++: void finalize(vector_Mat inputs, vector_Mat& outputs)
+ private static native void finalize_1(long nativeObj, long inputs_mat_nativeObj, long outputs_mat_nativeObj);
+
+ // C++: void forward(vector_Mat inputs, vector_Mat& outputs, vector_Mat& internals)
+ private static native void forward_0(long nativeObj, long inputs_mat_nativeObj, long outputs_mat_nativeObj, long internals_mat_nativeObj);
+
+ // C++: void run(vector_Mat inputs, vector_Mat& outputs, vector_Mat& internals)
+ private static native void run_0(long nativeObj, long inputs_mat_nativeObj, long outputs_mat_nativeObj, long internals_mat_nativeObj);
+
+ // C++: vector_Mat Layer::blobs
+ private static native long get_blobs_0(long nativeObj);
+
+ // C++: void Layer::blobs
+ private static native void set_blobs_0(long nativeObj, long blobs_mat_nativeObj);
+
+ // C++: String Layer::name
+ private static native String get_name_0(long nativeObj);
+
+ // C++: String Layer::type
+ private static native String get_type_0(long nativeObj);
+
+ // C++: int Layer::preferableTarget
+ private static native int get_preferableTarget_0(long nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/dnn/Net.java b/library/src/main/java/org/opencv/dnn/Net.java
new file mode 100644
index 0000000..967cd51
--- /dev/null
+++ b/library/src/main/java/org/opencv/dnn/Net.java
@@ -0,0 +1,597 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.dnn;
+
+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.dnn.DictValue;
+import org.opencv.utils.Converters;
+
+// C++: class Net
+//javadoc: Net
+public class Net {
+
+ protected final long nativeObj;
+ protected Net(long addr) { nativeObj = addr; }
+
+ public long getNativeObjAddr() { return nativeObj; }
+
+ //
+ // C++: Net()
+ //
+
+ //javadoc: Net::Net()
+ public Net()
+ {
+
+ nativeObj = Net_0();
+
+ return;
+ }
+
+
+ //
+ // C++: Mat forward(String outputName = String())
+ //
+
+ //javadoc: Net::forward(outputName)
+ public Mat forward(String outputName)
+ {
+
+ Mat retVal = new Mat(forward_0(nativeObj, outputName));
+
+ return retVal;
+ }
+
+ //javadoc: Net::forward()
+ public Mat forward()
+ {
+
+ Mat retVal = new Mat(forward_1(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat getParam(LayerId layer, int numParam = 0)
+ //
+
+ //javadoc: Net::getParam(layer, numParam)
+ public Mat getParam(DictValue layer, int numParam)
+ {
+
+ Mat retVal = new Mat(getParam_0(nativeObj, layer.getNativeObjAddr(), numParam));
+
+ return retVal;
+ }
+
+ //javadoc: Net::getParam(layer)
+ public Mat getParam(DictValue layer)
+ {
+
+ Mat retVal = new Mat(getParam_1(nativeObj, layer.getNativeObjAddr()));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Ptr_Layer getLayer(LayerId layerId)
+ //
+
+ //javadoc: Net::getLayer(layerId)
+ public Layer getLayer(DictValue layerId)
+ {
+
+ Layer retVal = new Layer(getLayer_0(nativeObj, layerId.getNativeObjAddr()));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool empty()
+ //
+
+ //javadoc: Net::empty()
+ public boolean empty()
+ {
+
+ boolean retVal = empty_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getLayerId(String layer)
+ //
+
+ //javadoc: Net::getLayerId(layer)
+ public int getLayerId(String layer)
+ {
+
+ int retVal = getLayerId_0(nativeObj, layer);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getLayersCount(String layerType)
+ //
+
+ //javadoc: Net::getLayersCount(layerType)
+ public int getLayersCount(String layerType)
+ {
+
+ int retVal = getLayersCount_0(nativeObj, layerType);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int64 getFLOPS(MatShape netInputShape)
+ //
+
+ //javadoc: Net::getFLOPS(netInputShape)
+ public long getFLOPS(MatOfInt netInputShape)
+ {
+ Mat netInputShape_mat = netInputShape;
+ long retVal = getFLOPS_0(nativeObj, netInputShape_mat.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int64 getFLOPS(int layerId, MatShape netInputShape)
+ //
+
+ //javadoc: Net::getFLOPS(layerId, netInputShape)
+ public long getFLOPS(int layerId, MatOfInt netInputShape)
+ {
+ Mat netInputShape_mat = netInputShape;
+ long retVal = getFLOPS_1(nativeObj, layerId, netInputShape_mat.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int64 getFLOPS(int layerId, vector_MatShape netInputShapes)
+ //
+
+ //javadoc: Net::getFLOPS(layerId, netInputShapes)
+ public long getFLOPS(int layerId, List netInputShapes)
+ {
+
+ long retVal = getFLOPS_2(nativeObj, layerId, netInputShapes);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int64 getFLOPS(vector_MatShape netInputShapes)
+ //
+
+ //javadoc: Net::getFLOPS(netInputShapes)
+ public long getFLOPS(List netInputShapes)
+ {
+
+ long retVal = getFLOPS_3(nativeObj, netInputShapes);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int64 getPerfProfile(vector_double& timings)
+ //
+
+ //javadoc: Net::getPerfProfile(timings)
+ public long getPerfProfile(MatOfDouble timings)
+ {
+ Mat timings_mat = timings;
+ long retVal = getPerfProfile_0(nativeObj, timings_mat.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: vector_String getLayerNames()
+ //
+
+ //javadoc: Net::getLayerNames()
+ public List getLayerNames()
+ {
+
+ List retVal = getLayerNames_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: vector_int getUnconnectedOutLayers()
+ //
+
+ //javadoc: Net::getUnconnectedOutLayers()
+ public MatOfInt getUnconnectedOutLayers()
+ {
+
+ MatOfInt retVal = MatOfInt.fromNativeAddr(getUnconnectedOutLayers_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void connect(String outPin, String inpPin)
+ //
+
+ //javadoc: Net::connect(outPin, inpPin)
+ public void connect(String outPin, String inpPin)
+ {
+
+ connect_0(nativeObj, outPin, inpPin);
+
+ return;
+ }
+
+
+ //
+ // C++: void deleteLayer(LayerId layer)
+ //
+
+ //javadoc: Net::deleteLayer(layer)
+ public void deleteLayer(DictValue layer)
+ {
+
+ deleteLayer_0(nativeObj, layer.getNativeObjAddr());
+
+ return;
+ }
+
+
+ //
+ // C++: void enableFusion(bool fusion)
+ //
+
+ //javadoc: Net::enableFusion(fusion)
+ public void enableFusion(boolean fusion)
+ {
+
+ enableFusion_0(nativeObj, fusion);
+
+ return;
+ }
+
+
+ //
+ // C++: void forward(vector_Mat outputBlobs, String outputName = String())
+ //
+
+ //javadoc: Net::forward(outputBlobs, outputName)
+ public void forward(List outputBlobs, String outputName)
+ {
+ Mat outputBlobs_mat = Converters.vector_Mat_to_Mat(outputBlobs);
+ forward_2(nativeObj, outputBlobs_mat.nativeObj, outputName);
+
+ return;
+ }
+
+ //javadoc: Net::forward(outputBlobs)
+ public void forward(List outputBlobs)
+ {
+ Mat outputBlobs_mat = Converters.vector_Mat_to_Mat(outputBlobs);
+ forward_3(nativeObj, outputBlobs_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void forward(vector_Mat outputBlobs, vector_String outBlobNames)
+ //
+
+ //javadoc: Net::forward(outputBlobs, outBlobNames)
+ public void forward(List outputBlobs, List outBlobNames)
+ {
+ Mat outputBlobs_mat = Converters.vector_Mat_to_Mat(outputBlobs);
+ forward_4(nativeObj, outputBlobs_mat.nativeObj, outBlobNames);
+
+ return;
+ }
+
+
+ //
+ // C++: void forward(vector_vector_Mat outputBlobs, vector_String outBlobNames)
+ //
+
+ // Unknown type 'vector_vector_Mat' (I), skipping the function
+
+
+ //
+ // C++: void getLayerTypes(vector_String& layersTypes)
+ //
+
+ //javadoc: Net::getLayerTypes(layersTypes)
+ public void getLayerTypes(List layersTypes)
+ {
+
+ getLayerTypes_0(nativeObj, layersTypes);
+
+ return;
+ }
+
+
+ //
+ // C++: void getLayersShapes(MatShape netInputShape, vector_int& layersIds, vector_vector_MatShape& inLayersShapes, vector_vector_MatShape& outLayersShapes)
+ //
+
+ // Unknown type 'vector_vector_MatShape' (O), skipping the function
+
+
+ //
+ // C++: void getLayersShapes(vector_MatShape netInputShapes, vector_int& layersIds, vector_vector_MatShape& inLayersShapes, vector_vector_MatShape& outLayersShapes)
+ //
+
+ // Unknown type 'vector_vector_MatShape' (O), skipping the function
+
+
+ //
+ // C++: void getMemoryConsumption(MatShape netInputShape, size_t& weights, size_t& blobs)
+ //
+
+ //javadoc: Net::getMemoryConsumption(netInputShape, weights, blobs)
+ public void getMemoryConsumption(MatOfInt netInputShape, long[] weights, long[] blobs)
+ {
+ Mat netInputShape_mat = netInputShape;
+ double[] weights_out = new double[1];
+ double[] blobs_out = new double[1];
+ getMemoryConsumption_0(nativeObj, netInputShape_mat.nativeObj, weights_out, blobs_out);
+ if(weights!=null) weights[0] = (long)weights_out[0];
+ if(blobs!=null) blobs[0] = (long)blobs_out[0];
+ return;
+ }
+
+
+ //
+ // C++: void getMemoryConsumption(int layerId, MatShape netInputShape, size_t& weights, size_t& blobs)
+ //
+
+ //javadoc: Net::getMemoryConsumption(layerId, netInputShape, weights, blobs)
+ public void getMemoryConsumption(int layerId, MatOfInt netInputShape, long[] weights, long[] blobs)
+ {
+ Mat netInputShape_mat = netInputShape;
+ double[] weights_out = new double[1];
+ double[] blobs_out = new double[1];
+ getMemoryConsumption_1(nativeObj, layerId, netInputShape_mat.nativeObj, weights_out, blobs_out);
+ if(weights!=null) weights[0] = (long)weights_out[0];
+ if(blobs!=null) blobs[0] = (long)blobs_out[0];
+ return;
+ }
+
+
+ //
+ // C++: void getMemoryConsumption(int layerId, vector_MatShape netInputShapes, size_t& weights, size_t& blobs)
+ //
+
+ //javadoc: Net::getMemoryConsumption(layerId, netInputShapes, weights, blobs)
+ public void getMemoryConsumption(int layerId, List netInputShapes, long[] weights, long[] blobs)
+ {
+ double[] weights_out = new double[1];
+ double[] blobs_out = new double[1];
+ getMemoryConsumption_2(nativeObj, layerId, netInputShapes, weights_out, blobs_out);
+ if(weights!=null) weights[0] = (long)weights_out[0];
+ if(blobs!=null) blobs[0] = (long)blobs_out[0];
+ return;
+ }
+
+
+ //
+ // C++: void setHalideScheduler(String scheduler)
+ //
+
+ //javadoc: Net::setHalideScheduler(scheduler)
+ public void setHalideScheduler(String scheduler)
+ {
+
+ setHalideScheduler_0(nativeObj, scheduler);
+
+ return;
+ }
+
+
+ //
+ // C++: void setInput(Mat blob, String name = "")
+ //
+
+ //javadoc: Net::setInput(blob, name)
+ public void setInput(Mat blob, String name)
+ {
+
+ setInput_0(nativeObj, blob.nativeObj, name);
+
+ return;
+ }
+
+ //javadoc: Net::setInput(blob)
+ public void setInput(Mat blob)
+ {
+
+ setInput_1(nativeObj, blob.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void setInputsNames(vector_String inputBlobNames)
+ //
+
+ //javadoc: Net::setInputsNames(inputBlobNames)
+ public void setInputsNames(List inputBlobNames)
+ {
+
+ setInputsNames_0(nativeObj, inputBlobNames);
+
+ return;
+ }
+
+
+ //
+ // C++: void setParam(LayerId layer, int numParam, Mat blob)
+ //
+
+ //javadoc: Net::setParam(layer, numParam, blob)
+ public void setParam(DictValue layer, int numParam, Mat blob)
+ {
+
+ setParam_0(nativeObj, layer.getNativeObjAddr(), numParam, blob.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void setPreferableBackend(int backendId)
+ //
+
+ //javadoc: Net::setPreferableBackend(backendId)
+ public void setPreferableBackend(int backendId)
+ {
+
+ setPreferableBackend_0(nativeObj, backendId);
+
+ return;
+ }
+
+
+ //
+ // C++: void setPreferableTarget(int targetId)
+ //
+
+ //javadoc: Net::setPreferableTarget(targetId)
+ public void setPreferableTarget(int targetId)
+ {
+
+ setPreferableTarget_0(nativeObj, targetId);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: Net()
+ private static native long Net_0();
+
+ // C++: Mat forward(String outputName = String())
+ private static native long forward_0(long nativeObj, String outputName);
+ private static native long forward_1(long nativeObj);
+
+ // C++: Mat getParam(LayerId layer, int numParam = 0)
+ private static native long getParam_0(long nativeObj, long layer_nativeObj, int numParam);
+ private static native long getParam_1(long nativeObj, long layer_nativeObj);
+
+ // C++: Ptr_Layer getLayer(LayerId layerId)
+ private static native long getLayer_0(long nativeObj, long layerId_nativeObj);
+
+ // C++: bool empty()
+ private static native boolean empty_0(long nativeObj);
+
+ // C++: int getLayerId(String layer)
+ private static native int getLayerId_0(long nativeObj, String layer);
+
+ // C++: int getLayersCount(String layerType)
+ private static native int getLayersCount_0(long nativeObj, String layerType);
+
+ // C++: int64 getFLOPS(MatShape netInputShape)
+ private static native long getFLOPS_0(long nativeObj, long netInputShape_mat_nativeObj);
+
+ // C++: int64 getFLOPS(int layerId, MatShape netInputShape)
+ private static native long getFLOPS_1(long nativeObj, int layerId, long netInputShape_mat_nativeObj);
+
+ // C++: int64 getFLOPS(int layerId, vector_MatShape netInputShapes)
+ private static native long getFLOPS_2(long nativeObj, int layerId, List netInputShapes);
+
+ // C++: int64 getFLOPS(vector_MatShape netInputShapes)
+ private static native long getFLOPS_3(long nativeObj, List netInputShapes);
+
+ // C++: int64 getPerfProfile(vector_double& timings)
+ private static native long getPerfProfile_0(long nativeObj, long timings_mat_nativeObj);
+
+ // C++: vector_String getLayerNames()
+ private static native List getLayerNames_0(long nativeObj);
+
+ // C++: vector_int getUnconnectedOutLayers()
+ private static native long getUnconnectedOutLayers_0(long nativeObj);
+
+ // C++: void connect(String outPin, String inpPin)
+ private static native void connect_0(long nativeObj, String outPin, String inpPin);
+
+ // C++: void deleteLayer(LayerId layer)
+ private static native void deleteLayer_0(long nativeObj, long layer_nativeObj);
+
+ // C++: void enableFusion(bool fusion)
+ private static native void enableFusion_0(long nativeObj, boolean fusion);
+
+ // C++: void forward(vector_Mat outputBlobs, String outputName = String())
+ private static native void forward_2(long nativeObj, long outputBlobs_mat_nativeObj, String outputName);
+ private static native void forward_3(long nativeObj, long outputBlobs_mat_nativeObj);
+
+ // C++: void forward(vector_Mat outputBlobs, vector_String outBlobNames)
+ private static native void forward_4(long nativeObj, long outputBlobs_mat_nativeObj, List outBlobNames);
+
+ // C++: void getLayerTypes(vector_String& layersTypes)
+ private static native void getLayerTypes_0(long nativeObj, List layersTypes);
+
+ // C++: void getMemoryConsumption(MatShape netInputShape, size_t& weights, size_t& blobs)
+ private static native void getMemoryConsumption_0(long nativeObj, long netInputShape_mat_nativeObj, double[] weights_out, double[] blobs_out);
+
+ // C++: void getMemoryConsumption(int layerId, MatShape netInputShape, size_t& weights, size_t& blobs)
+ private static native void getMemoryConsumption_1(long nativeObj, int layerId, long netInputShape_mat_nativeObj, double[] weights_out, double[] blobs_out);
+
+ // C++: void getMemoryConsumption(int layerId, vector_MatShape netInputShapes, size_t& weights, size_t& blobs)
+ private static native void getMemoryConsumption_2(long nativeObj, int layerId, List netInputShapes, double[] weights_out, double[] blobs_out);
+
+ // C++: void setHalideScheduler(String scheduler)
+ private static native void setHalideScheduler_0(long nativeObj, String scheduler);
+
+ // C++: void setInput(Mat blob, String name = "")
+ private static native void setInput_0(long nativeObj, long blob_nativeObj, String name);
+ private static native void setInput_1(long nativeObj, long blob_nativeObj);
+
+ // C++: void setInputsNames(vector_String inputBlobNames)
+ private static native void setInputsNames_0(long nativeObj, List inputBlobNames);
+
+ // C++: void setParam(LayerId layer, int numParam, Mat blob)
+ private static native void setParam_0(long nativeObj, long layer_nativeObj, int numParam, long blob_nativeObj);
+
+ // C++: void setPreferableBackend(int backendId)
+ private static native void setPreferableBackend_0(long nativeObj, int backendId);
+
+ // C++: void setPreferableTarget(int targetId)
+ private static native void setPreferableTarget_0(long nativeObj, int targetId);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/features2d/AKAZE.java b/library/src/main/java/org/opencv/features2d/AKAZE.java
new file mode 100644
index 0000000..5a72f55
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/AKAZE.java
@@ -0,0 +1,315 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import java.lang.String;
+
+// C++: class AKAZE
+//javadoc: AKAZE
+public class AKAZE extends Feature2D {
+
+ protected AKAZE(long addr) { super(addr); }
+
+
+ public static final int
+ DESCRIPTOR_KAZE_UPRIGHT = 2,
+ DESCRIPTOR_KAZE = 3,
+ DESCRIPTOR_MLDB_UPRIGHT = 4,
+ DESCRIPTOR_MLDB = 5;
+
+
+ //
+ // C++: static Ptr_AKAZE create(int descriptor_type = AKAZE::DESCRIPTOR_MLDB, int descriptor_size = 0, int descriptor_channels = 3, float threshold = 0.001f, int nOctaves = 4, int nOctaveLayers = 4, int diffusivity = KAZE::DIFF_PM_G2)
+ //
+
+ //javadoc: AKAZE::create(descriptor_type, descriptor_size, descriptor_channels, threshold, nOctaves, nOctaveLayers, diffusivity)
+ public static AKAZE create(int descriptor_type, int descriptor_size, int descriptor_channels, float threshold, int nOctaves, int nOctaveLayers, int diffusivity)
+ {
+
+ AKAZE retVal = new AKAZE(create_0(descriptor_type, descriptor_size, descriptor_channels, threshold, nOctaves, nOctaveLayers, diffusivity));
+
+ return retVal;
+ }
+
+ //javadoc: AKAZE::create()
+ public static AKAZE create()
+ {
+
+ AKAZE retVal = new AKAZE(create_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: String getDefaultName()
+ //
+
+ //javadoc: AKAZE::getDefaultName()
+ public String getDefaultName()
+ {
+
+ String retVal = getDefaultName_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double getThreshold()
+ //
+
+ //javadoc: AKAZE::getThreshold()
+ public double getThreshold()
+ {
+
+ double retVal = getThreshold_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getDescriptorChannels()
+ //
+
+ //javadoc: AKAZE::getDescriptorChannels()
+ public int getDescriptorChannels()
+ {
+
+ int retVal = getDescriptorChannels_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getDescriptorSize()
+ //
+
+ //javadoc: AKAZE::getDescriptorSize()
+ public int getDescriptorSize()
+ {
+
+ int retVal = getDescriptorSize_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getDescriptorType()
+ //
+
+ //javadoc: AKAZE::getDescriptorType()
+ public int getDescriptorType()
+ {
+
+ int retVal = getDescriptorType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getDiffusivity()
+ //
+
+ //javadoc: AKAZE::getDiffusivity()
+ public int getDiffusivity()
+ {
+
+ int retVal = getDiffusivity_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getNOctaveLayers()
+ //
+
+ //javadoc: AKAZE::getNOctaveLayers()
+ public int getNOctaveLayers()
+ {
+
+ int retVal = getNOctaveLayers_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getNOctaves()
+ //
+
+ //javadoc: AKAZE::getNOctaves()
+ public int getNOctaves()
+ {
+
+ int retVal = getNOctaves_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setDescriptorChannels(int dch)
+ //
+
+ //javadoc: AKAZE::setDescriptorChannels(dch)
+ public void setDescriptorChannels(int dch)
+ {
+
+ setDescriptorChannels_0(nativeObj, dch);
+
+ return;
+ }
+
+
+ //
+ // C++: void setDescriptorSize(int dsize)
+ //
+
+ //javadoc: AKAZE::setDescriptorSize(dsize)
+ public void setDescriptorSize(int dsize)
+ {
+
+ setDescriptorSize_0(nativeObj, dsize);
+
+ return;
+ }
+
+
+ //
+ // C++: void setDescriptorType(int dtype)
+ //
+
+ //javadoc: AKAZE::setDescriptorType(dtype)
+ public void setDescriptorType(int dtype)
+ {
+
+ setDescriptorType_0(nativeObj, dtype);
+
+ return;
+ }
+
+
+ //
+ // C++: void setDiffusivity(int diff)
+ //
+
+ //javadoc: AKAZE::setDiffusivity(diff)
+ public void setDiffusivity(int diff)
+ {
+
+ setDiffusivity_0(nativeObj, diff);
+
+ return;
+ }
+
+
+ //
+ // C++: void setNOctaveLayers(int octaveLayers)
+ //
+
+ //javadoc: AKAZE::setNOctaveLayers(octaveLayers)
+ public void setNOctaveLayers(int octaveLayers)
+ {
+
+ setNOctaveLayers_0(nativeObj, octaveLayers);
+
+ return;
+ }
+
+
+ //
+ // C++: void setNOctaves(int octaves)
+ //
+
+ //javadoc: AKAZE::setNOctaves(octaves)
+ public void setNOctaves(int octaves)
+ {
+
+ setNOctaves_0(nativeObj, octaves);
+
+ return;
+ }
+
+
+ //
+ // C++: void setThreshold(double threshold)
+ //
+
+ //javadoc: AKAZE::setThreshold(threshold)
+ public void setThreshold(double threshold)
+ {
+
+ setThreshold_0(nativeObj, threshold);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: static Ptr_AKAZE create(int descriptor_type = AKAZE::DESCRIPTOR_MLDB, int descriptor_size = 0, int descriptor_channels = 3, float threshold = 0.001f, int nOctaves = 4, int nOctaveLayers = 4, int diffusivity = KAZE::DIFF_PM_G2)
+ private static native long create_0(int descriptor_type, int descriptor_size, int descriptor_channels, float threshold, int nOctaves, int nOctaveLayers, int diffusivity);
+ private static native long create_1();
+
+ // C++: String getDefaultName()
+ private static native String getDefaultName_0(long nativeObj);
+
+ // C++: double getThreshold()
+ private static native double getThreshold_0(long nativeObj);
+
+ // C++: int getDescriptorChannels()
+ private static native int getDescriptorChannels_0(long nativeObj);
+
+ // C++: int getDescriptorSize()
+ private static native int getDescriptorSize_0(long nativeObj);
+
+ // C++: int getDescriptorType()
+ private static native int getDescriptorType_0(long nativeObj);
+
+ // C++: int getDiffusivity()
+ private static native int getDiffusivity_0(long nativeObj);
+
+ // C++: int getNOctaveLayers()
+ private static native int getNOctaveLayers_0(long nativeObj);
+
+ // C++: int getNOctaves()
+ private static native int getNOctaves_0(long nativeObj);
+
+ // C++: void setDescriptorChannels(int dch)
+ private static native void setDescriptorChannels_0(long nativeObj, int dch);
+
+ // C++: void setDescriptorSize(int dsize)
+ private static native void setDescriptorSize_0(long nativeObj, int dsize);
+
+ // C++: void setDescriptorType(int dtype)
+ private static native void setDescriptorType_0(long nativeObj, int dtype);
+
+ // C++: void setDiffusivity(int diff)
+ private static native void setDiffusivity_0(long nativeObj, int diff);
+
+ // C++: void setNOctaveLayers(int octaveLayers)
+ private static native void setNOctaveLayers_0(long nativeObj, int octaveLayers);
+
+ // C++: void setNOctaves(int octaves)
+ private static native void setNOctaves_0(long nativeObj, int octaves);
+
+ // C++: void setThreshold(double threshold)
+ private static native void setThreshold_0(long nativeObj, double threshold);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/features2d/AgastFeatureDetector.java b/library/src/main/java/org/opencv/features2d/AgastFeatureDetector.java
new file mode 100644
index 0000000..ea82e14
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/AgastFeatureDetector.java
@@ -0,0 +1,181 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import java.lang.String;
+
+// C++: class AgastFeatureDetector
+//javadoc: AgastFeatureDetector
+public class AgastFeatureDetector extends Feature2D {
+
+ protected AgastFeatureDetector(long addr) { super(addr); }
+
+
+ public static final int
+ AGAST_5_8 = 0,
+ AGAST_7_12d = 1,
+ AGAST_7_12s = 2,
+ OAST_9_16 = 3,
+ THRESHOLD = 10000,
+ NONMAX_SUPPRESSION = 10001;
+
+
+ //
+ // C++: static Ptr_AgastFeatureDetector create(int threshold = 10, bool nonmaxSuppression = true, int type = AgastFeatureDetector::OAST_9_16)
+ //
+
+ //javadoc: AgastFeatureDetector::create(threshold, nonmaxSuppression, type)
+ public static AgastFeatureDetector create(int threshold, boolean nonmaxSuppression, int type)
+ {
+
+ AgastFeatureDetector retVal = new AgastFeatureDetector(create_0(threshold, nonmaxSuppression, type));
+
+ return retVal;
+ }
+
+ //javadoc: AgastFeatureDetector::create()
+ public static AgastFeatureDetector create()
+ {
+
+ AgastFeatureDetector retVal = new AgastFeatureDetector(create_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: String getDefaultName()
+ //
+
+ //javadoc: AgastFeatureDetector::getDefaultName()
+ public String getDefaultName()
+ {
+
+ String retVal = getDefaultName_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool getNonmaxSuppression()
+ //
+
+ //javadoc: AgastFeatureDetector::getNonmaxSuppression()
+ public boolean getNonmaxSuppression()
+ {
+
+ boolean retVal = getNonmaxSuppression_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getThreshold()
+ //
+
+ //javadoc: AgastFeatureDetector::getThreshold()
+ public int getThreshold()
+ {
+
+ int retVal = getThreshold_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getType()
+ //
+
+ //javadoc: AgastFeatureDetector::getType()
+ public int getType()
+ {
+
+ int retVal = getType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setNonmaxSuppression(bool f)
+ //
+
+ //javadoc: AgastFeatureDetector::setNonmaxSuppression(f)
+ public void setNonmaxSuppression(boolean f)
+ {
+
+ setNonmaxSuppression_0(nativeObj, f);
+
+ return;
+ }
+
+
+ //
+ // C++: void setThreshold(int threshold)
+ //
+
+ //javadoc: AgastFeatureDetector::setThreshold(threshold)
+ public void setThreshold(int threshold)
+ {
+
+ setThreshold_0(nativeObj, threshold);
+
+ return;
+ }
+
+
+ //
+ // C++: void setType(int type)
+ //
+
+ //javadoc: AgastFeatureDetector::setType(type)
+ public void setType(int type)
+ {
+
+ setType_0(nativeObj, type);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: static Ptr_AgastFeatureDetector create(int threshold = 10, bool nonmaxSuppression = true, int type = AgastFeatureDetector::OAST_9_16)
+ private static native long create_0(int threshold, boolean nonmaxSuppression, int type);
+ private static native long create_1();
+
+ // C++: String getDefaultName()
+ private static native String getDefaultName_0(long nativeObj);
+
+ // C++: bool getNonmaxSuppression()
+ private static native boolean getNonmaxSuppression_0(long nativeObj);
+
+ // C++: int getThreshold()
+ private static native int getThreshold_0(long nativeObj);
+
+ // C++: int getType()
+ private static native int getType_0(long nativeObj);
+
+ // C++: void setNonmaxSuppression(bool f)
+ private static native void setNonmaxSuppression_0(long nativeObj, boolean f);
+
+ // C++: void setThreshold(int threshold)
+ private static native void setThreshold_0(long nativeObj, int threshold);
+
+ // C++: void setType(int type)
+ private static native void setType_0(long nativeObj, int type);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/features2d/BFMatcher.java b/library/src/main/java/org/opencv/features2d/BFMatcher.java
new file mode 100644
index 0000000..ff5a5db
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/BFMatcher.java
@@ -0,0 +1,80 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+
+
+// C++: class BFMatcher
+//javadoc: BFMatcher
+public class BFMatcher extends DescriptorMatcher {
+
+ protected BFMatcher(long addr) { super(addr); }
+
+
+ //
+ // C++: BFMatcher(int normType = NORM_L2, bool crossCheck = false)
+ //
+
+ //javadoc: BFMatcher::BFMatcher(normType, crossCheck)
+ public BFMatcher(int normType, boolean crossCheck)
+ {
+
+ super( BFMatcher_0(normType, crossCheck) );
+
+ return;
+ }
+
+ //javadoc: BFMatcher::BFMatcher()
+ public BFMatcher()
+ {
+
+ super( BFMatcher_1() );
+
+ return;
+ }
+
+
+ //
+ // C++: static Ptr_BFMatcher create(int normType = NORM_L2, bool crossCheck = false)
+ //
+
+ //javadoc: BFMatcher::create(normType, crossCheck)
+ public static BFMatcher create(int normType, boolean crossCheck)
+ {
+
+ BFMatcher retVal = new BFMatcher(create_0(normType, crossCheck));
+
+ return retVal;
+ }
+
+ //javadoc: BFMatcher::create()
+ public static BFMatcher create()
+ {
+
+ BFMatcher retVal = new BFMatcher(create_1());
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: BFMatcher(int normType = NORM_L2, bool crossCheck = false)
+ private static native long BFMatcher_0(int normType, boolean crossCheck);
+ private static native long BFMatcher_1();
+
+ // C++: static Ptr_BFMatcher create(int normType = NORM_L2, bool crossCheck = false)
+ private static native long create_0(int normType, boolean crossCheck);
+ private static native long create_1();
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/features2d/BOWImgDescriptorExtractor.java b/library/src/main/java/org/opencv/features2d/BOWImgDescriptorExtractor.java
new file mode 100644
index 0000000..69b9c93
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/BOWImgDescriptorExtractor.java
@@ -0,0 +1,124 @@
+
+//
+// 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.MatOfKeyPoint;
+import org.opencv.utils.Converters;
+
+// C++: class BOWImgDescriptorExtractor
+//javadoc: BOWImgDescriptorExtractor
+public class BOWImgDescriptorExtractor {
+
+ protected final long nativeObj;
+ protected BOWImgDescriptorExtractor(long addr) { nativeObj = addr; }
+
+ public long getNativeObjAddr() { return nativeObj; }
+
+ //
+ // C++: BOWImgDescriptorExtractor(Ptr_DescriptorExtractor dextractor, Ptr_DescriptorMatcher dmatcher)
+ //
+
+ // Unknown type 'Ptr_DescriptorExtractor' (I), skipping the function
+
+
+ //
+ // C++: Mat getVocabulary()
+ //
+
+ //javadoc: BOWImgDescriptorExtractor::getVocabulary()
+ public Mat getVocabulary()
+ {
+
+ Mat retVal = new Mat(getVocabulary_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int descriptorSize()
+ //
+
+ //javadoc: BOWImgDescriptorExtractor::descriptorSize()
+ public int descriptorSize()
+ {
+
+ int retVal = descriptorSize_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int descriptorType()
+ //
+
+ //javadoc: BOWImgDescriptorExtractor::descriptorType()
+ public int descriptorType()
+ {
+
+ int retVal = descriptorType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void compute2(Mat image, vector_KeyPoint keypoints, Mat& imgDescriptor)
+ //
+
+ //javadoc: BOWImgDescriptorExtractor::compute2(image, keypoints, imgDescriptor)
+ public void compute(Mat image, MatOfKeyPoint keypoints, Mat imgDescriptor)
+ {
+ Mat keypoints_mat = keypoints;
+ compute_0(nativeObj, image.nativeObj, keypoints_mat.nativeObj, imgDescriptor.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void setVocabulary(Mat vocabulary)
+ //
+
+ //javadoc: BOWImgDescriptorExtractor::setVocabulary(vocabulary)
+ public void setVocabulary(Mat vocabulary)
+ {
+
+ setVocabulary_0(nativeObj, vocabulary.nativeObj);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: Mat getVocabulary()
+ private static native long getVocabulary_0(long nativeObj);
+
+ // C++: int descriptorSize()
+ private static native int descriptorSize_0(long nativeObj);
+
+ // C++: int descriptorType()
+ private static native int descriptorType_0(long nativeObj);
+
+ // C++: void compute2(Mat image, vector_KeyPoint keypoints, Mat& imgDescriptor)
+ private static native void compute_0(long nativeObj, long image_nativeObj, long keypoints_mat_nativeObj, long imgDescriptor_nativeObj);
+
+ // C++: void setVocabulary(Mat vocabulary)
+ private static native void setVocabulary_0(long nativeObj, long vocabulary_nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/features2d/BOWKMeansTrainer.java b/library/src/main/java/org/opencv/features2d/BOWKMeansTrainer.java
new file mode 100644
index 0000000..fc91726
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/BOWKMeansTrainer.java
@@ -0,0 +1,88 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import org.opencv.core.Mat;
+import org.opencv.core.TermCriteria;
+
+// C++: class BOWKMeansTrainer
+//javadoc: BOWKMeansTrainer
+public class BOWKMeansTrainer extends BOWTrainer {
+
+ protected BOWKMeansTrainer(long addr) { super(addr); }
+
+
+ //
+ // C++: BOWKMeansTrainer(int clusterCount, TermCriteria termcrit = TermCriteria(), int attempts = 3, int flags = KMEANS_PP_CENTERS)
+ //
+
+ //javadoc: BOWKMeansTrainer::BOWKMeansTrainer(clusterCount, termcrit, attempts, flags)
+ public BOWKMeansTrainer(int clusterCount, TermCriteria termcrit, int attempts, int flags)
+ {
+
+ super( BOWKMeansTrainer_0(clusterCount, termcrit.type, termcrit.maxCount, termcrit.epsilon, attempts, flags) );
+
+ return;
+ }
+
+ //javadoc: BOWKMeansTrainer::BOWKMeansTrainer(clusterCount)
+ public BOWKMeansTrainer(int clusterCount)
+ {
+
+ super( BOWKMeansTrainer_1(clusterCount) );
+
+ return;
+ }
+
+
+ //
+ // C++: Mat cluster(Mat descriptors)
+ //
+
+ //javadoc: BOWKMeansTrainer::cluster(descriptors)
+ public Mat cluster(Mat descriptors)
+ {
+
+ Mat retVal = new Mat(cluster_0(nativeObj, descriptors.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat cluster()
+ //
+
+ //javadoc: BOWKMeansTrainer::cluster()
+ public Mat cluster()
+ {
+
+ Mat retVal = new Mat(cluster_1(nativeObj));
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: BOWKMeansTrainer(int clusterCount, TermCriteria termcrit = TermCriteria(), int attempts = 3, int flags = KMEANS_PP_CENTERS)
+ private static native long BOWKMeansTrainer_0(int clusterCount, int termcrit_type, int termcrit_maxCount, double termcrit_epsilon, int attempts, int flags);
+ private static native long BOWKMeansTrainer_1(int clusterCount);
+
+ // C++: Mat cluster(Mat descriptors)
+ private static native long cluster_0(long nativeObj, long descriptors_nativeObj);
+
+ // C++: Mat cluster()
+ private static native long cluster_1(long nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/features2d/BOWTrainer.java b/library/src/main/java/org/opencv/features2d/BOWTrainer.java
new file mode 100644
index 0000000..8cc0efc
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/BOWTrainer.java
@@ -0,0 +1,133 @@
+
+//
+// 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.utils.Converters;
+
+// C++: class BOWTrainer
+//javadoc: BOWTrainer
+public class BOWTrainer {
+
+ protected final long nativeObj;
+ protected BOWTrainer(long addr) { nativeObj = addr; }
+
+ public long getNativeObjAddr() { return nativeObj; }
+
+ //
+ // C++: Mat cluster(Mat descriptors)
+ //
+
+ //javadoc: BOWTrainer::cluster(descriptors)
+ public Mat cluster(Mat descriptors)
+ {
+
+ Mat retVal = new Mat(cluster_0(nativeObj, descriptors.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Mat cluster()
+ //
+
+ //javadoc: BOWTrainer::cluster()
+ public Mat cluster()
+ {
+
+ Mat retVal = new Mat(cluster_1(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int descriptorsCount()
+ //
+
+ //javadoc: BOWTrainer::descriptorsCount()
+ public int descriptorsCount()
+ {
+
+ int retVal = descriptorsCount_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: vector_Mat getDescriptors()
+ //
+
+ //javadoc: BOWTrainer::getDescriptors()
+ public List getDescriptors()
+ {
+ List retVal = new ArrayList();
+ Mat retValMat = new Mat(getDescriptors_0(nativeObj));
+ Converters.Mat_to_vector_Mat(retValMat, retVal);
+ return retVal;
+ }
+
+
+ //
+ // C++: void add(Mat descriptors)
+ //
+
+ //javadoc: BOWTrainer::add(descriptors)
+ public void add(Mat descriptors)
+ {
+
+ add_0(nativeObj, descriptors.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void clear()
+ //
+
+ //javadoc: BOWTrainer::clear()
+ public void clear()
+ {
+
+ clear_0(nativeObj);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: Mat cluster(Mat descriptors)
+ private static native long cluster_0(long nativeObj, long descriptors_nativeObj);
+
+ // C++: Mat cluster()
+ private static native long cluster_1(long nativeObj);
+
+ // C++: int descriptorsCount()
+ private static native int descriptorsCount_0(long nativeObj);
+
+ // C++: vector_Mat getDescriptors()
+ private static native long getDescriptors_0(long nativeObj);
+
+ // C++: void add(Mat descriptors)
+ private static native void add_0(long nativeObj, long descriptors_nativeObj);
+
+ // C++: void clear()
+ private static native void clear_0(long nativeObj);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/features2d/BRISK.java b/library/src/main/java/org/opencv/features2d/BRISK.java
new file mode 100644
index 0000000..4bd8b45
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/BRISK.java
@@ -0,0 +1,136 @@
+
+//
+// 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.MatOfFloat;
+import org.opencv.core.MatOfInt;
+import org.opencv.utils.Converters;
+
+// C++: class BRISK
+//javadoc: BRISK
+public class BRISK extends Feature2D {
+
+ protected BRISK(long addr) { super(addr); }
+
+
+ //
+ // C++: static Ptr_BRISK create(int thresh, int octaves, vector_float radiusList, vector_int numberList, float dMax = 5.85f, float dMin = 8.2f, vector_int indexChange = std::vector())
+ //
+
+ //javadoc: BRISK::create(thresh, octaves, radiusList, numberList, dMax, dMin, indexChange)
+ public static BRISK create(int thresh, int octaves, MatOfFloat radiusList, MatOfInt numberList, float dMax, float dMin, MatOfInt indexChange)
+ {
+ Mat radiusList_mat = radiusList;
+ Mat numberList_mat = numberList;
+ Mat indexChange_mat = indexChange;
+ BRISK retVal = new BRISK(create_0(thresh, octaves, radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax, dMin, indexChange_mat.nativeObj));
+
+ return retVal;
+ }
+
+ //javadoc: BRISK::create(thresh, octaves, radiusList, numberList)
+ public static BRISK create(int thresh, int octaves, MatOfFloat radiusList, MatOfInt numberList)
+ {
+ Mat radiusList_mat = radiusList;
+ Mat numberList_mat = numberList;
+ BRISK retVal = new BRISK(create_1(thresh, octaves, radiusList_mat.nativeObj, numberList_mat.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static Ptr_BRISK create(int thresh = 30, int octaves = 3, float patternScale = 1.0f)
+ //
+
+ //javadoc: BRISK::create(thresh, octaves, patternScale)
+ public static BRISK create(int thresh, int octaves, float patternScale)
+ {
+
+ BRISK retVal = new BRISK(create_2(thresh, octaves, patternScale));
+
+ return retVal;
+ }
+
+ //javadoc: BRISK::create()
+ public static BRISK create()
+ {
+
+ BRISK retVal = new BRISK(create_3());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static Ptr_BRISK create(vector_float radiusList, vector_int numberList, float dMax = 5.85f, float dMin = 8.2f, vector_int indexChange = std::vector())
+ //
+
+ //javadoc: BRISK::create(radiusList, numberList, dMax, dMin, indexChange)
+ public static BRISK create(MatOfFloat radiusList, MatOfInt numberList, float dMax, float dMin, MatOfInt indexChange)
+ {
+ Mat radiusList_mat = radiusList;
+ Mat numberList_mat = numberList;
+ Mat indexChange_mat = indexChange;
+ BRISK retVal = new BRISK(create_4(radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax, dMin, indexChange_mat.nativeObj));
+
+ return retVal;
+ }
+
+ //javadoc: BRISK::create(radiusList, numberList)
+ public static BRISK create(MatOfFloat radiusList, MatOfInt numberList)
+ {
+ Mat radiusList_mat = radiusList;
+ Mat numberList_mat = numberList;
+ BRISK retVal = new BRISK(create_5(radiusList_mat.nativeObj, numberList_mat.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: String getDefaultName()
+ //
+
+ //javadoc: BRISK::getDefaultName()
+ public String getDefaultName()
+ {
+
+ String retVal = getDefaultName_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: static Ptr_BRISK create(int thresh, int octaves, vector_float radiusList, vector_int numberList, float dMax = 5.85f, float dMin = 8.2f, vector_int indexChange = std::vector())
+ private static native long create_0(int thresh, int octaves, long radiusList_mat_nativeObj, long numberList_mat_nativeObj, float dMax, float dMin, long indexChange_mat_nativeObj);
+ private static native long create_1(int thresh, int octaves, long radiusList_mat_nativeObj, long numberList_mat_nativeObj);
+
+ // C++: static Ptr_BRISK create(int thresh = 30, int octaves = 3, float patternScale = 1.0f)
+ private static native long create_2(int thresh, int octaves, float patternScale);
+ private static native long create_3();
+
+ // C++: static Ptr_BRISK create(vector_float radiusList, vector_int numberList, float dMax = 5.85f, float dMin = 8.2f, vector_int indexChange = std::vector())
+ private static native long create_4(long radiusList_mat_nativeObj, long numberList_mat_nativeObj, float dMax, float dMin, long indexChange_mat_nativeObj);
+ private static native long create_5(long radiusList_mat_nativeObj, long numberList_mat_nativeObj);
+
+ // 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/library/src/main/java/org/opencv/features2d/DescriptorExtractor.java b/library/src/main/java/org/opencv/features2d/DescriptorExtractor.java
new file mode 100644
index 0000000..a5d80b2
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/DescriptorExtractor.java
@@ -0,0 +1,196 @@
+
+//
+// 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; }
+
+ public long getNativeObjAddr() { return nativeObj; }
+
+ 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++: static Ptr_javaDescriptorExtractor create(int extractorType)
+ //
+
+ //javadoc: javaDescriptorExtractor::create(extractorType)
+ public static DescriptorExtractor create(int extractorType)
+ {
+
+ DescriptorExtractor retVal = new DescriptorExtractor(create_0(extractorType));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool empty()
+ //
+
+ //javadoc: javaDescriptorExtractor::empty()
+ public boolean empty()
+ {
+
+ boolean retVal = empty_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // 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++: 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 images, List keypoints, List descriptors)
+ {
+ Mat images_mat = Converters.vector_Mat_to_Mat(images);
+ List keypoints_tmplm = new ArrayList((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++: void read(String fileName)
+ //
+
+ //javadoc: javaDescriptorExtractor::read(fileName)
+ public void read(String fileName)
+ {
+
+ read_0(nativeObj, fileName);
+
+ return;
+ }
+
+
+ //
+ // C++: void write(String fileName)
+ //
+
+ //javadoc: javaDescriptorExtractor::write(fileName)
+ public void write(String fileName)
+ {
+
+ write_0(nativeObj, fileName);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: static Ptr_javaDescriptorExtractor create(int extractorType)
+ private static native long create_0(int extractorType);
+
+ // C++: bool empty()
+ private static native boolean empty_0(long nativeObj);
+
+ // C++: int descriptorSize()
+ private static native int descriptorSize_0(long nativeObj);
+
+ // C++: int descriptorType()
+ private static native int descriptorType_0(long 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++: void read(String fileName)
+ private static native void read_0(long nativeObj, String fileName);
+
+ // C++: void write(String fileName)
+ private static native void write_0(long nativeObj, String fileName);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/features2d/DescriptorMatcher.java b/library/src/main/java/org/opencv/features2d/DescriptorMatcher.java
new file mode 100644
index 0000000..848ec07
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/DescriptorMatcher.java
@@ -0,0 +1,411 @@
+
+//
+// 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.Algorithm;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfDMatch;
+import org.opencv.utils.Converters;
+
+// C++: class DescriptorMatcher
+//javadoc: DescriptorMatcher
+public class DescriptorMatcher extends Algorithm {
+
+ protected DescriptorMatcher(long addr) { super(addr); }
+
+
+ public static final int
+ FLANNBASED = 1,
+ BRUTEFORCE = 2,
+ BRUTEFORCE_L1 = 3,
+ BRUTEFORCE_HAMMING = 4,
+ BRUTEFORCE_HAMMINGLUT = 5,
+ BRUTEFORCE_SL2 = 6;
+
+
+ //
+ // C++: Ptr_DescriptorMatcher clone(bool emptyTrainData = false)
+ //
+
+ //javadoc: DescriptorMatcher::clone(emptyTrainData)
+ public DescriptorMatcher clone(boolean emptyTrainData)
+ {
+
+ DescriptorMatcher retVal = new DescriptorMatcher(clone_0(nativeObj, emptyTrainData));
+
+ return retVal;
+ }
+
+ //javadoc: DescriptorMatcher::clone()
+ public DescriptorMatcher clone()
+ {
+
+ DescriptorMatcher retVal = new DescriptorMatcher(clone_1(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static Ptr_DescriptorMatcher create(String descriptorMatcherType)
+ //
+
+ //javadoc: DescriptorMatcher::create(descriptorMatcherType)
+ public static DescriptorMatcher create(String descriptorMatcherType)
+ {
+
+ DescriptorMatcher retVal = new DescriptorMatcher(create_0(descriptorMatcherType));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static Ptr_DescriptorMatcher create(int matcherType)
+ //
+
+ //javadoc: DescriptorMatcher::create(matcherType)
+ public static DescriptorMatcher create(int matcherType)
+ {
+
+ DescriptorMatcher retVal = new DescriptorMatcher(create_1(matcherType));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool empty()
+ //
+
+ //javadoc: DescriptorMatcher::empty()
+ public boolean empty()
+ {
+
+ boolean retVal = empty_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool isMaskSupported()
+ //
+
+ //javadoc: DescriptorMatcher::isMaskSupported()
+ public boolean isMaskSupported()
+ {
+
+ boolean retVal = isMaskSupported_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: vector_Mat getTrainDescriptors()
+ //
+
+ //javadoc: DescriptorMatcher::getTrainDescriptors()
+ public List getTrainDescriptors()
+ {
+ List retVal = new ArrayList();
+ Mat retValMat = new Mat(getTrainDescriptors_0(nativeObj));
+ Converters.Mat_to_vector_Mat(retValMat, retVal);
+ return retVal;
+ }
+
+
+ //
+ // C++: void add(vector_Mat descriptors)
+ //
+
+ //javadoc: DescriptorMatcher::add(descriptors)
+ public void add(List descriptors)
+ {
+ Mat descriptors_mat = Converters.vector_Mat_to_Mat(descriptors);
+ add_0(nativeObj, descriptors_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void clear()
+ //
+
+ //javadoc: DescriptorMatcher::clear()
+ public void clear()
+ {
+
+ clear_0(nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void knnMatch(Mat queryDescriptors, Mat trainDescriptors, vector_vector_DMatch& matches, int k, Mat mask = Mat(), bool compactResult = false)
+ //
+
+ //javadoc: DescriptorMatcher::knnMatch(queryDescriptors, trainDescriptors, matches, k, mask, compactResult)
+ public void knnMatch(Mat queryDescriptors, Mat trainDescriptors, List 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: DescriptorMatcher::knnMatch(queryDescriptors, trainDescriptors, matches, k)
+ public void knnMatch(Mat queryDescriptors, Mat trainDescriptors, List 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 knnMatch(Mat queryDescriptors, vector_vector_DMatch& matches, int k, vector_Mat masks = vector_Mat(), bool compactResult = false)
+ //
+
+ //javadoc: DescriptorMatcher::knnMatch(queryDescriptors, matches, k, masks, compactResult)
+ public void knnMatch(Mat queryDescriptors, List matches, int k, List 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: DescriptorMatcher::knnMatch(queryDescriptors, matches, k)
+ public void knnMatch(Mat queryDescriptors, List 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 match(Mat queryDescriptors, Mat trainDescriptors, vector_DMatch& matches, Mat mask = Mat())
+ //
+
+ //javadoc: DescriptorMatcher::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: DescriptorMatcher::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 match(Mat queryDescriptors, vector_DMatch& matches, vector_Mat masks = vector_Mat())
+ //
+
+ //javadoc: DescriptorMatcher::match(queryDescriptors, matches, masks)
+ public void match(Mat queryDescriptors, MatOfDMatch matches, List 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: DescriptorMatcher::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 radiusMatch(Mat queryDescriptors, Mat trainDescriptors, vector_vector_DMatch& matches, float maxDistance, Mat mask = Mat(), bool compactResult = false)
+ //
+
+ //javadoc: DescriptorMatcher::radiusMatch(queryDescriptors, trainDescriptors, matches, maxDistance, mask, compactResult)
+ public void radiusMatch(Mat queryDescriptors, Mat trainDescriptors, List 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: DescriptorMatcher::radiusMatch(queryDescriptors, trainDescriptors, matches, maxDistance)
+ public void radiusMatch(Mat queryDescriptors, Mat trainDescriptors, List 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 radiusMatch(Mat queryDescriptors, vector_vector_DMatch& matches, float maxDistance, vector_Mat masks = vector_Mat(), bool compactResult = false)
+ //
+
+ //javadoc: DescriptorMatcher::radiusMatch(queryDescriptors, matches, maxDistance, masks, compactResult)
+ public void radiusMatch(Mat queryDescriptors, List matches, float maxDistance, List 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: DescriptorMatcher::radiusMatch(queryDescriptors, matches, maxDistance)
+ public void radiusMatch(Mat queryDescriptors, List 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++: void read(String fileName)
+ //
+
+ //javadoc: DescriptorMatcher::read(fileName)
+ public void read(String fileName)
+ {
+
+ read_0(nativeObj, fileName);
+
+ return;
+ }
+
+
+ //
+ // C++: void train()
+ //
+
+ //javadoc: DescriptorMatcher::train()
+ public void train()
+ {
+
+ train_0(nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void write(String fileName)
+ //
+
+ //javadoc: DescriptorMatcher::write(fileName)
+ public void write(String fileName)
+ {
+
+ write_0(nativeObj, fileName);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: Ptr_DescriptorMatcher clone(bool emptyTrainData = false)
+ private static native long clone_0(long nativeObj, boolean emptyTrainData);
+ private static native long clone_1(long nativeObj);
+
+ // C++: static Ptr_DescriptorMatcher create(String descriptorMatcherType)
+ private static native long create_0(String descriptorMatcherType);
+
+ // C++: static Ptr_DescriptorMatcher create(int matcherType)
+ private static native long create_1(int matcherType);
+
+ // C++: bool empty()
+ private static native boolean empty_0(long nativeObj);
+
+ // C++: bool isMaskSupported()
+ private static native boolean isMaskSupported_0(long nativeObj);
+
+ // C++: vector_Mat getTrainDescriptors()
+ private static native long getTrainDescriptors_0(long nativeObj);
+
+ // C++: void add(vector_Mat descriptors)
+ private static native void add_0(long nativeObj, long descriptors_mat_nativeObj);
+
+ // C++: void clear()
+ private static native void clear_0(long 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 knnMatch(Mat queryDescriptors, vector_vector_DMatch& matches, int k, vector_Mat masks = 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 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 match(Mat queryDescriptors, vector_DMatch& matches, vector_Mat masks = 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 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 radiusMatch(Mat queryDescriptors, vector_vector_DMatch& matches, float maxDistance, vector_Mat masks = 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++: void read(String fileName)
+ private static native void read_0(long nativeObj, String fileName);
+
+ // C++: void train()
+ private static native void train_0(long nativeObj);
+
+ // C++: void write(String fileName)
+ private static native void write_0(long nativeObj, String fileName);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/features2d/FastFeatureDetector.java b/library/src/main/java/org/opencv/features2d/FastFeatureDetector.java
new file mode 100644
index 0000000..ff91c29
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/FastFeatureDetector.java
@@ -0,0 +1,181 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import java.lang.String;
+
+// C++: class FastFeatureDetector
+//javadoc: FastFeatureDetector
+public class FastFeatureDetector extends Feature2D {
+
+ protected FastFeatureDetector(long addr) { super(addr); }
+
+
+ public static final int
+ TYPE_5_8 = 0,
+ TYPE_7_12 = 1,
+ TYPE_9_16 = 2,
+ THRESHOLD = 10000,
+ NONMAX_SUPPRESSION = 10001,
+ FAST_N = 10002;
+
+
+ //
+ // C++: static Ptr_FastFeatureDetector create(int threshold = 10, bool nonmaxSuppression = true, int type = FastFeatureDetector::TYPE_9_16)
+ //
+
+ //javadoc: FastFeatureDetector::create(threshold, nonmaxSuppression, type)
+ public static FastFeatureDetector create(int threshold, boolean nonmaxSuppression, int type)
+ {
+
+ FastFeatureDetector retVal = new FastFeatureDetector(create_0(threshold, nonmaxSuppression, type));
+
+ return retVal;
+ }
+
+ //javadoc: FastFeatureDetector::create()
+ public static FastFeatureDetector create()
+ {
+
+ FastFeatureDetector retVal = new FastFeatureDetector(create_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: String getDefaultName()
+ //
+
+ //javadoc: FastFeatureDetector::getDefaultName()
+ public String getDefaultName()
+ {
+
+ String retVal = getDefaultName_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool getNonmaxSuppression()
+ //
+
+ //javadoc: FastFeatureDetector::getNonmaxSuppression()
+ public boolean getNonmaxSuppression()
+ {
+
+ boolean retVal = getNonmaxSuppression_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getThreshold()
+ //
+
+ //javadoc: FastFeatureDetector::getThreshold()
+ public int getThreshold()
+ {
+
+ int retVal = getThreshold_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getType()
+ //
+
+ //javadoc: FastFeatureDetector::getType()
+ public int getType()
+ {
+
+ int retVal = getType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setNonmaxSuppression(bool f)
+ //
+
+ //javadoc: FastFeatureDetector::setNonmaxSuppression(f)
+ public void setNonmaxSuppression(boolean f)
+ {
+
+ setNonmaxSuppression_0(nativeObj, f);
+
+ return;
+ }
+
+
+ //
+ // C++: void setThreshold(int threshold)
+ //
+
+ //javadoc: FastFeatureDetector::setThreshold(threshold)
+ public void setThreshold(int threshold)
+ {
+
+ setThreshold_0(nativeObj, threshold);
+
+ return;
+ }
+
+
+ //
+ // C++: void setType(int type)
+ //
+
+ //javadoc: FastFeatureDetector::setType(type)
+ public void setType(int type)
+ {
+
+ setType_0(nativeObj, type);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: static Ptr_FastFeatureDetector create(int threshold = 10, bool nonmaxSuppression = true, int type = FastFeatureDetector::TYPE_9_16)
+ private static native long create_0(int threshold, boolean nonmaxSuppression, int type);
+ private static native long create_1();
+
+ // C++: String getDefaultName()
+ private static native String getDefaultName_0(long nativeObj);
+
+ // C++: bool getNonmaxSuppression()
+ private static native boolean getNonmaxSuppression_0(long nativeObj);
+
+ // C++: int getThreshold()
+ private static native int getThreshold_0(long nativeObj);
+
+ // C++: int getType()
+ private static native int getType_0(long nativeObj);
+
+ // C++: void setNonmaxSuppression(bool f)
+ private static native void setNonmaxSuppression_0(long nativeObj, boolean f);
+
+ // C++: void setThreshold(int threshold)
+ private static native void setThreshold_0(long nativeObj, int threshold);
+
+ // C++: void setType(int type)
+ private static native void setType_0(long nativeObj, int type);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/features2d/Feature2D.java b/library/src/main/java/org/opencv/features2d/Feature2D.java
new file mode 100644
index 0000000..9efed4d
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/Feature2D.java
@@ -0,0 +1,277 @@
+
+//
+// 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.Algorithm;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfKeyPoint;
+import org.opencv.utils.Converters;
+
+// C++: class Feature2D
+//javadoc: Feature2D
+public class Feature2D extends Algorithm {
+
+ protected Feature2D(long addr) { super(addr); }
+
+
+ //
+ // C++: String getDefaultName()
+ //
+
+ //javadoc: Feature2D::getDefaultName()
+ public String getDefaultName()
+ {
+
+ String retVal = getDefaultName_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool empty()
+ //
+
+ //javadoc: Feature2D::empty()
+ public boolean empty()
+ {
+
+ boolean retVal = empty_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int defaultNorm()
+ //
+
+ //javadoc: Feature2D::defaultNorm()
+ public int defaultNorm()
+ {
+
+ int retVal = defaultNorm_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int descriptorSize()
+ //
+
+ //javadoc: Feature2D::descriptorSize()
+ public int descriptorSize()
+ {
+
+ int retVal = descriptorSize_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int descriptorType()
+ //
+
+ //javadoc: Feature2D::descriptorType()
+ public int descriptorType()
+ {
+
+ int retVal = descriptorType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void compute(Mat image, vector_KeyPoint& keypoints, Mat& descriptors)
+ //
+
+ //javadoc: Feature2D::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: Feature2D::compute(images, keypoints, descriptors)
+ public void compute(List images, List keypoints, List descriptors)
+ {
+ Mat images_mat = Converters.vector_Mat_to_Mat(images);
+ List keypoints_tmplm = new ArrayList((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++: void detect(Mat image, vector_KeyPoint& keypoints, Mat mask = Mat())
+ //
+
+ //javadoc: Feature2D::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: Feature2D::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 = vector_Mat())
+ //
+
+ //javadoc: Feature2D::detect(images, keypoints, masks)
+ public void detect(List images, List keypoints, List 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: Feature2D::detect(images, keypoints)
+ public void detect(List images, List 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++: void detectAndCompute(Mat image, Mat mask, vector_KeyPoint& keypoints, Mat& descriptors, bool useProvidedKeypoints = false)
+ //
+
+ //javadoc: Feature2D::detectAndCompute(image, mask, keypoints, descriptors, useProvidedKeypoints)
+ public void detectAndCompute(Mat image, Mat mask, MatOfKeyPoint keypoints, Mat descriptors, boolean useProvidedKeypoints)
+ {
+ Mat keypoints_mat = keypoints;
+ detectAndCompute_0(nativeObj, image.nativeObj, mask.nativeObj, keypoints_mat.nativeObj, descriptors.nativeObj, useProvidedKeypoints);
+
+ return;
+ }
+
+ //javadoc: Feature2D::detectAndCompute(image, mask, keypoints, descriptors)
+ public void detectAndCompute(Mat image, Mat mask, MatOfKeyPoint keypoints, Mat descriptors)
+ {
+ Mat keypoints_mat = keypoints;
+ detectAndCompute_1(nativeObj, image.nativeObj, mask.nativeObj, keypoints_mat.nativeObj, descriptors.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void read(String fileName)
+ //
+
+ //javadoc: Feature2D::read(fileName)
+ public void read(String fileName)
+ {
+
+ read_0(nativeObj, fileName);
+
+ return;
+ }
+
+
+ //
+ // C++: void write(String fileName)
+ //
+
+ //javadoc: Feature2D::write(fileName)
+ public void write(String fileName)
+ {
+
+ write_0(nativeObj, fileName);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: String getDefaultName()
+ private static native String getDefaultName_0(long nativeObj);
+
+ // C++: bool empty()
+ private static native boolean empty_0(long nativeObj);
+
+ // C++: int defaultNorm()
+ private static native int defaultNorm_0(long nativeObj);
+
+ // C++: int descriptorSize()
+ private static native int descriptorSize_0(long nativeObj);
+
+ // C++: int descriptorType()
+ private static native int descriptorType_0(long 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++: 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 = 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++: void detectAndCompute(Mat image, Mat mask, vector_KeyPoint& keypoints, Mat& descriptors, bool useProvidedKeypoints = false)
+ private static native void detectAndCompute_0(long nativeObj, long image_nativeObj, long mask_nativeObj, long keypoints_mat_nativeObj, long descriptors_nativeObj, boolean useProvidedKeypoints);
+ private static native void detectAndCompute_1(long nativeObj, long image_nativeObj, long mask_nativeObj, long keypoints_mat_nativeObj, long descriptors_nativeObj);
+
+ // C++: void read(String fileName)
+ private static native void read_0(long nativeObj, String fileName);
+
+ // C++: void write(String fileName)
+ private static native void write_0(long nativeObj, String fileName);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/features2d/FeatureDetector.java b/library/src/main/java/org/opencv/features2d/FeatureDetector.java
new file mode 100644
index 0000000..c390459
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/FeatureDetector.java
@@ -0,0 +1,217 @@
+
+//
+// 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; }
+
+ public long getNativeObjAddr() { return nativeObj; }
+
+ 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++: static Ptr_javaFeatureDetector create(int detectorType)
+ //
+
+ //javadoc: javaFeatureDetector::create(detectorType)
+ public static FeatureDetector create(int detectorType)
+ {
+
+ FeatureDetector retVal = new FeatureDetector(create_0(detectorType));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool empty()
+ //
+
+ //javadoc: javaFeatureDetector::empty()
+ public boolean empty()
+ {
+
+ boolean retVal = empty_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // 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())
+ //
+
+ //javadoc: javaFeatureDetector::detect(images, keypoints, masks)
+ public void detect(List images, List keypoints, List 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 images, List 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++: void read(String fileName)
+ //
+
+ //javadoc: javaFeatureDetector::read(fileName)
+ public void read(String fileName)
+ {
+
+ read_0(nativeObj, fileName);
+
+ return;
+ }
+
+
+ //
+ // C++: void write(String fileName)
+ //
+
+ //javadoc: javaFeatureDetector::write(fileName)
+ public void write(String fileName)
+ {
+
+ write_0(nativeObj, fileName);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: static Ptr_javaFeatureDetector create(int detectorType)
+ private static native long create_0(int detectorType);
+
+ // C++: bool empty()
+ private static native boolean empty_0(long 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())
+ 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++: void read(String fileName)
+ private static native void read_0(long nativeObj, String fileName);
+
+ // C++: void write(String fileName)
+ private static native void write_0(long nativeObj, String fileName);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/features2d/Features2d.java b/library/src/main/java/org/opencv/features2d/Features2d.java
new file mode 100644
index 0000000..d2a458d
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/Features2d.java
@@ -0,0 +1,155 @@
+
+//
+// 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 = DrawMatchesFlags::DEFAULT)
+ //
+
+ //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(), int flags = DrawMatchesFlags::DEFAULT)
+ //
+
+ //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 >(), 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 matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor, List matchesMask, int flags)
+ {
+ Mat keypoints1_mat = keypoints1;
+ Mat keypoints2_mat = keypoints2;
+ List matches1to2_tmplm = new ArrayList((matches1to2 != null) ? matches1to2.size() : 0);
+ Mat matches1to2_mat = Converters.vector_vector_DMatch_to_Mat(matches1to2, matches1to2_tmplm);
+ List matchesMask_tmplm = new ArrayList((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 matches1to2, Mat outImg)
+ {
+ Mat keypoints1_mat = keypoints1;
+ Mat keypoints2_mat = keypoints2;
+ List matches1to2_tmplm = new ArrayList((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 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 >(), int flags = DrawMatchesFlags::DEFAULT)
+ //
+
+ //javadoc: drawMatches(img1, keypoints1, img2, keypoints2, matches1to2, outImg, matchColor, singlePointColor, matchesMask, flags)
+ public static void drawMatchesKnn(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor, List matchesMask, int flags)
+ {
+ Mat keypoints1_mat = keypoints1;
+ Mat keypoints2_mat = keypoints2;
+ List matches1to2_tmplm = new ArrayList((matches1to2 != null) ? matches1to2.size() : 0);
+ Mat matches1to2_mat = Converters.vector_vector_DMatch_to_Mat(matches1to2, matches1to2_tmplm);
+ List matchesMask_tmplm = new ArrayList((matchesMask != null) ? matchesMask.size() : 0);
+ Mat matchesMask_mat = Converters.vector_vector_char_to_Mat(matchesMask, matchesMask_tmplm);
+ drawMatchesKnn_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 drawMatchesKnn(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List matches1to2, Mat outImg)
+ {
+ Mat keypoints1_mat = keypoints1;
+ Mat keypoints2_mat = keypoints2;
+ List matches1to2_tmplm = new ArrayList((matches1to2 != null) ? matches1to2.size() : 0);
+ Mat matches1to2_mat = Converters.vector_vector_DMatch_to_Mat(matches1to2, matches1to2_tmplm);
+ drawMatchesKnn_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 = DrawMatchesFlags::DEFAULT)
+ 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(), int flags = DrawMatchesFlags::DEFAULT)
+ 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 >(), 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);
+
+ // 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 >(), int flags = DrawMatchesFlags::DEFAULT)
+ private static native void drawMatchesKnn_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 drawMatchesKnn_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/library/src/main/java/org/opencv/features2d/FlannBasedMatcher.java b/library/src/main/java/org/opencv/features2d/FlannBasedMatcher.java
new file mode 100644
index 0000000..7a01864
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/FlannBasedMatcher.java
@@ -0,0 +1,60 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+
+
+// C++: class FlannBasedMatcher
+//javadoc: FlannBasedMatcher
+public class FlannBasedMatcher extends DescriptorMatcher {
+
+ protected FlannBasedMatcher(long addr) { super(addr); }
+
+
+ //
+ // C++: FlannBasedMatcher(Ptr_flann_IndexParams indexParams = makePtr(), Ptr_flann_SearchParams searchParams = makePtr())
+ //
+
+ //javadoc: FlannBasedMatcher::FlannBasedMatcher()
+ public FlannBasedMatcher()
+ {
+
+ super( FlannBasedMatcher_0() );
+
+ return;
+ }
+
+
+ //
+ // C++: static Ptr_FlannBasedMatcher create()
+ //
+
+ //javadoc: FlannBasedMatcher::create()
+ public static FlannBasedMatcher create()
+ {
+
+ FlannBasedMatcher retVal = new FlannBasedMatcher(create_0());
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: FlannBasedMatcher(Ptr_flann_IndexParams indexParams = makePtr(), Ptr_flann_SearchParams searchParams = makePtr())
+ private static native long FlannBasedMatcher_0();
+
+ // C++: static Ptr_FlannBasedMatcher create()
+ private static native long create_0();
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/features2d/GFTTDetector.java b/library/src/main/java/org/opencv/features2d/GFTTDetector.java
new file mode 100644
index 0000000..490411f
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/GFTTDetector.java
@@ -0,0 +1,301 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import java.lang.String;
+
+// C++: class GFTTDetector
+//javadoc: GFTTDetector
+public class GFTTDetector extends Feature2D {
+
+ protected GFTTDetector(long addr) { super(addr); }
+
+
+ //
+ // C++: static Ptr_GFTTDetector create(int maxCorners, double qualityLevel, double minDistance, int blockSize, int gradiantSize, bool useHarrisDetector = false, double k = 0.04)
+ //
+
+ //javadoc: GFTTDetector::create(maxCorners, qualityLevel, minDistance, blockSize, gradiantSize, useHarrisDetector, k)
+ public static GFTTDetector create(int maxCorners, double qualityLevel, double minDistance, int blockSize, int gradiantSize, boolean useHarrisDetector, double k)
+ {
+
+ GFTTDetector retVal = new GFTTDetector(create_0(maxCorners, qualityLevel, minDistance, blockSize, gradiantSize, useHarrisDetector, k));
+
+ return retVal;
+ }
+
+ //javadoc: GFTTDetector::create(maxCorners, qualityLevel, minDistance, blockSize, gradiantSize)
+ public static GFTTDetector create(int maxCorners, double qualityLevel, double minDistance, int blockSize, int gradiantSize)
+ {
+
+ GFTTDetector retVal = new GFTTDetector(create_1(maxCorners, qualityLevel, minDistance, blockSize, gradiantSize));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static Ptr_GFTTDetector create(int maxCorners = 1000, double qualityLevel = 0.01, double minDistance = 1, int blockSize = 3, bool useHarrisDetector = false, double k = 0.04)
+ //
+
+ //javadoc: GFTTDetector::create(maxCorners, qualityLevel, minDistance, blockSize, useHarrisDetector, k)
+ public static GFTTDetector create(int maxCorners, double qualityLevel, double minDistance, int blockSize, boolean useHarrisDetector, double k)
+ {
+
+ GFTTDetector retVal = new GFTTDetector(create_2(maxCorners, qualityLevel, minDistance, blockSize, useHarrisDetector, k));
+
+ return retVal;
+ }
+
+ //javadoc: GFTTDetector::create()
+ public static GFTTDetector create()
+ {
+
+ GFTTDetector retVal = new GFTTDetector(create_3());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: String getDefaultName()
+ //
+
+ //javadoc: GFTTDetector::getDefaultName()
+ public String getDefaultName()
+ {
+
+ String retVal = getDefaultName_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool getHarrisDetector()
+ //
+
+ //javadoc: GFTTDetector::getHarrisDetector()
+ public boolean getHarrisDetector()
+ {
+
+ boolean retVal = getHarrisDetector_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double getK()
+ //
+
+ //javadoc: GFTTDetector::getK()
+ public double getK()
+ {
+
+ double retVal = getK_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double getMinDistance()
+ //
+
+ //javadoc: GFTTDetector::getMinDistance()
+ public double getMinDistance()
+ {
+
+ double retVal = getMinDistance_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double getQualityLevel()
+ //
+
+ //javadoc: GFTTDetector::getQualityLevel()
+ public double getQualityLevel()
+ {
+
+ double retVal = getQualityLevel_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getBlockSize()
+ //
+
+ //javadoc: GFTTDetector::getBlockSize()
+ public int getBlockSize()
+ {
+
+ int retVal = getBlockSize_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getMaxFeatures()
+ //
+
+ //javadoc: GFTTDetector::getMaxFeatures()
+ public int getMaxFeatures()
+ {
+
+ int retVal = getMaxFeatures_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setBlockSize(int blockSize)
+ //
+
+ //javadoc: GFTTDetector::setBlockSize(blockSize)
+ public void setBlockSize(int blockSize)
+ {
+
+ setBlockSize_0(nativeObj, blockSize);
+
+ return;
+ }
+
+
+ //
+ // C++: void setHarrisDetector(bool val)
+ //
+
+ //javadoc: GFTTDetector::setHarrisDetector(val)
+ public void setHarrisDetector(boolean val)
+ {
+
+ setHarrisDetector_0(nativeObj, val);
+
+ return;
+ }
+
+
+ //
+ // C++: void setK(double k)
+ //
+
+ //javadoc: GFTTDetector::setK(k)
+ public void setK(double k)
+ {
+
+ setK_0(nativeObj, k);
+
+ return;
+ }
+
+
+ //
+ // C++: void setMaxFeatures(int maxFeatures)
+ //
+
+ //javadoc: GFTTDetector::setMaxFeatures(maxFeatures)
+ public void setMaxFeatures(int maxFeatures)
+ {
+
+ setMaxFeatures_0(nativeObj, maxFeatures);
+
+ return;
+ }
+
+
+ //
+ // C++: void setMinDistance(double minDistance)
+ //
+
+ //javadoc: GFTTDetector::setMinDistance(minDistance)
+ public void setMinDistance(double minDistance)
+ {
+
+ setMinDistance_0(nativeObj, minDistance);
+
+ return;
+ }
+
+
+ //
+ // C++: void setQualityLevel(double qlevel)
+ //
+
+ //javadoc: GFTTDetector::setQualityLevel(qlevel)
+ public void setQualityLevel(double qlevel)
+ {
+
+ setQualityLevel_0(nativeObj, qlevel);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: static Ptr_GFTTDetector create(int maxCorners, double qualityLevel, double minDistance, int blockSize, int gradiantSize, bool useHarrisDetector = false, double k = 0.04)
+ private static native long create_0(int maxCorners, double qualityLevel, double minDistance, int blockSize, int gradiantSize, boolean useHarrisDetector, double k);
+ private static native long create_1(int maxCorners, double qualityLevel, double minDistance, int blockSize, int gradiantSize);
+
+ // C++: static Ptr_GFTTDetector create(int maxCorners = 1000, double qualityLevel = 0.01, double minDistance = 1, int blockSize = 3, bool useHarrisDetector = false, double k = 0.04)
+ private static native long create_2(int maxCorners, double qualityLevel, double minDistance, int blockSize, boolean useHarrisDetector, double k);
+ private static native long create_3();
+
+ // C++: String getDefaultName()
+ private static native String getDefaultName_0(long nativeObj);
+
+ // C++: bool getHarrisDetector()
+ private static native boolean getHarrisDetector_0(long nativeObj);
+
+ // C++: double getK()
+ private static native double getK_0(long nativeObj);
+
+ // C++: double getMinDistance()
+ private static native double getMinDistance_0(long nativeObj);
+
+ // C++: double getQualityLevel()
+ private static native double getQualityLevel_0(long nativeObj);
+
+ // C++: int getBlockSize()
+ private static native int getBlockSize_0(long nativeObj);
+
+ // C++: int getMaxFeatures()
+ private static native int getMaxFeatures_0(long nativeObj);
+
+ // C++: void setBlockSize(int blockSize)
+ private static native void setBlockSize_0(long nativeObj, int blockSize);
+
+ // C++: void setHarrisDetector(bool val)
+ private static native void setHarrisDetector_0(long nativeObj, boolean val);
+
+ // C++: void setK(double k)
+ private static native void setK_0(long nativeObj, double k);
+
+ // C++: void setMaxFeatures(int maxFeatures)
+ private static native void setMaxFeatures_0(long nativeObj, int maxFeatures);
+
+ // C++: void setMinDistance(double minDistance)
+ private static native void setMinDistance_0(long nativeObj, double minDistance);
+
+ // C++: void setQualityLevel(double qlevel)
+ private static native void setQualityLevel_0(long nativeObj, double qlevel);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/features2d/KAZE.java b/library/src/main/java/org/opencv/features2d/KAZE.java
new file mode 100644
index 0000000..26a5148
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/KAZE.java
@@ -0,0 +1,281 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import java.lang.String;
+
+// C++: class KAZE
+//javadoc: KAZE
+public class KAZE extends Feature2D {
+
+ protected KAZE(long addr) { super(addr); }
+
+
+ public static final int
+ DIFF_PM_G1 = 0,
+ DIFF_PM_G2 = 1,
+ DIFF_WEICKERT = 2,
+ DIFF_CHARBONNIER = 3;
+
+
+ //
+ // C++: static Ptr_KAZE create(bool extended = false, bool upright = false, float threshold = 0.001f, int nOctaves = 4, int nOctaveLayers = 4, int diffusivity = KAZE::DIFF_PM_G2)
+ //
+
+ //javadoc: KAZE::create(extended, upright, threshold, nOctaves, nOctaveLayers, diffusivity)
+ public static KAZE create(boolean extended, boolean upright, float threshold, int nOctaves, int nOctaveLayers, int diffusivity)
+ {
+
+ KAZE retVal = new KAZE(create_0(extended, upright, threshold, nOctaves, nOctaveLayers, diffusivity));
+
+ return retVal;
+ }
+
+ //javadoc: KAZE::create()
+ public static KAZE create()
+ {
+
+ KAZE retVal = new KAZE(create_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: String getDefaultName()
+ //
+
+ //javadoc: KAZE::getDefaultName()
+ public String getDefaultName()
+ {
+
+ String retVal = getDefaultName_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool getExtended()
+ //
+
+ //javadoc: KAZE::getExtended()
+ public boolean getExtended()
+ {
+
+ boolean retVal = getExtended_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool getUpright()
+ //
+
+ //javadoc: KAZE::getUpright()
+ public boolean getUpright()
+ {
+
+ boolean retVal = getUpright_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double getThreshold()
+ //
+
+ //javadoc: KAZE::getThreshold()
+ public double getThreshold()
+ {
+
+ double retVal = getThreshold_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getDiffusivity()
+ //
+
+ //javadoc: KAZE::getDiffusivity()
+ public int getDiffusivity()
+ {
+
+ int retVal = getDiffusivity_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getNOctaveLayers()
+ //
+
+ //javadoc: KAZE::getNOctaveLayers()
+ public int getNOctaveLayers()
+ {
+
+ int retVal = getNOctaveLayers_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getNOctaves()
+ //
+
+ //javadoc: KAZE::getNOctaves()
+ public int getNOctaves()
+ {
+
+ int retVal = getNOctaves_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setDiffusivity(int diff)
+ //
+
+ //javadoc: KAZE::setDiffusivity(diff)
+ public void setDiffusivity(int diff)
+ {
+
+ setDiffusivity_0(nativeObj, diff);
+
+ return;
+ }
+
+
+ //
+ // C++: void setExtended(bool extended)
+ //
+
+ //javadoc: KAZE::setExtended(extended)
+ public void setExtended(boolean extended)
+ {
+
+ setExtended_0(nativeObj, extended);
+
+ return;
+ }
+
+
+ //
+ // C++: void setNOctaveLayers(int octaveLayers)
+ //
+
+ //javadoc: KAZE::setNOctaveLayers(octaveLayers)
+ public void setNOctaveLayers(int octaveLayers)
+ {
+
+ setNOctaveLayers_0(nativeObj, octaveLayers);
+
+ return;
+ }
+
+
+ //
+ // C++: void setNOctaves(int octaves)
+ //
+
+ //javadoc: KAZE::setNOctaves(octaves)
+ public void setNOctaves(int octaves)
+ {
+
+ setNOctaves_0(nativeObj, octaves);
+
+ return;
+ }
+
+
+ //
+ // C++: void setThreshold(double threshold)
+ //
+
+ //javadoc: KAZE::setThreshold(threshold)
+ public void setThreshold(double threshold)
+ {
+
+ setThreshold_0(nativeObj, threshold);
+
+ return;
+ }
+
+
+ //
+ // C++: void setUpright(bool upright)
+ //
+
+ //javadoc: KAZE::setUpright(upright)
+ public void setUpright(boolean upright)
+ {
+
+ setUpright_0(nativeObj, upright);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: static Ptr_KAZE create(bool extended = false, bool upright = false, float threshold = 0.001f, int nOctaves = 4, int nOctaveLayers = 4, int diffusivity = KAZE::DIFF_PM_G2)
+ private static native long create_0(boolean extended, boolean upright, float threshold, int nOctaves, int nOctaveLayers, int diffusivity);
+ private static native long create_1();
+
+ // C++: String getDefaultName()
+ private static native String getDefaultName_0(long nativeObj);
+
+ // C++: bool getExtended()
+ private static native boolean getExtended_0(long nativeObj);
+
+ // C++: bool getUpright()
+ private static native boolean getUpright_0(long nativeObj);
+
+ // C++: double getThreshold()
+ private static native double getThreshold_0(long nativeObj);
+
+ // C++: int getDiffusivity()
+ private static native int getDiffusivity_0(long nativeObj);
+
+ // C++: int getNOctaveLayers()
+ private static native int getNOctaveLayers_0(long nativeObj);
+
+ // C++: int getNOctaves()
+ private static native int getNOctaves_0(long nativeObj);
+
+ // C++: void setDiffusivity(int diff)
+ private static native void setDiffusivity_0(long nativeObj, int diff);
+
+ // C++: void setExtended(bool extended)
+ private static native void setExtended_0(long nativeObj, boolean extended);
+
+ // C++: void setNOctaveLayers(int octaveLayers)
+ private static native void setNOctaveLayers_0(long nativeObj, int octaveLayers);
+
+ // C++: void setNOctaves(int octaves)
+ private static native void setNOctaves_0(long nativeObj, int octaves);
+
+ // C++: void setThreshold(double threshold)
+ private static native void setThreshold_0(long nativeObj, double threshold);
+
+ // C++: void setUpright(bool upright)
+ private static native void setUpright_0(long nativeObj, boolean upright);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/features2d/MSER.java b/library/src/main/java/org/opencv/features2d/MSER.java
new file mode 100644
index 0000000..2f3d088
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/MSER.java
@@ -0,0 +1,231 @@
+
+//
+// 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.MatOfPoint;
+import org.opencv.core.MatOfRect;
+import org.opencv.utils.Converters;
+
+// C++: class MSER
+//javadoc: MSER
+public class MSER extends Feature2D {
+
+ protected MSER(long addr) { super(addr); }
+
+
+ //
+ // C++: static Ptr_MSER create(int _delta = 5, int _min_area = 60, int _max_area = 14400, double _max_variation = 0.25, double _min_diversity = .2, int _max_evolution = 200, double _area_threshold = 1.01, double _min_margin = 0.003, int _edge_blur_size = 5)
+ //
+
+ //javadoc: MSER::create(_delta, _min_area, _max_area, _max_variation, _min_diversity, _max_evolution, _area_threshold, _min_margin, _edge_blur_size)
+ public static MSER create(int _delta, int _min_area, int _max_area, double _max_variation, double _min_diversity, int _max_evolution, double _area_threshold, double _min_margin, int _edge_blur_size)
+ {
+
+ MSER retVal = new MSER(create_0(_delta, _min_area, _max_area, _max_variation, _min_diversity, _max_evolution, _area_threshold, _min_margin, _edge_blur_size));
+
+ return retVal;
+ }
+
+ //javadoc: MSER::create()
+ public static MSER create()
+ {
+
+ MSER retVal = new MSER(create_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: String getDefaultName()
+ //
+
+ //javadoc: MSER::getDefaultName()
+ public String getDefaultName()
+ {
+
+ String retVal = getDefaultName_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool getPass2Only()
+ //
+
+ //javadoc: MSER::getPass2Only()
+ public boolean getPass2Only()
+ {
+
+ boolean retVal = getPass2Only_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getDelta()
+ //
+
+ //javadoc: MSER::getDelta()
+ public int getDelta()
+ {
+
+ int retVal = getDelta_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getMaxArea()
+ //
+
+ //javadoc: MSER::getMaxArea()
+ public int getMaxArea()
+ {
+
+ int retVal = getMaxArea_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getMinArea()
+ //
+
+ //javadoc: MSER::getMinArea()
+ public int getMinArea()
+ {
+
+ int retVal = getMinArea_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void detectRegions(Mat image, vector_vector_Point& msers, vector_Rect& bboxes)
+ //
+
+ //javadoc: MSER::detectRegions(image, msers, bboxes)
+ public void detectRegions(Mat image, List msers, MatOfRect bboxes)
+ {
+ Mat msers_mat = new Mat();
+ Mat bboxes_mat = bboxes;
+ detectRegions_0(nativeObj, image.nativeObj, msers_mat.nativeObj, bboxes_mat.nativeObj);
+ Converters.Mat_to_vector_vector_Point(msers_mat, msers);
+ msers_mat.release();
+ return;
+ }
+
+
+ //
+ // C++: void setDelta(int delta)
+ //
+
+ //javadoc: MSER::setDelta(delta)
+ public void setDelta(int delta)
+ {
+
+ setDelta_0(nativeObj, delta);
+
+ return;
+ }
+
+
+ //
+ // C++: void setMaxArea(int maxArea)
+ //
+
+ //javadoc: MSER::setMaxArea(maxArea)
+ public void setMaxArea(int maxArea)
+ {
+
+ setMaxArea_0(nativeObj, maxArea);
+
+ return;
+ }
+
+
+ //
+ // C++: void setMinArea(int minArea)
+ //
+
+ //javadoc: MSER::setMinArea(minArea)
+ public void setMinArea(int minArea)
+ {
+
+ setMinArea_0(nativeObj, minArea);
+
+ return;
+ }
+
+
+ //
+ // C++: void setPass2Only(bool f)
+ //
+
+ //javadoc: MSER::setPass2Only(f)
+ public void setPass2Only(boolean f)
+ {
+
+ setPass2Only_0(nativeObj, f);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: static Ptr_MSER create(int _delta = 5, int _min_area = 60, int _max_area = 14400, double _max_variation = 0.25, double _min_diversity = .2, int _max_evolution = 200, double _area_threshold = 1.01, double _min_margin = 0.003, int _edge_blur_size = 5)
+ private static native long create_0(int _delta, int _min_area, int _max_area, double _max_variation, double _min_diversity, int _max_evolution, double _area_threshold, double _min_margin, int _edge_blur_size);
+ private static native long create_1();
+
+ // C++: String getDefaultName()
+ private static native String getDefaultName_0(long nativeObj);
+
+ // C++: bool getPass2Only()
+ private static native boolean getPass2Only_0(long nativeObj);
+
+ // C++: int getDelta()
+ private static native int getDelta_0(long nativeObj);
+
+ // C++: int getMaxArea()
+ private static native int getMaxArea_0(long nativeObj);
+
+ // C++: int getMinArea()
+ private static native int getMinArea_0(long nativeObj);
+
+ // C++: void detectRegions(Mat image, vector_vector_Point& msers, vector_Rect& bboxes)
+ private static native void detectRegions_0(long nativeObj, long image_nativeObj, long msers_mat_nativeObj, long bboxes_mat_nativeObj);
+
+ // C++: void setDelta(int delta)
+ private static native void setDelta_0(long nativeObj, int delta);
+
+ // C++: void setMaxArea(int maxArea)
+ private static native void setMaxArea_0(long nativeObj, int maxArea);
+
+ // C++: void setMinArea(int minArea)
+ private static native void setMinArea_0(long nativeObj, int minArea);
+
+ // C++: void setPass2Only(bool f)
+ private static native void setPass2Only_0(long nativeObj, boolean f);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/features2d/ORB.java b/library/src/main/java/org/opencv/features2d/ORB.java
new file mode 100644
index 0000000..5a68043
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/ORB.java
@@ -0,0 +1,382 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import java.lang.String;
+
+// C++: class ORB
+//javadoc: ORB
+public class ORB extends Feature2D {
+
+ protected ORB(long addr) { super(addr); }
+
+
+ public static final int
+ kBytes = 32,
+ HARRIS_SCORE = 0,
+ FAST_SCORE = 1;
+
+
+ //
+ // C++: static Ptr_ORB create(int nfeatures = 500, float scaleFactor = 1.2f, int nlevels = 8, int edgeThreshold = 31, int firstLevel = 0, int WTA_K = 2, int scoreType = ORB::HARRIS_SCORE, int patchSize = 31, int fastThreshold = 20)
+ //
+
+ //javadoc: ORB::create(nfeatures, scaleFactor, nlevels, edgeThreshold, firstLevel, WTA_K, scoreType, patchSize, fastThreshold)
+ public static ORB create(int nfeatures, float scaleFactor, int nlevels, int edgeThreshold, int firstLevel, int WTA_K, int scoreType, int patchSize, int fastThreshold)
+ {
+
+ ORB retVal = new ORB(create_0(nfeatures, scaleFactor, nlevels, edgeThreshold, firstLevel, WTA_K, scoreType, patchSize, fastThreshold));
+
+ return retVal;
+ }
+
+ //javadoc: ORB::create()
+ public static ORB create()
+ {
+
+ ORB retVal = new ORB(create_1());
+
+ return retVal;
+ }
+
+
+ //
+ // C++: String getDefaultName()
+ //
+
+ //javadoc: ORB::getDefaultName()
+ public String getDefaultName()
+ {
+
+ String retVal = getDefaultName_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double getScaleFactor()
+ //
+
+ //javadoc: ORB::getScaleFactor()
+ public double getScaleFactor()
+ {
+
+ double retVal = getScaleFactor_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getEdgeThreshold()
+ //
+
+ //javadoc: ORB::getEdgeThreshold()
+ public int getEdgeThreshold()
+ {
+
+ int retVal = getEdgeThreshold_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getFastThreshold()
+ //
+
+ //javadoc: ORB::getFastThreshold()
+ public int getFastThreshold()
+ {
+
+ int retVal = getFastThreshold_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getFirstLevel()
+ //
+
+ //javadoc: ORB::getFirstLevel()
+ public int getFirstLevel()
+ {
+
+ int retVal = getFirstLevel_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getMaxFeatures()
+ //
+
+ //javadoc: ORB::getMaxFeatures()
+ public int getMaxFeatures()
+ {
+
+ int retVal = getMaxFeatures_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getNLevels()
+ //
+
+ //javadoc: ORB::getNLevels()
+ public int getNLevels()
+ {
+
+ int retVal = getNLevels_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getPatchSize()
+ //
+
+ //javadoc: ORB::getPatchSize()
+ public int getPatchSize()
+ {
+
+ int retVal = getPatchSize_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getScoreType()
+ //
+
+ //javadoc: ORB::getScoreType()
+ public int getScoreType()
+ {
+
+ int retVal = getScoreType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int getWTA_K()
+ //
+
+ //javadoc: ORB::getWTA_K()
+ public int getWTA_K()
+ {
+
+ int retVal = getWTA_K_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void setEdgeThreshold(int edgeThreshold)
+ //
+
+ //javadoc: ORB::setEdgeThreshold(edgeThreshold)
+ public void setEdgeThreshold(int edgeThreshold)
+ {
+
+ setEdgeThreshold_0(nativeObj, edgeThreshold);
+
+ return;
+ }
+
+
+ //
+ // C++: void setFastThreshold(int fastThreshold)
+ //
+
+ //javadoc: ORB::setFastThreshold(fastThreshold)
+ public void setFastThreshold(int fastThreshold)
+ {
+
+ setFastThreshold_0(nativeObj, fastThreshold);
+
+ return;
+ }
+
+
+ //
+ // C++: void setFirstLevel(int firstLevel)
+ //
+
+ //javadoc: ORB::setFirstLevel(firstLevel)
+ public void setFirstLevel(int firstLevel)
+ {
+
+ setFirstLevel_0(nativeObj, firstLevel);
+
+ return;
+ }
+
+
+ //
+ // C++: void setMaxFeatures(int maxFeatures)
+ //
+
+ //javadoc: ORB::setMaxFeatures(maxFeatures)
+ public void setMaxFeatures(int maxFeatures)
+ {
+
+ setMaxFeatures_0(nativeObj, maxFeatures);
+
+ return;
+ }
+
+
+ //
+ // C++: void setNLevels(int nlevels)
+ //
+
+ //javadoc: ORB::setNLevels(nlevels)
+ public void setNLevels(int nlevels)
+ {
+
+ setNLevels_0(nativeObj, nlevels);
+
+ return;
+ }
+
+
+ //
+ // C++: void setPatchSize(int patchSize)
+ //
+
+ //javadoc: ORB::setPatchSize(patchSize)
+ public void setPatchSize(int patchSize)
+ {
+
+ setPatchSize_0(nativeObj, patchSize);
+
+ return;
+ }
+
+
+ //
+ // C++: void setScaleFactor(double scaleFactor)
+ //
+
+ //javadoc: ORB::setScaleFactor(scaleFactor)
+ public void setScaleFactor(double scaleFactor)
+ {
+
+ setScaleFactor_0(nativeObj, scaleFactor);
+
+ return;
+ }
+
+
+ //
+ // C++: void setScoreType(int scoreType)
+ //
+
+ //javadoc: ORB::setScoreType(scoreType)
+ public void setScoreType(int scoreType)
+ {
+
+ setScoreType_0(nativeObj, scoreType);
+
+ return;
+ }
+
+
+ //
+ // C++: void setWTA_K(int wta_k)
+ //
+
+ //javadoc: ORB::setWTA_K(wta_k)
+ public void setWTA_K(int wta_k)
+ {
+
+ setWTA_K_0(nativeObj, wta_k);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: static Ptr_ORB create(int nfeatures = 500, float scaleFactor = 1.2f, int nlevels = 8, int edgeThreshold = 31, int firstLevel = 0, int WTA_K = 2, int scoreType = ORB::HARRIS_SCORE, int patchSize = 31, int fastThreshold = 20)
+ private static native long create_0(int nfeatures, float scaleFactor, int nlevels, int edgeThreshold, int firstLevel, int WTA_K, int scoreType, int patchSize, int fastThreshold);
+ private static native long create_1();
+
+ // C++: String getDefaultName()
+ private static native String getDefaultName_0(long nativeObj);
+
+ // C++: double getScaleFactor()
+ private static native double getScaleFactor_0(long nativeObj);
+
+ // C++: int getEdgeThreshold()
+ private static native int getEdgeThreshold_0(long nativeObj);
+
+ // C++: int getFastThreshold()
+ private static native int getFastThreshold_0(long nativeObj);
+
+ // C++: int getFirstLevel()
+ private static native int getFirstLevel_0(long nativeObj);
+
+ // C++: int getMaxFeatures()
+ private static native int getMaxFeatures_0(long nativeObj);
+
+ // C++: int getNLevels()
+ private static native int getNLevels_0(long nativeObj);
+
+ // C++: int getPatchSize()
+ private static native int getPatchSize_0(long nativeObj);
+
+ // C++: int getScoreType()
+ private static native int getScoreType_0(long nativeObj);
+
+ // C++: int getWTA_K()
+ private static native int getWTA_K_0(long nativeObj);
+
+ // C++: void setEdgeThreshold(int edgeThreshold)
+ private static native void setEdgeThreshold_0(long nativeObj, int edgeThreshold);
+
+ // C++: void setFastThreshold(int fastThreshold)
+ private static native void setFastThreshold_0(long nativeObj, int fastThreshold);
+
+ // C++: void setFirstLevel(int firstLevel)
+ private static native void setFirstLevel_0(long nativeObj, int firstLevel);
+
+ // C++: void setMaxFeatures(int maxFeatures)
+ private static native void setMaxFeatures_0(long nativeObj, int maxFeatures);
+
+ // C++: void setNLevels(int nlevels)
+ private static native void setNLevels_0(long nativeObj, int nlevels);
+
+ // C++: void setPatchSize(int patchSize)
+ private static native void setPatchSize_0(long nativeObj, int patchSize);
+
+ // C++: void setScaleFactor(double scaleFactor)
+ private static native void setScaleFactor_0(long nativeObj, double scaleFactor);
+
+ // C++: void setScoreType(int scoreType)
+ private static native void setScoreType_0(long nativeObj, int scoreType);
+
+ // C++: void setWTA_K(int wta_k)
+ private static native void setWTA_K_0(long nativeObj, int wta_k);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/features2d/Params.java b/library/src/main/java/org/opencv/features2d/Params.java
new file mode 100644
index 0000000..4647852
--- /dev/null
+++ b/library/src/main/java/org/opencv/features2d/Params.java
@@ -0,0 +1,671 @@
+
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+
+
+// C++: class Params
+//javadoc: Params
+public class Params {
+
+ protected final long nativeObj;
+ protected Params(long addr) { nativeObj = addr; }
+
+ public long getNativeObjAddr() { return nativeObj; }
+
+ //
+ // C++: Params()
+ //
+
+ //javadoc: Params::Params()
+ public Params()
+ {
+
+ nativeObj = Params_0();
+
+ return;
+ }
+
+
+ //
+ // C++: float Params::thresholdStep
+ //
+
+ //javadoc: Params::get_thresholdStep()
+ public float get_thresholdStep()
+ {
+
+ float retVal = get_thresholdStep_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Params::thresholdStep
+ //
+
+ //javadoc: Params::set_thresholdStep(thresholdStep)
+ public void set_thresholdStep(float thresholdStep)
+ {
+
+ set_thresholdStep_0(nativeObj, thresholdStep);
+
+ return;
+ }
+
+
+ //
+ // C++: float Params::minThreshold
+ //
+
+ //javadoc: Params::get_minThreshold()
+ public float get_minThreshold()
+ {
+
+ float retVal = get_minThreshold_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Params::minThreshold
+ //
+
+ //javadoc: Params::set_minThreshold(minThreshold)
+ public void set_minThreshold(float minThreshold)
+ {
+
+ set_minThreshold_0(nativeObj, minThreshold);
+
+ return;
+ }
+
+
+ //
+ // C++: float Params::maxThreshold
+ //
+
+ //javadoc: Params::get_maxThreshold()
+ public float get_maxThreshold()
+ {
+
+ float retVal = get_maxThreshold_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Params::maxThreshold
+ //
+
+ //javadoc: Params::set_maxThreshold(maxThreshold)
+ public void set_maxThreshold(float maxThreshold)
+ {
+
+ set_maxThreshold_0(nativeObj, maxThreshold);
+
+ return;
+ }
+
+
+ //
+ // C++: size_t Params::minRepeatability
+ //
+
+ //javadoc: Params::get_minRepeatability()
+ public long get_minRepeatability()
+ {
+
+ long retVal = get_minRepeatability_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Params::minRepeatability
+ //
+
+ //javadoc: Params::set_minRepeatability(minRepeatability)
+ public void set_minRepeatability(long minRepeatability)
+ {
+
+ set_minRepeatability_0(nativeObj, minRepeatability);
+
+ return;
+ }
+
+
+ //
+ // C++: float Params::minDistBetweenBlobs
+ //
+
+ //javadoc: Params::get_minDistBetweenBlobs()
+ public float get_minDistBetweenBlobs()
+ {
+
+ float retVal = get_minDistBetweenBlobs_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Params::minDistBetweenBlobs
+ //
+
+ //javadoc: Params::set_minDistBetweenBlobs(minDistBetweenBlobs)
+ public void set_minDistBetweenBlobs(float minDistBetweenBlobs)
+ {
+
+ set_minDistBetweenBlobs_0(nativeObj, minDistBetweenBlobs);
+
+ return;
+ }
+
+
+ //
+ // C++: bool Params::filterByColor
+ //
+
+ //javadoc: Params::get_filterByColor()
+ public boolean get_filterByColor()
+ {
+
+ boolean retVal = get_filterByColor_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Params::filterByColor
+ //
+
+ //javadoc: Params::set_filterByColor(filterByColor)
+ public void set_filterByColor(boolean filterByColor)
+ {
+
+ set_filterByColor_0(nativeObj, filterByColor);
+
+ return;
+ }
+
+
+ //
+ // C++: uchar Params::blobColor
+ //
+
+ // Return type 'uchar' is not supported, skipping the function
+
+
+ //
+ // C++: void Params::blobColor
+ //
+
+ // Unknown type 'uchar' (I), skipping the function
+
+
+ //
+ // C++: bool Params::filterByArea
+ //
+
+ //javadoc: Params::get_filterByArea()
+ public boolean get_filterByArea()
+ {
+
+ boolean retVal = get_filterByArea_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Params::filterByArea
+ //
+
+ //javadoc: Params::set_filterByArea(filterByArea)
+ public void set_filterByArea(boolean filterByArea)
+ {
+
+ set_filterByArea_0(nativeObj, filterByArea);
+
+ return;
+ }
+
+
+ //
+ // C++: float Params::minArea
+ //
+
+ //javadoc: Params::get_minArea()
+ public float get_minArea()
+ {
+
+ float retVal = get_minArea_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Params::minArea
+ //
+
+ //javadoc: Params::set_minArea(minArea)
+ public void set_minArea(float minArea)
+ {
+
+ set_minArea_0(nativeObj, minArea);
+
+ return;
+ }
+
+
+ //
+ // C++: float Params::maxArea
+ //
+
+ //javadoc: Params::get_maxArea()
+ public float get_maxArea()
+ {
+
+ float retVal = get_maxArea_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Params::maxArea
+ //
+
+ //javadoc: Params::set_maxArea(maxArea)
+ public void set_maxArea(float maxArea)
+ {
+
+ set_maxArea_0(nativeObj, maxArea);
+
+ return;
+ }
+
+
+ //
+ // C++: bool Params::filterByCircularity
+ //
+
+ //javadoc: Params::get_filterByCircularity()
+ public boolean get_filterByCircularity()
+ {
+
+ boolean retVal = get_filterByCircularity_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Params::filterByCircularity
+ //
+
+ //javadoc: Params::set_filterByCircularity(filterByCircularity)
+ public void set_filterByCircularity(boolean filterByCircularity)
+ {
+
+ set_filterByCircularity_0(nativeObj, filterByCircularity);
+
+ return;
+ }
+
+
+ //
+ // C++: float Params::minCircularity
+ //
+
+ //javadoc: Params::get_minCircularity()
+ public float get_minCircularity()
+ {
+
+ float retVal = get_minCircularity_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Params::minCircularity
+ //
+
+ //javadoc: Params::set_minCircularity(minCircularity)
+ public void set_minCircularity(float minCircularity)
+ {
+
+ set_minCircularity_0(nativeObj, minCircularity);
+
+ return;
+ }
+
+
+ //
+ // C++: float Params::maxCircularity
+ //
+
+ //javadoc: Params::get_maxCircularity()
+ public float get_maxCircularity()
+ {
+
+ float retVal = get_maxCircularity_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Params::maxCircularity
+ //
+
+ //javadoc: Params::set_maxCircularity(maxCircularity)
+ public void set_maxCircularity(float maxCircularity)
+ {
+
+ set_maxCircularity_0(nativeObj, maxCircularity);
+
+ return;
+ }
+
+
+ //
+ // C++: bool Params::filterByInertia
+ //
+
+ //javadoc: Params::get_filterByInertia()
+ public boolean get_filterByInertia()
+ {
+
+ boolean retVal = get_filterByInertia_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Params::filterByInertia
+ //
+
+ //javadoc: Params::set_filterByInertia(filterByInertia)
+ public void set_filterByInertia(boolean filterByInertia)
+ {
+
+ set_filterByInertia_0(nativeObj, filterByInertia);
+
+ return;
+ }
+
+
+ //
+ // C++: float Params::minInertiaRatio
+ //
+
+ //javadoc: Params::get_minInertiaRatio()
+ public float get_minInertiaRatio()
+ {
+
+ float retVal = get_minInertiaRatio_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Params::minInertiaRatio
+ //
+
+ //javadoc: Params::set_minInertiaRatio(minInertiaRatio)
+ public void set_minInertiaRatio(float minInertiaRatio)
+ {
+
+ set_minInertiaRatio_0(nativeObj, minInertiaRatio);
+
+ return;
+ }
+
+
+ //
+ // C++: float Params::maxInertiaRatio
+ //
+
+ //javadoc: Params::get_maxInertiaRatio()
+ public float get_maxInertiaRatio()
+ {
+
+ float retVal = get_maxInertiaRatio_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Params::maxInertiaRatio
+ //
+
+ //javadoc: Params::set_maxInertiaRatio(maxInertiaRatio)
+ public void set_maxInertiaRatio(float maxInertiaRatio)
+ {
+
+ set_maxInertiaRatio_0(nativeObj, maxInertiaRatio);
+
+ return;
+ }
+
+
+ //
+ // C++: bool Params::filterByConvexity
+ //
+
+ //javadoc: Params::get_filterByConvexity()
+ public boolean get_filterByConvexity()
+ {
+
+ boolean retVal = get_filterByConvexity_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Params::filterByConvexity
+ //
+
+ //javadoc: Params::set_filterByConvexity(filterByConvexity)
+ public void set_filterByConvexity(boolean filterByConvexity)
+ {
+
+ set_filterByConvexity_0(nativeObj, filterByConvexity);
+
+ return;
+ }
+
+
+ //
+ // C++: float Params::minConvexity
+ //
+
+ //javadoc: Params::get_minConvexity()
+ public float get_minConvexity()
+ {
+
+ float retVal = get_minConvexity_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Params::minConvexity
+ //
+
+ //javadoc: Params::set_minConvexity(minConvexity)
+ public void set_minConvexity(float minConvexity)
+ {
+
+ set_minConvexity_0(nativeObj, minConvexity);
+
+ return;
+ }
+
+
+ //
+ // C++: float Params::maxConvexity
+ //
+
+ //javadoc: Params::get_maxConvexity()
+ public float get_maxConvexity()
+ {
+
+ float retVal = get_maxConvexity_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void Params::maxConvexity
+ //
+
+ //javadoc: Params::set_maxConvexity(maxConvexity)
+ public void set_maxConvexity(float maxConvexity)
+ {
+
+ set_maxConvexity_0(nativeObj, maxConvexity);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: Params()
+ private static native long Params_0();
+
+ // C++: float Params::thresholdStep
+ private static native float get_thresholdStep_0(long nativeObj);
+
+ // C++: void Params::thresholdStep
+ private static native void set_thresholdStep_0(long nativeObj, float thresholdStep);
+
+ // C++: float Params::minThreshold
+ private static native float get_minThreshold_0(long nativeObj);
+
+ // C++: void Params::minThreshold
+ private static native void set_minThreshold_0(long nativeObj, float minThreshold);
+
+ // C++: float Params::maxThreshold
+ private static native float get_maxThreshold_0(long nativeObj);
+
+ // C++: void Params::maxThreshold
+ private static native void set_maxThreshold_0(long nativeObj, float maxThreshold);
+
+ // C++: size_t Params::minRepeatability
+ private static native long get_minRepeatability_0(long nativeObj);
+
+ // C++: void Params::minRepeatability
+ private static native void set_minRepeatability_0(long nativeObj, long minRepeatability);
+
+ // C++: float Params::minDistBetweenBlobs
+ private static native float get_minDistBetweenBlobs_0(long nativeObj);
+
+ // C++: void Params::minDistBetweenBlobs
+ private static native void set_minDistBetweenBlobs_0(long nativeObj, float minDistBetweenBlobs);
+
+ // C++: bool Params::filterByColor
+ private static native boolean get_filterByColor_0(long nativeObj);
+
+ // C++: void Params::filterByColor
+ private static native void set_filterByColor_0(long nativeObj, boolean filterByColor);
+
+ // C++: bool Params::filterByArea
+ private static native boolean get_filterByArea_0(long nativeObj);
+
+ // C++: void Params::filterByArea
+ private static native void set_filterByArea_0(long nativeObj, boolean filterByArea);
+
+ // C++: float Params::minArea
+ private static native float get_minArea_0(long nativeObj);
+
+ // C++: void Params::minArea
+ private static native void set_minArea_0(long nativeObj, float minArea);
+
+ // C++: float Params::maxArea
+ private static native float get_maxArea_0(long nativeObj);
+
+ // C++: void Params::maxArea
+ private static native void set_maxArea_0(long nativeObj, float maxArea);
+
+ // C++: bool Params::filterByCircularity
+ private static native boolean get_filterByCircularity_0(long nativeObj);
+
+ // C++: void Params::filterByCircularity
+ private static native void set_filterByCircularity_0(long nativeObj, boolean filterByCircularity);
+
+ // C++: float Params::minCircularity
+ private static native float get_minCircularity_0(long nativeObj);
+
+ // C++: void Params::minCircularity
+ private static native void set_minCircularity_0(long nativeObj, float minCircularity);
+
+ // C++: float Params::maxCircularity
+ private static native float get_maxCircularity_0(long nativeObj);
+
+ // C++: void Params::maxCircularity
+ private static native void set_maxCircularity_0(long nativeObj, float maxCircularity);
+
+ // C++: bool Params::filterByInertia
+ private static native boolean get_filterByInertia_0(long nativeObj);
+
+ // C++: void Params::filterByInertia
+ private static native void set_filterByInertia_0(long nativeObj, boolean filterByInertia);
+
+ // C++: float Params::minInertiaRatio
+ private static native float get_minInertiaRatio_0(long nativeObj);
+
+ // C++: void Params::minInertiaRatio
+ private static native void set_minInertiaRatio_0(long nativeObj, float minInertiaRatio);
+
+ // C++: float Params::maxInertiaRatio
+ private static native float get_maxInertiaRatio_0(long nativeObj);
+
+ // C++: void Params::maxInertiaRatio
+ private static native void set_maxInertiaRatio_0(long nativeObj, float maxInertiaRatio);
+
+ // C++: bool Params::filterByConvexity
+ private static native boolean get_filterByConvexity_0(long nativeObj);
+
+ // C++: void Params::filterByConvexity
+ private static native void set_filterByConvexity_0(long nativeObj, boolean filterByConvexity);
+
+ // C++: float Params::minConvexity
+ private static native float get_minConvexity_0(long nativeObj);
+
+ // C++: void Params::minConvexity
+ private static native void set_minConvexity_0(long nativeObj, float minConvexity);
+
+ // C++: float Params::maxConvexity
+ private static native float get_maxConvexity_0(long nativeObj);
+
+ // C++: void Params::maxConvexity
+ private static native void set_maxConvexity_0(long nativeObj, float maxConvexity);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/imgcodecs/Imgcodecs.java b/library/src/main/java/org/opencv/imgcodecs/Imgcodecs.java
new file mode 100644
index 0000000..3018881
--- /dev/null
+++ b/library/src/main/java/org/opencv/imgcodecs/Imgcodecs.java
@@ -0,0 +1,217 @@
+
+//
+// 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_LOAD_IMAGE_IGNORE_ORIENTATION = 128,
+ 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_IMWRITE_PAM_TUPLETYPE = 128,
+ CV_IMWRITE_PAM_FORMAT_NULL = 0,
+ CV_IMWRITE_PAM_FORMAT_BLACKANDWHITE = 1,
+ CV_IMWRITE_PAM_FORMAT_GRAYSCALE = 2,
+ CV_IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA = 3,
+ CV_IMWRITE_PAM_FORMAT_RGB = 4,
+ CV_IMWRITE_PAM_FORMAT_RGB_ALPHA = 5,
+ 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,
+ IMREAD_REDUCED_GRAYSCALE_2 = 16,
+ IMREAD_REDUCED_COLOR_2 = 17,
+ IMREAD_REDUCED_GRAYSCALE_4 = 32,
+ IMREAD_REDUCED_COLOR_4 = 33,
+ IMREAD_REDUCED_GRAYSCALE_8 = 64,
+ IMREAD_REDUCED_COLOR_8 = 65,
+ IMREAD_IGNORE_ORIENTATION = 128,
+ 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_PAM_TUPLETYPE = 128,
+ 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,
+ IMWRITE_PAM_FORMAT_NULL = 0,
+ IMWRITE_PAM_FORMAT_BLACKANDWHITE = 1,
+ IMWRITE_PAM_FORMAT_GRAYSCALE = 2,
+ IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA = 3,
+ IMWRITE_PAM_FORMAT_RGB = 4,
+ IMWRITE_PAM_FORMAT_RGB_ALPHA = 5;
+
+
+ //
+ // 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++: 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 imencode(String ext, Mat img, vector_uchar& buf, vector_int params = std::vector())
+ //
+
+ //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++: bool imreadmulti(String filename, vector_Mat& mats, int flags = IMREAD_ANYCOLOR)
+ //
+
+ //javadoc: imreadmulti(filename, mats, flags)
+ public static boolean imreadmulti(String filename, List mats, int flags)
+ {
+ Mat mats_mat = new Mat();
+ boolean retVal = imreadmulti_0(filename, mats_mat.nativeObj, flags);
+ Converters.Mat_to_vector_Mat(mats_mat, mats);
+ mats_mat.release();
+ return retVal;
+ }
+
+ //javadoc: imreadmulti(filename, mats)
+ public static boolean imreadmulti(String filename, List mats)
+ {
+ Mat mats_mat = new Mat();
+ boolean retVal = imreadmulti_1(filename, mats_mat.nativeObj);
+ Converters.Mat_to_vector_Mat(mats_mat, mats);
+ mats_mat.release();
+ return retVal;
+ }
+
+
+ //
+ // C++: bool imwrite(String filename, Mat img, vector_int params = std::vector())
+ //
+
+ //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)
+ private static native long imdecode_0(long buf_nativeObj, int flags);
+
+ // 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 imencode(String ext, Mat img, vector_uchar& buf, vector_int params = std::vector())
+ 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);
+
+ // 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())
+ 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);
+
+}
diff --git a/library/src/main/java/org/opencv/imgproc/CLAHE.java b/library/src/main/java/org/opencv/imgproc/CLAHE.java
new file mode 100644
index 0000000..9c53b6f
--- /dev/null
+++ b/library/src/main/java/org/opencv/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++: Size getTilesGridSize()
+ //
+
+ //javadoc: CLAHE::getTilesGridSize()
+ public Size getTilesGridSize()
+ {
+
+ Size retVal = new Size(getTilesGridSize_0(nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double getClipLimit()
+ //
+
+ //javadoc: CLAHE::getClipLimit()
+ public double getClipLimit()
+ {
+
+ double retVal = getClipLimit_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // 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 collectGarbage()
+ //
+
+ //javadoc: CLAHE::collectGarbage()
+ public void collectGarbage()
+ {
+
+ collectGarbage_0(nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void setClipLimit(double clipLimit)
+ //
+
+ //javadoc: CLAHE::setClipLimit(clipLimit)
+ public void setClipLimit(double clipLimit)
+ {
+
+ setClipLimit_0(nativeObj, clipLimit);
+
+ return;
+ }
+
+
+ //
+ // C++: void setTilesGridSize(Size tileGridSize)
+ //
+
+ //javadoc: CLAHE::setTilesGridSize(tileGridSize)
+ public void setTilesGridSize(Size tileGridSize)
+ {
+
+ setTilesGridSize_0(nativeObj, tileGridSize.width, tileGridSize.height);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: Size getTilesGridSize()
+ private static native double[] getTilesGridSize_0(long nativeObj);
+
+ // C++: double getClipLimit()
+ private static native double getClipLimit_0(long nativeObj);
+
+ // C++: void apply(Mat src, Mat& dst)
+ private static native void apply_0(long nativeObj, long src_nativeObj, long dst_nativeObj);
+
+ // C++: void collectGarbage()
+ private static native void collectGarbage_0(long nativeObj);
+
+ // C++: void setClipLimit(double clipLimit)
+ private static native void setClipLimit_0(long nativeObj, double clipLimit);
+
+ // C++: void setTilesGridSize(Size tileGridSize)
+ private static native void setTilesGridSize_0(long nativeObj, double tileGridSize_width, double tileGridSize_height);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/library/src/main/java/org/opencv/imgproc/Imgproc.java b/library/src/main/java/org/opencv/imgproc/Imgproc.java
new file mode 100644
index 0000000..b21de0b
--- /dev/null
+++ b/library/src/main/java/org/opencv/imgproc/Imgproc.java
@@ -0,0 +1,3589 @@
+
+//
+// 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_HITMISS = 7,
+ 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,
+ CCL_WU = 0,
+ CCL_DEFAULT = -1,
+ CCL_GRANA = 1,
+ 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,
+ CONTOURS_MATCH_I1 = 1,
+ CONTOURS_MATCH_I2 = 2,
+ CONTOURS_MATCH_I3 = 3,
+ 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_BayerBG2BGRA = 139,
+ COLOR_BayerGB2BGRA = 140,
+ COLOR_BayerRG2BGRA = 141,
+ COLOR_BayerGR2BGRA = 142,
+ COLOR_BayerBG2RGBA = COLOR_BayerRG2BGRA,
+ COLOR_BayerGB2RGBA = COLOR_BayerGR2BGRA,
+ COLOR_BayerRG2RGBA = COLOR_BayerBG2BGRA,
+ COLOR_BayerGR2RGBA = COLOR_BayerGB2BGRA,
+ COLOR_COLORCVT_MAX = 143,
+ 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,
+ MARKER_CROSS = 0,
+ MARKER_TILTED_CROSS = 1,
+ MARKER_STAR = 2,
+ MARKER_DIAMOND = 3,
+ MARKER_SQUARE = 4,
+ MARKER_TRIANGLE_UP = 5,
+ MARKER_TRIANGLE_DOWN = 6;
+
+
+ //
+ // 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++: 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++: 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 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++: 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 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++: 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++: Moments moments(Mat array, bool binaryImage = false)
+ //
+
+ //javadoc: moments(array, binaryImage)
+ public static Moments moments(Mat array, boolean binaryImage)
+ {
+
+ Moments retVal = new Moments(moments_0(array.nativeObj, binaryImage));
+
+ return retVal;
+ }
+
+ //javadoc: moments(array)
+ public static Moments moments(Mat array)
+ {
+
+ Moments retVal = new Moments(moments_1(array.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // 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++: 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++: 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++: 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++: 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++: RotatedRect fitEllipseAMS(Mat points)
+ //
+
+ //javadoc: fitEllipseAMS(points)
+ public static RotatedRect fitEllipseAMS(Mat points)
+ {
+
+ RotatedRect retVal = new RotatedRect(fitEllipseAMS_0(points.nativeObj));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: RotatedRect fitEllipseDirect(Mat points)
+ //
+
+ //javadoc: fitEllipseDirect(points)
+ public static RotatedRect fitEllipseDirect(Mat points)
+ {
+
+ RotatedRect retVal = new RotatedRect(fitEllipseDirect_0(points.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++: 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++: 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++: 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++: 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++: 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++: 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++: 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 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++: 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++: 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++: 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++: float wrapperEMD(Mat signature1, Mat signature2, int distType, Mat cost = Mat(), Ptr_float& lowerBound = Ptr(), Mat& flow = Mat())
+ //
+
+ //javadoc: wrapperEMD(signature1, signature2, distType, cost, flow)
+ public static float EMD(Mat signature1, Mat signature2, int distType, Mat cost, Mat flow)
+ {
+
+ float retVal = EMD_0(signature1.nativeObj, signature2.nativeObj, distType, cost.nativeObj, flow.nativeObj);
+
+ return retVal;
+ }
+
+ //javadoc: wrapperEMD(signature1, signature2, distType)
+ public static float EMD(Mat signature1, Mat signature2, int distType)
+ {
+
+ float retVal = EMD_1(signature1.nativeObj, signature2.nativeObj, distType);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int connectedComponents(Mat image, Mat& labels, int connectivity, int ltype, int ccltype)
+ //
+
+ //javadoc: connectedComponents(image, labels, connectivity, ltype, ccltype)
+ public static int connectedComponentsWithAlgorithm(Mat image, Mat labels, int connectivity, int ltype, int ccltype)
+ {
+
+ int retVal = connectedComponentsWithAlgorithm_0(image.nativeObj, labels.nativeObj, connectivity, ltype, ccltype);
+
+ return retVal;
+ }
+
+
+ //
+ // 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, int ltype, int ccltype)
+ //
+
+ //javadoc: connectedComponentsWithStats(image, labels, stats, centroids, connectivity, ltype, ccltype)
+ public static int connectedComponentsWithStatsWithAlgorithm(Mat image, Mat labels, Mat stats, Mat centroids, int connectivity, int ltype, int ccltype)
+ {
+
+ int retVal = connectedComponentsWithStatsWithAlgorithm_0(image.nativeObj, labels.nativeObj, stats.nativeObj, centroids.nativeObj, connectivity, ltype, ccltype);
+
+ 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++: 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++: 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++: void Canny(Mat dx, Mat dy, Mat& edges, double threshold1, double threshold2, bool L2gradient = false)
+ //
+
+ //javadoc: Canny(dx, dy, edges, threshold1, threshold2, L2gradient)
+ public static void Canny(Mat dx, Mat dy, Mat edges, double threshold1, double threshold2, boolean L2gradient)
+ {
+
+ Canny_0(dx.nativeObj, dy.nativeObj, edges.nativeObj, threshold1, threshold2, L2gradient);
+
+ return;
+ }
+
+ //javadoc: Canny(dx, dy, edges, threshold1, threshold2)
+ public static void Canny(Mat dx, Mat dy, Mat edges, double threshold1, double threshold2)
+ {
+
+ Canny_1(dx.nativeObj, dy.nativeObj, edges.nativeObj, threshold1, threshold2);
+
+ 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_2(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_3(image.nativeObj, edges.nativeObj, threshold1, threshold2);
+
+ 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 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 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 HuMoments(Moments m, Mat& hu)
+ //
+
+ //javadoc: HuMoments(m, hu)
+ public static void HuMoments(Moments m, Mat hu)
+ {
+
+ HuMoments_0(m.m00, m.m10, m.m01, m.m20, m.m11, m.m02, m.m30, m.m21, m.m12, m.m03, hu.nativeObj);
+
+ 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 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 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 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 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 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 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++: 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 applyColorMap(Mat src, Mat& dst, Mat userColor)
+ //
+
+ //javadoc: applyColorMap(src, dst, userColor)
+ public static void applyColorMap(Mat src, Mat dst, Mat userColor)
+ {
+
+ applyColorMap_0(src.nativeObj, dst.nativeObj, userColor.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // 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_1(src.nativeObj, dst.nativeObj, colormap);
+
+ 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++: 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 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 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 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 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 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 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++: 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 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 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 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 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++: 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++: 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 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 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++: void cornerSubPix(Mat image, Mat& corners, Size winSize, Size zeroZone, TermCriteria criteria)
+ //
+
+ //javadoc: cornerSubPix(image, corners, winSize, zeroZone, criteria)
+ public static void cornerSubPix(Mat image, Mat corners, Size winSize, Size zeroZone, TermCriteria criteria)
+ {
+
+ cornerSubPix_0(image.nativeObj, corners.nativeObj, winSize.width, winSize.height, zeroZone.width, zeroZone.height, criteria.type, criteria.maxCount, criteria.epsilon);
+
+ return;
+ }
+
+
+ //
+ // 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++: 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++: 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 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++: 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 contours, int contourIdx, Scalar color, int thickness, int lineType, Mat hierarchy, int maxLevel, Point offset)
+ {
+ List contours_tmplm = new ArrayList((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 contours, int contourIdx, Scalar color, int thickness)
+ {
+ List contours_tmplm = new ArrayList((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 contours, int contourIdx, Scalar color)
+ {
+ List contours_tmplm = new ArrayList((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++: void drawMarker(Mat& img, Point position, Scalar color, int markerType = MARKER_CROSS, int markerSize = 20, int thickness = 1, int line_type = 8)
+ //
+
+ //javadoc: drawMarker(img, position, color, markerType, markerSize, thickness, line_type)
+ public static void drawMarker(Mat img, Point position, Scalar color, int markerType, int markerSize, int thickness, int line_type)
+ {
+
+ drawMarker_0(img.nativeObj, position.x, position.y, color.val[0], color.val[1], color.val[2], color.val[3], markerType, markerSize, thickness, line_type);
+
+ return;
+ }
+
+ //javadoc: drawMarker(img, position, color)
+ public static void drawMarker(Mat img, Point position, Scalar color)
+ {
+
+ drawMarker_1(img.nativeObj, position.x, position.y, 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 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 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 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 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 pts, Scalar color, int lineType, int shift, Point offset)
+ {
+ List pts_tmplm = new ArrayList((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 pts, Scalar color)
+ {
+ List pts_tmplm = new ArrayList