OSDN Git Service

ライブビューデータを拾うために検討中。その4。
authorMRSa <mrsa@myad.jp>
Sat, 4 May 2019 14:09:58 +0000 (23:09 +0900)
committerMRSa <mrsa@myad.jp>
Sat, 4 May 2019 14:09:58 +0000 (23:09 +0900)
155 files changed:
app/build.gradle
app/src/main/java/net/osdn/gokigen/cameratest/MainActivity.java
app/src/main/java/net/osdn/gokigen/cameratest/camtest/CamTest.java
app/src/main/java/net/osdn/gokigen/cameratest/fuji/FujiStreamReceiver.java
app/src/main/java/net/osdn/gokigen/cameratest/fuji/ILiveViewImage.java
app/src/main/jnilibs/LICENSE [new file with mode: 0644]
app/src/main/jnilibs/README.android [new file with mode: 0644]
app/src/main/jnilibs/arm64-v8a/libopencv_java4.so [new file with mode: 0644]
app/src/main/jnilibs/armeabi-v7a/libopencv_java4.so [new file with mode: 0644]
app/src/main/jnilibs/x86/libopencv_java4.so [new file with mode: 0644]
app/src/main/jnilibs/x86_64/libopencv_java4.so [new file with mode: 0644]
opencv41/build.gradle [new file with mode: 0644]
opencv41/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out/org/opencv/engine/OpenCVEngineInterface.java [new file with mode: 0644]
opencv41/build/generated/source/buildConfig/debug/org/opencv/BuildConfig.java [new file with mode: 0644]
opencv41/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml [new file with mode: 0644]
opencv41/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output.json [new file with mode: 0644]
opencv41/build/intermediates/library_manifest/debug/AndroidManifest.xml [new file with mode: 0644]
opencv41/build/intermediates/merged_manifests/debug/output.json [new file with mode: 0644]
opencv41/build/outputs/logs/manifest-merger-debug-report.txt [new file with mode: 0644]
opencv41/src/main/AndroidManifest.xml [new file with mode: 0644]
opencv41/src/main/aidl/org/opencv/engine/OpenCVEngineInterface.aidl [new file with mode: 0644]
opencv41/src/main/java/org/opencv/android/AsyncServiceHelper.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/android/BaseLoaderCallback.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/android/Camera2Renderer.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/android/CameraBridgeViewBase.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/android/CameraGLRendererBase.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/android/CameraGLSurfaceView.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/android/CameraRenderer.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/android/FpsMeter.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/android/InstallCallbackInterface.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/android/JavaCamera2View.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/android/JavaCameraView.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/android/LoaderCallbackInterface.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/android/OpenCVLoader.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/android/StaticHelper.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/android/Utils.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/calib3d/Calib3d.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/calib3d/StereoBM.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/calib3d/StereoMatcher.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/calib3d/StereoSGBM.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/Algorithm.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/Core.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/CvException.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/CvType.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/DMatch.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/KeyPoint.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/Mat.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/MatOfByte.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/MatOfDMatch.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/MatOfDouble.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/MatOfFloat.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/MatOfFloat4.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/MatOfFloat6.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/MatOfInt.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/MatOfInt4.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/MatOfKeyPoint.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/MatOfPoint.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/MatOfPoint2f.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/MatOfPoint3.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/MatOfPoint3f.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/MatOfRect.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/MatOfRect2d.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/MatOfRotatedRect.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/Point.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/Point3.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/Range.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/Rect.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/Rect2d.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/RotatedRect.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/Scalar.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/Size.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/TermCriteria.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/core/TickMeter.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/dnn/DictValue.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/dnn/Dnn.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/dnn/Layer.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/dnn/Net.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/features2d/AKAZE.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/features2d/AgastFeatureDetector.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/features2d/BFMatcher.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/features2d/BOWImgDescriptorExtractor.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/features2d/BOWKMeansTrainer.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/features2d/BOWTrainer.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/features2d/BRISK.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/features2d/DescriptorMatcher.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/features2d/FastFeatureDetector.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/features2d/Feature2D.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/features2d/Features2d.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/features2d/FlannBasedMatcher.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/features2d/GFTTDetector.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/features2d/KAZE.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/features2d/MSER.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/features2d/ORB.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/features2d/Params.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/imgcodecs/Imgcodecs.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/imgproc/CLAHE.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/imgproc/GeneralizedHough.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/imgproc/GeneralizedHoughBallard.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/imgproc/GeneralizedHoughGuil.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/imgproc/Imgproc.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/imgproc/LineSegmentDetector.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/imgproc/Moments.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/imgproc/Subdiv2D.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/ml/ANN_MLP.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/ml/Boost.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/ml/DTrees.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/ml/EM.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/ml/KNearest.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/ml/LogisticRegression.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/ml/Ml.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/ml/NormalBayesClassifier.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/ml/ParamGrid.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/ml/RTrees.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/ml/SVM.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/ml/SVMSGD.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/ml/StatModel.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/ml/TrainData.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/objdetect/BaseCascadeClassifier.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/objdetect/CascadeClassifier.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/objdetect/HOGDescriptor.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/objdetect/Objdetect.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/objdetect/QRCodeDetector.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/osgi/OpenCVInterface.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/osgi/OpenCVNativeLoader.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/photo/AlignExposures.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/photo/AlignMTB.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/photo/CalibrateCRF.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/photo/CalibrateDebevec.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/photo/CalibrateRobertson.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/photo/MergeDebevec.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/photo/MergeExposures.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/photo/MergeMertens.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/photo/MergeRobertson.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/photo/Photo.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/photo/Tonemap.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/photo/TonemapDrago.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/photo/TonemapMantiuk.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/photo/TonemapReinhard.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/utils/Converters.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/video/BackgroundSubtractor.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/video/BackgroundSubtractorKNN.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/video/BackgroundSubtractorMOG2.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/video/DISOpticalFlow.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/video/DenseOpticalFlow.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/video/FarnebackOpticalFlow.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/video/KalmanFilter.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/video/SparseOpticalFlow.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/video/SparsePyrLKOpticalFlow.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/video/VariationalRefinement.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/video/Video.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/videoio/VideoCapture.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/videoio/VideoWriter.java [new file with mode: 0644]
opencv41/src/main/java/org/opencv/videoio/Videoio.java [new file with mode: 0644]
opencv41/src/main/res/values/attrs.xml [new file with mode: 0644]
settings.gradle

index 0cc8718..856de1d 100644 (file)
@@ -19,7 +19,8 @@ android {
 
 dependencies {
     implementation fileTree(dir: 'libs', include: ['*.jar'])
-    implementation 'androidx.appcompat:appcompat:1.1.0-alpha03'
-    implementation 'com.google.android.material:material:1.1.0-alpha04'
+    implementation 'androidx.appcompat:appcompat:1.1.0-alpha04'
+    implementation 'com.google.android.material:material:1.1.0-alpha06'
     implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
+    implementation project(':opencv41')
 }
index 1e9c432..4a19106 100644 (file)
@@ -24,8 +24,35 @@ import android.view.WindowManager;
 import net.osdn.gokigen.cameratest.camtest.CamTest;
 import net.osdn.gokigen.cameratest.pages.SectionsPagerAdapter;
 
+import org.opencv.android.BaseLoaderCallback;
+import org.opencv.android.LoaderCallbackInterface;
+
 public class MainActivity extends AppCompatActivity
 {
+    /////// OpenCV ///////
+    static
+    {
+        System.loadLibrary("opencv_java4");
+    }
+    private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(this)
+    {
+        @Override
+        public void onManagerConnected(int status)
+        {
+            switch (status)
+            {
+                case LoaderCallbackInterface.SUCCESS:
+                {
+                    Log.i(TAG, "OpenCV loaded successfully");
+                } break;
+                default:
+                {
+                    super.onManagerConnected(status);
+                } break;
+            }
+        }
+    };
+
     private final String TAG = toString();
     private SectionsPagerAdapter mSectionsPagerAdapter;
     private ViewPager mViewPager;
index 9d344b3..fbc1879 100644 (file)
@@ -194,6 +194,37 @@ public class CamTest implements View.OnClickListener, ILiveViewImage
         }
     }
 
+    @Override
+    public void updateImage(final Bitmap bitmap)
+    {
+        try
+        {
+            Log.v(TAG, "bitmap : " + bitmap.getByteCount() + " bytes.");
+
+            //////  画像を更新する
+            activity.runOnUiThread(new Runnable() {
+                @Override
+                public void run() {
+                    try
+                    {
+                        // ビットマップイメージを表示する。
+                        ImageView view = activity.findViewById(R.id.imageView);
+                        view.setImageBitmap(bitmap);
+                        view.invalidate();
+                    }
+                    catch (Throwable e)
+                    {
+                        e.printStackTrace();
+                    }
+                }
+            });
+        }
+        catch (Throwable e)
+        {
+            e.printStackTrace();
+        }
+    }
+
     private void outputFile(ReceivedDataHolder receivedData)
     {
         try
index a675ecf..190dd5b 100644 (file)
@@ -61,6 +61,7 @@ class FujiStreamReceiver
 
     private void startReceive(Socket socket)
     {
+/**/
         InputStreamReader isr;
         char[] char_array;
         try
@@ -75,14 +76,28 @@ class FujiStreamReceiver
             Log.v(TAG, "===== startReceive() aborted.");
             return;
         }
+/**/
         Log.v(TAG, "startReceive() start.");
         while (isStart)
         {
             try
             {
+/*
+                Bitmap imageData = BitmapFactory.decodeStream(socket.getInputStream());
+                if (imageData != null)
+                {
+                    // received image
+                    Log.v(TAG, "RECEIVED IMAGE.");
+                }
+                else
+                {
+                    Log.v(TAG, "IMAGE IS NULL...");
+                }
+*/
+/**/
                 int read_bytes = isr.read(char_array, 0, BUFFER_SIZE);
                 imageViewer.updateImage(new ReceivedDataHolder(char_array, read_bytes));
-
+/**/
                 Thread.sleep(WAIT_MS);
             }
             catch (Exception e)
@@ -90,6 +105,7 @@ class FujiStreamReceiver
                 e.printStackTrace();
             }
         }
+/**/
         try
         {
             isr.close();
@@ -98,6 +114,7 @@ class FujiStreamReceiver
         {
             e.printStackTrace();
         }
+/**/
         Log.v(TAG, "startReceive() end.");
     }
 }
index ab73c35..e3166b2 100644 (file)
@@ -1,7 +1,10 @@
 package net.osdn.gokigen.cameratest.fuji;
 
+import android.graphics.Bitmap;
+
 public interface ILiveViewImage
 {
     void updateImage(ReceivedDataHolder receivedData);
+    void updateImage(Bitmap bitmap);
 
 }
diff --git a/app/src/main/jnilibs/LICENSE b/app/src/main/jnilibs/LICENSE
new file mode 100644 (file)
index 0000000..be57671
--- /dev/null
@@ -0,0 +1,41 @@
+By downloading, copying, installing or using the software you agree to this license.
+If you do not agree to this license, do not download, install,
+copy or use the software.
+
+
+                          License Agreement
+               For Open Source Computer Vision Library
+                       (3-clause BSD License)
+
+Copyright (C) 2000-2019, Intel Corporation, all rights reserved.
+Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
+Copyright (C) 2009-2016, NVIDIA Corporation, all rights reserved.
+Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
+Copyright (C) 2015-2016, OpenCV Foundation, all rights reserved.
+Copyright (C) 2015-2016, Itseez Inc., all rights reserved.
+Third party copyrights are property of their respective owners.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+  * Redistributions of source code must retain the above copyright notice,
+    this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+  * Neither the names of the copyright holders nor the names of the contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+
+This software is provided by the copyright holders and contributors "as is" and
+any express or implied warranties, including, but not limited to, the implied
+warranties of merchantability and fitness for a particular purpose are disclaimed.
+In no event shall copyright holders or contributors be liable for any direct,
+indirect, incidental, special, exemplary, or consequential damages
+(including, but not limited to, procurement of substitute goods or services;
+loss of use, data, or profits; or business interruption) however caused
+and on any theory of liability, whether in contract, strict liability,
+or tort (including negligence or otherwise) arising in any way out of
+the use of this software, even if advised of the possibility of such damage.
diff --git a/app/src/main/jnilibs/README.android b/app/src/main/jnilibs/README.android
new file mode 100644 (file)
index 0000000..c572577
--- /dev/null
@@ -0,0 +1 @@
+See http://opencv.org/platforms/android
diff --git a/app/src/main/jnilibs/arm64-v8a/libopencv_java4.so b/app/src/main/jnilibs/arm64-v8a/libopencv_java4.so
new file mode 100644 (file)
index 0000000..f930552
Binary files /dev/null and b/app/src/main/jnilibs/arm64-v8a/libopencv_java4.so differ
diff --git a/app/src/main/jnilibs/armeabi-v7a/libopencv_java4.so b/app/src/main/jnilibs/armeabi-v7a/libopencv_java4.so
new file mode 100644 (file)
index 0000000..9130775
Binary files /dev/null and b/app/src/main/jnilibs/armeabi-v7a/libopencv_java4.so differ
diff --git a/app/src/main/jnilibs/x86/libopencv_java4.so b/app/src/main/jnilibs/x86/libopencv_java4.so
new file mode 100644 (file)
index 0000000..15ccceb
Binary files /dev/null and b/app/src/main/jnilibs/x86/libopencv_java4.so differ
diff --git a/app/src/main/jnilibs/x86_64/libopencv_java4.so b/app/src/main/jnilibs/x86_64/libopencv_java4.so
new file mode 100644 (file)
index 0000000..d7ade64
Binary files /dev/null and b/app/src/main/jnilibs/x86_64/libopencv_java4.so differ
diff --git a/opencv41/build.gradle b/opencv41/build.gradle
new file mode 100644 (file)
index 0000000..25c6d98
--- /dev/null
@@ -0,0 +1,15 @@
+//apply plugin: 'com.android.application'
+apply plugin: 'com.android.library'
+android {
+    compileSdkVersion 28
+    defaultConfig {
+        //applicationId "org.opencv"
+}
+
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
+        }
+    }
+}
diff --git a/opencv41/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out/org/opencv/engine/OpenCVEngineInterface.java b/opencv41/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out/org/opencv/engine/OpenCVEngineInterface.java
new file mode 100644 (file)
index 0000000..407804d
--- /dev/null
@@ -0,0 +1,199 @@
+/*
+ * This file is auto-generated.  DO NOT MODIFY.
+ * Original file: C:\\Users\\MRSa\\AndroidStudioProjects\\android\\FujiCam\\opencv41\\src\\main\\aidl\\org\\opencv\\engine\\OpenCVEngineInterface.aidl
+ */
+package org.opencv.engine;
+/**
+* Class provides a Java interface for OpenCV Engine Service. It's synchronous with native OpenCVEngine class.
+*/
+public interface OpenCVEngineInterface extends android.os.IInterface
+{
+/** Local-side IPC implementation stub class. */
+public static abstract class Stub extends android.os.Binder implements org.opencv.engine.OpenCVEngineInterface
+{
+private static final java.lang.String DESCRIPTOR = "org.opencv.engine.OpenCVEngineInterface";
+/** Construct the stub at attach it to the interface. */
+public Stub()
+{
+this.attachInterface(this, DESCRIPTOR);
+}
+/**
+ * Cast an IBinder object into an org.opencv.engine.OpenCVEngineInterface interface,
+ * generating a proxy if needed.
+ */
+public static org.opencv.engine.OpenCVEngineInterface asInterface(android.os.IBinder obj)
+{
+if ((obj==null)) {
+return null;
+}
+android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
+if (((iin!=null)&&(iin instanceof org.opencv.engine.OpenCVEngineInterface))) {
+return ((org.opencv.engine.OpenCVEngineInterface)iin);
+}
+return new org.opencv.engine.OpenCVEngineInterface.Stub.Proxy(obj);
+}
+@Override public android.os.IBinder asBinder()
+{
+return this;
+}
+@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
+{
+java.lang.String descriptor = DESCRIPTOR;
+switch (code)
+{
+case INTERFACE_TRANSACTION:
+{
+reply.writeString(descriptor);
+return true;
+}
+case TRANSACTION_getEngineVersion:
+{
+data.enforceInterface(descriptor);
+int _result = this.getEngineVersion();
+reply.writeNoException();
+reply.writeInt(_result);
+return true;
+}
+case TRANSACTION_getLibPathByVersion:
+{
+data.enforceInterface(descriptor);
+java.lang.String _arg0;
+_arg0 = data.readString();
+java.lang.String _result = this.getLibPathByVersion(_arg0);
+reply.writeNoException();
+reply.writeString(_result);
+return true;
+}
+case TRANSACTION_installVersion:
+{
+data.enforceInterface(descriptor);
+java.lang.String _arg0;
+_arg0 = data.readString();
+boolean _result = this.installVersion(_arg0);
+reply.writeNoException();
+reply.writeInt(((_result)?(1):(0)));
+return true;
+}
+case TRANSACTION_getLibraryList:
+{
+data.enforceInterface(descriptor);
+java.lang.String _arg0;
+_arg0 = data.readString();
+java.lang.String _result = this.getLibraryList(_arg0);
+reply.writeNoException();
+reply.writeString(_result);
+return true;
+}
+default:
+{
+return super.onTransact(code, data, reply, flags);
+}
+}
+}
+private static class Proxy implements org.opencv.engine.OpenCVEngineInterface
+{
+private android.os.IBinder mRemote;
+Proxy(android.os.IBinder remote)
+{
+mRemote = remote;
+}
+@Override public android.os.IBinder asBinder()
+{
+return mRemote;
+}
+public java.lang.String getInterfaceDescriptor()
+{
+return DESCRIPTOR;
+}
+@Override public int getEngineVersion() throws android.os.RemoteException
+{
+android.os.Parcel _data = android.os.Parcel.obtain();
+android.os.Parcel _reply = android.os.Parcel.obtain();
+int _result;
+try {
+_data.writeInterfaceToken(DESCRIPTOR);
+mRemote.transact(Stub.TRANSACTION_getEngineVersion, _data, _reply, 0);
+_reply.readException();
+_result = _reply.readInt();
+}
+finally {
+_reply.recycle();
+_data.recycle();
+}
+return _result;
+}
+@Override public java.lang.String getLibPathByVersion(java.lang.String version) throws android.os.RemoteException
+{
+android.os.Parcel _data = android.os.Parcel.obtain();
+android.os.Parcel _reply = android.os.Parcel.obtain();
+java.lang.String _result;
+try {
+_data.writeInterfaceToken(DESCRIPTOR);
+_data.writeString(version);
+mRemote.transact(Stub.TRANSACTION_getLibPathByVersion, _data, _reply, 0);
+_reply.readException();
+_result = _reply.readString();
+}
+finally {
+_reply.recycle();
+_data.recycle();
+}
+return _result;
+}
+/**
+    * Tries to install defined version of OpenCV from Google Play Market.
+    * @param OpenCV version.
+    * @return Returns true if installation was successful or OpenCV package has been already installed.
+    */
+@Override public boolean installVersion(java.lang.String version) throws android.os.RemoteException
+{
+android.os.Parcel _data = android.os.Parcel.obtain();
+android.os.Parcel _reply = android.os.Parcel.obtain();
+boolean _result;
+try {
+_data.writeInterfaceToken(DESCRIPTOR);
+_data.writeString(version);
+mRemote.transact(Stub.TRANSACTION_installVersion, _data, _reply, 0);
+_reply.readException();
+_result = (0!=_reply.readInt());
+}
+finally {
+_reply.recycle();
+_data.recycle();
+}
+return _result;
+}
+@Override public java.lang.String getLibraryList(java.lang.String version) throws android.os.RemoteException
+{
+android.os.Parcel _data = android.os.Parcel.obtain();
+android.os.Parcel _reply = android.os.Parcel.obtain();
+java.lang.String _result;
+try {
+_data.writeInterfaceToken(DESCRIPTOR);
+_data.writeString(version);
+mRemote.transact(Stub.TRANSACTION_getLibraryList, _data, _reply, 0);
+_reply.readException();
+_result = _reply.readString();
+}
+finally {
+_reply.recycle();
+_data.recycle();
+}
+return _result;
+}
+}
+static final int TRANSACTION_getEngineVersion = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
+static final int TRANSACTION_getLibPathByVersion = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);
+static final int TRANSACTION_installVersion = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2);
+static final int TRANSACTION_getLibraryList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3);
+}
+public int getEngineVersion() throws android.os.RemoteException;
+public java.lang.String getLibPathByVersion(java.lang.String version) throws android.os.RemoteException;
+/**
+    * Tries to install defined version of OpenCV from Google Play Market.
+    * @param OpenCV version.
+    * @return Returns true if installation was successful or OpenCV package has been already installed.
+    */
+public boolean installVersion(java.lang.String version) throws android.os.RemoteException;
+public java.lang.String getLibraryList(java.lang.String version) throws android.os.RemoteException;
+}
diff --git a/opencv41/build/generated/source/buildConfig/debug/org/opencv/BuildConfig.java b/opencv41/build/generated/source/buildConfig/debug/org/opencv/BuildConfig.java
new file mode 100644 (file)
index 0000000..c066777
--- /dev/null
@@ -0,0 +1,13 @@
+/**
+ * Automatically generated file. DO NOT MODIFY
+ */
+package org.opencv;
+
+public final class BuildConfig {
+  public static final boolean DEBUG = Boolean.parseBoolean("true");
+  public static final String APPLICATION_ID = "org.opencv";
+  public static final String BUILD_TYPE = "debug";
+  public static final String FLAVOR = "";
+  public static final int VERSION_CODE = 4100;
+  public static final String VERSION_NAME = "4.1.0";
+}
diff --git a/opencv41/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml b/opencv41/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml
new file mode 100644 (file)
index 0000000..5dec688
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="org.opencv"
+    android:versionCode="4100"
+    android:versionName="4.1.0" >
+
+</manifest>
\ No newline at end of file
diff --git a/opencv41/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output.json b/opencv41/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output.json
new file mode 100644 (file)
index 0000000..17ef88a
--- /dev/null
@@ -0,0 +1 @@
+[{"outputType":{"type":"AAPT_FRIENDLY_MERGED_MANIFESTS"},"apkData":{"type":"MAIN","splits":[],"versionCode":4100,"versionName":"4.1.0","enabled":true,"outputFile":"opencv41-debug.aar","fullName":"debug","baseName":"debug"},"path":"AndroidManifest.xml","properties":{"packageId":"org.opencv","split":""}}]
\ No newline at end of file
diff --git a/opencv41/build/intermediates/library_manifest/debug/AndroidManifest.xml b/opencv41/build/intermediates/library_manifest/debug/AndroidManifest.xml
new file mode 100644 (file)
index 0000000..5dec688
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="org.opencv"
+    android:versionCode="4100"
+    android:versionName="4.1.0" >
+
+</manifest>
\ No newline at end of file
diff --git a/opencv41/build/intermediates/merged_manifests/debug/output.json b/opencv41/build/intermediates/merged_manifests/debug/output.json
new file mode 100644 (file)
index 0000000..d8263da
--- /dev/null
@@ -0,0 +1 @@
+[{"outputType":{"type":"MERGED_MANIFESTS"},"apkData":{"type":"MAIN","splits":[],"versionCode":4100,"versionName":"4.1.0","enabled":true,"outputFile":"opencv41-debug.aar","fullName":"debug","baseName":"debug"},"path":"..\\..\\library_manifest\\debug\\AndroidManifest.xml","properties":{"packageId":"org.opencv","split":""}}]
\ No newline at end of file
diff --git a/opencv41/build/outputs/logs/manifest-merger-debug-report.txt b/opencv41/build/outputs/logs/manifest-merger-debug-report.txt
new file mode 100644 (file)
index 0000000..ebc15dd
--- /dev/null
@@ -0,0 +1,23 @@
+-- Merging decision tree log ---
+manifest
+ADDED from C:\Users\MRSa\AndroidStudioProjects\android\FujiCam\opencv41\src\main\AndroidManifest.xml:2:1-6:12
+INJECTED from C:\Users\MRSa\AndroidStudioProjects\android\FujiCam\opencv41\src\main\AndroidManifest.xml:2:1-6:12
+INJECTED from C:\Users\MRSa\AndroidStudioProjects\android\FujiCam\opencv41\src\main\AndroidManifest.xml:2:1-6:12
+INJECTED from C:\Users\MRSa\AndroidStudioProjects\android\FujiCam\opencv41\src\main\AndroidManifest.xml:2:1-6:12
+INJECTED from C:\Users\MRSa\AndroidStudioProjects\android\FujiCam\opencv41\src\main\AndroidManifest.xml:2:1-6:12
+INJECTED from C:\Users\MRSa\AndroidStudioProjects\android\FujiCam\opencv41\src\main\AndroidManifest.xml:2:1-6:12
+INJECTED from C:\Users\MRSa\AndroidStudioProjects\android\FujiCam\opencv41\src\main\AndroidManifest.xml:2:1-6:12
+       package
+               ADDED from C:\Users\MRSa\AndroidStudioProjects\android\FujiCam\opencv41\src\main\AndroidManifest.xml:3:7-27
+               INJECTED from C:\Users\MRSa\AndroidStudioProjects\android\FujiCam\opencv41\src\main\AndroidManifest.xml
+               INJECTED from C:\Users\MRSa\AndroidStudioProjects\android\FujiCam\opencv41\src\main\AndroidManifest.xml
+       android:versionName
+               ADDED from C:\Users\MRSa\AndroidStudioProjects\android\FujiCam\opencv41\src\main\AndroidManifest.xml:5:7-34
+               INJECTED from C:\Users\MRSa\AndroidStudioProjects\android\FujiCam\opencv41\src\main\AndroidManifest.xml
+               INJECTED from C:\Users\MRSa\AndroidStudioProjects\android\FujiCam\opencv41\src\main\AndroidManifest.xml
+       xmlns:android
+               ADDED from C:\Users\MRSa\AndroidStudioProjects\android\FujiCam\opencv41\src\main\AndroidManifest.xml:2:11-69
+       android:versionCode
+               ADDED from C:\Users\MRSa\AndroidStudioProjects\android\FujiCam\opencv41\src\main\AndroidManifest.xml:4:7-33
+               INJECTED from C:\Users\MRSa\AndroidStudioProjects\android\FujiCam\opencv41\src\main\AndroidManifest.xml
+               INJECTED from C:\Users\MRSa\AndroidStudioProjects\android\FujiCam\opencv41\src\main\AndroidManifest.xml
diff --git a/opencv41/src/main/AndroidManifest.xml b/opencv41/src/main/AndroidManifest.xml
new file mode 100644 (file)
index 0000000..b4a6ff3
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+      package="org.opencv"
+      android:versionCode="4100"
+      android:versionName="4.1.0">
+</manifest>
diff --git a/opencv41/src/main/aidl/org/opencv/engine/OpenCVEngineInterface.aidl b/opencv41/src/main/aidl/org/opencv/engine/OpenCVEngineInterface.aidl
new file mode 100644 (file)
index 0000000..21fe5f7
--- /dev/null
@@ -0,0 +1,33 @@
+package org.opencv.engine;
+
+/**
+* Class provides a Java interface for OpenCV Engine Service. It's synchronous with native OpenCVEngine class.
+*/
+interface OpenCVEngineInterface
+{
+    /**
+    * @return Returns service version.
+    */
+    int getEngineVersion();
+
+    /**
+    * Finds an installed OpenCV library.
+    * @param OpenCV version.
+    * @return Returns path to OpenCV native libs or an empty string if OpenCV can not be found.
+    */
+    String getLibPathByVersion(String version);
+
+    /**
+    * Tries to install defined version of OpenCV from Google Play Market.
+    * @param OpenCV version.
+    * @return Returns true if installation was successful or OpenCV package has been already installed.
+    */
+    boolean installVersion(String version);
+
+    /**
+    * Returns list of libraries in loading order, separated by semicolon.
+    * @param OpenCV version.
+    * @return Returns names of OpenCV libraries, separated by semicolon.
+    */
+    String getLibraryList(String version);
+}
diff --git a/opencv41/src/main/java/org/opencv/android/AsyncServiceHelper.java b/opencv41/src/main/java/org/opencv/android/AsyncServiceHelper.java
new file mode 100644 (file)
index 0000000..a718ca3
--- /dev/null
@@ -0,0 +1,391 @@
+package org.opencv.android;
+
+import java.io.File;
+import java.util.StringTokenizer;
+
+import org.opencv.core.Core;
+import org.opencv.engine.OpenCVEngineInterface;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.net.Uri;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.util.Log;
+
+class AsyncServiceHelper
+{
+    public static boolean initOpenCV(String Version, final Context AppContext,
+            final LoaderCallbackInterface Callback)
+    {
+        AsyncServiceHelper helper = new AsyncServiceHelper(Version, AppContext, Callback);
+        Intent intent = new Intent("org.opencv.engine.BIND");
+        intent.setPackage("org.opencv.engine");
+        if (AppContext.bindService(intent, helper.mServiceConnection, Context.BIND_AUTO_CREATE))
+        {
+            return true;
+        }
+        else
+        {
+            AppContext.unbindService(helper.mServiceConnection);
+            InstallService(AppContext, Callback);
+            return false;
+        }
+    }
+
+    protected AsyncServiceHelper(String Version, Context AppContext, LoaderCallbackInterface Callback)
+    {
+        mOpenCVersion = Version;
+        mUserAppCallback = Callback;
+        mAppContext = AppContext;
+    }
+
+    protected static final String TAG = "OpenCVManager/Helper";
+    protected static final int MINIMUM_ENGINE_VERSION = 2;
+    protected OpenCVEngineInterface mEngineService;
+    protected LoaderCallbackInterface mUserAppCallback;
+    protected String mOpenCVersion;
+    protected Context mAppContext;
+    protected static boolean mServiceInstallationProgress = false;
+    protected static boolean mLibraryInstallationProgress = false;
+
+    protected static boolean InstallServiceQuiet(Context context)
+    {
+        boolean result = true;
+        try
+        {
+            Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(OPEN_CV_SERVICE_URL));
+            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+            context.startActivity(intent);
+        }
+        catch(Exception e)
+        {
+            result = false;
+        }
+
+        return result;
+    }
+
+    protected static void InstallService(final Context AppContext, final LoaderCallbackInterface Callback)
+    {
+        if (!mServiceInstallationProgress)
+        {
+                Log.d(TAG, "Request new service installation");
+                InstallCallbackInterface InstallQuery = new InstallCallbackInterface() {
+                private LoaderCallbackInterface mUserAppCallback = Callback;
+                public String getPackageName()
+                {
+                    return "OpenCV Manager";
+                }
+                public void install() {
+                    Log.d(TAG, "Trying to install OpenCV Manager via Google Play");
+
+                    boolean result = InstallServiceQuiet(AppContext);
+                    if (result)
+                    {
+                        mServiceInstallationProgress = true;
+                        Log.d(TAG, "Package installation started");
+                    }
+                    else
+                    {
+                        Log.d(TAG, "OpenCV package was not installed!");
+                        int Status = LoaderCallbackInterface.MARKET_ERROR;
+                        Log.d(TAG, "Init finished with status " + Status);
+                        Log.d(TAG, "Unbind from service");
+                        Log.d(TAG, "Calling using callback");
+                        mUserAppCallback.onManagerConnected(Status);
+                    }
+                }
+
+                public void cancel()
+                {
+                    Log.d(TAG, "OpenCV library installation was canceled");
+                    int Status = LoaderCallbackInterface.INSTALL_CANCELED;
+                    Log.d(TAG, "Init finished with status " + Status);
+                    Log.d(TAG, "Calling using callback");
+                    mUserAppCallback.onManagerConnected(Status);
+                }
+
+                public void wait_install()
+                {
+                    Log.e(TAG, "Installation was not started! Nothing to wait!");
+                }
+            };
+
+            Callback.onPackageInstall(InstallCallbackInterface.NEW_INSTALLATION, InstallQuery);
+        }
+        else
+        {
+            Log.d(TAG, "Waiting current installation process");
+            InstallCallbackInterface WaitQuery = new InstallCallbackInterface() {
+                private LoaderCallbackInterface mUserAppCallback = Callback;
+                public String getPackageName()
+                {
+                    return "OpenCV Manager";
+                }
+                public void install()
+                {
+                    Log.e(TAG, "Nothing to install we just wait current installation");
+                }
+                public void cancel()
+                {
+                    Log.d(TAG, "Waiting for OpenCV canceled by user");
+                    mServiceInstallationProgress = false;
+                    int Status = LoaderCallbackInterface.INSTALL_CANCELED;
+                    Log.d(TAG, "Init finished with status " + Status);
+                    Log.d(TAG, "Calling using callback");
+                    mUserAppCallback.onManagerConnected(Status);
+                }
+                public void wait_install()
+                {
+                     InstallServiceQuiet(AppContext);
+                }
+            };
+
+            Callback.onPackageInstall(InstallCallbackInterface.INSTALLATION_PROGRESS, WaitQuery);
+        }
+    }
+
+    /**
+     *  URL of OpenCV Manager page on Google Play Market.
+     */
+    protected static final String OPEN_CV_SERVICE_URL = "market://details?id=org.opencv.engine";
+
+    protected ServiceConnection mServiceConnection = new ServiceConnection()
+    {
+        public void onServiceConnected(ComponentName className, IBinder service)
+        {
+            Log.d(TAG, "Service connection created");
+            mEngineService = OpenCVEngineInterface.Stub.asInterface(service);
+            if (null == mEngineService)
+            {
+                Log.d(TAG, "OpenCV Manager Service connection fails. May be service was not installed?");
+                InstallService(mAppContext, mUserAppCallback);
+            }
+            else
+            {
+                mServiceInstallationProgress = false;
+                try
+                {
+                    if (mEngineService.getEngineVersion() < MINIMUM_ENGINE_VERSION)
+                    {
+                        Log.d(TAG, "Init finished with status " + LoaderCallbackInterface.INCOMPATIBLE_MANAGER_VERSION);
+                        Log.d(TAG, "Unbind from service");
+                        mAppContext.unbindService(mServiceConnection);
+                        Log.d(TAG, "Calling using callback");
+                        mUserAppCallback.onManagerConnected(LoaderCallbackInterface.INCOMPATIBLE_MANAGER_VERSION);
+                        return;
+                    }
+
+                    Log.d(TAG, "Trying to get library path");
+                    String path = mEngineService.getLibPathByVersion(mOpenCVersion);
+                    if ((null == path) || (path.length() == 0))
+                    {
+                        if (!mLibraryInstallationProgress)
+                        {
+                            InstallCallbackInterface InstallQuery = new InstallCallbackInterface() {
+                                public String getPackageName()
+                                {
+                                    return "OpenCV library";
+                                }
+                                public void install() {
+                                    Log.d(TAG, "Trying to install OpenCV lib via Google Play");
+                                    try
+                                    {
+                                        if (mEngineService.installVersion(mOpenCVersion))
+                                        {
+                                            mLibraryInstallationProgress = true;
+                                            Log.d(TAG, "Package installation started");
+                                            Log.d(TAG, "Unbind from service");
+                                            mAppContext.unbindService(mServiceConnection);
+                                        }
+                                        else
+                                        {
+                                            Log.d(TAG, "OpenCV package was not installed!");
+                                            Log.d(TAG, "Init finished with status " + LoaderCallbackInterface.MARKET_ERROR);
+                                            Log.d(TAG, "Unbind from service");
+                                            mAppContext.unbindService(mServiceConnection);
+                                            Log.d(TAG, "Calling using callback");
+                                            mUserAppCallback.onManagerConnected(LoaderCallbackInterface.MARKET_ERROR);
+                                        }
+                                    } catch (RemoteException e) {
+                                        e.printStackTrace();;
+                                        Log.d(TAG, "Init finished with status " + LoaderCallbackInterface.INIT_FAILED);
+                                        Log.d(TAG, "Unbind from service");
+                                        mAppContext.unbindService(mServiceConnection);
+                                        Log.d(TAG, "Calling using callback");
+                                        mUserAppCallback.onManagerConnected(LoaderCallbackInterface.INIT_FAILED);
+                                    }
+                                }
+                                public void cancel() {
+                                    Log.d(TAG, "OpenCV library installation was canceled");
+                                    Log.d(TAG, "Init finished with status " + LoaderCallbackInterface.INSTALL_CANCELED);
+                                    Log.d(TAG, "Unbind from service");
+                                    mAppContext.unbindService(mServiceConnection);
+                                    Log.d(TAG, "Calling using callback");
+                                    mUserAppCallback.onManagerConnected(LoaderCallbackInterface.INSTALL_CANCELED);
+                                }
+                                public void wait_install() {
+                                    Log.e(TAG, "Installation was not started! Nothing to wait!");
+                                }
+                            };
+
+                            mUserAppCallback.onPackageInstall(InstallCallbackInterface.NEW_INSTALLATION, InstallQuery);
+                        }
+                        else
+                        {
+                            InstallCallbackInterface WaitQuery = new InstallCallbackInterface() {
+                                public String getPackageName()
+                                {
+                                    return "OpenCV library";
+                                }
+
+                                public void install() {
+                                    Log.e(TAG, "Nothing to install we just wait current installation");
+                                }
+                                public void cancel()
+                                {
+                                    Log.d(TAG, "OpenCV library installation was canceled");
+                                    mLibraryInstallationProgress = false;
+                                    Log.d(TAG, "Init finished with status " + LoaderCallbackInterface.INSTALL_CANCELED);
+                                    Log.d(TAG, "Unbind from service");
+                                    mAppContext.unbindService(mServiceConnection);
+                                    Log.d(TAG, "Calling using callback");
+                                        mUserAppCallback.onManagerConnected(LoaderCallbackInterface.INSTALL_CANCELED);
+                                }
+                                public void wait_install() {
+                                    Log.d(TAG, "Waiting for current installation");
+                                    try
+                                    {
+                                        if (!mEngineService.installVersion(mOpenCVersion))
+                                        {
+                                            Log.d(TAG, "OpenCV package was not installed!");
+                                            Log.d(TAG, "Init finished with status " + LoaderCallbackInterface.MARKET_ERROR);
+                                            Log.d(TAG, "Calling using callback");
+                                            mUserAppCallback.onManagerConnected(LoaderCallbackInterface.MARKET_ERROR);
+                                        }
+                                        else
+                                        {
+                                            Log.d(TAG, "Wating for package installation");
+                                        }
+
+                                        Log.d(TAG, "Unbind from service");
+                                        mAppContext.unbindService(mServiceConnection);
+
+                                    } catch (RemoteException e) {
+                                        e.printStackTrace();
+                                        Log.d(TAG, "Init finished with status " + LoaderCallbackInterface.INIT_FAILED);
+                                        Log.d(TAG, "Unbind from service");
+                                        mAppContext.unbindService(mServiceConnection);
+                                        Log.d(TAG, "Calling using callback");
+                                        mUserAppCallback.onManagerConnected(LoaderCallbackInterface.INIT_FAILED);
+                                    }
+                               }
+                            };
+
+                            mUserAppCallback.onPackageInstall(InstallCallbackInterface.INSTALLATION_PROGRESS, WaitQuery);
+                        }
+                        return;
+                    }
+                    else
+                    {
+                        Log.d(TAG, "Trying to get library list");
+                        mLibraryInstallationProgress = false;
+                        String libs = mEngineService.getLibraryList(mOpenCVersion);
+                        Log.d(TAG, "Library list: \"" + libs + "\"");
+                        Log.d(TAG, "First attempt to load libs");
+                        int status;
+                        if (initOpenCVLibs(path, 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);
+
+                            status = LoaderCallbackInterface.SUCCESS;
+                        }
+                        else
+                        {
+                            Log.d(TAG, "First attempt to load libs fails");
+                            status = LoaderCallbackInterface.INIT_FAILED;
+                        }
+
+                        Log.d(TAG, "Init finished with status " + status);
+                        Log.d(TAG, "Unbind from service");
+                        mAppContext.unbindService(mServiceConnection);
+                        Log.d(TAG, "Calling using callback");
+                        mUserAppCallback.onManagerConnected(status);
+                    }
+                }
+                catch (RemoteException e)
+                {
+                    e.printStackTrace();
+                    Log.d(TAG, "Init finished with status " + LoaderCallbackInterface.INIT_FAILED);
+                    Log.d(TAG, "Unbind from service");
+                    mAppContext.unbindService(mServiceConnection);
+                    Log.d(TAG, "Calling using callback");
+                    mUserAppCallback.onManagerConnected(LoaderCallbackInterface.INIT_FAILED);
+                }
+            }
+        }
+
+        public void onServiceDisconnected(ComponentName className)
+        {
+            mEngineService = null;
+        }
+    };
+
+    private boolean loadLibrary(String AbsPath)
+    {
+        boolean result = true;
+
+        Log.d(TAG, "Trying to load library " + AbsPath);
+        try
+        {
+            System.load(AbsPath);
+            Log.d(TAG, "OpenCV libs init was ok!");
+        }
+        catch(UnsatisfiedLinkError e)
+        {
+            Log.d(TAG, "Cannot load library \"" + AbsPath + "\"");
+            e.printStackTrace();
+            result = false;
+        }
+
+        return result;
+    }
+
+    private boolean initOpenCVLibs(String Path, String Libs)
+    {
+        Log.d(TAG, "Trying to init OpenCV libs");
+        if ((null != Path) && (Path.length() != 0))
+        {
+            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())
+                {
+                    String AbsLibraryPath = Path + File.separator + splitter.nextToken();
+                    result &= loadLibrary(AbsLibraryPath);
+                }
+            }
+            else
+            {
+                // If the dependencies list is not defined or empty.
+                String AbsLibraryPath = Path + File.separator + "libopencv_java4.so";
+                result = loadLibrary(AbsLibraryPath);
+            }
+
+            return result;
+        }
+        else
+        {
+            Log.d(TAG, "Library path \"" + Path + "\" is empty");
+            return false;
+        }
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/android/BaseLoaderCallback.java b/opencv41/src/main/java/org/opencv/android/BaseLoaderCallback.java
new file mode 100644 (file)
index 0000000..8ece662
--- /dev/null
@@ -0,0 +1,141 @@
+package org.opencv.android;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnClickListener;
+import android.util.Log;
+
+/**
+ * Basic implementation of LoaderCallbackInterface.
+ */
+public abstract class BaseLoaderCallback implements LoaderCallbackInterface {
+
+    public BaseLoaderCallback(Context AppContext) {
+        mAppContext = AppContext;
+    }
+
+    public void onManagerConnected(int status)
+    {
+        switch (status)
+        {
+            /** OpenCV initialization was successful. **/
+            case LoaderCallbackInterface.SUCCESS:
+            {
+                /** Application must override this method to handle successful library initialization. **/
+            } break;
+            /** OpenCV loader can not start Google Play Market. **/
+            case LoaderCallbackInterface.MARKET_ERROR:
+            {
+                Log.e(TAG, "Package installation failed!");
+                AlertDialog MarketErrorMessage = new AlertDialog.Builder(mAppContext).create();
+                MarketErrorMessage.setTitle("OpenCV Manager");
+                MarketErrorMessage.setMessage("Package installation failed!");
+                MarketErrorMessage.setCancelable(false); // This blocks the 'BACK' button
+                MarketErrorMessage.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new OnClickListener() {
+                    public void onClick(DialogInterface dialog, int which) {
+                        finish();
+                    }
+                });
+                MarketErrorMessage.show();
+            } break;
+            /** Package installation has been canceled. **/
+            case LoaderCallbackInterface.INSTALL_CANCELED:
+            {
+                Log.d(TAG, "OpenCV library installation was canceled by user");
+                finish();
+            } break;
+            /** Application is incompatible with this version of OpenCV Manager. Possibly, a service update is required. **/
+            case LoaderCallbackInterface.INCOMPATIBLE_MANAGER_VERSION:
+            {
+                Log.d(TAG, "OpenCV Manager Service is uncompatible with this app!");
+                AlertDialog IncomatibilityMessage = new AlertDialog.Builder(mAppContext).create();
+                IncomatibilityMessage.setTitle("OpenCV Manager");
+                IncomatibilityMessage.setMessage("OpenCV Manager service is incompatible with this app. Try to update it via Google Play.");
+                IncomatibilityMessage.setCancelable(false); // This blocks the 'BACK' button
+                IncomatibilityMessage.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new OnClickListener() {
+                    public void onClick(DialogInterface dialog, int which) {
+                        finish();
+                    }
+                });
+                IncomatibilityMessage.show();
+            } break;
+            /** Other status, i.e. INIT_FAILED. **/
+            default:
+            {
+                Log.e(TAG, "OpenCV loading failed!");
+                AlertDialog InitFailedDialog = new AlertDialog.Builder(mAppContext).create();
+                InitFailedDialog.setTitle("OpenCV error");
+                InitFailedDialog.setMessage("OpenCV was not initialised correctly. Application will be shut down");
+                InitFailedDialog.setCancelable(false); // This blocks the 'BACK' button
+                InitFailedDialog.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new OnClickListener() {
+
+                    public void onClick(DialogInterface dialog, int which) {
+                        finish();
+                    }
+                });
+
+                InitFailedDialog.show();
+            } break;
+        }
+    }
+
+    public void onPackageInstall(final int operation, final InstallCallbackInterface callback)
+    {
+        switch (operation)
+        {
+            case InstallCallbackInterface.NEW_INSTALLATION:
+            {
+                AlertDialog InstallMessage = new AlertDialog.Builder(mAppContext).create();
+                InstallMessage.setTitle("Package not found");
+                InstallMessage.setMessage(callback.getPackageName() + " package was not found! Try to install it?");
+                InstallMessage.setCancelable(false); // This blocks the 'BACK' button
+                InstallMessage.setButton(AlertDialog.BUTTON_POSITIVE, "Yes", new OnClickListener()
+                {
+                    public void onClick(DialogInterface dialog, int which)
+                    {
+                        callback.install();
+                    }
+                });
+
+                InstallMessage.setButton(AlertDialog.BUTTON_NEGATIVE, "No", new OnClickListener() {
+
+                    public void onClick(DialogInterface dialog, int which)
+                    {
+                        callback.cancel();
+                    }
+                });
+
+                InstallMessage.show();
+            } break;
+            case InstallCallbackInterface.INSTALLATION_PROGRESS:
+            {
+                AlertDialog WaitMessage = new AlertDialog.Builder(mAppContext).create();
+                WaitMessage.setTitle("OpenCV is not ready");
+                WaitMessage.setMessage("Installation is in progress. Wait or exit?");
+                WaitMessage.setCancelable(false); // This blocks the 'BACK' button
+                WaitMessage.setButton(AlertDialog.BUTTON_POSITIVE, "Wait", new OnClickListener() {
+                    public void onClick(DialogInterface dialog, int which) {
+                        callback.wait_install();
+                    }
+                });
+                WaitMessage.setButton(AlertDialog.BUTTON_NEGATIVE, "Exit", new OnClickListener() {
+                    public void onClick(DialogInterface dialog, int which) {
+                        callback.cancel();
+                    }
+                });
+
+                WaitMessage.show();
+            } break;
+        }
+    }
+
+    void finish()
+    {
+        ((Activity) mAppContext).finish();
+    }
+
+    protected Context mAppContext;
+    private final static String TAG = "OCV/BaseLoaderCallback";
+}
diff --git a/opencv41/src/main/java/org/opencv/android/Camera2Renderer.java b/opencv41/src/main/java/org/opencv/android/Camera2Renderer.java
new file mode 100644 (file)
index 0000000..4082140
--- /dev/null
@@ -0,0 +1,302 @@
+package org.opencv.android;
+
+import java.util.Arrays;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+import android.annotation.TargetApi;
+import android.content.Context;
+import android.graphics.SurfaceTexture;
+import android.hardware.camera2.CameraAccessException;
+import android.hardware.camera2.CameraCaptureSession;
+import android.hardware.camera2.CameraCharacteristics;
+import android.hardware.camera2.CameraDevice;
+import android.hardware.camera2.CameraManager;
+import android.hardware.camera2.CaptureRequest;
+import android.hardware.camera2.params.StreamConfigurationMap;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.util.Log;
+import android.util.Size;
+import android.view.Surface;
+
+@TargetApi(21)
+public class Camera2Renderer extends CameraGLRendererBase {
+
+    protected final String LOGTAG = "Camera2Renderer";
+    private CameraDevice mCameraDevice;
+    private CameraCaptureSession mCaptureSession;
+    private CaptureRequest.Builder mPreviewRequestBuilder;
+    private String mCameraID;
+    private Size mPreviewSize = new Size(-1, -1);
+
+    private HandlerThread mBackgroundThread;
+    private Handler mBackgroundHandler;
+    private Semaphore mCameraOpenCloseLock = new Semaphore(1);
+
+    Camera2Renderer(CameraGLSurfaceView view) {
+        super(view);
+    }
+
+    @Override
+    protected void doStart() {
+        Log.d(LOGTAG, "doStart");
+        startBackgroundThread();
+        super.doStart();
+    }
+
+
+    @Override
+    protected void doStop() {
+        Log.d(LOGTAG, "doStop");
+        super.doStop();
+        stopBackgroundThread();
+    }
+
+    boolean cacPreviewSize(final int width, final int height) {
+        Log.i(LOGTAG, "cacPreviewSize: "+width+"x"+height);
+        if(mCameraID == null) {
+            Log.e(LOGTAG, "Camera isn't initialized!");
+            return false;
+        }
+        CameraManager manager = (CameraManager) mView.getContext()
+                .getSystemService(Context.CAMERA_SERVICE);
+        try {
+            CameraCharacteristics characteristics = manager
+                    .getCameraCharacteristics(mCameraID);
+            StreamConfigurationMap map = characteristics
+                    .get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
+            int bestWidth = 0, bestHeight = 0;
+            float aspect = (float)width / height;
+            for (Size psize : map.getOutputSizes(SurfaceTexture.class)) {
+                int w = psize.getWidth(), h = psize.getHeight();
+                Log.d(LOGTAG, "trying size: "+w+"x"+h);
+                if ( width >= w && height >= h &&
+                     bestWidth <= w && bestHeight <= h &&
+                     Math.abs(aspect - (float)w/h) < 0.2 ) {
+                    bestWidth = w;
+                    bestHeight = h;
+                }
+            }
+            Log.i(LOGTAG, "best size: "+bestWidth+"x"+bestHeight);
+            if( bestWidth == 0 || bestHeight == 0 ||
+                mPreviewSize.getWidth() == bestWidth &&
+                mPreviewSize.getHeight() == bestHeight )
+                return false;
+            else {
+                mPreviewSize = new Size(bestWidth, bestHeight);
+                return true;
+            }
+        } catch (CameraAccessException e) {
+            Log.e(LOGTAG, "cacPreviewSize - Camera Access Exception");
+        } catch (IllegalArgumentException e) {
+            Log.e(LOGTAG, "cacPreviewSize - Illegal Argument Exception");
+        } catch (SecurityException e) {
+            Log.e(LOGTAG, "cacPreviewSize - Security Exception");
+        }
+        return false;
+    }
+
+    @Override
+    protected void openCamera(int id) {
+        Log.i(LOGTAG, "openCamera");
+        CameraManager manager = (CameraManager) mView.getContext().getSystemService(Context.CAMERA_SERVICE);
+        try {
+            String camList[] = manager.getCameraIdList();
+            if(camList.length == 0) {
+                Log.e(LOGTAG, "Error: camera isn't detected.");
+                return;
+            }
+            if(id == CameraBridgeViewBase.CAMERA_ID_ANY) {
+                mCameraID = camList[0];
+            } else {
+                for (String cameraID : camList) {
+                    CameraCharacteristics characteristics = manager.getCameraCharacteristics(cameraID);
+                    if( id == CameraBridgeViewBase.CAMERA_ID_BACK &&
+                        characteristics.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_BACK ||
+                        id == CameraBridgeViewBase.CAMERA_ID_FRONT &&
+                        characteristics.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT) {
+                        mCameraID = cameraID;
+                        break;
+                    }
+                }
+            }
+            if(mCameraID != null) {
+                if (!mCameraOpenCloseLock.tryAcquire(2500, TimeUnit.MILLISECONDS)) {
+                    throw new RuntimeException(
+                            "Time out waiting to lock camera opening.");
+                }
+                Log.i(LOGTAG, "Opening camera: " + mCameraID);
+                manager.openCamera(mCameraID, mStateCallback, mBackgroundHandler);
+            }
+        } catch (CameraAccessException e) {
+            Log.e(LOGTAG, "OpenCamera - Camera Access Exception");
+        } catch (IllegalArgumentException e) {
+            Log.e(LOGTAG, "OpenCamera - Illegal Argument Exception");
+        } catch (SecurityException e) {
+            Log.e(LOGTAG, "OpenCamera - Security Exception");
+        } catch (InterruptedException e) {
+            Log.e(LOGTAG, "OpenCamera - Interrupted Exception");
+        }
+    }
+
+    @Override
+    protected void closeCamera() {
+        Log.i(LOGTAG, "closeCamera");
+        try {
+            mCameraOpenCloseLock.acquire();
+            if (null != mCaptureSession) {
+                mCaptureSession.close();
+                mCaptureSession = null;
+            }
+            if (null != mCameraDevice) {
+                mCameraDevice.close();
+                mCameraDevice = null;
+            }
+        } catch (InterruptedException e) {
+            throw new RuntimeException("Interrupted while trying to lock camera closing.", e);
+        } finally {
+            mCameraOpenCloseLock.release();
+        }
+    }
+
+    private final CameraDevice.StateCallback mStateCallback = new CameraDevice.StateCallback() {
+
+        @Override
+        public void onOpened(CameraDevice cameraDevice) {
+            mCameraDevice = cameraDevice;
+            mCameraOpenCloseLock.release();
+            createCameraPreviewSession();
+        }
+
+        @Override
+        public void onDisconnected(CameraDevice cameraDevice) {
+            cameraDevice.close();
+            mCameraDevice = null;
+            mCameraOpenCloseLock.release();
+        }
+
+        @Override
+        public void onError(CameraDevice cameraDevice, int error) {
+            cameraDevice.close();
+            mCameraDevice = null;
+            mCameraOpenCloseLock.release();
+        }
+
+    };
+
+    private void createCameraPreviewSession() {
+        int w=mPreviewSize.getWidth(), h=mPreviewSize.getHeight();
+        Log.i(LOGTAG, "createCameraPreviewSession("+w+"x"+h+")");
+        if(w<0 || h<0)
+            return;
+        try {
+            mCameraOpenCloseLock.acquire();
+            if (null == mCameraDevice) {
+                mCameraOpenCloseLock.release();
+                Log.e(LOGTAG, "createCameraPreviewSession: camera isn't opened");
+                return;
+            }
+            if (null != mCaptureSession) {
+                mCameraOpenCloseLock.release();
+                Log.e(LOGTAG, "createCameraPreviewSession: mCaptureSession is already started");
+                return;
+            }
+            if(null == mSTexture) {
+                mCameraOpenCloseLock.release();
+                Log.e(LOGTAG, "createCameraPreviewSession: preview SurfaceTexture is null");
+                return;
+            }
+            mSTexture.setDefaultBufferSize(w, h);
+
+            Surface surface = new Surface(mSTexture);
+
+            mPreviewRequestBuilder = mCameraDevice
+                    .createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW);
+            mPreviewRequestBuilder.addTarget(surface);
+
+            mCameraDevice.createCaptureSession(Arrays.asList(surface),
+                    new CameraCaptureSession.StateCallback() {
+                        @Override
+                        public void onConfigured( CameraCaptureSession cameraCaptureSession) {
+                            mCaptureSession = cameraCaptureSession;
+                            try {
+                                mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE);
+                                mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AE_MODE, CaptureRequest.CONTROL_AE_MODE_ON_AUTO_FLASH);
+
+                                mCaptureSession.setRepeatingRequest(mPreviewRequestBuilder.build(), null, mBackgroundHandler);
+                                Log.i(LOGTAG, "CameraPreviewSession has been started");
+                            } catch (CameraAccessException e) {
+                                Log.e(LOGTAG, "createCaptureSession failed");
+                            }
+                            mCameraOpenCloseLock.release();
+                        }
+
+                        @Override
+                        public void onConfigureFailed(
+                                CameraCaptureSession cameraCaptureSession) {
+                            Log.e(LOGTAG, "createCameraPreviewSession failed");
+                            mCameraOpenCloseLock.release();
+                        }
+                    }, mBackgroundHandler);
+        } catch (CameraAccessException e) {
+            Log.e(LOGTAG, "createCameraPreviewSession");
+        } catch (InterruptedException e) {
+            throw new RuntimeException(
+                    "Interrupted while createCameraPreviewSession", e);
+        }
+        finally {
+            //mCameraOpenCloseLock.release();
+        }
+    }
+
+    private void startBackgroundThread() {
+        Log.i(LOGTAG, "startBackgroundThread");
+        stopBackgroundThread();
+        mBackgroundThread = new HandlerThread("CameraBackground");
+        mBackgroundThread.start();
+        mBackgroundHandler = new Handler(mBackgroundThread.getLooper());
+    }
+
+    private void stopBackgroundThread() {
+        Log.i(LOGTAG, "stopBackgroundThread");
+        if(mBackgroundThread == null)
+            return;
+        mBackgroundThread.quitSafely();
+        try {
+            mBackgroundThread.join();
+            mBackgroundThread = null;
+            mBackgroundHandler = null;
+        } catch (InterruptedException e) {
+            Log.e(LOGTAG, "stopBackgroundThread");
+        }
+    }
+
+    @Override
+    protected void setCameraPreviewSize(int width, int height) {
+        Log.i(LOGTAG, "setCameraPreviewSize("+width+"x"+height+")");
+        if(mMaxCameraWidth  > 0 && mMaxCameraWidth  < width)  width  = mMaxCameraWidth;
+        if(mMaxCameraHeight > 0 && mMaxCameraHeight < height) height = mMaxCameraHeight;
+        try {
+            mCameraOpenCloseLock.acquire();
+
+            boolean needReconfig = cacPreviewSize(width, height);
+            mCameraWidth  = mPreviewSize.getWidth();
+            mCameraHeight = mPreviewSize.getHeight();
+
+            if( !needReconfig ) {
+                mCameraOpenCloseLock.release();
+                return;
+            }
+            if (null != mCaptureSession) {
+                Log.d(LOGTAG, "closing existing previewSession");
+                mCaptureSession.close();
+                mCaptureSession = null;
+            }
+            mCameraOpenCloseLock.release();
+            createCameraPreviewSession();
+        } catch (InterruptedException e) {
+            mCameraOpenCloseLock.release();
+            throw new RuntimeException("Interrupted while setCameraPreviewSize.", e);
+        }
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/android/CameraBridgeViewBase.java b/opencv41/src/main/java/org/opencv/android/CameraBridgeViewBase.java
new file mode 100644 (file)
index 0000000..5487105
--- /dev/null
@@ -0,0 +1,495 @@
+package org.opencv.android;
+
+import java.util.List;
+
+import org.opencv.BuildConfig;
+import org.opencv.R;
+import org.opencv.core.Mat;
+import org.opencv.core.Size;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.res.TypedArray;
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.Rect;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.SurfaceHolder;
+import android.view.SurfaceView;
+
+/**
+ * This is a basic class, implementing the interaction with Camera and OpenCV library.
+ * The main responsibility of it - is to control when camera can be enabled, process the frame,
+ * call external listener to make any adjustments to the frame and then draw the resulting
+ * frame to the screen.
+ * The clients shall implement CvCameraViewListener.
+ */
+public abstract class CameraBridgeViewBase extends SurfaceView implements SurfaceHolder.Callback {
+
+    private static final String TAG = "CameraBridge";
+    private static final int MAX_UNSPECIFIED = -1;
+    private static final int STOPPED = 0;
+    private static final int STARTED = 1;
+
+    private int mState = STOPPED;
+    private Bitmap mCacheBitmap;
+    private CvCameraViewListener2 mListener;
+    private boolean mSurfaceExist;
+    private final Object mSyncObject = new Object();
+
+    protected int mFrameWidth;
+    protected int mFrameHeight;
+    protected int mMaxHeight;
+    protected int mMaxWidth;
+    protected float mScale = 0;
+    protected int mPreviewFormat = RGBA;
+    protected int mCameraIndex = CAMERA_ID_ANY;
+    protected boolean mEnabled;
+    protected FpsMeter mFpsMeter = null;
+
+    public static final int CAMERA_ID_ANY   = -1;
+    public static final int CAMERA_ID_BACK  = 99;
+    public static final int CAMERA_ID_FRONT = 98;
+    public static final int RGBA = 1;
+    public static final int GRAY = 2;
+
+    public CameraBridgeViewBase(Context context, int cameraId) {
+        super(context);
+        mCameraIndex = cameraId;
+        getHolder().addCallback(this);
+        mMaxWidth = MAX_UNSPECIFIED;
+        mMaxHeight = MAX_UNSPECIFIED;
+    }
+
+    public CameraBridgeViewBase(Context context, AttributeSet attrs) {
+        super(context, attrs);
+
+        int count = attrs.getAttributeCount();
+        Log.d(TAG, "Attr count: " + Integer.valueOf(count));
+
+        TypedArray styledAttrs = getContext().obtainStyledAttributes(attrs, R.styleable.CameraBridgeViewBase);
+        if (styledAttrs.getBoolean(R.styleable.CameraBridgeViewBase_show_fps, false))
+            enableFpsMeter();
+
+        mCameraIndex = styledAttrs.getInt(R.styleable.CameraBridgeViewBase_camera_id, -1);
+
+        getHolder().addCallback(this);
+        mMaxWidth = MAX_UNSPECIFIED;
+        mMaxHeight = MAX_UNSPECIFIED;
+        styledAttrs.recycle();
+    }
+
+    /**
+     * Sets the camera index
+     * @param cameraIndex new camera index
+     */
+    public void setCameraIndex(int cameraIndex) {
+        this.mCameraIndex = cameraIndex;
+    }
+
+    public interface CvCameraViewListener {
+        /**
+         * This method is invoked when camera preview has started. After this method is invoked
+         * the frames will start to be delivered to client via the onCameraFrame() callback.
+         * @param width -  the width of the frames that will be delivered
+         * @param height - the height of the frames that will be delivered
+         */
+        public void onCameraViewStarted(int width, int height);
+
+        /**
+         * This method is invoked when camera preview has been stopped for some reason.
+         * No frames will be delivered via onCameraFrame() callback after this method is called.
+         */
+        public void onCameraViewStopped();
+
+        /**
+         * This method is invoked when delivery of the frame needs to be done.
+         * The returned values - is a modified frame which needs to be displayed on the screen.
+         * TODO: pass the parameters specifying the format of the frame (BPP, YUV or RGB and etc)
+         */
+        public Mat onCameraFrame(Mat inputFrame);
+    }
+
+    public interface CvCameraViewListener2 {
+        /**
+         * This method is invoked when camera preview has started. After this method is invoked
+         * the frames will start to be delivered to client via the onCameraFrame() callback.
+         * @param width -  the width of the frames that will be delivered
+         * @param height - the height of the frames that will be delivered
+         */
+        public void onCameraViewStarted(int width, int height);
+
+        /**
+         * This method is invoked when camera preview has been stopped for some reason.
+         * No frames will be delivered via onCameraFrame() callback after this method is called.
+         */
+        public void onCameraViewStopped();
+
+        /**
+         * This method is invoked when delivery of the frame needs to be done.
+         * The returned values - is a modified frame which needs to be displayed on the screen.
+         * TODO: pass the parameters specifying the format of the frame (BPP, YUV or RGB and etc)
+         */
+        public Mat onCameraFrame(CvCameraViewFrame inputFrame);
+    };
+
+    protected class CvCameraViewListenerAdapter implements CvCameraViewListener2  {
+        public CvCameraViewListenerAdapter(CvCameraViewListener oldStypeListener) {
+            mOldStyleListener = oldStypeListener;
+        }
+
+        public void onCameraViewStarted(int width, int height) {
+            mOldStyleListener.onCameraViewStarted(width, height);
+        }
+
+        public void onCameraViewStopped() {
+            mOldStyleListener.onCameraViewStopped();
+        }
+
+        public Mat onCameraFrame(CvCameraViewFrame inputFrame) {
+             Mat result = null;
+             switch (mPreviewFormat) {
+                case RGBA:
+                    result = mOldStyleListener.onCameraFrame(inputFrame.rgba());
+                    break;
+                case GRAY:
+                    result = mOldStyleListener.onCameraFrame(inputFrame.gray());
+                    break;
+                default:
+                    Log.e(TAG, "Invalid frame format! Only RGBA and Gray Scale are supported!");
+            };
+
+            return result;
+        }
+
+        public void setFrameFormat(int format) {
+            mPreviewFormat = format;
+        }
+
+        private int mPreviewFormat = RGBA;
+        private CvCameraViewListener mOldStyleListener;
+    };
+
+    /**
+     * This class interface is abstract representation of single frame from camera for onCameraFrame callback
+     * Attention: Do not use objects, that represents this interface out of onCameraFrame callback!
+     */
+    public interface CvCameraViewFrame {
+
+        /**
+         * This method returns RGBA Mat with frame
+         */
+        public Mat rgba();
+
+        /**
+         * This method returns single channel gray scale Mat with frame
+         */
+        public Mat gray();
+    };
+
+    public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) {
+        Log.d(TAG, "call surfaceChanged event");
+        synchronized(mSyncObject) {
+            if (!mSurfaceExist) {
+                mSurfaceExist = true;
+                checkCurrentState();
+            } else {
+                /** Surface changed. We need to stop camera and restart with new parameters */
+                /* Pretend that old surface has been destroyed */
+                mSurfaceExist = false;
+                checkCurrentState();
+                /* Now use new surface. Say we have it now */
+                mSurfaceExist = true;
+                checkCurrentState();
+            }
+        }
+    }
+
+    public void surfaceCreated(SurfaceHolder holder) {
+        /* Do nothing. Wait until surfaceChanged delivered */
+    }
+
+    public void surfaceDestroyed(SurfaceHolder holder) {
+        synchronized(mSyncObject) {
+            mSurfaceExist = false;
+            checkCurrentState();
+        }
+    }
+
+    /**
+     * This method is provided for clients, so they can enable the camera connection.
+     * The actual onCameraViewStarted callback will be delivered only after both this method is called and surface is available
+     */
+    public void enableView() {
+        synchronized(mSyncObject) {
+            mEnabled = true;
+            checkCurrentState();
+        }
+    }
+
+    /**
+     * This method is provided for clients, so they can disable camera connection and stop
+     * the delivery of frames even though the surface view itself is not destroyed and still stays on the scren
+     */
+    public void disableView() {
+        synchronized(mSyncObject) {
+            mEnabled = false;
+            checkCurrentState();
+        }
+    }
+
+    /**
+     * This method enables label with fps value on the screen
+     */
+    public void enableFpsMeter() {
+        if (mFpsMeter == null) {
+            mFpsMeter = new FpsMeter();
+            mFpsMeter.setResolution(mFrameWidth, mFrameHeight);
+        }
+    }
+
+    public void disableFpsMeter() {
+            mFpsMeter = null;
+    }
+
+    /**
+     *
+     * @param listener
+     */
+
+    public void setCvCameraViewListener(CvCameraViewListener2 listener) {
+        mListener = listener;
+    }
+
+    public void setCvCameraViewListener(CvCameraViewListener listener) {
+        CvCameraViewListenerAdapter adapter = new CvCameraViewListenerAdapter(listener);
+        adapter.setFrameFormat(mPreviewFormat);
+        mListener = adapter;
+    }
+
+    /**
+     * This method sets the maximum size that camera frame is allowed to be. When selecting
+     * size - the biggest size which less or equal the size set will be selected.
+     * As an example - we set setMaxFrameSize(200,200) and we have 176x152 and 320x240 sizes. The
+     * preview frame will be selected with 176x152 size.
+     * This method is useful when need to restrict the size of preview frame for some reason (for example for video recording)
+     * @param maxWidth - the maximum width allowed for camera frame.
+     * @param maxHeight - the maximum height allowed for camera frame
+     */
+    public void setMaxFrameSize(int maxWidth, int maxHeight) {
+        mMaxWidth = maxWidth;
+        mMaxHeight = maxHeight;
+    }
+
+    public void SetCaptureFormat(int format)
+    {
+        mPreviewFormat = format;
+        if (mListener instanceof CvCameraViewListenerAdapter) {
+            CvCameraViewListenerAdapter adapter = (CvCameraViewListenerAdapter) mListener;
+            adapter.setFrameFormat(mPreviewFormat);
+        }
+    }
+
+    /**
+     * Called when mSyncObject lock is held
+     */
+    private void checkCurrentState() {
+        Log.d(TAG, "call checkCurrentState");
+        int targetState;
+
+        if (mEnabled && mSurfaceExist && getVisibility() == VISIBLE) {
+            targetState = STARTED;
+        } else {
+            targetState = STOPPED;
+        }
+
+        if (targetState != mState) {
+            /* The state change detected. Need to exit the current state and enter target state */
+            processExitState(mState);
+            mState = targetState;
+            processEnterState(mState);
+        }
+    }
+
+    private void processEnterState(int state) {
+        Log.d(TAG, "call processEnterState: " + state);
+        switch(state) {
+        case STARTED:
+            onEnterStartedState();
+            if (mListener != null) {
+                mListener.onCameraViewStarted(mFrameWidth, mFrameHeight);
+            }
+            break;
+        case STOPPED:
+            onEnterStoppedState();
+            if (mListener != null) {
+                mListener.onCameraViewStopped();
+            }
+            break;
+        };
+    }
+
+    private void processExitState(int state) {
+        Log.d(TAG, "call processExitState: " + state);
+        switch(state) {
+        case STARTED:
+            onExitStartedState();
+            break;
+        case STOPPED:
+            onExitStoppedState();
+            break;
+        };
+    }
+
+    private void onEnterStoppedState() {
+        /* nothing to do */
+    }
+
+    private void onExitStoppedState() {
+        /* nothing to do */
+    }
+
+    // NOTE: The order of bitmap constructor and camera connection is important for android 4.1.x
+    // Bitmap must be constructed before surface
+    private void onEnterStartedState() {
+        Log.d(TAG, "call onEnterStartedState");
+        /* Connect camera */
+        if (!connectCamera(getWidth(), getHeight())) {
+            AlertDialog ad = new AlertDialog.Builder(getContext()).create();
+            ad.setCancelable(false); // This blocks the 'BACK' button
+            ad.setMessage("It seems that you device does not support camera (or it is locked). Application will be closed.");
+            ad.setButton(DialogInterface.BUTTON_NEUTRAL,  "OK", new DialogInterface.OnClickListener() {
+                public void onClick(DialogInterface dialog, int which) {
+                    dialog.dismiss();
+                    ((Activity) getContext()).finish();
+                }
+            });
+            ad.show();
+
+        }
+    }
+
+    private void onExitStartedState() {
+        disconnectCamera();
+        if (mCacheBitmap != null) {
+            mCacheBitmap.recycle();
+        }
+    }
+
+    /**
+     * This method shall be called by the subclasses when they have valid
+     * object and want it to be delivered to external client (via callback) and
+     * then displayed on the screen.
+     * @param frame - the current frame to be delivered
+     */
+    protected void deliverAndDrawFrame(CvCameraViewFrame frame) {
+        Mat modified;
+
+        if (mListener != null) {
+            modified = mListener.onCameraFrame(frame);
+        } else {
+            modified = frame.rgba();
+        }
+
+        boolean bmpValid = true;
+        if (modified != null) {
+            try {
+                Utils.matToBitmap(modified, mCacheBitmap);
+            } catch(Exception e) {
+                Log.e(TAG, "Mat type: " + modified);
+                Log.e(TAG, "Bitmap type: " + mCacheBitmap.getWidth() + "*" + mCacheBitmap.getHeight());
+                Log.e(TAG, "Utils.matToBitmap() throws an exception: " + e.getMessage());
+                bmpValid = false;
+            }
+        }
+
+        if (bmpValid && mCacheBitmap != null) {
+            Canvas canvas = getHolder().lockCanvas();
+            if (canvas != null) {
+                canvas.drawColor(0, android.graphics.PorterDuff.Mode.CLEAR);
+                if (BuildConfig.DEBUG)
+                    Log.d(TAG, "mStretch value: " + mScale);
+
+                if (mScale != 0) {
+                    canvas.drawBitmap(mCacheBitmap, new Rect(0,0,mCacheBitmap.getWidth(), mCacheBitmap.getHeight()),
+                         new Rect((int)((canvas.getWidth() - mScale*mCacheBitmap.getWidth()) / 2),
+                         (int)((canvas.getHeight() - mScale*mCacheBitmap.getHeight()) / 2),
+                         (int)((canvas.getWidth() - mScale*mCacheBitmap.getWidth()) / 2 + mScale*mCacheBitmap.getWidth()),
+                         (int)((canvas.getHeight() - mScale*mCacheBitmap.getHeight()) / 2 + mScale*mCacheBitmap.getHeight())), null);
+                } else {
+                     canvas.drawBitmap(mCacheBitmap, new Rect(0,0,mCacheBitmap.getWidth(), mCacheBitmap.getHeight()),
+                         new Rect((canvas.getWidth() - mCacheBitmap.getWidth()) / 2,
+                         (canvas.getHeight() - mCacheBitmap.getHeight()) / 2,
+                         (canvas.getWidth() - mCacheBitmap.getWidth()) / 2 + mCacheBitmap.getWidth(),
+                         (canvas.getHeight() - mCacheBitmap.getHeight()) / 2 + mCacheBitmap.getHeight()), null);
+                }
+
+                if (mFpsMeter != null) {
+                    mFpsMeter.measure();
+                    mFpsMeter.draw(canvas, 20, 30);
+                }
+                getHolder().unlockCanvasAndPost(canvas);
+            }
+        }
+    }
+
+    /**
+     * This method is invoked shall perform concrete operation to initialize the camera.
+     * CONTRACT: as a result of this method variables mFrameWidth and mFrameHeight MUST be
+     * initialized with the size of the Camera frames that will be delivered to external processor.
+     * @param width - the width of this SurfaceView
+     * @param height - the height of this SurfaceView
+     */
+    protected abstract boolean connectCamera(int width, int height);
+
+    /**
+     * Disconnects and release the particular camera object being connected to this surface view.
+     * Called when syncObject lock is held
+     */
+    protected abstract void disconnectCamera();
+
+    // NOTE: On Android 4.1.x the function must be called before SurfaceTexture constructor!
+    protected void AllocateCache()
+    {
+        mCacheBitmap = Bitmap.createBitmap(mFrameWidth, mFrameHeight, Bitmap.Config.ARGB_8888);
+    }
+
+    public interface ListItemAccessor {
+        public int getWidth(Object obj);
+        public int getHeight(Object obj);
+    };
+
+    /**
+     * This helper method can be called by subclasses to select camera preview size.
+     * It goes over the list of the supported preview sizes and selects the maximum one which
+     * fits both values set via setMaxFrameSize() and surface frame allocated for this view
+     * @param supportedSizes
+     * @param surfaceWidth
+     * @param surfaceHeight
+     * @return optimal frame size
+     */
+    protected Size calculateCameraFrameSize(List<?> supportedSizes, ListItemAccessor accessor, int surfaceWidth, int surfaceHeight) {
+        int calcWidth = 0;
+        int calcHeight = 0;
+
+        int maxAllowedWidth = (mMaxWidth != MAX_UNSPECIFIED && mMaxWidth < surfaceWidth)? mMaxWidth : surfaceWidth;
+        int maxAllowedHeight = (mMaxHeight != MAX_UNSPECIFIED && mMaxHeight < surfaceHeight)? mMaxHeight : surfaceHeight;
+
+        for (Object size : supportedSizes) {
+            int width = accessor.getWidth(size);
+            int height = accessor.getHeight(size);
+
+            if (width <= maxAllowedWidth && height <= maxAllowedHeight) {
+                if (width >= calcWidth && height >= calcHeight) {
+                    calcWidth = (int) width;
+                    calcHeight = (int) height;
+                }
+            }
+        }
+
+        return new Size(calcWidth, calcHeight);
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/android/CameraGLRendererBase.java b/opencv41/src/main/java/org/opencv/android/CameraGLRendererBase.java
new file mode 100644 (file)
index 0000000..60c37c3
--- /dev/null
@@ -0,0 +1,440 @@
+package org.opencv.android;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.nio.FloatBuffer;
+
+import javax.microedition.khronos.egl.EGLConfig;
+import javax.microedition.khronos.opengles.GL10;
+
+import org.opencv.android.CameraGLSurfaceView.CameraTextureListener;
+
+import android.annotation.TargetApi;
+import android.graphics.SurfaceTexture;
+import android.opengl.GLES11Ext;
+import android.opengl.GLES20;
+import android.opengl.GLSurfaceView;
+import android.util.Log;
+import android.view.View;
+
+@TargetApi(15)
+public abstract class CameraGLRendererBase implements GLSurfaceView.Renderer, SurfaceTexture.OnFrameAvailableListener {
+
+    protected final String LOGTAG = "CameraGLRendererBase";
+
+    // shaders
+    private final String vss = ""
+            + "attribute vec2 vPosition;\n"
+            + "attribute vec2 vTexCoord;\n" + "varying vec2 texCoord;\n"
+            + "void main() {\n" + "  texCoord = vTexCoord;\n"
+            + "  gl_Position = vec4 ( vPosition.x, vPosition.y, 0.0, 1.0 );\n"
+            + "}";
+
+    private final String fssOES = ""
+            + "#extension GL_OES_EGL_image_external : require\n"
+            + "precision mediump float;\n"
+            + "uniform samplerExternalOES sTexture;\n"
+            + "varying vec2 texCoord;\n"
+            + "void main() {\n"
+            + "  gl_FragColor = texture2D(sTexture,texCoord);\n" + "}";
+
+    private final String fss2D = ""
+            + "precision mediump float;\n"
+            + "uniform sampler2D sTexture;\n"
+            + "varying vec2 texCoord;\n"
+            + "void main() {\n"
+            + "  gl_FragColor = texture2D(sTexture,texCoord);\n" + "}";
+
+    // coord-s
+    private final float vertices[] = {
+           -1, -1,
+           -1,  1,
+            1, -1,
+            1,  1 };
+    private final float texCoordOES[] = {
+            0,  1,
+            0,  0,
+            1,  1,
+            1,  0 };
+    private final float texCoord2D[] = {
+            0,  0,
+            0,  1,
+            1,  0,
+            1,  1 };
+
+    private int[] texCamera = {0}, texFBO = {0}, texDraw = {0};
+    private int[] FBO = {0};
+    private int progOES = -1, prog2D = -1;
+    private int vPosOES, vTCOES, vPos2D, vTC2D;
+
+    private FloatBuffer vert, texOES, tex2D;
+
+    protected int mCameraWidth = -1, mCameraHeight = -1;
+    protected int mFBOWidth = -1, mFBOHeight = -1;
+    protected int mMaxCameraWidth = -1, mMaxCameraHeight = -1;
+    protected int mCameraIndex = CameraBridgeViewBase.CAMERA_ID_ANY;
+
+    protected SurfaceTexture mSTexture;
+
+    protected boolean mHaveSurface = false;
+    protected boolean mHaveFBO = false;
+    protected boolean mUpdateST = false;
+    protected boolean mEnabled = true;
+    protected boolean mIsStarted = false;
+
+    protected CameraGLSurfaceView mView;
+
+    protected abstract void openCamera(int id);
+    protected abstract void closeCamera();
+    protected abstract void setCameraPreviewSize(int width, int height); // updates mCameraWidth & mCameraHeight
+
+    public CameraGLRendererBase(CameraGLSurfaceView view) {
+        mView = view;
+        int bytes = vertices.length * Float.SIZE / Byte.SIZE;
+        vert   = ByteBuffer.allocateDirect(bytes).order(ByteOrder.nativeOrder()).asFloatBuffer();
+        texOES = ByteBuffer.allocateDirect(bytes).order(ByteOrder.nativeOrder()).asFloatBuffer();
+        tex2D  = ByteBuffer.allocateDirect(bytes).order(ByteOrder.nativeOrder()).asFloatBuffer();
+        vert.put(vertices).position(0);
+        texOES.put(texCoordOES).position(0);
+        tex2D.put(texCoord2D).position(0);
+    }
+
+    @Override
+    public synchronized void onFrameAvailable(SurfaceTexture surfaceTexture) {
+        //Log.i(LOGTAG, "onFrameAvailable");
+        mUpdateST = true;
+        mView.requestRender();
+    }
+
+    @Override
+    public void onDrawFrame(GL10 gl) {
+        //Log.i(LOGTAG, "onDrawFrame start");
+
+        if (!mHaveFBO)
+            return;
+
+        synchronized(this) {
+            if (mUpdateST) {
+                mSTexture.updateTexImage();
+                mUpdateST = false;
+            }
+
+            GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
+
+            CameraTextureListener texListener = mView.getCameraTextureListener();
+            if(texListener != null) {
+                //Log.d(LOGTAG, "haveUserCallback");
+                // texCamera(OES) -> texFBO
+                drawTex(texCamera[0], true, FBO[0]);
+
+                // call user code (texFBO -> texDraw)
+                boolean modified = texListener.onCameraTexture(texFBO[0], texDraw[0], mCameraWidth, mCameraHeight);
+
+                if(modified) {
+                    // texDraw -> screen
+                    drawTex(texDraw[0], false, 0);
+                } else {
+                    // texFBO -> screen
+                    drawTex(texFBO[0], false, 0);
+                }
+            } else {
+                Log.d(LOGTAG, "texCamera(OES) -> screen");
+                // texCamera(OES) -> screen
+                drawTex(texCamera[0], true, 0);
+            }
+            //Log.i(LOGTAG, "onDrawFrame end");
+        }
+    }
+
+    @Override
+    public void onSurfaceChanged(GL10 gl, int surfaceWidth, int surfaceHeight) {
+        Log.i(LOGTAG, "onSurfaceChanged("+surfaceWidth+"x"+surfaceHeight+")");
+        mHaveSurface = true;
+        updateState();
+        setPreviewSize(surfaceWidth, surfaceHeight);
+    }
+
+    @Override
+    public void onSurfaceCreated(GL10 gl, EGLConfig config) {
+        Log.i(LOGTAG, "onSurfaceCreated");
+        initShaders();
+    }
+
+    private void initShaders() {
+        String strGLVersion = GLES20.glGetString(GLES20.GL_VERSION);
+        if (strGLVersion != null)
+            Log.i(LOGTAG, "OpenGL ES version: " + strGLVersion);
+
+        GLES20.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+
+        progOES = loadShader(vss, fssOES);
+        vPosOES = GLES20.glGetAttribLocation(progOES, "vPosition");
+        vTCOES  = GLES20.glGetAttribLocation(progOES, "vTexCoord");
+        GLES20.glEnableVertexAttribArray(vPosOES);
+        GLES20.glEnableVertexAttribArray(vTCOES);
+
+        prog2D  = loadShader(vss, fss2D);
+        vPos2D = GLES20.glGetAttribLocation(prog2D, "vPosition");
+        vTC2D  = GLES20.glGetAttribLocation(prog2D, "vTexCoord");
+        GLES20.glEnableVertexAttribArray(vPos2D);
+        GLES20.glEnableVertexAttribArray(vTC2D);
+    }
+
+    private void initSurfaceTexture() {
+        Log.d(LOGTAG, "initSurfaceTexture");
+        deleteSurfaceTexture();
+        initTexOES(texCamera);
+        mSTexture = new SurfaceTexture(texCamera[0]);
+        mSTexture.setOnFrameAvailableListener(this);
+    }
+
+    private void deleteSurfaceTexture() {
+        Log.d(LOGTAG, "deleteSurfaceTexture");
+        if(mSTexture != null) {
+            mSTexture.release();
+            mSTexture = null;
+            deleteTex(texCamera);
+        }
+    }
+
+    private void initTexOES(int[] tex) {
+        if(tex.length == 1) {
+            GLES20.glGenTextures(1, tex, 0);
+            GLES20.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, tex[0]);
+            GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE);
+            GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_CLAMP_TO_EDGE);
+            GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_NEAREST);
+            GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_NEAREST);
+        }
+    }
+
+    private static void deleteTex(int[] tex) {
+        if(tex.length == 1) {
+            GLES20.glDeleteTextures(1, tex, 0);
+        }
+    }
+
+    private static int loadShader(String vss, String fss) {
+        Log.d("CameraGLRendererBase", "loadShader");
+        int vshader = GLES20.glCreateShader(GLES20.GL_VERTEX_SHADER);
+        GLES20.glShaderSource(vshader, vss);
+        GLES20.glCompileShader(vshader);
+        int[] status = new int[1];
+        GLES20.glGetShaderiv(vshader, GLES20.GL_COMPILE_STATUS, status, 0);
+        if (status[0] == 0) {
+            Log.e("CameraGLRendererBase", "Could not compile vertex shader: "+GLES20.glGetShaderInfoLog(vshader));
+            GLES20.glDeleteShader(vshader);
+            vshader = 0;
+            return 0;
+        }
+
+        int fshader = GLES20.glCreateShader(GLES20.GL_FRAGMENT_SHADER);
+        GLES20.glShaderSource(fshader, fss);
+        GLES20.glCompileShader(fshader);
+        GLES20.glGetShaderiv(fshader, GLES20.GL_COMPILE_STATUS, status, 0);
+        if (status[0] == 0) {
+            Log.e("CameraGLRendererBase", "Could not compile fragment shader:"+GLES20.glGetShaderInfoLog(fshader));
+            GLES20.glDeleteShader(vshader);
+            GLES20.glDeleteShader(fshader);
+            fshader = 0;
+            return 0;
+        }
+
+        int program = GLES20.glCreateProgram();
+        GLES20.glAttachShader(program, vshader);
+        GLES20.glAttachShader(program, fshader);
+        GLES20.glLinkProgram(program);
+        GLES20.glDeleteShader(vshader);
+        GLES20.glDeleteShader(fshader);
+        GLES20.glGetProgramiv(program, GLES20.GL_LINK_STATUS, status, 0);
+        if (status[0] == 0) {
+            Log.e("CameraGLRendererBase", "Could not link shader program: "+GLES20.glGetProgramInfoLog(program));
+            program = 0;
+            return 0;
+        }
+        GLES20.glValidateProgram(program);
+        GLES20.glGetProgramiv(program, GLES20.GL_VALIDATE_STATUS, status, 0);
+        if (status[0] == 0)
+        {
+            Log.e("CameraGLRendererBase", "Shader program validation error: "+GLES20.glGetProgramInfoLog(program));
+            GLES20.glDeleteProgram(program);
+            program = 0;
+            return 0;
+        }
+
+        Log.d("CameraGLRendererBase", "Shader program is built OK");
+
+        return program;
+    }
+
+    private void deleteFBO()
+    {
+        Log.d(LOGTAG, "deleteFBO("+mFBOWidth+"x"+mFBOHeight+")");
+        GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, 0);
+        GLES20.glDeleteFramebuffers(1, FBO, 0);
+
+        deleteTex(texFBO);
+        deleteTex(texDraw);
+        mFBOWidth = mFBOHeight = 0;
+    }
+
+    private void initFBO(int width, int height)
+    {
+        Log.d(LOGTAG, "initFBO("+width+"x"+height+")");
+
+        deleteFBO();
+
+        GLES20.glGenTextures(1, texDraw, 0);
+        GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, texDraw[0]);
+        GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGBA, width, height, 0, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, null);
+        GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE);
+        GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_CLAMP_TO_EDGE);
+        GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_NEAREST);
+        GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_NEAREST);
+
+        GLES20.glGenTextures(1, texFBO, 0);
+        GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, texFBO[0]);
+        GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGBA, width, height, 0, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, null);
+        GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE);
+        GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_CLAMP_TO_EDGE);
+        GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_NEAREST);
+        GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_NEAREST);
+
+        //int hFBO;
+        GLES20.glGenFramebuffers(1, FBO, 0);
+        GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, FBO[0]);
+        GLES20.glFramebufferTexture2D(GLES20.GL_FRAMEBUFFER, GLES20.GL_COLOR_ATTACHMENT0, GLES20.GL_TEXTURE_2D, texFBO[0], 0);
+        Log.d(LOGTAG, "initFBO error status: " + GLES20.glGetError());
+
+        int FBOstatus = GLES20.glCheckFramebufferStatus(GLES20.GL_FRAMEBUFFER);
+        if (FBOstatus != GLES20.GL_FRAMEBUFFER_COMPLETE)
+            Log.e(LOGTAG, "initFBO failed, status: " + FBOstatus);
+
+        mFBOWidth  = width;
+        mFBOHeight = height;
+    }
+
+    // draw texture to FBO or to screen if fbo == 0
+    private void drawTex(int tex, boolean isOES, int fbo)
+    {
+        GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, fbo);
+
+        if(fbo == 0)
+            GLES20.glViewport(0, 0, mView.getWidth(), mView.getHeight());
+        else
+            GLES20.glViewport(0, 0, mFBOWidth, mFBOHeight);
+
+        GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
+
+        if(isOES) {
+            GLES20.glUseProgram(progOES);
+            GLES20.glVertexAttribPointer(vPosOES, 2, GLES20.GL_FLOAT, false, 4*2, vert);
+            GLES20.glVertexAttribPointer(vTCOES,  2, GLES20.GL_FLOAT, false, 4*2, texOES);
+        } else {
+            GLES20.glUseProgram(prog2D);
+            GLES20.glVertexAttribPointer(vPos2D, 2, GLES20.GL_FLOAT, false, 4*2, vert);
+            GLES20.glVertexAttribPointer(vTC2D,  2, GLES20.GL_FLOAT, false, 4*2, tex2D);
+        }
+
+        GLES20.glActiveTexture(GLES20.GL_TEXTURE0);
+
+        if(isOES) {
+            GLES20.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, tex);
+            GLES20.glUniform1i(GLES20.glGetUniformLocation(progOES, "sTexture"), 0);
+        } else {
+            GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, tex);
+            GLES20.glUniform1i(GLES20.glGetUniformLocation(prog2D, "sTexture"), 0);
+        }
+
+        GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, 0, 4);
+        GLES20.glFlush();
+    }
+
+    public synchronized void enableView() {
+        Log.d(LOGTAG, "enableView");
+        mEnabled = true;
+        updateState();
+    }
+
+    public synchronized void disableView() {
+        Log.d(LOGTAG, "disableView");
+        mEnabled = false;
+        updateState();
+    }
+
+    protected void updateState() {
+        Log.d(LOGTAG, "updateState");
+        Log.d(LOGTAG, "mEnabled="+mEnabled+", mHaveSurface="+mHaveSurface);
+        boolean willStart = mEnabled && mHaveSurface && mView.getVisibility() == View.VISIBLE;
+        if (willStart != mIsStarted) {
+            if(willStart) doStart();
+            else doStop();
+        } else {
+            Log.d(LOGTAG, "keeping State unchanged");
+        }
+        Log.d(LOGTAG, "updateState end");
+    }
+
+    protected synchronized void doStart() {
+        Log.d(LOGTAG, "doStart");
+        initSurfaceTexture();
+        openCamera(mCameraIndex);
+        mIsStarted = true;
+        if(mCameraWidth>0 && mCameraHeight>0)
+            setPreviewSize(mCameraWidth, mCameraHeight); // start preview and call listener.onCameraViewStarted()
+    }
+
+
+    protected void doStop() {
+        Log.d(LOGTAG, "doStop");
+        synchronized(this) {
+            mUpdateST = false;
+            mIsStarted = false;
+            mHaveFBO = false;
+            closeCamera();
+            deleteSurfaceTexture();
+        }
+        CameraTextureListener listener = mView.getCameraTextureListener();
+        if(listener != null) listener.onCameraViewStopped();
+
+    }
+
+    protected void setPreviewSize(int width, int height) {
+        synchronized(this) {
+            mHaveFBO = false;
+            mCameraWidth  = width;
+            mCameraHeight = height;
+            setCameraPreviewSize(width, height); // can change mCameraWidth & mCameraHeight
+            initFBO(mCameraWidth, mCameraHeight);
+            mHaveFBO = true;
+        }
+
+        CameraTextureListener listener = mView.getCameraTextureListener();
+        if(listener != null) listener.onCameraViewStarted(mCameraWidth, mCameraHeight);
+    }
+
+    public void setCameraIndex(int cameraIndex) {
+        disableView();
+        mCameraIndex = cameraIndex;
+        enableView();
+    }
+
+    public void setMaxCameraPreviewSize(int maxWidth, int maxHeight) {
+        disableView();
+        mMaxCameraWidth  = maxWidth;
+        mMaxCameraHeight = maxHeight;
+        enableView();
+    }
+
+    public void onResume() {
+        Log.i(LOGTAG, "onResume");
+    }
+
+    public void onPause() {
+        Log.i(LOGTAG, "onPause");
+        mHaveSurface = false;
+        updateState();
+        mCameraWidth = mCameraHeight = -1;
+    }
+
+}
diff --git a/opencv41/src/main/java/org/opencv/android/CameraGLSurfaceView.java b/opencv41/src/main/java/org/opencv/android/CameraGLSurfaceView.java
new file mode 100644 (file)
index 0000000..05f950b
--- /dev/null
@@ -0,0 +1,119 @@
+package org.opencv.android;
+
+import org.opencv.R;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.opengl.GLSurfaceView;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.SurfaceHolder;
+
+public class CameraGLSurfaceView extends GLSurfaceView {
+
+    private static final String LOGTAG = "CameraGLSurfaceView";
+
+    public interface CameraTextureListener {
+        /**
+         * This method is invoked when camera preview has started. After this method is invoked
+         * the frames will start to be delivered to client via the onCameraFrame() callback.
+         * @param width -  the width of the frames that will be delivered
+         * @param height - the height of the frames that will be delivered
+         */
+        public void onCameraViewStarted(int width, int height);
+
+        /**
+         * This method is invoked when camera preview has been stopped for some reason.
+         * No frames will be delivered via onCameraFrame() callback after this method is called.
+         */
+        public void onCameraViewStopped();
+
+        /**
+         * This method is invoked when a new preview frame from Camera is ready.
+         * @param texIn -  the OpenGL texture ID that contains frame in RGBA format
+         * @param texOut - the OpenGL texture ID that can be used to store modified frame image t display
+         * @param width -  the width of the frame
+         * @param height - the height of the frame
+         * @return `true` if `texOut` should be displayed, `false` - to show `texIn`
+         */
+        public boolean onCameraTexture(int texIn, int texOut, int width, int height);
+    };
+
+    private CameraTextureListener mTexListener;
+    private CameraGLRendererBase mRenderer;
+
+    public CameraGLSurfaceView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+
+        TypedArray styledAttrs = getContext().obtainStyledAttributes(attrs, R.styleable.CameraBridgeViewBase);
+        int cameraIndex = styledAttrs.getInt(R.styleable.CameraBridgeViewBase_camera_id, -1);
+        styledAttrs.recycle();
+
+        if(android.os.Build.VERSION.SDK_INT >= 21)
+            mRenderer = new Camera2Renderer(this);
+        else
+            mRenderer = new CameraRenderer(this);
+
+        setCameraIndex(cameraIndex);
+
+        setEGLContextClientVersion(2);
+        setRenderer(mRenderer);
+        setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
+    }
+
+    public void setCameraTextureListener(CameraTextureListener texListener)
+    {
+        mTexListener = texListener;
+    }
+
+    public CameraTextureListener getCameraTextureListener()
+    {
+        return mTexListener;
+    }
+
+    public void setCameraIndex(int cameraIndex) {
+        mRenderer.setCameraIndex(cameraIndex);
+    }
+
+    public void setMaxCameraPreviewSize(int maxWidth, int maxHeight) {
+        mRenderer.setMaxCameraPreviewSize(maxWidth, maxHeight);
+    }
+
+    @Override
+    public void surfaceCreated(SurfaceHolder holder) {
+        super.surfaceCreated(holder);
+    }
+
+    @Override
+    public void surfaceDestroyed(SurfaceHolder holder) {
+        mRenderer.mHaveSurface = false;
+        super.surfaceDestroyed(holder);
+    }
+
+    @Override
+    public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
+        super.surfaceChanged(holder, format, w, h);
+    }
+
+    @Override
+    public void onResume() {
+        Log.i(LOGTAG, "onResume");
+        super.onResume();
+        mRenderer.onResume();
+    }
+
+    @Override
+    public void onPause() {
+        Log.i(LOGTAG, "onPause");
+        mRenderer.onPause();
+        super.onPause();
+    }
+
+    public void enableView() {
+        mRenderer.enableView();
+    }
+
+    public void disableView() {
+        mRenderer.disableView();
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/android/CameraRenderer.java b/opencv41/src/main/java/org/opencv/android/CameraRenderer.java
new file mode 100644 (file)
index 0000000..2d668ff
--- /dev/null
@@ -0,0 +1,166 @@
+package org.opencv.android;
+
+import java.io.IOException;
+import java.util.List;
+
+import android.annotation.TargetApi;
+import android.hardware.Camera;
+import android.hardware.Camera.Size;
+import android.os.Build;
+import android.util.Log;
+
+@TargetApi(15)
+@SuppressWarnings("deprecation")
+public class CameraRenderer extends CameraGLRendererBase {
+
+    public static final String LOGTAG = "CameraRenderer";
+
+    private Camera mCamera;
+    private boolean mPreviewStarted = false;
+
+    CameraRenderer(CameraGLSurfaceView view) {
+        super(view);
+    }
+
+    @Override
+    protected synchronized void closeCamera() {
+        Log.i(LOGTAG, "closeCamera");
+        if(mCamera != null) {
+            mCamera.stopPreview();
+            mPreviewStarted = false;
+            mCamera.release();
+            mCamera = null;
+        }
+    }
+
+    @Override
+    protected synchronized void openCamera(int id) {
+        Log.i(LOGTAG, "openCamera");
+        closeCamera();
+        if (id == CameraBridgeViewBase.CAMERA_ID_ANY) {
+            Log.d(LOGTAG, "Trying to open camera with old open()");
+            try {
+                mCamera = Camera.open();
+            }
+            catch (Exception e){
+                Log.e(LOGTAG, "Camera is not available (in use or does not exist): " + e.getLocalizedMessage());
+            }
+
+            if(mCamera == null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
+                boolean connected = false;
+                for (int camIdx = 0; camIdx < Camera.getNumberOfCameras(); ++camIdx) {
+                    Log.d(LOGTAG, "Trying to open camera with new open(" + camIdx + ")");
+                    try {
+                        mCamera = Camera.open(camIdx);
+                        connected = true;
+                    } catch (RuntimeException e) {
+                        Log.e(LOGTAG, "Camera #" + camIdx + "failed to open: " + e.getLocalizedMessage());
+                    }
+                    if (connected) break;
+                }
+            }
+        } else {
+            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
+                int localCameraIndex = mCameraIndex;
+                if (mCameraIndex == CameraBridgeViewBase.CAMERA_ID_BACK) {
+                    Log.i(LOGTAG, "Trying to open BACK camera");
+                    Camera.CameraInfo cameraInfo = new Camera.CameraInfo();
+                    for (int camIdx = 0; camIdx < Camera.getNumberOfCameras(); ++camIdx) {
+                        Camera.getCameraInfo( camIdx, cameraInfo );
+                        if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_BACK) {
+                            localCameraIndex = camIdx;
+                            break;
+                        }
+                    }
+                } else if (mCameraIndex == CameraBridgeViewBase.CAMERA_ID_FRONT) {
+                    Log.i(LOGTAG, "Trying to open FRONT camera");
+                    Camera.CameraInfo cameraInfo = new Camera.CameraInfo();
+                    for (int camIdx = 0; camIdx < Camera.getNumberOfCameras(); ++camIdx) {
+                        Camera.getCameraInfo( camIdx, cameraInfo );
+                        if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) {
+                            localCameraIndex = camIdx;
+                            break;
+                        }
+                    }
+                }
+                if (localCameraIndex == CameraBridgeViewBase.CAMERA_ID_BACK) {
+                    Log.e(LOGTAG, "Back camera not found!");
+                } else if (localCameraIndex == CameraBridgeViewBase.CAMERA_ID_FRONT) {
+                    Log.e(LOGTAG, "Front camera not found!");
+                } else {
+                    Log.d(LOGTAG, "Trying to open camera with new open(" + localCameraIndex + ")");
+                    try {
+                        mCamera = Camera.open(localCameraIndex);
+                    } catch (RuntimeException e) {
+                        Log.e(LOGTAG, "Camera #" + localCameraIndex + "failed to open: " + e.getLocalizedMessage());
+                    }
+                }
+            }
+        }
+        if(mCamera == null) {
+            Log.e(LOGTAG, "Error: can't open camera");
+            return;
+        }
+        Camera.Parameters params = mCamera.getParameters();
+        List<String> 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);
+
+        try {
+            mCamera.setPreviewTexture(mSTexture);
+        } catch (IOException ioe) {
+            Log.e(LOGTAG, "setPreviewTexture() failed: " + ioe.getMessage());
+        }
+    }
+
+    @Override
+    public synchronized void setCameraPreviewSize(int width, int height) {
+        Log.i(LOGTAG, "setCameraPreviewSize: "+width+"x"+height);
+        if(mCamera == null) {
+            Log.e(LOGTAG, "Camera isn't initialized!");
+            return;
+        }
+
+        if(mMaxCameraWidth  > 0 && mMaxCameraWidth  < width)  width  = mMaxCameraWidth;
+        if(mMaxCameraHeight > 0 && mMaxCameraHeight < height) height = mMaxCameraHeight;
+
+        Camera.Parameters param = mCamera.getParameters();
+        List<Size> psize = param.getSupportedPreviewSizes();
+        int bestWidth = 0, bestHeight = 0;
+        if (psize.size() > 0) {
+            float aspect = (float)width / height;
+            for (Size size : psize) {
+                int w = size.width, h = size.height;
+                Log.d(LOGTAG, "checking camera preview size: "+w+"x"+h);
+                if ( w <= width && h <= height &&
+                     w >= bestWidth && h >= bestHeight &&
+                     Math.abs(aspect - (float)w/h) < 0.2 ) {
+                    bestWidth = w;
+                    bestHeight = h;
+                }
+            }
+            if(bestWidth <= 0 || bestHeight <= 0) {
+                bestWidth  = psize.get(0).width;
+                bestHeight = psize.get(0).height;
+                Log.e(LOGTAG, "Error: best size was not selected, using "+bestWidth+" x "+bestHeight);
+            } else {
+                Log.i(LOGTAG, "Selected best size: "+bestWidth+" x "+bestHeight);
+            }
+
+            if(mPreviewStarted) {
+                mCamera.stopPreview();
+                mPreviewStarted = false;
+            }
+            mCameraWidth  = bestWidth;
+            mCameraHeight = bestHeight;
+            param.setPreviewSize(bestWidth, bestHeight);
+        }
+        param.set("orientation", "landscape");
+        mCamera.setParameters(param);
+        mCamera.startPreview();
+        mPreviewStarted = true;
+    }
+}
\ No newline at end of file
diff --git a/opencv41/src/main/java/org/opencv/android/FpsMeter.java b/opencv41/src/main/java/org/opencv/android/FpsMeter.java
new file mode 100644 (file)
index 0000000..d22c68e
--- /dev/null
@@ -0,0 +1,66 @@
+package org.opencv.android;
+
+import java.text.DecimalFormat;
+
+import org.opencv.core.Core;
+
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.util.Log;
+
+public class FpsMeter {
+    private static final String TAG               = "FpsMeter";
+    private static final int    STEP              = 20;
+    private static final DecimalFormat FPS_FORMAT = new DecimalFormat("0.00");
+
+    private int                 mFramesCounter;
+    private double              mFrequency;
+    private long                mprevFrameTime;
+    private String              mStrfps;
+    Paint                       mPaint;
+    boolean                     mIsInitialized = false;
+    int                         mWidth = 0;
+    int                         mHeight = 0;
+
+    public void init() {
+        mFramesCounter = 0;
+        mFrequency = Core.getTickFrequency();
+        mprevFrameTime = Core.getTickCount();
+        mStrfps = "";
+
+        mPaint = new Paint();
+        mPaint.setColor(Color.BLUE);
+        mPaint.setTextSize(20);
+    }
+
+    public void measure() {
+        if (!mIsInitialized) {
+            init();
+            mIsInitialized = true;
+        } else {
+            mFramesCounter++;
+            if (mFramesCounter % STEP == 0) {
+                long time = Core.getTickCount();
+                double fps = STEP * mFrequency / (time - mprevFrameTime);
+                mprevFrameTime = time;
+                if (mWidth != 0 && mHeight != 0)
+                    mStrfps = FPS_FORMAT.format(fps) + " FPS@" + Integer.valueOf(mWidth) + "x" + Integer.valueOf(mHeight);
+                else
+                    mStrfps = FPS_FORMAT.format(fps) + " FPS";
+                Log.i(TAG, mStrfps);
+            }
+        }
+    }
+
+    public void setResolution(int width, int height) {
+        mWidth = width;
+        mHeight = height;
+    }
+
+    public void draw(Canvas canvas, float offsetx, float offsety) {
+        Log.d(TAG, mStrfps);
+        canvas.drawText(mStrfps, offsetx, offsety, mPaint);
+    }
+
+}
diff --git a/opencv41/src/main/java/org/opencv/android/InstallCallbackInterface.java b/opencv41/src/main/java/org/opencv/android/InstallCallbackInterface.java
new file mode 100644 (file)
index 0000000..f68027a
--- /dev/null
@@ -0,0 +1,34 @@
+package org.opencv.android;
+
+/**
+ * Installation callback interface.
+ */
+public interface InstallCallbackInterface
+{
+    /**
+     * New package installation is required.
+     */
+    static final int NEW_INSTALLATION = 0;
+    /**
+     * Current package installation is in progress.
+     */
+    static final int INSTALLATION_PROGRESS = 1;
+
+    /**
+     * Target package name.
+     * @return Return target package name.
+     */
+    public String getPackageName();
+    /**
+     * Installation is approved.
+     */
+    public void install();
+    /**
+     * Installation is canceled.
+     */
+    public void cancel();
+    /**
+     * Wait for package installation.
+     */
+    public void wait_install();
+};
diff --git a/opencv41/src/main/java/org/opencv/android/JavaCamera2View.java b/opencv41/src/main/java/org/opencv/android/JavaCamera2View.java
new file mode 100644 (file)
index 0000000..045917e
--- /dev/null
@@ -0,0 +1,383 @@
+package org.opencv.android;
+
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+
+import android.annotation.TargetApi;
+import android.content.Context;
+import android.graphics.ImageFormat;
+import android.hardware.camera2.CameraAccessException;
+import android.hardware.camera2.CameraCaptureSession;
+import android.hardware.camera2.CameraCharacteristics;
+import android.hardware.camera2.CameraDevice;
+import android.hardware.camera2.CameraManager;
+import android.hardware.camera2.CaptureRequest;
+import android.hardware.camera2.params.StreamConfigurationMap;
+import android.media.Image;
+import android.media.ImageReader;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.Surface;
+import android.view.ViewGroup.LayoutParams;
+
+import org.opencv.core.CvType;
+import org.opencv.core.Mat;
+import org.opencv.imgproc.Imgproc;
+
+/**
+ * This class is an implementation of the Bridge View between OpenCV and Java Camera.
+ * This class relays on the functionality available in base class and only implements
+ * required functions:
+ * connectCamera - opens Java camera and sets the PreviewCallback to be delivered.
+ * disconnectCamera - closes the camera and stops preview.
+ * When frame is delivered via callback from Camera - it processed via OpenCV to be
+ * converted to RGBA32 and then passed to the external callback for modifications if required.
+ */
+
+@TargetApi(21)
+public class JavaCamera2View extends CameraBridgeViewBase {
+
+    private static final String LOGTAG = "JavaCamera2View";
+
+    private ImageReader mImageReader;
+    private int mPreviewFormat = ImageFormat.YUV_420_888;
+
+    private CameraDevice mCameraDevice;
+    private CameraCaptureSession mCaptureSession;
+    private CaptureRequest.Builder mPreviewRequestBuilder;
+    private String mCameraID;
+    private android.util.Size mPreviewSize = new android.util.Size(-1, -1);
+
+    private HandlerThread mBackgroundThread;
+    private Handler mBackgroundHandler;
+
+    public JavaCamera2View(Context context, int cameraId) {
+        super(context, cameraId);
+    }
+
+    public JavaCamera2View(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    private void startBackgroundThread() {
+        Log.i(LOGTAG, "startBackgroundThread");
+        stopBackgroundThread();
+        mBackgroundThread = new HandlerThread("OpenCVCameraBackground");
+        mBackgroundThread.start();
+        mBackgroundHandler = new Handler(mBackgroundThread.getLooper());
+    }
+
+    private void stopBackgroundThread() {
+        Log.i(LOGTAG, "stopBackgroundThread");
+        if (mBackgroundThread == null)
+            return;
+        mBackgroundThread.quitSafely();
+        try {
+            mBackgroundThread.join();
+            mBackgroundThread = null;
+            mBackgroundHandler = null;
+        } catch (InterruptedException e) {
+            Log.e(LOGTAG, "stopBackgroundThread", e);
+        }
+    }
+
+    protected boolean initializeCamera() {
+        Log.i(LOGTAG, "initializeCamera");
+        CameraManager manager = (CameraManager) getContext().getSystemService(Context.CAMERA_SERVICE);
+        try {
+            String camList[] = manager.getCameraIdList();
+            if (camList.length == 0) {
+                Log.e(LOGTAG, "Error: camera isn't detected.");
+                return false;
+            }
+            if (mCameraIndex == CameraBridgeViewBase.CAMERA_ID_ANY) {
+                mCameraID = camList[0];
+            } else {
+                for (String cameraID : camList) {
+                    CameraCharacteristics characteristics = manager.getCameraCharacteristics(cameraID);
+                    if ((mCameraIndex == CameraBridgeViewBase.CAMERA_ID_BACK &&
+                            characteristics.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_BACK) ||
+                        (mCameraIndex == CameraBridgeViewBase.CAMERA_ID_FRONT &&
+                            characteristics.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT)
+                    ) {
+                        mCameraID = cameraID;
+                        break;
+                    }
+                }
+            }
+            if (mCameraID != null) {
+                Log.i(LOGTAG, "Opening camera: " + mCameraID);
+                manager.openCamera(mCameraID, mStateCallback, mBackgroundHandler);
+            } else { // make JavaCamera2View behaves in the same way as JavaCameraView
+                Log.i(LOGTAG, "Trying to open camera with the value (" + mCameraIndex + ")");
+                if (mCameraIndex < camList.length) {
+                    mCameraID = camList[mCameraIndex];
+                    manager.openCamera(mCameraID, mStateCallback, mBackgroundHandler);
+                } else {
+                    // CAMERA_DISCONNECTED is used when the camera id is no longer valid
+                    throw new CameraAccessException(CameraAccessException.CAMERA_DISCONNECTED);
+                }
+            }
+            return true;
+        } catch (CameraAccessException e) {
+            Log.e(LOGTAG, "OpenCamera - Camera Access Exception", e);
+        } catch (IllegalArgumentException e) {
+            Log.e(LOGTAG, "OpenCamera - Illegal Argument Exception", e);
+        } catch (SecurityException e) {
+            Log.e(LOGTAG, "OpenCamera - Security Exception", e);
+        }
+        return false;
+    }
+
+    private final CameraDevice.StateCallback mStateCallback = new CameraDevice.StateCallback() {
+
+        @Override
+        public void onOpened(CameraDevice cameraDevice) {
+            mCameraDevice = cameraDevice;
+            createCameraPreviewSession();
+        }
+
+        @Override
+        public void onDisconnected(CameraDevice cameraDevice) {
+            cameraDevice.close();
+            mCameraDevice = null;
+        }
+
+        @Override
+        public void onError(CameraDevice cameraDevice, int error) {
+            cameraDevice.close();
+            mCameraDevice = null;
+        }
+
+    };
+
+    private void createCameraPreviewSession() {
+        final int w = mPreviewSize.getWidth(), h = mPreviewSize.getHeight();
+        Log.i(LOGTAG, "createCameraPreviewSession(" + w + "x" + h + ")");
+        if (w < 0 || h < 0)
+            return;
+        try {
+            if (null == mCameraDevice) {
+                Log.e(LOGTAG, "createCameraPreviewSession: camera isn't opened");
+                return;
+            }
+            if (null != mCaptureSession) {
+                Log.e(LOGTAG, "createCameraPreviewSession: mCaptureSession is already started");
+                return;
+            }
+
+            mImageReader = ImageReader.newInstance(w, h, mPreviewFormat, 2);
+            mImageReader.setOnImageAvailableListener(new ImageReader.OnImageAvailableListener() {
+                @Override
+                public void onImageAvailable(ImageReader reader) {
+                    Image image = reader.acquireLatestImage();
+                    if (image == null)
+                        return;
+
+                    // sanity checks - 3 planes
+                    Image.Plane[] planes = image.getPlanes();
+                    assert (planes.length == 3);
+                    assert (image.getFormat() == mPreviewFormat);
+
+                    // see also https://developer.android.com/reference/android/graphics/ImageFormat.html#YUV_420_888
+                    // Y plane (0) non-interleaved => stride == 1; U/V plane interleaved => stride == 2
+                    assert (planes[0].getPixelStride() == 1);
+                    assert (planes[1].getPixelStride() == 2);
+                    assert (planes[2].getPixelStride() == 2);
+
+                    ByteBuffer y_plane = planes[0].getBuffer();
+                    ByteBuffer uv_plane = planes[1].getBuffer();
+                    Mat y_mat = new Mat(h, w, CvType.CV_8UC1, y_plane);
+                    Mat uv_mat = new Mat(h / 2, w / 2, CvType.CV_8UC2, uv_plane);
+                    JavaCamera2Frame tempFrame = new JavaCamera2Frame(y_mat, uv_mat, w, h);
+                    deliverAndDrawFrame(tempFrame);
+                    tempFrame.release();
+                    image.close();
+                }
+            }, mBackgroundHandler);
+            Surface surface = mImageReader.getSurface();
+
+            mPreviewRequestBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW);
+            mPreviewRequestBuilder.addTarget(surface);
+
+            mCameraDevice.createCaptureSession(Arrays.asList(surface),
+                new CameraCaptureSession.StateCallback() {
+                    @Override
+                    public void onConfigured(CameraCaptureSession cameraCaptureSession) {
+                        Log.i(LOGTAG, "createCaptureSession::onConfigured");
+                        if (null == mCameraDevice) {
+                            return; // camera is already closed
+                        }
+                        mCaptureSession = cameraCaptureSession;
+                        try {
+                            mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AF_MODE,
+                                    CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE);
+                            mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AE_MODE,
+                                    CaptureRequest.CONTROL_AE_MODE_ON_AUTO_FLASH);
+
+                            mCaptureSession.setRepeatingRequest(mPreviewRequestBuilder.build(), null, mBackgroundHandler);
+                            Log.i(LOGTAG, "CameraPreviewSession has been started");
+                        } catch (Exception e) {
+                            Log.e(LOGTAG, "createCaptureSession failed", e);
+                        }
+                    }
+
+                    @Override
+                    public void onConfigureFailed(CameraCaptureSession cameraCaptureSession) {
+                        Log.e(LOGTAG, "createCameraPreviewSession failed");
+                    }
+                },
+                null
+            );
+        } catch (CameraAccessException e) {
+            Log.e(LOGTAG, "createCameraPreviewSession", e);
+        }
+    }
+
+    @Override
+    protected void disconnectCamera() {
+        Log.i(LOGTAG, "closeCamera");
+        try {
+            CameraDevice c = mCameraDevice;
+            mCameraDevice = null;
+            if (null != mCaptureSession) {
+                mCaptureSession.close();
+                mCaptureSession = null;
+            }
+            if (null != c) {
+                c.close();
+            }
+            if (null != mImageReader) {
+                mImageReader.close();
+                mImageReader = null;
+            }
+        } finally {
+            stopBackgroundThread();
+        }
+    }
+
+    boolean calcPreviewSize(final int width, final int height) {
+        Log.i(LOGTAG, "calcPreviewSize: " + width + "x" + height);
+        if (mCameraID == null) {
+            Log.e(LOGTAG, "Camera isn't initialized!");
+            return false;
+        }
+        CameraManager manager = (CameraManager) getContext().getSystemService(Context.CAMERA_SERVICE);
+        try {
+            CameraCharacteristics characteristics = manager.getCameraCharacteristics(mCameraID);
+            StreamConfigurationMap map = characteristics.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
+            int bestWidth = 0, bestHeight = 0;
+            float aspect = (float) width / height;
+            android.util.Size[] sizes = map.getOutputSizes(ImageReader.class);
+            bestWidth = sizes[0].getWidth();
+            bestHeight = sizes[0].getHeight();
+            for (android.util.Size sz : sizes) {
+                int w = sz.getWidth(), h = sz.getHeight();
+                Log.d(LOGTAG, "trying size: " + w + "x" + h);
+                if (width >= w && height >= h && bestWidth <= w && bestHeight <= h
+                        && Math.abs(aspect - (float) w / h) < 0.2) {
+                    bestWidth = w;
+                    bestHeight = h;
+                }
+            }
+            Log.i(LOGTAG, "best size: " + bestWidth + "x" + bestHeight);
+            assert(!(bestWidth == 0 || bestHeight == 0));
+            if (mPreviewSize.getWidth() == bestWidth && mPreviewSize.getHeight() == bestHeight)
+                return false;
+            else {
+                mPreviewSize = new android.util.Size(bestWidth, bestHeight);
+                return true;
+            }
+        } catch (CameraAccessException e) {
+            Log.e(LOGTAG, "calcPreviewSize - Camera Access Exception", e);
+        } catch (IllegalArgumentException e) {
+            Log.e(LOGTAG, "calcPreviewSize - Illegal Argument Exception", e);
+        } catch (SecurityException e) {
+            Log.e(LOGTAG, "calcPreviewSize - Security Exception", e);
+        }
+        return false;
+    }
+
+    @Override
+    protected boolean connectCamera(int width, int height) {
+        Log.i(LOGTAG, "setCameraPreviewSize(" + width + "x" + height + ")");
+        startBackgroundThread();
+        initializeCamera();
+        try {
+            boolean needReconfig = calcPreviewSize(width, height);
+            mFrameWidth = mPreviewSize.getWidth();
+            mFrameHeight = mPreviewSize.getHeight();
+
+            if ((getLayoutParams().width == LayoutParams.MATCH_PARENT) && (getLayoutParams().height == LayoutParams.MATCH_PARENT))
+                mScale = Math.min(((float)height)/mFrameHeight, ((float)width)/mFrameWidth);
+            else
+                mScale = 0;
+
+            AllocateCache();
+
+            if (needReconfig) {
+                if (null != mCaptureSession) {
+                    Log.d(LOGTAG, "closing existing previewSession");
+                    mCaptureSession.close();
+                    mCaptureSession = null;
+                }
+                createCameraPreviewSession();
+            }
+        } catch (RuntimeException e) {
+            throw new RuntimeException("Interrupted while setCameraPreviewSize.", e);
+        }
+        return true;
+    }
+
+    private class JavaCamera2Frame 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 if (mPreviewFormat == ImageFormat.YUV_420_888) {
+                assert (mUVFrameData != null);
+                Imgproc.cvtColorTwoPlane(mYuvFrameData, mUVFrameData, mRgba, Imgproc.COLOR_YUV2RGBA_NV21);
+            } else
+                throw new IllegalArgumentException("Preview Format can be NV21 or YV12");
+
+            return mRgba;
+        }
+
+        public JavaCamera2Frame(Mat Yuv420sp, int width, int height) {
+            super();
+            mWidth = width;
+            mHeight = height;
+            mYuvFrameData = Yuv420sp;
+            mUVFrameData = null;
+            mRgba = new Mat();
+        }
+
+        public JavaCamera2Frame(Mat Y, Mat UV, int width, int height) {
+            super();
+            mWidth = width;
+            mHeight = height;
+            mYuvFrameData = Y;
+            mUVFrameData = UV;
+            mRgba = new Mat();
+        }
+
+        public void release() {
+            mRgba.release();
+        }
+
+        private Mat mYuvFrameData;
+        private Mat mUVFrameData;
+        private Mat mRgba;
+        private int mWidth;
+        private int mHeight;
+    };
+}
diff --git a/opencv41/src/main/java/org/opencv/android/JavaCameraView.java b/opencv41/src/main/java/org/opencv/android/JavaCameraView.java
new file mode 100644 (file)
index 0000000..a7c72e4
--- /dev/null
@@ -0,0 +1,379 @@
+package org.opencv.android;
+
+import java.util.List;
+
+import android.content.Context;
+import android.graphics.ImageFormat;
+import android.graphics.SurfaceTexture;
+import android.hardware.Camera;
+import android.hardware.Camera.PreviewCallback;
+import android.os.Build;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.ViewGroup.LayoutParams;
+
+import org.opencv.BuildConfig;
+import org.opencv.core.CvType;
+import org.opencv.core.Mat;
+import org.opencv.core.Size;
+import org.opencv.imgproc.Imgproc;
+
+/**
+ * This class is an implementation of the Bridge View between OpenCV and Java Camera.
+ * This class relays on the functionality available in base class and only implements
+ * required functions:
+ * connectCamera - opens Java camera and sets the PreviewCallback to be delivered.
+ * disconnectCamera - closes the camera and stops preview.
+ * When frame is delivered via callback from Camera - it processed via OpenCV to be
+ * converted to RGBA32 and then passed to the external callback for modifications if required.
+ */
+public class JavaCameraView extends CameraBridgeViewBase implements PreviewCallback {
+
+    private static final int MAGIC_TEXTURE_ID = 10;
+    private static final String TAG = "JavaCameraView";
+
+    private byte mBuffer[];
+    private Mat[] mFrameChain;
+    private int mChainIdx = 0;
+    private Thread mThread;
+    private boolean mStopThread;
+
+    protected Camera mCamera;
+    protected JavaCameraFrame[] mCameraFrame;
+    private SurfaceTexture mSurfaceTexture;
+    private int mPreviewFormat = ImageFormat.NV21;
+
+    public static class JavaCameraSizeAccessor implements ListItemAccessor {
+
+        @Override
+        public int getWidth(Object obj) {
+            Camera.Size size = (Camera.Size) obj;
+            return size.width;
+        }
+
+        @Override
+        public int getHeight(Object obj) {
+            Camera.Size size = (Camera.Size) obj;
+            return size.height;
+        }
+    }
+
+    public JavaCameraView(Context context, int cameraId) {
+        super(context, cameraId);
+    }
+
+    public JavaCameraView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    protected boolean initializeCamera(int width, int height) {
+        Log.d(TAG, "Initialize java camera");
+        boolean result = true;
+        synchronized (this) {
+            mCamera = null;
+
+            if (mCameraIndex == CAMERA_ID_ANY) {
+                Log.d(TAG, "Trying to open camera with old open()");
+                try {
+                    mCamera = Camera.open();
+                }
+                catch (Exception e){
+                    Log.e(TAG, "Camera is not available (in use or does not exist): " + e.getLocalizedMessage());
+                }
+
+                if(mCamera == null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
+                    boolean connected = false;
+                    for (int camIdx = 0; camIdx < Camera.getNumberOfCameras(); ++camIdx) {
+                        Log.d(TAG, "Trying to open camera with new open(" + Integer.valueOf(camIdx) + ")");
+                        try {
+                            mCamera = Camera.open(camIdx);
+                            connected = true;
+                        } catch (RuntimeException e) {
+                            Log.e(TAG, "Camera #" + camIdx + "failed to open: " + e.getLocalizedMessage());
+                        }
+                        if (connected) break;
+                    }
+                }
+            } else {
+                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
+                    int localCameraIndex = mCameraIndex;
+                    if (mCameraIndex == CAMERA_ID_BACK) {
+                        Log.i(TAG, "Trying to open back camera");
+                        Camera.CameraInfo cameraInfo = new Camera.CameraInfo();
+                        for (int camIdx = 0; camIdx < Camera.getNumberOfCameras(); ++camIdx) {
+                            Camera.getCameraInfo( camIdx, cameraInfo );
+                            if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_BACK) {
+                                localCameraIndex = camIdx;
+                                break;
+                            }
+                        }
+                    } else if (mCameraIndex == CAMERA_ID_FRONT) {
+                        Log.i(TAG, "Trying to open front camera");
+                        Camera.CameraInfo cameraInfo = new Camera.CameraInfo();
+                        for (int camIdx = 0; camIdx < Camera.getNumberOfCameras(); ++camIdx) {
+                            Camera.getCameraInfo( camIdx, cameraInfo );
+                            if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) {
+                                localCameraIndex = camIdx;
+                                break;
+                            }
+                        }
+                    }
+                    if (localCameraIndex == CAMERA_ID_BACK) {
+                        Log.e(TAG, "Back camera not found!");
+                    } else if (localCameraIndex == CAMERA_ID_FRONT) {
+                        Log.e(TAG, "Front camera not found!");
+                    } else {
+                        Log.d(TAG, "Trying to open camera with new open(" + Integer.valueOf(localCameraIndex) + ")");
+                        try {
+                            mCamera = Camera.open(localCameraIndex);
+                        } catch (RuntimeException e) {
+                            Log.e(TAG, "Camera #" + localCameraIndex + "failed to open: " + e.getLocalizedMessage());
+                        }
+                    }
+                }
+            }
+
+            if (mCamera == null)
+                return false;
+
+            /* Now set camera parameters */
+            try {
+                Camera.Parameters params = mCamera.getParameters();
+                Log.d(TAG, "getSupportedPreviewSizes()");
+                List<android.hardware.Camera.Size> sizes = params.getSupportedPreviewSizes();
+
+                if (sizes != null) {
+                    /* Select the size that fits surface considering maximum size allowed */
+                    Size frameSize = calculateCameraFrameSize(sizes, new JavaCameraSizeAccessor(), width, height);
+
+                    /* Image format NV21 causes issues in the Android emulators */
+                    if (Build.FINGERPRINT.startsWith("generic")
+                            || Build.FINGERPRINT.startsWith("unknown")
+                            || Build.MODEL.contains("google_sdk")
+                            || Build.MODEL.contains("Emulator")
+                            || Build.MODEL.contains("Android SDK built for x86")
+                            || Build.MANUFACTURER.contains("Genymotion")
+                            || (Build.BRAND.startsWith("generic") && Build.DEVICE.startsWith("generic"))
+                            || "google_sdk".equals(Build.PRODUCT))
+                        params.setPreviewFormat(ImageFormat.YV12);  // "generic" or "android" = android emulator
+                    else
+                        params.setPreviewFormat(ImageFormat.NV21);
+
+                    mPreviewFormat = params.getPreviewFormat();
+
+                    Log.d(TAG, "Set preview size to " + Integer.valueOf((int)frameSize.width) + "x" + Integer.valueOf((int)frameSize.height));
+                    params.setPreviewSize((int)frameSize.width, (int)frameSize.height);
+
+                    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH && !android.os.Build.MODEL.equals("GT-I9100"))
+                        params.setRecordingHint(true);
+
+                    List<String> 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/opencv41/src/main/java/org/opencv/android/LoaderCallbackInterface.java b/opencv41/src/main/java/org/opencv/android/LoaderCallbackInterface.java
new file mode 100644 (file)
index 0000000..a941e83
--- /dev/null
@@ -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/opencv41/src/main/java/org/opencv/android/OpenCVLoader.java b/opencv41/src/main/java/org/opencv/android/OpenCVLoader.java
new file mode 100644 (file)
index 0000000..0fd3041
--- /dev/null
@@ -0,0 +1,132 @@
+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";
+
+    /**
+     * OpenCV Library version 3.4.0.
+     */
+    public static final String OPENCV_VERSION_3_4_0 = "3.4.0";
+
+    /**
+     * Current OpenCV Library version
+     */
+    public static final String OPENCV_VERSION = "4.1.0";
+
+
+    /**
+     * 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/opencv41/src/main/java/org/opencv/android/StaticHelper.java b/opencv41/src/main/java/org/opencv/android/StaticHelper.java
new file mode 100644 (file)
index 0000000..934dd75
--- /dev/null
@@ -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_java4");
+        }
+
+        return result;
+    }
+
+    private static final String TAG = "OpenCV/StaticHelper";
+
+    private static native String getLibraryList();
+}
diff --git a/opencv41/src/main/java/org/opencv/android/Utils.java b/opencv41/src/main/java/org/opencv/android/Utils.java
new file mode 100644 (file)
index 0000000..404c986
--- /dev/null
@@ -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.
+     * <p>
+     * This function converts an Android Bitmap image to the OpenCV Mat.
+     * <br>'ARGB_8888' and 'RGB_565' input Bitmap formats are supported.
+     * <br>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.
+     * <br>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.
+     * <p>
+     * <br>This function converts an image in the OpenCV Mat representation to the Android Bitmap.
+     * <br>The input Mat object has to be of the types 'CV_8UC1' (gray-scale), 'CV_8UC3' (RGB) or 'CV_8UC4' (RGBA).
+     * <br>The output Bitmap object has to be of the same size as the input Mat and of the types 'ARGB_8888' or 'RGB_565'.
+     * <br>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 <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b>
+     * @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/opencv41/src/main/java/org/opencv/calib3d/Calib3d.java b/opencv41/src/main/java/org/opencv/calib3d/Calib3d.java
new file mode 100644 (file)
index 0000000..d63839f
--- /dev/null
@@ -0,0 +1,2607 @@
+//
+// 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;
+
+// C++: class Calib3d
+//javadoc: Calib3d
+
+public class Calib3d {
+
+    // C++: enum <unnamed>
+    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,
+            CvLevMarq_DONE = 0,
+            CvLevMarq_STARTED = 1,
+            CvLevMarq_CALC_J = 2,
+            CvLevMarq_CHECK_ERR = 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_EXHAUSTIVE = 16,
+            CALIB_CB_ACCURACY = 32,
+            CALIB_CB_SYMMETRIC_GRID = 1,
+            CALIB_CB_ASYMMETRIC_GRID = 2,
+            CALIB_CB_CLUSTERING = 4,
+            CALIB_NINTRINSIC = 18,
+            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),
+            CALIB_USE_EXTRINSIC_GUESS = (1 << 22),
+            FM_7POINT = 1,
+            FM_8POINT = 2,
+            FM_LMEDS = 4,
+            FM_RANSAC = 8,
+            fisheye_CALIB_USE_INTRINSIC_GUESS = 1 << 0,
+            fisheye_CALIB_RECOMPUTE_EXTRINSIC = 1 << 1,
+            fisheye_CALIB_CHECK_COND = 1 << 2,
+            fisheye_CALIB_FIX_SKEW = 1 << 3,
+            fisheye_CALIB_FIX_K1 = 1 << 4,
+            fisheye_CALIB_FIX_K2 = 1 << 5,
+            fisheye_CALIB_FIX_K3 = 1 << 6,
+            fisheye_CALIB_FIX_K4 = 1 << 7,
+            fisheye_CALIB_FIX_INTRINSIC = 1 << 8,
+            fisheye_CALIB_FIX_PRINCIPAL_POINT = 1 << 9;
+
+
+    // C++: enum UndistortTypes
+    public static final int
+            PROJ_SPHERICAL_ORTHO = 0,
+            PROJ_SPHERICAL_EQRECT = 1;
+
+
+    // C++: enum HandEyeCalibrationMethod
+    public static final int
+            CALIB_HAND_EYE_TSAI = 0,
+            CALIB_HAND_EYE_PARK = 1,
+            CALIB_HAND_EYE_HORAUD = 2,
+            CALIB_HAND_EYE_ANDREFF = 3,
+            CALIB_HAND_EYE_DANIILIDIS = 4;
+
+
+    // C++: enum GridType
+    public static final int
+            CirclesGridFinderParameters_SYMMETRIC_GRID = 0,
+            CirclesGridFinderParameters_ASYMMETRIC_GRID = 1;
+
+
+    //
+    // C++:  Mat cv::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, inliers, method, ransacReprojThreshold, maxIters, confidence)
+    public static Mat estimateAffine2D(Mat from, Mat to, Mat inliers, int method, double ransacReprojThreshold, long maxIters, double confidence)
+    {
+        
+        Mat retVal = new Mat(estimateAffine2D_1(from.nativeObj, to.nativeObj, inliers.nativeObj, method, ransacReprojThreshold, maxIters, confidence));
+        
+        return retVal;
+    }
+
+    //javadoc: estimateAffine2D(from, to, inliers, method, ransacReprojThreshold, maxIters)
+    public static Mat estimateAffine2D(Mat from, Mat to, Mat inliers, int method, double ransacReprojThreshold, long maxIters)
+    {
+        
+        Mat retVal = new Mat(estimateAffine2D_2(from.nativeObj, to.nativeObj, inliers.nativeObj, method, ransacReprojThreshold, maxIters));
+        
+        return retVal;
+    }
+
+    //javadoc: estimateAffine2D(from, to, inliers, method, ransacReprojThreshold)
+    public static Mat estimateAffine2D(Mat from, Mat to, Mat inliers, int method, double ransacReprojThreshold)
+    {
+        
+        Mat retVal = new Mat(estimateAffine2D_3(from.nativeObj, to.nativeObj, inliers.nativeObj, method, ransacReprojThreshold));
+        
+        return retVal;
+    }
+
+    //javadoc: estimateAffine2D(from, to, inliers, method)
+    public static Mat estimateAffine2D(Mat from, Mat to, Mat inliers, int method)
+    {
+        
+        Mat retVal = new Mat(estimateAffine2D_4(from.nativeObj, to.nativeObj, inliers.nativeObj, method));
+        
+        return retVal;
+    }
+
+    //javadoc: estimateAffine2D(from, to, inliers)
+    public static Mat estimateAffine2D(Mat from, Mat to, Mat inliers)
+    {
+        
+        Mat retVal = new Mat(estimateAffine2D_5(from.nativeObj, to.nativeObj, inliers.nativeObj));
+        
+        return retVal;
+    }
+
+    //javadoc: estimateAffine2D(from, to)
+    public static Mat estimateAffine2D(Mat from, Mat to)
+    {
+        
+        Mat retVal = new Mat(estimateAffine2D_6(from.nativeObj, to.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::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, inliers, method, ransacReprojThreshold, maxIters, confidence)
+    public static Mat estimateAffinePartial2D(Mat from, Mat to, Mat inliers, int method, double ransacReprojThreshold, long maxIters, double confidence)
+    {
+        
+        Mat retVal = new Mat(estimateAffinePartial2D_1(from.nativeObj, to.nativeObj, inliers.nativeObj, method, ransacReprojThreshold, maxIters, confidence));
+        
+        return retVal;
+    }
+
+    //javadoc: estimateAffinePartial2D(from, to, inliers, method, ransacReprojThreshold, maxIters)
+    public static Mat estimateAffinePartial2D(Mat from, Mat to, Mat inliers, int method, double ransacReprojThreshold, long maxIters)
+    {
+        
+        Mat retVal = new Mat(estimateAffinePartial2D_2(from.nativeObj, to.nativeObj, inliers.nativeObj, method, ransacReprojThreshold, maxIters));
+        
+        return retVal;
+    }
+
+    //javadoc: estimateAffinePartial2D(from, to, inliers, method, ransacReprojThreshold)
+    public static Mat estimateAffinePartial2D(Mat from, Mat to, Mat inliers, int method, double ransacReprojThreshold)
+    {
+        
+        Mat retVal = new Mat(estimateAffinePartial2D_3(from.nativeObj, to.nativeObj, inliers.nativeObj, method, ransacReprojThreshold));
+        
+        return retVal;
+    }
+
+    //javadoc: estimateAffinePartial2D(from, to, inliers, method)
+    public static Mat estimateAffinePartial2D(Mat from, Mat to, Mat inliers, int method)
+    {
+        
+        Mat retVal = new Mat(estimateAffinePartial2D_4(from.nativeObj, to.nativeObj, inliers.nativeObj, method));
+        
+        return retVal;
+    }
+
+    //javadoc: estimateAffinePartial2D(from, to, inliers)
+    public static Mat estimateAffinePartial2D(Mat from, Mat to, Mat inliers)
+    {
+        
+        Mat retVal = new Mat(estimateAffinePartial2D_5(from.nativeObj, to.nativeObj, inliers.nativeObj));
+        
+        return retVal;
+    }
+
+    //javadoc: estimateAffinePartial2D(from, to)
+    public static Mat estimateAffinePartial2D(Mat from, Mat to)
+    {
+        
+        Mat retVal = new Mat(estimateAffinePartial2D_6(from.nativeObj, to.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::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, method, prob)
+    public static Mat findEssentialMat(Mat points1, Mat points2, Mat cameraMatrix, int method, double prob)
+    {
+        
+        Mat retVal = new Mat(findEssentialMat_2(points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, method, prob));
+        
+        return retVal;
+    }
+
+    //javadoc: findEssentialMat(points1, points2, cameraMatrix, method)
+    public static Mat findEssentialMat(Mat points1, Mat points2, Mat cameraMatrix, int method)
+    {
+        
+        Mat retVal = new Mat(findEssentialMat_3(points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, method));
+        
+        return retVal;
+    }
+
+    //javadoc: findEssentialMat(points1, points2, cameraMatrix)
+    public static Mat findEssentialMat(Mat points1, Mat points2, Mat cameraMatrix)
+    {
+        
+        Mat retVal = new Mat(findEssentialMat_4(points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::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_5(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_6(points1.nativeObj, points2.nativeObj, focal, pp.x, pp.y, method, prob, threshold));
+        
+        return retVal;
+    }
+
+    //javadoc: findEssentialMat(points1, points2, focal, pp, method, prob)
+    public static Mat findEssentialMat(Mat points1, Mat points2, double focal, Point pp, int method, double prob)
+    {
+        
+        Mat retVal = new Mat(findEssentialMat_7(points1.nativeObj, points2.nativeObj, focal, pp.x, pp.y, method, prob));
+        
+        return retVal;
+    }
+
+    //javadoc: findEssentialMat(points1, points2, focal, pp, method)
+    public static Mat findEssentialMat(Mat points1, Mat points2, double focal, Point pp, int method)
+    {
+        
+        Mat retVal = new Mat(findEssentialMat_8(points1.nativeObj, points2.nativeObj, focal, pp.x, pp.y, method));
+        
+        return retVal;
+    }
+
+    //javadoc: findEssentialMat(points1, points2, focal, pp)
+    public static Mat findEssentialMat(Mat points1, Mat points2, double focal, Point pp)
+    {
+        
+        Mat retVal = new Mat(findEssentialMat_9(points1.nativeObj, points2.nativeObj, focal, pp.x, pp.y));
+        
+        return retVal;
+    }
+
+    //javadoc: findEssentialMat(points1, points2, focal)
+    public static Mat findEssentialMat(Mat points1, Mat points2, double focal)
+    {
+        
+        Mat retVal = new Mat(findEssentialMat_10(points1.nativeObj, points2.nativeObj, focal));
+        
+        return retVal;
+    }
+
+    //javadoc: findEssentialMat(points1, points2)
+    public static Mat findEssentialMat(Mat points1, Mat points2)
+    {
+        
+        Mat retVal = new Mat(findEssentialMat_11(points1.nativeObj, points2.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::findFundamentalMat(vector_Point2f points1, vector_Point2f points2, int method = FM_RANSAC, double ransacReprojThreshold = 3., double confidence = 0.99, Mat& mask = Mat())
+    //
+
+    //javadoc: findFundamentalMat(points1, points2, method, ransacReprojThreshold, confidence, mask)
+    public static Mat findFundamentalMat(MatOfPoint2f points1, MatOfPoint2f points2, int method, double ransacReprojThreshold, double confidence, Mat mask)
+    {
+        Mat points1_mat = points1;
+        Mat points2_mat = points2;
+        Mat retVal = new Mat(findFundamentalMat_0(points1_mat.nativeObj, points2_mat.nativeObj, method, ransacReprojThreshold, confidence, mask.nativeObj));
+        
+        return retVal;
+    }
+
+    //javadoc: findFundamentalMat(points1, points2, method, ransacReprojThreshold, confidence)
+    public static Mat findFundamentalMat(MatOfPoint2f points1, MatOfPoint2f points2, int method, double ransacReprojThreshold, double confidence)
+    {
+        Mat points1_mat = points1;
+        Mat points2_mat = points2;
+        Mat retVal = new Mat(findFundamentalMat_1(points1_mat.nativeObj, points2_mat.nativeObj, method, ransacReprojThreshold, confidence));
+        
+        return retVal;
+    }
+
+    //javadoc: findFundamentalMat(points1, points2, method, ransacReprojThreshold)
+    public static Mat findFundamentalMat(MatOfPoint2f points1, MatOfPoint2f points2, int method, double ransacReprojThreshold)
+    {
+        Mat points1_mat = points1;
+        Mat points2_mat = points2;
+        Mat retVal = new Mat(findFundamentalMat_2(points1_mat.nativeObj, points2_mat.nativeObj, method, ransacReprojThreshold));
+        
+        return retVal;
+    }
+
+    //javadoc: findFundamentalMat(points1, points2, method)
+    public static Mat findFundamentalMat(MatOfPoint2f points1, MatOfPoint2f points2, int method)
+    {
+        Mat points1_mat = points1;
+        Mat points2_mat = points2;
+        Mat retVal = new Mat(findFundamentalMat_3(points1_mat.nativeObj, points2_mat.nativeObj, method));
+        
+        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_4(points1_mat.nativeObj, points2_mat.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::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, mask, maxIters)
+    public static Mat findHomography(MatOfPoint2f srcPoints, MatOfPoint2f dstPoints, int method, double ransacReprojThreshold, Mat mask, int maxIters)
+    {
+        Mat srcPoints_mat = srcPoints;
+        Mat dstPoints_mat = dstPoints;
+        Mat retVal = new Mat(findHomography_1(srcPoints_mat.nativeObj, dstPoints_mat.nativeObj, method, ransacReprojThreshold, mask.nativeObj, maxIters));
+        
+        return retVal;
+    }
+
+    //javadoc: findHomography(srcPoints, dstPoints, method, ransacReprojThreshold, mask)
+    public static Mat findHomography(MatOfPoint2f srcPoints, MatOfPoint2f dstPoints, int method, double ransacReprojThreshold, Mat mask)
+    {
+        Mat srcPoints_mat = srcPoints;
+        Mat dstPoints_mat = dstPoints;
+        Mat retVal = new Mat(findHomography_2(srcPoints_mat.nativeObj, dstPoints_mat.nativeObj, method, ransacReprojThreshold, mask.nativeObj));
+        
+        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_3(srcPoints_mat.nativeObj, dstPoints_mat.nativeObj, method, ransacReprojThreshold));
+        
+        return retVal;
+    }
+
+    //javadoc: findHomography(srcPoints, dstPoints, method)
+    public static Mat findHomography(MatOfPoint2f srcPoints, MatOfPoint2f dstPoints, int method)
+    {
+        Mat srcPoints_mat = srcPoints;
+        Mat dstPoints_mat = dstPoints;
+        Mat retVal = new Mat(findHomography_4(srcPoints_mat.nativeObj, dstPoints_mat.nativeObj, method));
+        
+        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_5(srcPoints_mat.nativeObj, dstPoints_mat.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::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, imgsize)
+    public static Mat getDefaultNewCameraMatrix(Mat cameraMatrix, Size imgsize)
+    {
+        
+        Mat retVal = new Mat(getDefaultNewCameraMatrix_1(cameraMatrix.nativeObj, imgsize.width, imgsize.height));
+        
+        return retVal;
+    }
+
+    //javadoc: getDefaultNewCameraMatrix(cameraMatrix)
+    public static Mat getDefaultNewCameraMatrix(Mat cameraMatrix)
+    {
+        
+        Mat retVal = new Mat(getDefaultNewCameraMatrix_2(cameraMatrix.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::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, newImgSize, validPixROI)
+    public static Mat getOptimalNewCameraMatrix(Mat cameraMatrix, Mat distCoeffs, Size imageSize, double alpha, Size newImgSize, Rect validPixROI)
+    {
+        double[] validPixROI_out = new double[4];
+        Mat retVal = new Mat(getOptimalNewCameraMatrix_1(cameraMatrix.nativeObj, distCoeffs.nativeObj, imageSize.width, imageSize.height, alpha, newImgSize.width, newImgSize.height, validPixROI_out));
+        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, newImgSize)
+    public static Mat getOptimalNewCameraMatrix(Mat cameraMatrix, Mat distCoeffs, Size imageSize, double alpha, Size newImgSize)
+    {
+        
+        Mat retVal = new Mat(getOptimalNewCameraMatrix_2(cameraMatrix.nativeObj, distCoeffs.nativeObj, imageSize.width, imageSize.height, alpha, newImgSize.width, newImgSize.height));
+        
+        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_3(cameraMatrix.nativeObj, distCoeffs.nativeObj, imageSize.width, imageSize.height, alpha));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::initCameraMatrix2D(vector_vector_Point3f objectPoints, vector_vector_Point2f imagePoints, Size imageSize, double aspectRatio = 1.0)
+    //
+
+    //javadoc: initCameraMatrix2D(objectPoints, imagePoints, imageSize, aspectRatio)
+    public static Mat initCameraMatrix2D(List<MatOfPoint3f> objectPoints, List<MatOfPoint2f> imagePoints, Size imageSize, double aspectRatio)
+    {
+        List<Mat> objectPoints_tmplm = new ArrayList<Mat>((objectPoints != null) ? objectPoints.size() : 0);
+        Mat objectPoints_mat = Converters.vector_vector_Point3f_to_Mat(objectPoints, objectPoints_tmplm);
+        List<Mat> imagePoints_tmplm = new ArrayList<Mat>((imagePoints != null) ? imagePoints.size() : 0);
+        Mat imagePoints_mat = Converters.vector_vector_Point2f_to_Mat(imagePoints, imagePoints_tmplm);
+        Mat retVal = new Mat(initCameraMatrix2D_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, aspectRatio));
+        
+        return retVal;
+    }
+
+    //javadoc: initCameraMatrix2D(objectPoints, imagePoints, imageSize)
+    public static Mat initCameraMatrix2D(List<MatOfPoint3f> objectPoints, List<MatOfPoint2f> imagePoints, Size imageSize)
+    {
+        List<Mat> objectPoints_tmplm = new ArrayList<Mat>((objectPoints != null) ? objectPoints.size() : 0);
+        Mat objectPoints_mat = Converters.vector_vector_Point3f_to_Mat(objectPoints, objectPoints_tmplm);
+        List<Mat> imagePoints_tmplm = new ArrayList<Mat>((imagePoints != null) ? imagePoints.size() : 0);
+        Mat imagePoints_mat = Converters.vector_vector_Point2f_to_Mat(imagePoints, imagePoints_tmplm);
+        Mat retVal = new Mat(initCameraMatrix2D_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Rect cv::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 cv::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, Qx, Qy)
+    public static double[] RQDecomp3x3(Mat src, Mat mtxR, Mat mtxQ, Mat Qx, Mat Qy)
+    {
+        
+        double[] retVal = RQDecomp3x3_1(src.nativeObj, mtxR.nativeObj, mtxQ.nativeObj, Qx.nativeObj, Qy.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: RQDecomp3x3(src, mtxR, mtxQ, Qx)
+    public static double[] RQDecomp3x3(Mat src, Mat mtxR, Mat mtxQ, Mat Qx)
+    {
+        
+        double[] retVal = RQDecomp3x3_2(src.nativeObj, mtxR.nativeObj, mtxQ.nativeObj, Qx.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: RQDecomp3x3(src, mtxR, mtxQ)
+    public static double[] RQDecomp3x3(Mat src, Mat mtxR, Mat mtxQ)
+    {
+        
+        double[] retVal = RQDecomp3x3_3(src.nativeObj, mtxR.nativeObj, mtxQ.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::checkChessboard(Mat img, Size size)
+    //
+
+    //javadoc: checkChessboard(img, size)
+    public static boolean checkChessboard(Mat img, Size size)
+    {
+        
+        boolean retVal = checkChessboard_0(img.nativeObj, size.width, size.height);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::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 cv::findChessboardCornersSB(Mat image, Size patternSize, Mat& corners, int flags = 0)
+    //
+
+    //javadoc: findChessboardCornersSB(image, patternSize, corners, flags)
+    public static boolean findChessboardCornersSB(Mat image, Size patternSize, Mat corners, int flags)
+    {
+        
+        boolean retVal = findChessboardCornersSB_0(image.nativeObj, patternSize.width, patternSize.height, corners.nativeObj, flags);
+        
+        return retVal;
+    }
+
+    //javadoc: findChessboardCornersSB(image, patternSize, corners)
+    public static boolean findChessboardCornersSB(Mat image, Size patternSize, Mat corners)
+    {
+        
+        boolean retVal = findChessboardCornersSB_1(image.nativeObj, patternSize.width, patternSize.height, corners.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::findCirclesGrid(Mat image, Size patternSize, Mat& centers, int flags, Ptr_FeatureDetector blobDetector, CirclesGridFinderParameters parameters)
+    //
+
+    // Unknown type 'Ptr_FeatureDetector' (I), skipping the function
+
+
+    //
+    // C++:  bool cv::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_2(image.nativeObj, patternSize.width, patternSize.height, centers.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::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, useExtrinsicGuess)
+    public static boolean solvePnP(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess)
+    {
+        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, useExtrinsicGuess);
+        
+        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_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::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, useExtrinsicGuess, iterationsCount, reprojectionError, confidence, inliers)
+    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)
+    {
+        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, useExtrinsicGuess, iterationsCount, reprojectionError, confidence, inliers.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: solvePnPRansac(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess, iterationsCount, reprojectionError, confidence)
+    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 objectPoints_mat = objectPoints;
+        Mat imagePoints_mat = imagePoints;
+        Mat distCoeffs_mat = distCoeffs;
+        boolean retVal = solvePnPRansac_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, iterationsCount, reprojectionError, confidence);
+        
+        return retVal;
+    }
+
+    //javadoc: solvePnPRansac(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess, iterationsCount, reprojectionError)
+    public static boolean solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int iterationsCount, float reprojectionError)
+    {
+        Mat objectPoints_mat = objectPoints;
+        Mat imagePoints_mat = imagePoints;
+        Mat distCoeffs_mat = distCoeffs;
+        boolean retVal = solvePnPRansac_3(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, iterationsCount, reprojectionError);
+        
+        return retVal;
+    }
+
+    //javadoc: solvePnPRansac(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess, iterationsCount)
+    public static boolean solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int iterationsCount)
+    {
+        Mat objectPoints_mat = objectPoints;
+        Mat imagePoints_mat = imagePoints;
+        Mat distCoeffs_mat = distCoeffs;
+        boolean retVal = solvePnPRansac_4(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, iterationsCount);
+        
+        return retVal;
+    }
+
+    //javadoc: solvePnPRansac(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess)
+    public static boolean solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess)
+    {
+        Mat objectPoints_mat = objectPoints;
+        Mat imagePoints_mat = imagePoints;
+        Mat distCoeffs_mat = distCoeffs;
+        boolean retVal = solvePnPRansac_5(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess);
+        
+        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_6(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::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 cv::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: calibrateCameraExtended(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, stdDeviationsIntrinsics, stdDeviationsExtrinsics, perViewErrors, flags, criteria)
+    public static double calibrateCameraExtended(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> 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: calibrateCameraExtended(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, stdDeviationsIntrinsics, stdDeviationsExtrinsics, perViewErrors, flags)
+    public static double calibrateCameraExtended(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> 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: calibrateCameraExtended(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, stdDeviationsIntrinsics, stdDeviationsExtrinsics, perViewErrors)
+    public static double calibrateCameraExtended(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> 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 cv::calibrateCamera(vector_Mat objectPoints, vector_Mat imagePoints, Size imageSize, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
+    //
+
+    //javadoc: calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, flags, criteria)
+    public static double calibrateCamera(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, int flags, TermCriteria criteria)
+    {
+        Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+        Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+        Mat rvecs_mat = new Mat();
+        Mat tvecs_mat = new Mat();
+        double retVal = calibrateCamera_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
+        Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
+        rvecs_mat.release();
+        Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
+        tvecs_mat.release();
+        return retVal;
+    }
+
+    //javadoc: calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, flags)
+    public static double calibrateCamera(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, int flags)
+    {
+        Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+        Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+        Mat rvecs_mat = new Mat();
+        Mat tvecs_mat = new Mat();
+        double retVal = calibrateCamera_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, flags);
+        Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
+        rvecs_mat.release();
+        Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
+        tvecs_mat.release();
+        return retVal;
+    }
+
+    //javadoc: calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs)
+    public static double calibrateCamera(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs)
+    {
+        Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+        Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+        Mat rvecs_mat = new Mat();
+        Mat tvecs_mat = new Mat();
+        double retVal = calibrateCamera_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj);
+        Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
+        rvecs_mat.release();
+        Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
+        tvecs_mat.release();
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::calibrateCameraRO(vector_Mat objectPoints, vector_Mat imagePoints, Size imageSize, int iFixedPoint, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, Mat& newObjPoints, Mat& stdDeviationsIntrinsics, Mat& stdDeviationsExtrinsics, Mat& stdDeviationsObjPoints, Mat& perViewErrors, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
+    //
+
+    //javadoc: calibrateCameraROExtended(objectPoints, imagePoints, imageSize, iFixedPoint, cameraMatrix, distCoeffs, rvecs, tvecs, newObjPoints, stdDeviationsIntrinsics, stdDeviationsExtrinsics, stdDeviationsObjPoints, perViewErrors, flags, criteria)
+    public static double calibrateCameraROExtended(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, Mat newObjPoints, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat stdDeviationsObjPoints, 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 = calibrateCameraROExtended_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, iFixedPoint, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, newObjPoints.nativeObj, stdDeviationsIntrinsics.nativeObj, stdDeviationsExtrinsics.nativeObj, stdDeviationsObjPoints.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: calibrateCameraROExtended(objectPoints, imagePoints, imageSize, iFixedPoint, cameraMatrix, distCoeffs, rvecs, tvecs, newObjPoints, stdDeviationsIntrinsics, stdDeviationsExtrinsics, stdDeviationsObjPoints, perViewErrors, flags)
+    public static double calibrateCameraROExtended(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, Mat newObjPoints, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat stdDeviationsObjPoints, 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 = calibrateCameraROExtended_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, iFixedPoint, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, newObjPoints.nativeObj, stdDeviationsIntrinsics.nativeObj, stdDeviationsExtrinsics.nativeObj, stdDeviationsObjPoints.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: calibrateCameraROExtended(objectPoints, imagePoints, imageSize, iFixedPoint, cameraMatrix, distCoeffs, rvecs, tvecs, newObjPoints, stdDeviationsIntrinsics, stdDeviationsExtrinsics, stdDeviationsObjPoints, perViewErrors)
+    public static double calibrateCameraROExtended(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, Mat newObjPoints, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat stdDeviationsObjPoints, 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 = calibrateCameraROExtended_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, iFixedPoint, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, newObjPoints.nativeObj, stdDeviationsIntrinsics.nativeObj, stdDeviationsExtrinsics.nativeObj, stdDeviationsObjPoints.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 cv::calibrateCameraRO(vector_Mat objectPoints, vector_Mat imagePoints, Size imageSize, int iFixedPoint, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, Mat& newObjPoints, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
+    //
+
+    //javadoc: calibrateCameraRO(objectPoints, imagePoints, imageSize, iFixedPoint, cameraMatrix, distCoeffs, rvecs, tvecs, newObjPoints, flags, criteria)
+    public static double calibrateCameraRO(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, Mat newObjPoints, 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 = calibrateCameraRO_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, iFixedPoint, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, newObjPoints.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: calibrateCameraRO(objectPoints, imagePoints, imageSize, iFixedPoint, cameraMatrix, distCoeffs, rvecs, tvecs, newObjPoints, flags)
+    public static double calibrateCameraRO(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, Mat newObjPoints, 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 = calibrateCameraRO_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, iFixedPoint, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, newObjPoints.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: calibrateCameraRO(objectPoints, imagePoints, imageSize, iFixedPoint, cameraMatrix, distCoeffs, rvecs, tvecs, newObjPoints)
+    public static double calibrateCameraRO(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, Mat newObjPoints)
+    {
+        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 = calibrateCameraRO_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, iFixedPoint, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, newObjPoints.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 cv::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 cv::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, Mat& perViewErrors, int flags = CALIB_FIX_INTRINSIC, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 1e-6))
+    //
+
+    //javadoc: stereoCalibrateExtended(objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F, perViewErrors, flags, criteria)
+    public static double stereoCalibrateExtended(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors, 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 = stereoCalibrateExtended_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, perViewErrors.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
+        
+        return retVal;
+    }
+
+    //javadoc: stereoCalibrateExtended(objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F, perViewErrors, flags)
+    public static double stereoCalibrateExtended(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors, 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 = stereoCalibrateExtended_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, perViewErrors.nativeObj, flags);
+        
+        return retVal;
+    }
+
+    //javadoc: stereoCalibrateExtended(objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F, perViewErrors)
+    public static double stereoCalibrateExtended(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors)
+    {
+        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 = stereoCalibrateExtended_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, perViewErrors.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::stereoCalibrate(vector_Mat objectPoints, vector_Mat imagePoints1, vector_Mat imagePoints2, Mat& cameraMatrix1, Mat& distCoeffs1, Mat& cameraMatrix2, Mat& distCoeffs2, Size imageSize, Mat& R, Mat& T, Mat& E, Mat& F, int flags = CALIB_FIX_INTRINSIC, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 1e-6))
+    //
+
+    //javadoc: stereoCalibrate(objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F, flags, criteria)
+    public static double stereoCalibrate(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, int flags, TermCriteria criteria)
+    {
+        Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+        Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
+        Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
+        double retVal = stereoCalibrate_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<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, int flags)
+    {
+        Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+        Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
+        Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
+        double retVal = stereoCalibrate_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<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F)
+    {
+        Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+        Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
+        Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
+        double retVal = stereoCalibrate_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 cv::fisheye::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: fisheye_calibrate(objectPoints, imagePoints, image_size, K, D, rvecs, tvecs, flags, criteria)
+    public static double fisheye_calibrate(List<Mat> objectPoints, List<Mat> imagePoints, Size image_size, Mat K, Mat D, List<Mat> rvecs, List<Mat> tvecs, int flags, TermCriteria criteria)
+    {
+        Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+        Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+        Mat rvecs_mat = new Mat();
+        Mat tvecs_mat = new Mat();
+        double retVal = fisheye_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: fisheye_calibrate(objectPoints, imagePoints, image_size, K, D, rvecs, tvecs, flags)
+    public static double fisheye_calibrate(List<Mat> objectPoints, List<Mat> imagePoints, Size image_size, Mat K, Mat D, List<Mat> rvecs, List<Mat> tvecs, int flags)
+    {
+        Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+        Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+        Mat rvecs_mat = new Mat();
+        Mat tvecs_mat = new Mat();
+        double retVal = fisheye_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: fisheye_calibrate(objectPoints, imagePoints, image_size, K, D, rvecs, tvecs)
+    public static double fisheye_calibrate(List<Mat> objectPoints, List<Mat> imagePoints, Size image_size, Mat K, Mat D, List<Mat> rvecs, List<Mat> tvecs)
+    {
+        Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+        Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+        Mat rvecs_mat = new Mat();
+        Mat tvecs_mat = new Mat();
+        double retVal = fisheye_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 cv::fisheye::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: fisheye_stereoCalibrate(objectPoints, imagePoints1, imagePoints2, K1, D1, K2, D2, imageSize, R, T, flags, criteria)
+    public static double fisheye_stereoCalibrate(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T, int flags, TermCriteria criteria)
+    {
+        Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+        Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
+        Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
+        double retVal = fisheye_stereoCalibrate_0(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, K1.nativeObj, D1.nativeObj, K2.nativeObj, D2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
+        
+        return retVal;
+    }
+
+    //javadoc: fisheye_stereoCalibrate(objectPoints, imagePoints1, imagePoints2, K1, D1, K2, D2, imageSize, R, T, flags)
+    public static double fisheye_stereoCalibrate(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T, int flags)
+    {
+        Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+        Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
+        Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
+        double retVal = fisheye_stereoCalibrate_1(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, K1.nativeObj, D1.nativeObj, K2.nativeObj, D2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, flags);
+        
+        return retVal;
+    }
+
+    //javadoc: fisheye_stereoCalibrate(objectPoints, imagePoints1, imagePoints2, K1, D1, K2, D2, imageSize, R, T)
+    public static double fisheye_stereoCalibrate(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T)
+    {
+        Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+        Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
+        Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
+        double retVal = fisheye_stereoCalibrate_2(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, K1.nativeObj, D1.nativeObj, K2.nativeObj, D2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::rectify3Collinear(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Mat cameraMatrix3, Mat distCoeffs3, vector_Mat imgpt1, vector_Mat imgpt3, Size imageSize, Mat R12, Mat T12, Mat R13, Mat T13, Mat& R1, Mat& R2, Mat& R3, Mat& P1, Mat& P2, Mat& P3, Mat& Q, double alpha, Size newImgSize, Rect* roi1, Rect* roi2, int flags)
+    //
+
+    //javadoc: rectify3Collinear(cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, cameraMatrix3, distCoeffs3, imgpt1, imgpt3, imageSize, R12, T12, R13, T13, R1, R2, R3, P1, P2, P3, Q, alpha, newImgSize, roi1, roi2, flags)
+    public static float rectify3Collinear(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Mat cameraMatrix3, Mat distCoeffs3, List<Mat> imgpt1, List<Mat> imgpt3, Size imageSize, Mat R12, Mat T12, Mat R13, Mat T13, Mat R1, Mat R2, Mat R3, Mat P1, Mat P2, Mat P3, Mat Q, double alpha, Size newImgSize, Rect roi1, Rect roi2, int flags)
+    {
+        Mat imgpt1_mat = Converters.vector_Mat_to_Mat(imgpt1);
+        Mat imgpt3_mat = Converters.vector_Mat_to_Mat(imgpt3);
+        double[] roi1_out = new double[4];
+        double[] roi2_out = new double[4];
+        float retVal = rectify3Collinear_0(cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, cameraMatrix3.nativeObj, distCoeffs3.nativeObj, imgpt1_mat.nativeObj, imgpt3_mat.nativeObj, imageSize.width, imageSize.height, R12.nativeObj, T12.nativeObj, R13.nativeObj, T13.nativeObj, R1.nativeObj, R2.nativeObj, R3.nativeObj, P1.nativeObj, P2.nativeObj, P3.nativeObj, Q.nativeObj, alpha, newImgSize.width, newImgSize.height, roi1_out, roi2_out, flags);
+        if(roi1!=null){ roi1.x = (int)roi1_out[0]; roi1.y = (int)roi1_out[1]; roi1.width = (int)roi1_out[2]; roi1.height = (int)roi1_out[3]; } 
+        if(roi2!=null){ roi2.x = (int)roi2_out[0]; roi2.y = (int)roi2_out[1]; roi2.width = (int)roi2_out[2]; roi2.height = (int)roi2_out[3]; } 
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::decomposeHomographyMat(Mat H, Mat K, vector_Mat& rotations, vector_Mat& translations, vector_Mat& normals)
+    //
+
+    //javadoc: decomposeHomographyMat(H, K, rotations, translations, normals)
+    public static int decomposeHomographyMat(Mat H, Mat K, List<Mat> rotations, List<Mat> translations, List<Mat> normals)
+    {
+        Mat rotations_mat = new Mat();
+        Mat translations_mat = new Mat();
+        Mat normals_mat = new Mat();
+        int retVal = decomposeHomographyMat_0(H.nativeObj, K.nativeObj, rotations_mat.nativeObj, translations_mat.nativeObj, normals_mat.nativeObj);
+        Converters.Mat_to_vector_Mat(rotations_mat, rotations);
+        rotations_mat.release();
+        Converters.Mat_to_vector_Mat(translations_mat, translations);
+        translations_mat.release();
+        Converters.Mat_to_vector_Mat(normals_mat, normals);
+        normals_mat.release();
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::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, ransacThreshold)
+    public static int estimateAffine3D(Mat src, Mat dst, Mat out, Mat inliers, double ransacThreshold)
+    {
+        
+        int retVal = estimateAffine3D_1(src.nativeObj, dst.nativeObj, out.nativeObj, inliers.nativeObj, ransacThreshold);
+        
+        return retVal;
+    }
+
+    //javadoc: estimateAffine3D(src, dst, out, inliers)
+    public static int estimateAffine3D(Mat src, Mat dst, Mat out, Mat inliers)
+    {
+        
+        int retVal = estimateAffine3D_2(src.nativeObj, dst.nativeObj, out.nativeObj, inliers.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::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, focal)
+    public static int recoverPose(Mat E, Mat points1, Mat points2, Mat R, Mat t, double focal)
+    {
+        
+        int retVal = recoverPose_2(E.nativeObj, points1.nativeObj, points2.nativeObj, R.nativeObj, t.nativeObj, focal);
+        
+        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_3(E.nativeObj, points1.nativeObj, points2.nativeObj, R.nativeObj, t.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::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_4(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_5(E.nativeObj, points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, R.nativeObj, t.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::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_6(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, mask)
+    public static int recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat R, Mat t, double distanceThresh, Mat mask)
+    {
+        
+        int retVal = recoverPose_7(E.nativeObj, points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, R.nativeObj, t.nativeObj, distanceThresh, mask.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_8(E.nativeObj, points1.nativeObj, points2.nativeObj, cameraMatrix.nativeObj, R.nativeObj, t.nativeObj, distanceThresh);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::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<Mat> rvecs, List<Mat> 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 cv::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 cv::calibrateHandEye(vector_Mat R_gripper2base, vector_Mat t_gripper2base, vector_Mat R_target2cam, vector_Mat t_target2cam, Mat& R_cam2gripper, Mat& t_cam2gripper, HandEyeCalibrationMethod method = CALIB_HAND_EYE_TSAI)
+    //
+
+    //javadoc: calibrateHandEye(R_gripper2base, t_gripper2base, R_target2cam, t_target2cam, R_cam2gripper, t_cam2gripper, method)
+    public static void calibrateHandEye(List<Mat> R_gripper2base, List<Mat> t_gripper2base, List<Mat> R_target2cam, List<Mat> t_target2cam, Mat R_cam2gripper, Mat t_cam2gripper, int method)
+    {
+        Mat R_gripper2base_mat = Converters.vector_Mat_to_Mat(R_gripper2base);
+        Mat t_gripper2base_mat = Converters.vector_Mat_to_Mat(t_gripper2base);
+        Mat R_target2cam_mat = Converters.vector_Mat_to_Mat(R_target2cam);
+        Mat t_target2cam_mat = Converters.vector_Mat_to_Mat(t_target2cam);
+        calibrateHandEye_0(R_gripper2base_mat.nativeObj, t_gripper2base_mat.nativeObj, R_target2cam_mat.nativeObj, t_target2cam_mat.nativeObj, R_cam2gripper.nativeObj, t_cam2gripper.nativeObj, method);
+        
+        return;
+    }
+
+    //javadoc: calibrateHandEye(R_gripper2base, t_gripper2base, R_target2cam, t_target2cam, R_cam2gripper, t_cam2gripper)
+    public static void calibrateHandEye(List<Mat> R_gripper2base, List<Mat> t_gripper2base, List<Mat> R_target2cam, List<Mat> t_target2cam, Mat R_cam2gripper, Mat t_cam2gripper)
+    {
+        Mat R_gripper2base_mat = Converters.vector_Mat_to_Mat(R_gripper2base);
+        Mat t_gripper2base_mat = Converters.vector_Mat_to_Mat(t_gripper2base);
+        Mat R_target2cam_mat = Converters.vector_Mat_to_Mat(R_target2cam);
+        Mat t_target2cam_mat = Converters.vector_Mat_to_Mat(t_target2cam);
+        calibrateHandEye_1(R_gripper2base_mat.nativeObj, t_gripper2base_mat.nativeObj, R_target2cam_mat.nativeObj, t_target2cam_mat.nativeObj, R_cam2gripper.nativeObj, t_cam2gripper.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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, dr3dr1, dr3dt1, dr3dr2, dr3dt2, dt3dr1, dt3dt1, dt3dr2)
+    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)
+    {
+        
+        composeRT_1(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);
+        
+        return;
+    }
+
+    //javadoc: composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3, dr3dr1, dr3dt1, dr3dr2, dr3dt2, dt3dr1, dt3dt1)
+    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)
+    {
+        
+        composeRT_2(rvec1.nativeObj, tvec1.nativeObj, rvec2.nativeObj, tvec2.nativeObj, rvec3.nativeObj, tvec3.nativeObj, dr3dr1.nativeObj, dr3dt1.nativeObj, dr3dr2.nativeObj, dr3dt2.nativeObj, dt3dr1.nativeObj, dt3dt1.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3, dr3dr1, dr3dt1, dr3dr2, dr3dt2, dt3dr1)
+    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)
+    {
+        
+        composeRT_3(rvec1.nativeObj, tvec1.nativeObj, rvec2.nativeObj, tvec2.nativeObj, rvec3.nativeObj, tvec3.nativeObj, dr3dr1.nativeObj, dr3dt1.nativeObj, dr3dr2.nativeObj, dr3dt2.nativeObj, dt3dr1.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3, dr3dr1, dr3dt1, dr3dr2, dr3dt2)
+    public static void composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat rvec3, Mat tvec3, Mat dr3dr1, Mat dr3dt1, Mat dr3dr2, Mat dr3dt2)
+    {
+        
+        composeRT_4(rvec1.nativeObj, tvec1.nativeObj, rvec2.nativeObj, tvec2.nativeObj, rvec3.nativeObj, tvec3.nativeObj, dr3dr1.nativeObj, dr3dt1.nativeObj, dr3dr2.nativeObj, dr3dt2.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3, dr3dr1, dr3dt1, dr3dr2)
+    public static void composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat rvec3, Mat tvec3, Mat dr3dr1, Mat dr3dt1, Mat dr3dr2)
+    {
+        
+        composeRT_5(rvec1.nativeObj, tvec1.nativeObj, rvec2.nativeObj, tvec2.nativeObj, rvec3.nativeObj, tvec3.nativeObj, dr3dr1.nativeObj, dr3dt1.nativeObj, dr3dr2.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3, dr3dr1, dr3dt1)
+    public static void composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat rvec3, Mat tvec3, Mat dr3dr1, Mat dr3dt1)
+    {
+        
+        composeRT_6(rvec1.nativeObj, tvec1.nativeObj, rvec2.nativeObj, tvec2.nativeObj, rvec3.nativeObj, tvec3.nativeObj, dr3dr1.nativeObj, dr3dt1.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3, dr3dr1)
+    public static void composeRT(Mat rvec1, Mat tvec1, Mat rvec2, Mat tvec2, Mat rvec3, Mat tvec3, Mat dr3dr1)
+    {
+        
+        composeRT_7(rvec1.nativeObj, tvec1.nativeObj, rvec2.nativeObj, tvec2.nativeObj, rvec3.nativeObj, tvec3.nativeObj, dr3dr1.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_8(rvec1.nativeObj, tvec1.nativeObj, rvec2.nativeObj, tvec2.nativeObj, rvec3.nativeObj, tvec3.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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 cv::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 cv::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 cv::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 cv::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, rotMatrixX, rotMatrixY, rotMatrixZ)
+    public static void decomposeProjectionMatrix(Mat projMatrix, Mat cameraMatrix, Mat rotMatrix, Mat transVect, Mat rotMatrixX, Mat rotMatrixY, Mat rotMatrixZ)
+    {
+        
+        decomposeProjectionMatrix_1(projMatrix.nativeObj, cameraMatrix.nativeObj, rotMatrix.nativeObj, transVect.nativeObj, rotMatrixX.nativeObj, rotMatrixY.nativeObj, rotMatrixZ.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: decomposeProjectionMatrix(projMatrix, cameraMatrix, rotMatrix, transVect, rotMatrixX, rotMatrixY)
+    public static void decomposeProjectionMatrix(Mat projMatrix, Mat cameraMatrix, Mat rotMatrix, Mat transVect, Mat rotMatrixX, Mat rotMatrixY)
+    {
+        
+        decomposeProjectionMatrix_2(projMatrix.nativeObj, cameraMatrix.nativeObj, rotMatrix.nativeObj, transVect.nativeObj, rotMatrixX.nativeObj, rotMatrixY.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: decomposeProjectionMatrix(projMatrix, cameraMatrix, rotMatrix, transVect, rotMatrixX)
+    public static void decomposeProjectionMatrix(Mat projMatrix, Mat cameraMatrix, Mat rotMatrix, Mat transVect, Mat rotMatrixX)
+    {
+        
+        decomposeProjectionMatrix_3(projMatrix.nativeObj, cameraMatrix.nativeObj, rotMatrix.nativeObj, transVect.nativeObj, rotMatrixX.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: decomposeProjectionMatrix(projMatrix, cameraMatrix, rotMatrix, transVect)
+    public static void decomposeProjectionMatrix(Mat projMatrix, Mat cameraMatrix, Mat rotMatrix, Mat transVect)
+    {
+        
+        decomposeProjectionMatrix_4(projMatrix.nativeObj, cameraMatrix.nativeObj, rotMatrix.nativeObj, transVect.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::drawFrameAxes(Mat& image, Mat cameraMatrix, Mat distCoeffs, Mat rvec, Mat tvec, float length, int thickness = 3)
+    //
+
+    //javadoc: drawFrameAxes(image, cameraMatrix, distCoeffs, rvec, tvec, length, thickness)
+    public static void drawFrameAxes(Mat image, Mat cameraMatrix, Mat distCoeffs, Mat rvec, Mat tvec, float length, int thickness)
+    {
+        
+        drawFrameAxes_0(image.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvec.nativeObj, tvec.nativeObj, length, thickness);
+        
+        return;
+    }
+
+    //javadoc: drawFrameAxes(image, cameraMatrix, distCoeffs, rvec, tvec, length)
+    public static void drawFrameAxes(Mat image, Mat cameraMatrix, Mat distCoeffs, Mat rvec, Mat tvec, float length)
+    {
+        
+        drawFrameAxes_1(image.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvec.nativeObj, tvec.nativeObj, length);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::filterHomographyDecompByVisibleRefpoints(vector_Mat rotations, vector_Mat normals, Mat beforePoints, Mat afterPoints, Mat& possibleSolutions, Mat pointsMask = Mat())
+    //
+
+    //javadoc: filterHomographyDecompByVisibleRefpoints(rotations, normals, beforePoints, afterPoints, possibleSolutions, pointsMask)
+    public static void filterHomographyDecompByVisibleRefpoints(List<Mat> rotations, List<Mat> normals, Mat beforePoints, Mat afterPoints, Mat possibleSolutions, Mat pointsMask)
+    {
+        Mat rotations_mat = Converters.vector_Mat_to_Mat(rotations);
+        Mat normals_mat = Converters.vector_Mat_to_Mat(normals);
+        filterHomographyDecompByVisibleRefpoints_0(rotations_mat.nativeObj, normals_mat.nativeObj, beforePoints.nativeObj, afterPoints.nativeObj, possibleSolutions.nativeObj, pointsMask.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: filterHomographyDecompByVisibleRefpoints(rotations, normals, beforePoints, afterPoints, possibleSolutions)
+    public static void filterHomographyDecompByVisibleRefpoints(List<Mat> rotations, List<Mat> normals, Mat beforePoints, Mat afterPoints, Mat possibleSolutions)
+    {
+        Mat rotations_mat = Converters.vector_Mat_to_Mat(rotations);
+        Mat normals_mat = Converters.vector_Mat_to_Mat(normals);
+        filterHomographyDecompByVisibleRefpoints_1(rotations_mat.nativeObj, normals_mat.nativeObj, beforePoints.nativeObj, afterPoints.nativeObj, possibleSolutions.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::initUndistortRectifyMap(Mat cameraMatrix, Mat distCoeffs, Mat R, Mat newCameraMatrix, Size size, int m1type, Mat& map1, Mat& map2)
+    //
+
+    //javadoc: initUndistortRectifyMap(cameraMatrix, distCoeffs, R, newCameraMatrix, size, m1type, map1, map2)
+    public static void initUndistortRectifyMap(Mat cameraMatrix, Mat distCoeffs, Mat R, Mat newCameraMatrix, Size size, int m1type, Mat map1, Mat map2)
+    {
+        
+        initUndistortRectifyMap_0(cameraMatrix.nativeObj, distCoeffs.nativeObj, R.nativeObj, newCameraMatrix.nativeObj, size.width, size.height, m1type, map1.nativeObj, map2.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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, jacobian)
+    public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints, Mat jacobian)
+    {
+        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, jacobian.nativeObj);
+        
+        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_2(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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, flags, alpha, newImageSize, validPixROI1)
+    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)
+    {
+        double[] validPixROI1_out = new double[4];
+        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, flags, alpha, newImageSize.width, newImageSize.height, validPixROI1_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]; } 
+        return;
+    }
+
+    //javadoc: stereoRectify(cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, R1, R2, P1, P2, Q, flags, alpha, newImageSize)
+    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)
+    {
+        
+        stereoRectify_2(cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, R1.nativeObj, R2.nativeObj, P1.nativeObj, P2.nativeObj, Q.nativeObj, flags, alpha, newImageSize.width, newImageSize.height);
+        
+        return;
+    }
+
+    //javadoc: stereoRectify(cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, R1, R2, P1, P2, Q, flags, alpha)
+    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)
+    {
+        
+        stereoRectify_3(cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, R1.nativeObj, R2.nativeObj, P1.nativeObj, P2.nativeObj, Q.nativeObj, flags, alpha);
+        
+        return;
+    }
+
+    //javadoc: stereoRectify(cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, R1, R2, P1, P2, Q, flags)
+    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)
+    {
+        
+        stereoRectify_4(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);
+        
+        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_5(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 cv::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 cv::undistort(Mat src, Mat& dst, Mat cameraMatrix, Mat distCoeffs, Mat newCameraMatrix = Mat())
+    //
+
+    //javadoc: undistort(src, dst, cameraMatrix, distCoeffs, newCameraMatrix)
+    public static void undistort(Mat src, Mat dst, Mat cameraMatrix, Mat distCoeffs, Mat newCameraMatrix)
+    {
+        
+        undistort_0(src.nativeObj, dst.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, newCameraMatrix.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: undistort(src, dst, cameraMatrix, distCoeffs)
+    public static void undistort(Mat src, Mat dst, Mat cameraMatrix, Mat distCoeffs)
+    {
+        
+        undistort_1(src.nativeObj, dst.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::undistortPoints(Mat src, Mat& dst, Mat cameraMatrix, Mat distCoeffs, Mat R, Mat P, TermCriteria criteria)
+    //
+
+    //javadoc: undistortPointsIter(src, dst, cameraMatrix, distCoeffs, R, P, criteria)
+    public static void undistortPointsIter(Mat src, Mat dst, Mat cameraMatrix, Mat distCoeffs, Mat R, Mat P, TermCriteria criteria)
+    {
+        
+        undistortPointsIter_0(src.nativeObj, dst.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, R.nativeObj, P.nativeObj, criteria.type, criteria.maxCount, criteria.epsilon);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::undistortPoints(vector_Point2f src, vector_Point2f& dst, Mat cameraMatrix, Mat distCoeffs, Mat R = Mat(), Mat P = Mat())
+    //
+
+    //javadoc: undistortPoints(src, dst, cameraMatrix, distCoeffs, R, P)
+    public static void undistortPoints(MatOfPoint2f src, MatOfPoint2f dst, Mat cameraMatrix, Mat distCoeffs, Mat R, Mat P)
+    {
+        Mat src_mat = src;
+        Mat dst_mat = dst;
+        undistortPoints_0(src_mat.nativeObj, dst_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, R.nativeObj, P.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: undistortPoints(src, dst, cameraMatrix, distCoeffs, R)
+    public static void undistortPoints(MatOfPoint2f src, MatOfPoint2f dst, Mat cameraMatrix, Mat distCoeffs, Mat R)
+    {
+        Mat src_mat = src;
+        Mat dst_mat = dst;
+        undistortPoints_1(src_mat.nativeObj, dst_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, R.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: undistortPoints(src, dst, cameraMatrix, distCoeffs)
+    public static void undistortPoints(MatOfPoint2f src, MatOfPoint2f dst, Mat cameraMatrix, Mat distCoeffs)
+    {
+        Mat src_mat = src;
+        Mat dst_mat = dst;
+        undistortPoints_2(src_mat.nativeObj, dst_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::fisheye::distortPoints(Mat undistorted, Mat& distorted, Mat K, Mat D, double alpha = 0)
+    //
+
+    //javadoc: fisheye_distortPoints(undistorted, distorted, K, D, alpha)
+    public static void fisheye_distortPoints(Mat undistorted, Mat distorted, Mat K, Mat D, double alpha)
+    {
+        
+        fisheye_distortPoints_0(undistorted.nativeObj, distorted.nativeObj, K.nativeObj, D.nativeObj, alpha);
+        
+        return;
+    }
+
+    //javadoc: fisheye_distortPoints(undistorted, distorted, K, D)
+    public static void fisheye_distortPoints(Mat undistorted, Mat distorted, Mat K, Mat D)
+    {
+        
+        fisheye_distortPoints_1(undistorted.nativeObj, distorted.nativeObj, K.nativeObj, D.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::fisheye::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: fisheye_estimateNewCameraMatrixForUndistortRectify(K, D, image_size, R, P, balance, new_size, fov_scale)
+    public static void fisheye_estimateNewCameraMatrixForUndistortRectify(Mat K, Mat D, Size image_size, Mat R, Mat P, double balance, Size new_size, double fov_scale)
+    {
+        
+        fisheye_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: fisheye_estimateNewCameraMatrixForUndistortRectify(K, D, image_size, R, P, balance, new_size)
+    public static void fisheye_estimateNewCameraMatrixForUndistortRectify(Mat K, Mat D, Size image_size, Mat R, Mat P, double balance, Size new_size)
+    {
+        
+        fisheye_estimateNewCameraMatrixForUndistortRectify_1(K.nativeObj, D.nativeObj, image_size.width, image_size.height, R.nativeObj, P.nativeObj, balance, new_size.width, new_size.height);
+        
+        return;
+    }
+
+    //javadoc: fisheye_estimateNewCameraMatrixForUndistortRectify(K, D, image_size, R, P, balance)
+    public static void fisheye_estimateNewCameraMatrixForUndistortRectify(Mat K, Mat D, Size image_size, Mat R, Mat P, double balance)
+    {
+        
+        fisheye_estimateNewCameraMatrixForUndistortRectify_2(K.nativeObj, D.nativeObj, image_size.width, image_size.height, R.nativeObj, P.nativeObj, balance);
+        
+        return;
+    }
+
+    //javadoc: fisheye_estimateNewCameraMatrixForUndistortRectify(K, D, image_size, R, P)
+    public static void fisheye_estimateNewCameraMatrixForUndistortRectify(Mat K, Mat D, Size image_size, Mat R, Mat P)
+    {
+        
+        fisheye_estimateNewCameraMatrixForUndistortRectify_3(K.nativeObj, D.nativeObj, image_size.width, image_size.height, R.nativeObj, P.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::fisheye::initUndistortRectifyMap(Mat K, Mat D, Mat R, Mat P, Size size, int m1type, Mat& map1, Mat& map2)
+    //
+
+    //javadoc: fisheye_initUndistortRectifyMap(K, D, R, P, size, m1type, map1, map2)
+    public static void fisheye_initUndistortRectifyMap(Mat K, Mat D, Mat R, Mat P, Size size, int m1type, Mat map1, Mat map2)
+    {
+        
+        fisheye_initUndistortRectifyMap_0(K.nativeObj, D.nativeObj, R.nativeObj, P.nativeObj, size.width, size.height, m1type, map1.nativeObj, map2.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::fisheye::projectPoints(Mat objectPoints, Mat& imagePoints, Mat rvec, Mat tvec, Mat K, Mat D, double alpha = 0, Mat& jacobian = Mat())
+    //
+
+    //javadoc: fisheye_projectPoints(objectPoints, imagePoints, rvec, tvec, K, D, alpha, jacobian)
+    public static void fisheye_projectPoints(Mat objectPoints, Mat imagePoints, Mat rvec, Mat tvec, Mat K, Mat D, double alpha, Mat jacobian)
+    {
+        
+        fisheye_projectPoints_0(objectPoints.nativeObj, imagePoints.nativeObj, rvec.nativeObj, tvec.nativeObj, K.nativeObj, D.nativeObj, alpha, jacobian.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: fisheye_projectPoints(objectPoints, imagePoints, rvec, tvec, K, D, alpha)
+    public static void fisheye_projectPoints(Mat objectPoints, Mat imagePoints, Mat rvec, Mat tvec, Mat K, Mat D, double alpha)
+    {
+        
+        fisheye_projectPoints_1(objectPoints.nativeObj, imagePoints.nativeObj, rvec.nativeObj, tvec.nativeObj, K.nativeObj, D.nativeObj, alpha);
+        
+        return;
+    }
+
+    //javadoc: fisheye_projectPoints(objectPoints, imagePoints, rvec, tvec, K, D)
+    public static void fisheye_projectPoints(Mat objectPoints, Mat imagePoints, Mat rvec, Mat tvec, Mat K, Mat D)
+    {
+        
+        fisheye_projectPoints_2(objectPoints.nativeObj, imagePoints.nativeObj, rvec.nativeObj, tvec.nativeObj, K.nativeObj, D.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::fisheye::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: fisheye_stereoRectify(K1, D1, K2, D2, imageSize, R, tvec, R1, R2, P1, P2, Q, flags, newImageSize, balance, fov_scale)
+    public static void fisheye_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)
+    {
+        
+        fisheye_stereoRectify_0(K1.nativeObj, D1.nativeObj, K2.nativeObj, D2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, tvec.nativeObj, R1.nativeObj, R2.nativeObj, P1.nativeObj, P2.nativeObj, Q.nativeObj, flags, newImageSize.width, newImageSize.height, balance, fov_scale);
+        
+        return;
+    }
+
+    //javadoc: fisheye_stereoRectify(K1, D1, K2, D2, imageSize, R, tvec, R1, R2, P1, P2, Q, flags, newImageSize, balance)
+    public static void fisheye_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)
+    {
+        
+        fisheye_stereoRectify_1(K1.nativeObj, D1.nativeObj, K2.nativeObj, D2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, tvec.nativeObj, R1.nativeObj, R2.nativeObj, P1.nativeObj, P2.nativeObj, Q.nativeObj, flags, newImageSize.width, newImageSize.height, balance);
+        
+        return;
+    }
+
+    //javadoc: fisheye_stereoRectify(K1, D1, K2, D2, imageSize, R, tvec, R1, R2, P1, P2, Q, flags, newImageSize)
+    public static void fisheye_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)
+    {
+        
+        fisheye_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);
+        
+        return;
+    }
+
+    //javadoc: fisheye_stereoRectify(K1, D1, K2, D2, imageSize, R, tvec, R1, R2, P1, P2, Q, flags)
+    public static void fisheye_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)
+    {
+        
+        fisheye_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 cv::fisheye::undistortImage(Mat distorted, Mat& undistorted, Mat K, Mat D, Mat Knew = cv::Mat(), Size new_size = Size())
+    //
+
+    //javadoc: fisheye_undistortImage(distorted, undistorted, K, D, Knew, new_size)
+    public static void fisheye_undistortImage(Mat distorted, Mat undistorted, Mat K, Mat D, Mat Knew, Size new_size)
+    {
+        
+        fisheye_undistortImage_0(distorted.nativeObj, undistorted.nativeObj, K.nativeObj, D.nativeObj, Knew.nativeObj, new_size.width, new_size.height);
+        
+        return;
+    }
+
+    //javadoc: fisheye_undistortImage(distorted, undistorted, K, D, Knew)
+    public static void fisheye_undistortImage(Mat distorted, Mat undistorted, Mat K, Mat D, Mat Knew)
+    {
+        
+        fisheye_undistortImage_1(distorted.nativeObj, undistorted.nativeObj, K.nativeObj, D.nativeObj, Knew.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: fisheye_undistortImage(distorted, undistorted, K, D)
+    public static void fisheye_undistortImage(Mat distorted, Mat undistorted, Mat K, Mat D)
+    {
+        
+        fisheye_undistortImage_2(distorted.nativeObj, undistorted.nativeObj, K.nativeObj, D.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::fisheye::undistortPoints(Mat distorted, Mat& undistorted, Mat K, Mat D, Mat R = Mat(), Mat P = Mat())
+    //
+
+    //javadoc: fisheye_undistortPoints(distorted, undistorted, K, D, R, P)
+    public static void fisheye_undistortPoints(Mat distorted, Mat undistorted, Mat K, Mat D, Mat R, Mat P)
+    {
+        
+        fisheye_undistortPoints_0(distorted.nativeObj, undistorted.nativeObj, K.nativeObj, D.nativeObj, R.nativeObj, P.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: fisheye_undistortPoints(distorted, undistorted, K, D, R)
+    public static void fisheye_undistortPoints(Mat distorted, Mat undistorted, Mat K, Mat D, Mat R)
+    {
+        
+        fisheye_undistortPoints_1(distorted.nativeObj, undistorted.nativeObj, K.nativeObj, D.nativeObj, R.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: fisheye_undistortPoints(distorted, undistorted, K, D)
+    public static void fisheye_undistortPoints(Mat distorted, Mat undistorted, Mat K, Mat D)
+    {
+        
+        fisheye_undistortPoints_2(distorted.nativeObj, undistorted.nativeObj, K.nativeObj, D.nativeObj);
+        
+        return;
+    }
+
+
+
+
+    // C++:  Mat cv::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, long inliers_nativeObj, int method, double ransacReprojThreshold, long maxIters, double confidence);
+    private static native long estimateAffine2D_2(long from_nativeObj, long to_nativeObj, long inliers_nativeObj, int method, double ransacReprojThreshold, long maxIters);
+    private static native long estimateAffine2D_3(long from_nativeObj, long to_nativeObj, long inliers_nativeObj, int method, double ransacReprojThreshold);
+    private static native long estimateAffine2D_4(long from_nativeObj, long to_nativeObj, long inliers_nativeObj, int method);
+    private static native long estimateAffine2D_5(long from_nativeObj, long to_nativeObj, long inliers_nativeObj);
+    private static native long estimateAffine2D_6(long from_nativeObj, long to_nativeObj);
+
+    // C++:  Mat cv::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, long inliers_nativeObj, int method, double ransacReprojThreshold, long maxIters, double confidence);
+    private static native long estimateAffinePartial2D_2(long from_nativeObj, long to_nativeObj, long inliers_nativeObj, int method, double ransacReprojThreshold, long maxIters);
+    private static native long estimateAffinePartial2D_3(long from_nativeObj, long to_nativeObj, long inliers_nativeObj, int method, double ransacReprojThreshold);
+    private static native long estimateAffinePartial2D_4(long from_nativeObj, long to_nativeObj, long inliers_nativeObj, int method);
+    private static native long estimateAffinePartial2D_5(long from_nativeObj, long to_nativeObj, long inliers_nativeObj);
+    private static native long estimateAffinePartial2D_6(long from_nativeObj, long to_nativeObj);
+
+    // C++:  Mat cv::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, int method, double prob);
+    private static native long findEssentialMat_3(long points1_nativeObj, long points2_nativeObj, long cameraMatrix_nativeObj, int method);
+    private static native long findEssentialMat_4(long points1_nativeObj, long points2_nativeObj, long cameraMatrix_nativeObj);
+
+    // C++:  Mat cv::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_5(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_6(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_7(long points1_nativeObj, long points2_nativeObj, double focal, double pp_x, double pp_y, int method, double prob);
+    private static native long findEssentialMat_8(long points1_nativeObj, long points2_nativeObj, double focal, double pp_x, double pp_y, int method);
+    private static native long findEssentialMat_9(long points1_nativeObj, long points2_nativeObj, double focal, double pp_x, double pp_y);
+    private static native long findEssentialMat_10(long points1_nativeObj, long points2_nativeObj, double focal);
+    private static native long findEssentialMat_11(long points1_nativeObj, long points2_nativeObj);
+
+    // C++:  Mat cv::findFundamentalMat(vector_Point2f points1, vector_Point2f points2, int method = FM_RANSAC, double ransacReprojThreshold = 3., double confidence = 0.99, Mat& mask = Mat())
+    private static native long findFundamentalMat_0(long points1_mat_nativeObj, long points2_mat_nativeObj, int method, double ransacReprojThreshold, double confidence, long mask_nativeObj);
+    private static native long findFundamentalMat_1(long points1_mat_nativeObj, long points2_mat_nativeObj, int method, double ransacReprojThreshold, double confidence);
+    private static native long findFundamentalMat_2(long points1_mat_nativeObj, long points2_mat_nativeObj, int method, double ransacReprojThreshold);
+    private static native long findFundamentalMat_3(long points1_mat_nativeObj, long points2_mat_nativeObj, int method);
+    private static native long findFundamentalMat_4(long points1_mat_nativeObj, long points2_mat_nativeObj);
+
+    // C++:  Mat cv::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, long mask_nativeObj, int maxIters);
+    private static native long findHomography_2(long srcPoints_mat_nativeObj, long dstPoints_mat_nativeObj, int method, double ransacReprojThreshold, long mask_nativeObj);
+    private static native long findHomography_3(long srcPoints_mat_nativeObj, long dstPoints_mat_nativeObj, int method, double ransacReprojThreshold);
+    private static native long findHomography_4(long srcPoints_mat_nativeObj, long dstPoints_mat_nativeObj, int method);
+    private static native long findHomography_5(long srcPoints_mat_nativeObj, long dstPoints_mat_nativeObj);
+
+    // C++:  Mat cv::getDefaultNewCameraMatrix(Mat cameraMatrix, Size imgsize = Size(), bool centerPrincipalPoint = false)
+    private static native long getDefaultNewCameraMatrix_0(long cameraMatrix_nativeObj, double imgsize_width, double imgsize_height, boolean centerPrincipalPoint);
+    private static native long getDefaultNewCameraMatrix_1(long cameraMatrix_nativeObj, double imgsize_width, double imgsize_height);
+    private static native long getDefaultNewCameraMatrix_2(long cameraMatrix_nativeObj);
+
+    // C++:  Mat cv::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, double newImgSize_width, double newImgSize_height, double[] validPixROI_out);
+    private static native long getOptimalNewCameraMatrix_2(long cameraMatrix_nativeObj, long distCoeffs_nativeObj, double imageSize_width, double imageSize_height, double alpha, double newImgSize_width, double newImgSize_height);
+    private static native long getOptimalNewCameraMatrix_3(long cameraMatrix_nativeObj, long distCoeffs_nativeObj, double imageSize_width, double imageSize_height, double alpha);
+
+    // C++:  Mat cv::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 cv::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 cv::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, long Qx_nativeObj, long Qy_nativeObj);
+    private static native double[] RQDecomp3x3_2(long src_nativeObj, long mtxR_nativeObj, long mtxQ_nativeObj, long Qx_nativeObj);
+    private static native double[] RQDecomp3x3_3(long src_nativeObj, long mtxR_nativeObj, long mtxQ_nativeObj);
+
+    // C++:  bool cv::checkChessboard(Mat img, Size size)
+    private static native boolean checkChessboard_0(long img_nativeObj, double size_width, double size_height);
+
+    // C++:  bool cv::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 cv::findChessboardCornersSB(Mat image, Size patternSize, Mat& corners, int flags = 0)
+    private static native boolean findChessboardCornersSB_0(long image_nativeObj, double patternSize_width, double patternSize_height, long corners_nativeObj, int flags);
+    private static native boolean findChessboardCornersSB_1(long image_nativeObj, double patternSize_width, double patternSize_height, long corners_nativeObj);
+
+    // C++:  bool cv::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_2(long image_nativeObj, double patternSize_width, double patternSize_height, long centers_nativeObj);
+
+    // C++:  bool cv::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, boolean useExtrinsicGuess);
+    private static native boolean solvePnP_2(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_mat_nativeObj, long rvec_nativeObj, long tvec_nativeObj);
+
+    // C++:  bool cv::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, boolean useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence, long inliers_nativeObj);
+    private static native boolean solvePnPRansac_2(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);
+    private static native boolean solvePnPRansac_3(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);
+    private static native boolean solvePnPRansac_4(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);
+    private static native boolean solvePnPRansac_5(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_mat_nativeObj, long rvec_nativeObj, long tvec_nativeObj, boolean useExtrinsicGuess);
+    private static native boolean solvePnPRansac_6(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_mat_nativeObj, long rvec_nativeObj, long tvec_nativeObj);
+
+    // C++:  bool cv::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 cv::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 cv::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 cv::calibrateCameraRO(vector_Mat objectPoints, vector_Mat imagePoints, Size imageSize, int iFixedPoint, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, Mat& newObjPoints, Mat& stdDeviationsIntrinsics, Mat& stdDeviationsExtrinsics, Mat& stdDeviationsObjPoints, Mat& perViewErrors, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
+    private static native double calibrateCameraROExtended_0(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, int iFixedPoint, long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long rvecs_mat_nativeObj, long tvecs_mat_nativeObj, long newObjPoints_nativeObj, long stdDeviationsIntrinsics_nativeObj, long stdDeviationsExtrinsics_nativeObj, long stdDeviationsObjPoints_nativeObj, long perViewErrors_nativeObj, int flags, int criteria_type, int criteria_maxCount, double criteria_epsilon);
+    private static native double calibrateCameraROExtended_1(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, int iFixedPoint, long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long rvecs_mat_nativeObj, long tvecs_mat_nativeObj, long newObjPoints_nativeObj, long stdDeviationsIntrinsics_nativeObj, long stdDeviationsExtrinsics_nativeObj, long stdDeviationsObjPoints_nativeObj, long perViewErrors_nativeObj, int flags);
+    private static native double calibrateCameraROExtended_2(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, int iFixedPoint, long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long rvecs_mat_nativeObj, long tvecs_mat_nativeObj, long newObjPoints_nativeObj, long stdDeviationsIntrinsics_nativeObj, long stdDeviationsExtrinsics_nativeObj, long stdDeviationsObjPoints_nativeObj, long perViewErrors_nativeObj);
+
+    // C++:  double cv::calibrateCameraRO(vector_Mat objectPoints, vector_Mat imagePoints, Size imageSize, int iFixedPoint, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, Mat& newObjPoints, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
+    private static native double calibrateCameraRO_0(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, int iFixedPoint, long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long rvecs_mat_nativeObj, long tvecs_mat_nativeObj, long newObjPoints_nativeObj, int flags, int criteria_type, int criteria_maxCount, double criteria_epsilon);
+    private static native double calibrateCameraRO_1(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, int iFixedPoint, long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long rvecs_mat_nativeObj, long tvecs_mat_nativeObj, long newObjPoints_nativeObj, int flags);
+    private static native double calibrateCameraRO_2(long objectPoints_mat_nativeObj, long imagePoints_mat_nativeObj, double imageSize_width, double imageSize_height, int iFixedPoint, long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long rvecs_mat_nativeObj, long tvecs_mat_nativeObj, long newObjPoints_nativeObj);
+
+    // C++:  double cv::sampsonDistance(Mat pt1, Mat pt2, Mat F)
+    private static native double sampsonDistance_0(long pt1_nativeObj, long pt2_nativeObj, long F_nativeObj);
+
+    // C++:  double cv::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, Mat& perViewErrors, int flags = CALIB_FIX_INTRINSIC, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 1e-6))
+    private static native double stereoCalibrateExtended_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, long perViewErrors_nativeObj, int flags, int criteria_type, int criteria_maxCount, double criteria_epsilon);
+    private static native double stereoCalibrateExtended_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, long perViewErrors_nativeObj, int flags);
+    private static native double stereoCalibrateExtended_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, long perViewErrors_nativeObj);
+
+    // C++:  double cv::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 cv::fisheye::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 fisheye_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 fisheye_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 fisheye_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 cv::fisheye::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 fisheye_stereoCalibrate_0(long objectPoints_mat_nativeObj, long imagePoints1_mat_nativeObj, long imagePoints2_mat_nativeObj, long K1_nativeObj, long D1_nativeObj, long K2_nativeObj, long D2_nativeObj, double imageSize_width, double imageSize_height, long R_nativeObj, long T_nativeObj, int flags, int criteria_type, int criteria_maxCount, double criteria_epsilon);
+    private static native double fisheye_stereoCalibrate_1(long objectPoints_mat_nativeObj, long imagePoints1_mat_nativeObj, long imagePoints2_mat_nativeObj, long K1_nativeObj, long D1_nativeObj, long K2_nativeObj, long D2_nativeObj, double imageSize_width, double imageSize_height, long R_nativeObj, long T_nativeObj, int flags);
+    private static native double fisheye_stereoCalibrate_2(long objectPoints_mat_nativeObj, long imagePoints1_mat_nativeObj, long imagePoints2_mat_nativeObj, long K1_nativeObj, long D1_nativeObj, long K2_nativeObj, long D2_nativeObj, double imageSize_width, double imageSize_height, long R_nativeObj, long T_nativeObj);
+
+    // C++:  float cv::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 cv::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 cv::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, double ransacThreshold);
+    private static native int estimateAffine3D_2(long src_nativeObj, long dst_nativeObj, long out_nativeObj, long inliers_nativeObj);
+
+    // C++:  int cv::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, double focal);
+    private static native int recoverPose_3(long E_nativeObj, long points1_nativeObj, long points2_nativeObj, long R_nativeObj, long t_nativeObj);
+
+    // C++:  int cv::recoverPose(Mat E, Mat points1, Mat points2, Mat cameraMatrix, Mat& R, Mat& t, Mat& mask = Mat())
+    private static native int recoverPose_4(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_5(long E_nativeObj, long points1_nativeObj, long points2_nativeObj, long cameraMatrix_nativeObj, long R_nativeObj, long t_nativeObj);
+
+    // C++:  int cv::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_6(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_7(long E_nativeObj, long points1_nativeObj, long points2_nativeObj, long cameraMatrix_nativeObj, long R_nativeObj, long t_nativeObj, double distanceThresh, long mask_nativeObj);
+    private static native int recoverPose_8(long E_nativeObj, long points1_nativeObj, long points2_nativeObj, long cameraMatrix_nativeObj, long R_nativeObj, long t_nativeObj, double distanceThresh);
+
+    // C++:  int cv::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 cv::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 cv::calibrateHandEye(vector_Mat R_gripper2base, vector_Mat t_gripper2base, vector_Mat R_target2cam, vector_Mat t_target2cam, Mat& R_cam2gripper, Mat& t_cam2gripper, HandEyeCalibrationMethod method = CALIB_HAND_EYE_TSAI)
+    private static native void calibrateHandEye_0(long R_gripper2base_mat_nativeObj, long t_gripper2base_mat_nativeObj, long R_target2cam_mat_nativeObj, long t_target2cam_mat_nativeObj, long R_cam2gripper_nativeObj, long t_cam2gripper_nativeObj, int method);
+    private static native void calibrateHandEye_1(long R_gripper2base_mat_nativeObj, long t_gripper2base_mat_nativeObj, long R_target2cam_mat_nativeObj, long t_target2cam_mat_nativeObj, long R_cam2gripper_nativeObj, long t_cam2gripper_nativeObj);
+
+    // C++:  void cv::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 cv::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, long dr3dr1_nativeObj, long dr3dt1_nativeObj, long dr3dr2_nativeObj, long dr3dt2_nativeObj, long dt3dr1_nativeObj, long dt3dt1_nativeObj, long dt3dr2_nativeObj);
+    private static native void composeRT_2(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);
+    private static native void composeRT_3(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);
+    private static native void composeRT_4(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);
+    private static native void composeRT_5(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);
+    private static native void composeRT_6(long rvec1_nativeObj, long tvec1_nativeObj, long rvec2_nativeObj, long tvec2_nativeObj, long rvec3_nativeObj, long tvec3_nativeObj, long dr3dr1_nativeObj, long dr3dt1_nativeObj);
+    private static native void composeRT_7(long rvec1_nativeObj, long tvec1_nativeObj, long rvec2_nativeObj, long tvec2_nativeObj, long rvec3_nativeObj, long tvec3_nativeObj, long dr3dr1_nativeObj);
+    private static native void composeRT_8(long rvec1_nativeObj, long tvec1_nativeObj, long rvec2_nativeObj, long tvec2_nativeObj, long rvec3_nativeObj, long tvec3_nativeObj);
+
+    // C++:  void cv::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 cv::convertPointsFromHomogeneous(Mat src, Mat& dst)
+    private static native void convertPointsFromHomogeneous_0(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::convertPointsToHomogeneous(Mat src, Mat& dst)
+    private static native void convertPointsToHomogeneous_0(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::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 cv::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 cv::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, long rotMatrixX_nativeObj, long rotMatrixY_nativeObj, long rotMatrixZ_nativeObj);
+    private static native void decomposeProjectionMatrix_2(long projMatrix_nativeObj, long cameraMatrix_nativeObj, long rotMatrix_nativeObj, long transVect_nativeObj, long rotMatrixX_nativeObj, long rotMatrixY_nativeObj);
+    private static native void decomposeProjectionMatrix_3(long projMatrix_nativeObj, long cameraMatrix_nativeObj, long rotMatrix_nativeObj, long transVect_nativeObj, long rotMatrixX_nativeObj);
+    private static native void decomposeProjectionMatrix_4(long projMatrix_nativeObj, long cameraMatrix_nativeObj, long rotMatrix_nativeObj, long transVect_nativeObj);
+
+    // C++:  void cv::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 cv::drawFrameAxes(Mat& image, Mat cameraMatrix, Mat distCoeffs, Mat rvec, Mat tvec, float length, int thickness = 3)
+    private static native void drawFrameAxes_0(long image_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long rvec_nativeObj, long tvec_nativeObj, float length, int thickness);
+    private static native void drawFrameAxes_1(long image_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long rvec_nativeObj, long tvec_nativeObj, float length);
+
+    // C++:  void cv::filterHomographyDecompByVisibleRefpoints(vector_Mat rotations, vector_Mat normals, Mat beforePoints, Mat afterPoints, Mat& possibleSolutions, Mat pointsMask = Mat())
+    private static native void filterHomographyDecompByVisibleRefpoints_0(long rotations_mat_nativeObj, long normals_mat_nativeObj, long beforePoints_nativeObj, long afterPoints_nativeObj, long possibleSolutions_nativeObj, long pointsMask_nativeObj);
+    private static native void filterHomographyDecompByVisibleRefpoints_1(long rotations_mat_nativeObj, long normals_mat_nativeObj, long beforePoints_nativeObj, long afterPoints_nativeObj, long possibleSolutions_nativeObj);
+
+    // C++:  void cv::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 cv::initUndistortRectifyMap(Mat cameraMatrix, Mat distCoeffs, Mat R, Mat newCameraMatrix, Size size, int m1type, Mat& map1, Mat& map2)
+    private static native void initUndistortRectifyMap_0(long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long R_nativeObj, long newCameraMatrix_nativeObj, double size_width, double size_height, int m1type, long map1_nativeObj, long map2_nativeObj);
+
+    // C++:  void cv::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 cv::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, long jacobian_nativeObj);
+    private static native void projectPoints_2(long objectPoints_mat_nativeObj, long rvec_nativeObj, long tvec_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_mat_nativeObj, long imagePoints_mat_nativeObj);
+
+    // C++:  void cv::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 cv::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, int flags, double alpha, double newImageSize_width, double newImageSize_height, double[] validPixROI1_out);
+    private static native void stereoRectify_2(long cameraMatrix1_nativeObj, long distCoeffs1_nativeObj, long cameraMatrix2_nativeObj, long distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, long R_nativeObj, long T_nativeObj, long R1_nativeObj, long R2_nativeObj, long P1_nativeObj, long P2_nativeObj, long Q_nativeObj, int flags, double alpha, double newImageSize_width, double newImageSize_height);
+    private static native void stereoRectify_3(long cameraMatrix1_nativeObj, long distCoeffs1_nativeObj, long cameraMatrix2_nativeObj, long distCoeffs2_nativeObj, double imageSize_width, double imageSize_height, long R_nativeObj, long T_nativeObj, long R1_nativeObj, long R2_nativeObj, long P1_nativeObj, long P2_nativeObj, long Q_nativeObj, int flags, double alpha);
+    private static native void stereoRectify_4(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);
+    private static native void stereoRectify_5(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 cv::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 cv::undistort(Mat src, Mat& dst, Mat cameraMatrix, Mat distCoeffs, Mat newCameraMatrix = Mat())
+    private static native void undistort_0(long src_nativeObj, long dst_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long newCameraMatrix_nativeObj);
+    private static native void undistort_1(long src_nativeObj, long dst_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_nativeObj);
+
+    // C++:  void cv::undistortPoints(Mat src, Mat& dst, Mat cameraMatrix, Mat distCoeffs, Mat R, Mat P, TermCriteria criteria)
+    private static native void undistortPointsIter_0(long src_nativeObj, long dst_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long R_nativeObj, long P_nativeObj, int criteria_type, int criteria_maxCount, double criteria_epsilon);
+
+    // C++:  void cv::undistortPoints(vector_Point2f src, vector_Point2f& dst, Mat cameraMatrix, Mat distCoeffs, Mat R = Mat(), Mat P = Mat())
+    private static native void undistortPoints_0(long src_mat_nativeObj, long dst_mat_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long R_nativeObj, long P_nativeObj);
+    private static native void undistortPoints_1(long src_mat_nativeObj, long dst_mat_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_nativeObj, long R_nativeObj);
+    private static native void undistortPoints_2(long src_mat_nativeObj, long dst_mat_nativeObj, long cameraMatrix_nativeObj, long distCoeffs_nativeObj);
+
+    // C++:  void cv::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 cv::fisheye::distortPoints(Mat undistorted, Mat& distorted, Mat K, Mat D, double alpha = 0)
+    private static native void fisheye_distortPoints_0(long undistorted_nativeObj, long distorted_nativeObj, long K_nativeObj, long D_nativeObj, double alpha);
+    private static native void fisheye_distortPoints_1(long undistorted_nativeObj, long distorted_nativeObj, long K_nativeObj, long D_nativeObj);
+
+    // C++:  void cv::fisheye::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 fisheye_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 fisheye_estimateNewCameraMatrixForUndistortRectify_1(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);
+    private static native void fisheye_estimateNewCameraMatrixForUndistortRectify_2(long K_nativeObj, long D_nativeObj, double image_size_width, double image_size_height, long R_nativeObj, long P_nativeObj, double balance);
+    private static native void fisheye_estimateNewCameraMatrixForUndistortRectify_3(long K_nativeObj, long D_nativeObj, double image_size_width, double image_size_height, long R_nativeObj, long P_nativeObj);
+
+    // C++:  void cv::fisheye::initUndistortRectifyMap(Mat K, Mat D, Mat R, Mat P, Size size, int m1type, Mat& map1, Mat& map2)
+    private static native void fisheye_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 cv::fisheye::projectPoints(Mat objectPoints, Mat& imagePoints, Mat rvec, Mat tvec, Mat K, Mat D, double alpha = 0, Mat& jacobian = Mat())
+    private static native void fisheye_projectPoints_0(long objectPoints_nativeObj, long imagePoints_nativeObj, long rvec_nativeObj, long tvec_nativeObj, long K_nativeObj, long D_nativeObj, double alpha, long jacobian_nativeObj);
+    private static native void fisheye_projectPoints_1(long objectPoints_nativeObj, long imagePoints_nativeObj, long rvec_nativeObj, long tvec_nativeObj, long K_nativeObj, long D_nativeObj, double alpha);
+    private static native void fisheye_projectPoints_2(long objectPoints_nativeObj, long imagePoints_nativeObj, long rvec_nativeObj, long tvec_nativeObj, long K_nativeObj, long D_nativeObj);
+
+    // C++:  void cv::fisheye::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 fisheye_stereoRectify_0(long K1_nativeObj, long D1_nativeObj, long K2_nativeObj, long D2_nativeObj, double imageSize_width, double imageSize_height, long R_nativeObj, long tvec_nativeObj, long R1_nativeObj, long R2_nativeObj, long P1_nativeObj, long P2_nativeObj, long Q_nativeObj, int flags, double newImageSize_width, double newImageSize_height, double balance, double fov_scale);
+    private static native void fisheye_stereoRectify_1(long K1_nativeObj, long D1_nativeObj, long K2_nativeObj, long D2_nativeObj, double imageSize_width, double imageSize_height, long R_nativeObj, long tvec_nativeObj, long R1_nativeObj, long R2_nativeObj, long P1_nativeObj, long P2_nativeObj, long Q_nativeObj, int flags, double newImageSize_width, double newImageSize_height, double balance);
+    private static native void fisheye_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);
+    private static native void fisheye_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 cv::fisheye::undistortImage(Mat distorted, Mat& undistorted, Mat K, Mat D, Mat Knew = cv::Mat(), Size new_size = Size())
+    private static native void fisheye_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 fisheye_undistortImage_1(long distorted_nativeObj, long undistorted_nativeObj, long K_nativeObj, long D_nativeObj, long Knew_nativeObj);
+    private static native void fisheye_undistortImage_2(long distorted_nativeObj, long undistorted_nativeObj, long K_nativeObj, long D_nativeObj);
+
+    // C++:  void cv::fisheye::undistortPoints(Mat distorted, Mat& undistorted, Mat K, Mat D, Mat R = Mat(), Mat P = Mat())
+    private static native void fisheye_undistortPoints_0(long distorted_nativeObj, long undistorted_nativeObj, long K_nativeObj, long D_nativeObj, long R_nativeObj, long P_nativeObj);
+    private static native void fisheye_undistortPoints_1(long distorted_nativeObj, long undistorted_nativeObj, long K_nativeObj, long D_nativeObj, long R_nativeObj);
+    private static native void fisheye_undistortPoints_2(long distorted_nativeObj, long undistorted_nativeObj, long K_nativeObj, long D_nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/calib3d/StereoBM.java b/opencv41/src/main/java/org/opencv/calib3d/StereoBM.java
new file mode 100644 (file)
index 0000000..2502c64
--- /dev/null
@@ -0,0 +1,345 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.calib3d;
+
+import org.opencv.calib3d.StereoBM;
+import org.opencv.calib3d.StereoMatcher;
+import org.opencv.core.Rect;
+
+// C++: class StereoBM
+//javadoc: StereoBM
+
+public class StereoBM extends StereoMatcher {
+
+    protected StereoBM(long addr) { super(addr); }
+
+    // internal usage only
+    public static StereoBM __fromPtr__(long addr) { return new StereoBM(addr); }
+
+    // C++: enum <unnamed>
+    public static final int
+            PREFILTER_NORMALIZED_RESPONSE = 0,
+            PREFILTER_XSOBEL = 1;
+
+
+    //
+    // C++: static Ptr_StereoBM cv::StereoBM::create(int numDisparities = 0, int blockSize = 21)
+    //
+
+    //javadoc: StereoBM::create(numDisparities, blockSize)
+    public static StereoBM create(int numDisparities, int blockSize)
+    {
+        
+        StereoBM retVal = StereoBM.__fromPtr__(create_0(numDisparities, blockSize));
+        
+        return retVal;
+    }
+
+    //javadoc: StereoBM::create(numDisparities)
+    public static StereoBM create(int numDisparities)
+    {
+        
+        StereoBM retVal = StereoBM.__fromPtr__(create_1(numDisparities));
+        
+        return retVal;
+    }
+
+    //javadoc: StereoBM::create()
+    public static StereoBM create()
+    {
+        
+        StereoBM retVal = StereoBM.__fromPtr__(create_2());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Rect cv::StereoBM::getROI1()
+    //
+
+    //javadoc: StereoBM::getROI1()
+    public  Rect getROI1()
+    {
+        
+        Rect retVal = new Rect(getROI1_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Rect cv::StereoBM::getROI2()
+    //
+
+    //javadoc: StereoBM::getROI2()
+    public  Rect getROI2()
+    {
+        
+        Rect retVal = new Rect(getROI2_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::StereoBM::getPreFilterCap()
+    //
+
+    //javadoc: StereoBM::getPreFilterCap()
+    public  int getPreFilterCap()
+    {
+        
+        int retVal = getPreFilterCap_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::StereoBM::getPreFilterSize()
+    //
+
+    //javadoc: StereoBM::getPreFilterSize()
+    public  int getPreFilterSize()
+    {
+        
+        int retVal = getPreFilterSize_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::StereoBM::getPreFilterType()
+    //
+
+    //javadoc: StereoBM::getPreFilterType()
+    public  int getPreFilterType()
+    {
+        
+        int retVal = getPreFilterType_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::StereoBM::getSmallerBlockSize()
+    //
+
+    //javadoc: StereoBM::getSmallerBlockSize()
+    public  int getSmallerBlockSize()
+    {
+        
+        int retVal = getSmallerBlockSize_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::StereoBM::getTextureThreshold()
+    //
+
+    //javadoc: StereoBM::getTextureThreshold()
+    public  int getTextureThreshold()
+    {
+        
+        int retVal = getTextureThreshold_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::StereoBM::getUniquenessRatio()
+    //
+
+    //javadoc: StereoBM::getUniquenessRatio()
+    public  int getUniquenessRatio()
+    {
+        
+        int retVal = getUniquenessRatio_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::StereoBM::setPreFilterCap(int preFilterCap)
+    //
+
+    //javadoc: StereoBM::setPreFilterCap(preFilterCap)
+    public  void setPreFilterCap(int preFilterCap)
+    {
+        
+        setPreFilterCap_0(nativeObj, preFilterCap);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::StereoBM::setPreFilterSize(int preFilterSize)
+    //
+
+    //javadoc: StereoBM::setPreFilterSize(preFilterSize)
+    public  void setPreFilterSize(int preFilterSize)
+    {
+        
+        setPreFilterSize_0(nativeObj, preFilterSize);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::StereoBM::setPreFilterType(int preFilterType)
+    //
+
+    //javadoc: StereoBM::setPreFilterType(preFilterType)
+    public  void setPreFilterType(int preFilterType)
+    {
+        
+        setPreFilterType_0(nativeObj, preFilterType);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::StereoBM::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 cv::StereoBM::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 cv::StereoBM::setSmallerBlockSize(int blockSize)
+    //
+
+    //javadoc: StereoBM::setSmallerBlockSize(blockSize)
+    public  void setSmallerBlockSize(int blockSize)
+    {
+        
+        setSmallerBlockSize_0(nativeObj, blockSize);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::StereoBM::setTextureThreshold(int textureThreshold)
+    //
+
+    //javadoc: StereoBM::setTextureThreshold(textureThreshold)
+    public  void setTextureThreshold(int textureThreshold)
+    {
+        
+        setTextureThreshold_0(nativeObj, textureThreshold);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::StereoBM::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 cv::StereoBM::create(int numDisparities = 0, int blockSize = 21)
+    private static native long create_0(int numDisparities, int blockSize);
+    private static native long create_1(int numDisparities);
+    private static native long create_2();
+
+    // C++:  Rect cv::StereoBM::getROI1()
+    private static native double[] getROI1_0(long nativeObj);
+
+    // C++:  Rect cv::StereoBM::getROI2()
+    private static native double[] getROI2_0(long nativeObj);
+
+    // C++:  int cv::StereoBM::getPreFilterCap()
+    private static native int getPreFilterCap_0(long nativeObj);
+
+    // C++:  int cv::StereoBM::getPreFilterSize()
+    private static native int getPreFilterSize_0(long nativeObj);
+
+    // C++:  int cv::StereoBM::getPreFilterType()
+    private static native int getPreFilterType_0(long nativeObj);
+
+    // C++:  int cv::StereoBM::getSmallerBlockSize()
+    private static native int getSmallerBlockSize_0(long nativeObj);
+
+    // C++:  int cv::StereoBM::getTextureThreshold()
+    private static native int getTextureThreshold_0(long nativeObj);
+
+    // C++:  int cv::StereoBM::getUniquenessRatio()
+    private static native int getUniquenessRatio_0(long nativeObj);
+
+    // C++:  void cv::StereoBM::setPreFilterCap(int preFilterCap)
+    private static native void setPreFilterCap_0(long nativeObj, int preFilterCap);
+
+    // C++:  void cv::StereoBM::setPreFilterSize(int preFilterSize)
+    private static native void setPreFilterSize_0(long nativeObj, int preFilterSize);
+
+    // C++:  void cv::StereoBM::setPreFilterType(int preFilterType)
+    private static native void setPreFilterType_0(long nativeObj, int preFilterType);
+
+    // C++:  void cv::StereoBM::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 cv::StereoBM::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 cv::StereoBM::setSmallerBlockSize(int blockSize)
+    private static native void setSmallerBlockSize_0(long nativeObj, int blockSize);
+
+    // C++:  void cv::StereoBM::setTextureThreshold(int textureThreshold)
+    private static native void setTextureThreshold_0(long nativeObj, int textureThreshold);
+
+    // C++:  void cv::StereoBM::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/opencv41/src/main/java/org/opencv/calib3d/StereoMatcher.java b/opencv41/src/main/java/org/opencv/calib3d/StereoMatcher.java
new file mode 100644 (file)
index 0000000..fbeb58d
--- /dev/null
@@ -0,0 +1,256 @@
+//
+// 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); }
+
+    // internal usage only
+    public static StereoMatcher __fromPtr__(long addr) { return new StereoMatcher(addr); }
+
+    // C++: enum <unnamed>
+    public static final int
+            DISP_SHIFT = 4,
+            DISP_SCALE = (1 << DISP_SHIFT);
+
+
+    //
+    // C++:  int cv::StereoMatcher::getBlockSize()
+    //
+
+    //javadoc: StereoMatcher::getBlockSize()
+    public  int getBlockSize()
+    {
+        
+        int retVal = getBlockSize_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::StereoMatcher::getDisp12MaxDiff()
+    //
+
+    //javadoc: StereoMatcher::getDisp12MaxDiff()
+    public  int getDisp12MaxDiff()
+    {
+        
+        int retVal = getDisp12MaxDiff_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::StereoMatcher::getMinDisparity()
+    //
+
+    //javadoc: StereoMatcher::getMinDisparity()
+    public  int getMinDisparity()
+    {
+        
+        int retVal = getMinDisparity_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::StereoMatcher::getNumDisparities()
+    //
+
+    //javadoc: StereoMatcher::getNumDisparities()
+    public  int getNumDisparities()
+    {
+        
+        int retVal = getNumDisparities_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::StereoMatcher::getSpeckleRange()
+    //
+
+    //javadoc: StereoMatcher::getSpeckleRange()
+    public  int getSpeckleRange()
+    {
+        
+        int retVal = getSpeckleRange_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::StereoMatcher::getSpeckleWindowSize()
+    //
+
+    //javadoc: StereoMatcher::getSpeckleWindowSize()
+    public  int getSpeckleWindowSize()
+    {
+        
+        int retVal = getSpeckleWindowSize_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::StereoMatcher::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 cv::StereoMatcher::setBlockSize(int blockSize)
+    //
+
+    //javadoc: StereoMatcher::setBlockSize(blockSize)
+    public  void setBlockSize(int blockSize)
+    {
+        
+        setBlockSize_0(nativeObj, blockSize);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::StereoMatcher::setDisp12MaxDiff(int disp12MaxDiff)
+    //
+
+    //javadoc: StereoMatcher::setDisp12MaxDiff(disp12MaxDiff)
+    public  void setDisp12MaxDiff(int disp12MaxDiff)
+    {
+        
+        setDisp12MaxDiff_0(nativeObj, disp12MaxDiff);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::StereoMatcher::setMinDisparity(int minDisparity)
+    //
+
+    //javadoc: StereoMatcher::setMinDisparity(minDisparity)
+    public  void setMinDisparity(int minDisparity)
+    {
+        
+        setMinDisparity_0(nativeObj, minDisparity);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::StereoMatcher::setNumDisparities(int numDisparities)
+    //
+
+    //javadoc: StereoMatcher::setNumDisparities(numDisparities)
+    public  void setNumDisparities(int numDisparities)
+    {
+        
+        setNumDisparities_0(nativeObj, numDisparities);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::StereoMatcher::setSpeckleRange(int speckleRange)
+    //
+
+    //javadoc: StereoMatcher::setSpeckleRange(speckleRange)
+    public  void setSpeckleRange(int speckleRange)
+    {
+        
+        setSpeckleRange_0(nativeObj, speckleRange);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::StereoMatcher::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 cv::StereoMatcher::getBlockSize()
+    private static native int getBlockSize_0(long nativeObj);
+
+    // C++:  int cv::StereoMatcher::getDisp12MaxDiff()
+    private static native int getDisp12MaxDiff_0(long nativeObj);
+
+    // C++:  int cv::StereoMatcher::getMinDisparity()
+    private static native int getMinDisparity_0(long nativeObj);
+
+    // C++:  int cv::StereoMatcher::getNumDisparities()
+    private static native int getNumDisparities_0(long nativeObj);
+
+    // C++:  int cv::StereoMatcher::getSpeckleRange()
+    private static native int getSpeckleRange_0(long nativeObj);
+
+    // C++:  int cv::StereoMatcher::getSpeckleWindowSize()
+    private static native int getSpeckleWindowSize_0(long nativeObj);
+
+    // C++:  void cv::StereoMatcher::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 cv::StereoMatcher::setBlockSize(int blockSize)
+    private static native void setBlockSize_0(long nativeObj, int blockSize);
+
+    // C++:  void cv::StereoMatcher::setDisp12MaxDiff(int disp12MaxDiff)
+    private static native void setDisp12MaxDiff_0(long nativeObj, int disp12MaxDiff);
+
+    // C++:  void cv::StereoMatcher::setMinDisparity(int minDisparity)
+    private static native void setMinDisparity_0(long nativeObj, int minDisparity);
+
+    // C++:  void cv::StereoMatcher::setNumDisparities(int numDisparities)
+    private static native void setNumDisparities_0(long nativeObj, int numDisparities);
+
+    // C++:  void cv::StereoMatcher::setSpeckleRange(int speckleRange)
+    private static native void setSpeckleRange_0(long nativeObj, int speckleRange);
+
+    // C++:  void cv::StereoMatcher::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/opencv41/src/main/java/org/opencv/calib3d/StereoSGBM.java b/opencv41/src/main/java/org/opencv/calib3d/StereoSGBM.java
new file mode 100644 (file)
index 0000000..7efdcde
--- /dev/null
@@ -0,0 +1,334 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.calib3d;
+
+import org.opencv.calib3d.StereoMatcher;
+import org.opencv.calib3d.StereoSGBM;
+
+// C++: class StereoSGBM
+//javadoc: StereoSGBM
+
+public class StereoSGBM extends StereoMatcher {
+
+    protected StereoSGBM(long addr) { super(addr); }
+
+    // internal usage only
+    public static StereoSGBM __fromPtr__(long addr) { return new StereoSGBM(addr); }
+
+    // C++: enum <unnamed>
+    public static final int
+            MODE_SGBM = 0,
+            MODE_HH = 1,
+            MODE_SGBM_3WAY = 2,
+            MODE_HH4 = 3;
+
+
+    //
+    // C++: static Ptr_StereoSGBM cv::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 = StereoSGBM.__fromPtr__(create_0(minDisparity, numDisparities, blockSize, P1, P2, disp12MaxDiff, preFilterCap, uniquenessRatio, speckleWindowSize, speckleRange, mode));
+        
+        return retVal;
+    }
+
+    //javadoc: StereoSGBM::create(minDisparity, numDisparities, blockSize, P1, P2, disp12MaxDiff, preFilterCap, uniquenessRatio, speckleWindowSize, speckleRange)
+    public static StereoSGBM create(int minDisparity, int numDisparities, int blockSize, int P1, int P2, int disp12MaxDiff, int preFilterCap, int uniquenessRatio, int speckleWindowSize, int speckleRange)
+    {
+        
+        StereoSGBM retVal = StereoSGBM.__fromPtr__(create_1(minDisparity, numDisparities, blockSize, P1, P2, disp12MaxDiff, preFilterCap, uniquenessRatio, speckleWindowSize, speckleRange));
+        
+        return retVal;
+    }
+
+    //javadoc: StereoSGBM::create(minDisparity, numDisparities, blockSize, P1, P2, disp12MaxDiff, preFilterCap, uniquenessRatio, speckleWindowSize)
+    public static StereoSGBM create(int minDisparity, int numDisparities, int blockSize, int P1, int P2, int disp12MaxDiff, int preFilterCap, int uniquenessRatio, int speckleWindowSize)
+    {
+        
+        StereoSGBM retVal = StereoSGBM.__fromPtr__(create_2(minDisparity, numDisparities, blockSize, P1, P2, disp12MaxDiff, preFilterCap, uniquenessRatio, speckleWindowSize));
+        
+        return retVal;
+    }
+
+    //javadoc: StereoSGBM::create(minDisparity, numDisparities, blockSize, P1, P2, disp12MaxDiff, preFilterCap, uniquenessRatio)
+    public static StereoSGBM create(int minDisparity, int numDisparities, int blockSize, int P1, int P2, int disp12MaxDiff, int preFilterCap, int uniquenessRatio)
+    {
+        
+        StereoSGBM retVal = StereoSGBM.__fromPtr__(create_3(minDisparity, numDisparities, blockSize, P1, P2, disp12MaxDiff, preFilterCap, uniquenessRatio));
+        
+        return retVal;
+    }
+
+    //javadoc: StereoSGBM::create(minDisparity, numDisparities, blockSize, P1, P2, disp12MaxDiff, preFilterCap)
+    public static StereoSGBM create(int minDisparity, int numDisparities, int blockSize, int P1, int P2, int disp12MaxDiff, int preFilterCap)
+    {
+        
+        StereoSGBM retVal = StereoSGBM.__fromPtr__(create_4(minDisparity, numDisparities, blockSize, P1, P2, disp12MaxDiff, preFilterCap));
+        
+        return retVal;
+    }
+
+    //javadoc: StereoSGBM::create(minDisparity, numDisparities, blockSize, P1, P2, disp12MaxDiff)
+    public static StereoSGBM create(int minDisparity, int numDisparities, int blockSize, int P1, int P2, int disp12MaxDiff)
+    {
+        
+        StereoSGBM retVal = StereoSGBM.__fromPtr__(create_5(minDisparity, numDisparities, blockSize, P1, P2, disp12MaxDiff));
+        
+        return retVal;
+    }
+
+    //javadoc: StereoSGBM::create(minDisparity, numDisparities, blockSize, P1, P2)
+    public static StereoSGBM create(int minDisparity, int numDisparities, int blockSize, int P1, int P2)
+    {
+        
+        StereoSGBM retVal = StereoSGBM.__fromPtr__(create_6(minDisparity, numDisparities, blockSize, P1, P2));
+        
+        return retVal;
+    }
+
+    //javadoc: StereoSGBM::create(minDisparity, numDisparities, blockSize, P1)
+    public static StereoSGBM create(int minDisparity, int numDisparities, int blockSize, int P1)
+    {
+        
+        StereoSGBM retVal = StereoSGBM.__fromPtr__(create_7(minDisparity, numDisparities, blockSize, P1));
+        
+        return retVal;
+    }
+
+    //javadoc: StereoSGBM::create(minDisparity, numDisparities, blockSize)
+    public static StereoSGBM create(int minDisparity, int numDisparities, int blockSize)
+    {
+        
+        StereoSGBM retVal = StereoSGBM.__fromPtr__(create_8(minDisparity, numDisparities, blockSize));
+        
+        return retVal;
+    }
+
+    //javadoc: StereoSGBM::create(minDisparity, numDisparities)
+    public static StereoSGBM create(int minDisparity, int numDisparities)
+    {
+        
+        StereoSGBM retVal = StereoSGBM.__fromPtr__(create_9(minDisparity, numDisparities));
+        
+        return retVal;
+    }
+
+    //javadoc: StereoSGBM::create(minDisparity)
+    public static StereoSGBM create(int minDisparity)
+    {
+        
+        StereoSGBM retVal = StereoSGBM.__fromPtr__(create_10(minDisparity));
+        
+        return retVal;
+    }
+
+    //javadoc: StereoSGBM::create()
+    public static StereoSGBM create()
+    {
+        
+        StereoSGBM retVal = StereoSGBM.__fromPtr__(create_11());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::StereoSGBM::getMode()
+    //
+
+    //javadoc: StereoSGBM::getMode()
+    public  int getMode()
+    {
+        
+        int retVal = getMode_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::StereoSGBM::getP1()
+    //
+
+    //javadoc: StereoSGBM::getP1()
+    public  int getP1()
+    {
+        
+        int retVal = getP1_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::StereoSGBM::getP2()
+    //
+
+    //javadoc: StereoSGBM::getP2()
+    public  int getP2()
+    {
+        
+        int retVal = getP2_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::StereoSGBM::getPreFilterCap()
+    //
+
+    //javadoc: StereoSGBM::getPreFilterCap()
+    public  int getPreFilterCap()
+    {
+        
+        int retVal = getPreFilterCap_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::StereoSGBM::getUniquenessRatio()
+    //
+
+    //javadoc: StereoSGBM::getUniquenessRatio()
+    public  int getUniquenessRatio()
+    {
+        
+        int retVal = getUniquenessRatio_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::StereoSGBM::setMode(int mode)
+    //
+
+    //javadoc: StereoSGBM::setMode(mode)
+    public  void setMode(int mode)
+    {
+        
+        setMode_0(nativeObj, mode);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::StereoSGBM::setP1(int P1)
+    //
+
+    //javadoc: StereoSGBM::setP1(P1)
+    public  void setP1(int P1)
+    {
+        
+        setP1_0(nativeObj, P1);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::StereoSGBM::setP2(int P2)
+    //
+
+    //javadoc: StereoSGBM::setP2(P2)
+    public  void setP2(int P2)
+    {
+        
+        setP2_0(nativeObj, P2);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::StereoSGBM::setPreFilterCap(int preFilterCap)
+    //
+
+    //javadoc: StereoSGBM::setPreFilterCap(preFilterCap)
+    public  void setPreFilterCap(int preFilterCap)
+    {
+        
+        setPreFilterCap_0(nativeObj, preFilterCap);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::StereoSGBM::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 cv::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(int minDisparity, int numDisparities, int blockSize, int P1, int P2, int disp12MaxDiff, int preFilterCap, int uniquenessRatio, int speckleWindowSize, int speckleRange);
+    private static native long create_2(int minDisparity, int numDisparities, int blockSize, int P1, int P2, int disp12MaxDiff, int preFilterCap, int uniquenessRatio, int speckleWindowSize);
+    private static native long create_3(int minDisparity, int numDisparities, int blockSize, int P1, int P2, int disp12MaxDiff, int preFilterCap, int uniquenessRatio);
+    private static native long create_4(int minDisparity, int numDisparities, int blockSize, int P1, int P2, int disp12MaxDiff, int preFilterCap);
+    private static native long create_5(int minDisparity, int numDisparities, int blockSize, int P1, int P2, int disp12MaxDiff);
+    private static native long create_6(int minDisparity, int numDisparities, int blockSize, int P1, int P2);
+    private static native long create_7(int minDisparity, int numDisparities, int blockSize, int P1);
+    private static native long create_8(int minDisparity, int numDisparities, int blockSize);
+    private static native long create_9(int minDisparity, int numDisparities);
+    private static native long create_10(int minDisparity);
+    private static native long create_11();
+
+    // C++:  int cv::StereoSGBM::getMode()
+    private static native int getMode_0(long nativeObj);
+
+    // C++:  int cv::StereoSGBM::getP1()
+    private static native int getP1_0(long nativeObj);
+
+    // C++:  int cv::StereoSGBM::getP2()
+    private static native int getP2_0(long nativeObj);
+
+    // C++:  int cv::StereoSGBM::getPreFilterCap()
+    private static native int getPreFilterCap_0(long nativeObj);
+
+    // C++:  int cv::StereoSGBM::getUniquenessRatio()
+    private static native int getUniquenessRatio_0(long nativeObj);
+
+    // C++:  void cv::StereoSGBM::setMode(int mode)
+    private static native void setMode_0(long nativeObj, int mode);
+
+    // C++:  void cv::StereoSGBM::setP1(int P1)
+    private static native void setP1_0(long nativeObj, int P1);
+
+    // C++:  void cv::StereoSGBM::setP2(int P2)
+    private static native void setP2_0(long nativeObj, int P2);
+
+    // C++:  void cv::StereoSGBM::setPreFilterCap(int preFilterCap)
+    private static native void setPreFilterCap_0(long nativeObj, int preFilterCap);
+
+    // C++:  void cv::StereoSGBM::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/opencv41/src/main/java/org/opencv/core/Algorithm.java b/opencv41/src/main/java/org/opencv/core/Algorithm.java
new file mode 100644 (file)
index 0000000..8db0fe0
--- /dev/null
@@ -0,0 +1,113 @@
+//
+// 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; }
+
+    // internal usage only
+    public static Algorithm __fromPtr__(long addr) { return new Algorithm(addr); }
+
+    //
+    // C++:  String cv::Algorithm::getDefaultName()
+    //
+
+    //javadoc: Algorithm::getDefaultName()
+    public  String getDefaultName()
+    {
+        
+        String retVal = getDefaultName_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::Algorithm::empty()
+    //
+
+    //javadoc: Algorithm::empty()
+    public  boolean empty()
+    {
+        
+        boolean retVal = empty_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::Algorithm::clear()
+    //
+
+    //javadoc: Algorithm::clear()
+    public  void clear()
+    {
+        
+        clear_0(nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::Algorithm::read(FileNode fn)
+    //
+
+    // Unknown type 'FileNode' (I), skipping the function
+
+
+    //
+    // C++:  void cv::Algorithm::save(String filename)
+    //
+
+    //javadoc: Algorithm::save(filename)
+    public  void save(String filename)
+    {
+        
+        save_0(nativeObj, filename);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::Algorithm::write(Ptr_FileStorage fs, String name = String())
+    //
+
+    // Unknown type 'Ptr_FileStorage' (I), skipping the function
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  String cv::Algorithm::getDefaultName()
+    private static native String getDefaultName_0(long nativeObj);
+
+    // C++:  bool cv::Algorithm::empty()
+    private static native boolean empty_0(long nativeObj);
+
+    // C++:  void cv::Algorithm::clear()
+    private static native void clear_0(long nativeObj);
+
+    // C++:  void cv::Algorithm::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/opencv41/src/main/java/org/opencv/core/Core.java b/opencv41/src/main/java/org/opencv/core/Core.java
new file mode 100644 (file)
index 0000000..fe1efc9
--- /dev/null
@@ -0,0 +1,3188 @@
+//
+// 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;
+
+// C++: class Core
+//javadoc: Core
+
+public class Core {
+    // these constants are wrapped inside functions to prevent inlining
+    private static String getVersion() { return "4.1.0"; }
+    private static String getNativeLibraryName() { return "opencv_java410"; }
+    private static int getVersionMajorJ() { return 4; }
+    private static int getVersionMinorJ() { return 1; }
+    private static int getVersionRevisionJ() { return 0; }
+    private static String getVersionStatusJ() { return ""; }
+
+    public static final String VERSION = getVersion();
+    public static final String NATIVE_LIBRARY_NAME = getNativeLibraryName();
+    public static final int VERSION_MAJOR = getVersionMajorJ();
+    public static final int VERSION_MINOR = getVersionMinorJ();
+    public static final int VERSION_REVISION = getVersionRevisionJ();
+    public static final String VERSION_STATUS = getVersionStatusJ();
+
+    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;
+
+
+    // C++: enum DecompTypes
+    public static final int
+            DECOMP_LU = 0,
+            DECOMP_SVD = 1,
+            DECOMP_EIG = 2,
+            DECOMP_CHOLESKY = 3,
+            DECOMP_QR = 4,
+            DECOMP_NORMAL = 16;
+
+
+    // C++: enum BorderTypes
+    public static final int
+            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;
+
+
+    // C++: enum GemmFlags
+    public static final int
+            GEMM_1_T = 1,
+            GEMM_2_T = 2,
+            GEMM_3_T = 4;
+
+
+    // C++: enum KmeansFlags
+    public static final int
+            KMEANS_RANDOM_CENTERS = 0,
+            KMEANS_PP_CENTERS = 2,
+            KMEANS_USE_INITIAL_LABELS = 1;
+
+
+    // C++: enum CmpTypes
+    public static final int
+            CMP_EQ = 0,
+            CMP_GT = 1,
+            CMP_GE = 2,
+            CMP_LT = 3,
+            CMP_LE = 4,
+            CMP_NE = 5;
+
+
+    // C++: enum Flags
+    public static final int
+            PCA_DATA_AS_ROW = 0,
+            PCA_DATA_AS_COL = 1,
+            PCA_USE_AVG = 2;
+
+
+    // C++: enum DftFlags
+    public static final int
+            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;
+
+
+    // C++: enum <unnamed>
+    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,
+            RNG_UNIFORM = 0,
+            RNG_NORMAL = 1;
+
+
+    // C++: enum IMPL
+    public static final int
+            IMPL_PLAIN = 0,
+            IMPL_IPP = 0+1,
+            IMPL_OPENCL = 0+2;
+
+
+    // C++: enum FLAGS
+    public static final int
+            FLAGS_NONE = 0,
+            FLAGS_MAPPING = 0x01,
+            FLAGS_EXPAND_SAME_NAMES = 0x02;
+
+
+    // C++: enum TYPE
+    public static final int
+            TYPE_GENERAL = 0,
+            TYPE_MARKER = 0+1,
+            TYPE_WRAPPER = 0+2,
+            TYPE_FUN = 0+3;
+
+
+    // C++: enum FormatType
+    public static final int
+            Formatter_FMT_DEFAULT = 0,
+            Formatter_FMT_MATLAB = 1,
+            Formatter_FMT_CSV = 2,
+            Formatter_FMT_PYTHON = 3,
+            Formatter_FMT_NUMPY = 4,
+            Formatter_FMT_C = 5;
+
+
+    // C++: enum SortFlags
+    public static final int
+            SORT_EVERY_ROW = 0,
+            SORT_EVERY_COLUMN = 1,
+            SORT_ASCENDING = 0,
+            SORT_DESCENDING = 16;
+
+
+    // C++: enum CovarFlags
+    public static final int
+            COVAR_SCRAMBLED = 0,
+            COVAR_NORMAL = 1,
+            COVAR_USE_AVG = 2,
+            COVAR_SCALE = 4,
+            COVAR_ROWS = 8,
+            COVAR_COLS = 16;
+
+
+    // C++: enum Param
+    public static final int
+            Param_INT = 0,
+            Param_BOOLEAN = 1,
+            Param_REAL = 2,
+            Param_STRING = 3,
+            Param_MAT = 4,
+            Param_MAT_VECTOR = 5,
+            Param_ALGORITHM = 6,
+            Param_FLOAT = 7,
+            Param_UNSIGNED_INT = 8,
+            Param_UINT64 = 9,
+            Param_UCHAR = 11,
+            Param_SCALAR = 12;
+
+
+    // C++: enum NormTypes
+    public static final int
+            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;
+
+
+    // C++: enum RotateFlags
+    public static final int
+            ROTATE_90_CLOCKWISE = 0,
+            ROTATE_180 = 1,
+            ROTATE_90_COUNTERCLOCKWISE = 2;
+
+
+    // C++: enum Code
+    public static final int
+            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;
+
+
+    //
+    // C++:  Scalar cv::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 cv::sum(Mat src)
+    //
+
+    //javadoc: sumElems(src)
+    public static Scalar sumElems(Mat src)
+    {
+        
+        Scalar retVal = new Scalar(sumElems_0(src.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Scalar cv::trace(Mat mtx)
+    //
+
+    //javadoc: trace(mtx)
+    public static Scalar trace(Mat mtx)
+    {
+        
+        Scalar retVal = new Scalar(trace_0(mtx.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  String cv::getBuildInformation()
+    //
+
+    //javadoc: getBuildInformation()
+    public static String getBuildInformation()
+    {
+        
+        String retVal = getBuildInformation_0();
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  String cv::getHardwareFeatureName(int feature)
+    //
+
+    //javadoc: getHardwareFeatureName(feature)
+    public static String getHardwareFeatureName(int feature)
+    {
+        
+        String retVal = getHardwareFeatureName_0(feature);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  String cv::getVersionString()
+    //
+
+    //javadoc: getVersionString()
+    public static String getVersionString()
+    {
+        
+        String retVal = getVersionString_0();
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  String cv::ipp::getIppVersion()
+    //
+
+    //javadoc: getIppVersion()
+    public static String getIppVersion()
+    {
+        
+        String retVal = getIppVersion_0();
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  String cv::samples::findFile(String relative_path, bool required = true, bool silentMode = false)
+    //
+
+    //javadoc: findFile(relative_path, required, silentMode)
+    public static String findFile(String relative_path, boolean required, boolean silentMode)
+    {
+        
+        String retVal = findFile_0(relative_path, required, silentMode);
+        
+        return retVal;
+    }
+
+    //javadoc: findFile(relative_path, required)
+    public static String findFile(String relative_path, boolean required)
+    {
+        
+        String retVal = findFile_1(relative_path, required);
+        
+        return retVal;
+    }
+
+    //javadoc: findFile(relative_path)
+    public static String findFile(String relative_path)
+    {
+        
+        String retVal = findFile_2(relative_path);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  String cv::samples::findFileOrKeep(String relative_path, bool silentMode = false)
+    //
+
+    //javadoc: findFileOrKeep(relative_path, silentMode)
+    public static String findFileOrKeep(String relative_path, boolean silentMode)
+    {
+        
+        String retVal = findFileOrKeep_0(relative_path, silentMode);
+        
+        return retVal;
+    }
+
+    //javadoc: findFileOrKeep(relative_path)
+    public static String findFileOrKeep(String relative_path)
+    {
+        
+        String retVal = findFileOrKeep_1(relative_path);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::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, quiet, minVal)
+    public static boolean checkRange(Mat a, boolean quiet, double minVal)
+    {
+        
+        boolean retVal = checkRange_1(a.nativeObj, quiet, minVal);
+        
+        return retVal;
+    }
+
+    //javadoc: checkRange(a, quiet)
+    public static boolean checkRange(Mat a, boolean quiet)
+    {
+        
+        boolean retVal = checkRange_2(a.nativeObj, quiet);
+        
+        return retVal;
+    }
+
+    //javadoc: checkRange(a)
+    public static boolean checkRange(Mat a)
+    {
+        
+        boolean retVal = checkRange_4(a.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::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 cv::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 cv::ipp::useIPP()
+    //
+
+    //javadoc: useIPP()
+    public static boolean useIPP()
+    {
+        
+        boolean retVal = useIPP_0();
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::ipp::useIPP_NotExact()
+    //
+
+    //javadoc: useIPP_NotExact()
+    public static boolean useIPP_NotExact()
+    {
+        
+        boolean retVal = useIPP_NotExact_0();
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::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 cv::PSNR(Mat src1, Mat src2, double R = 255.)
+    //
+
+    //javadoc: PSNR(src1, src2, R)
+    public static double PSNR(Mat src1, Mat src2, double R)
+    {
+        
+        double retVal = PSNR_0(src1.nativeObj, src2.nativeObj, R);
+        
+        return retVal;
+    }
+
+    //javadoc: PSNR(src1, src2)
+    public static double PSNR(Mat src1, Mat src2)
+    {
+        
+        double retVal = PSNR_1(src1.nativeObj, src2.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::determinant(Mat mtx)
+    //
+
+    //javadoc: determinant(mtx)
+    public static double determinant(Mat mtx)
+    {
+        
+        double retVal = determinant_0(mtx.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::getTickFrequency()
+    //
+
+    //javadoc: getTickFrequency()
+    public static double getTickFrequency()
+    {
+        
+        double retVal = getTickFrequency_0();
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::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 cv::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 cv::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 cv::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 cv::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 cv::cubeRoot(float val)
+    //
+
+    //javadoc: cubeRoot(val)
+    public static float cubeRoot(float val)
+    {
+        
+        float retVal = cubeRoot_0(val);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::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 cv::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 cv::countNonZero(Mat src)
+    //
+
+    //javadoc: countNonZero(src)
+    public static int countNonZero(Mat src)
+    {
+        
+        int retVal = countNonZero_0(src.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::getNumThreads()
+    //
+
+    //javadoc: getNumThreads()
+    public static int getNumThreads()
+    {
+        
+        int retVal = getNumThreads_0();
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::getNumberOfCPUs()
+    //
+
+    //javadoc: getNumberOfCPUs()
+    public static int getNumberOfCPUs()
+    {
+        
+        int retVal = getNumberOfCPUs_0();
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::getOptimalDFTSize(int vecsize)
+    //
+
+    //javadoc: getOptimalDFTSize(vecsize)
+    public static int getOptimalDFTSize(int vecsize)
+    {
+        
+        int retVal = getOptimalDFTSize_0(vecsize);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::getThreadNum()
+    //
+
+    //javadoc: getThreadNum()
+    @Deprecated
+    public static int getThreadNum()
+    {
+        
+        int retVal = getThreadNum_0();
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::getVersionMajor()
+    //
+
+    //javadoc: getVersionMajor()
+    public static int getVersionMajor()
+    {
+        
+        int retVal = getVersionMajor_0();
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::getVersionMinor()
+    //
+
+    //javadoc: getVersionMinor()
+    public static int getVersionMinor()
+    {
+        
+        int retVal = getVersionMinor_0();
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::getVersionRevision()
+    //
+
+    //javadoc: getVersionRevision()
+    public static int getVersionRevision()
+    {
+        
+        int retVal = getVersionRevision_0();
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::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 cv::getCPUTickCount()
+    //
+
+    //javadoc: getCPUTickCount()
+    public static long getCPUTickCount()
+    {
+        
+        long retVal = getCPUTickCount_0();
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int64 cv::getTickCount()
+    //
+
+    //javadoc: getTickCount()
+    public static long getTickCount()
+    {
+        
+        long retVal = getTickCount_0();
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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 cv::PCACompute(Mat data, Mat& mean, Mat& eigenvectors, Mat& eigenvalues, double retainedVariance)
+    //
+
+    //javadoc: PCACompute2(data, mean, eigenvectors, eigenvalues, retainedVariance)
+    public static void PCACompute2(Mat data, Mat mean, Mat eigenvectors, Mat eigenvalues, double retainedVariance)
+    {
+        
+        PCACompute2_0(data.nativeObj, mean.nativeObj, eigenvectors.nativeObj, eigenvalues.nativeObj, retainedVariance);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::PCACompute(Mat data, Mat& mean, Mat& eigenvectors, Mat& eigenvalues, int maxComponents = 0)
+    //
+
+    //javadoc: PCACompute2(data, mean, eigenvectors, eigenvalues, maxComponents)
+    public static void PCACompute2(Mat data, Mat mean, Mat eigenvectors, Mat eigenvalues, int maxComponents)
+    {
+        
+        PCACompute2_1(data.nativeObj, mean.nativeObj, eigenvectors.nativeObj, eigenvalues.nativeObj, maxComponents);
+        
+        return;
+    }
+
+    //javadoc: PCACompute2(data, mean, eigenvectors, eigenvalues)
+    public static void PCACompute2(Mat data, Mat mean, Mat eigenvectors, Mat eigenvalues)
+    {
+        
+        PCACompute2_2(data.nativeObj, mean.nativeObj, eigenvectors.nativeObj, eigenvalues.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::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, mask, update)
+    public static void batchDistance(Mat src1, Mat src2, Mat dist, int dtype, Mat nidx, int normType, int K, Mat mask, int update)
+    {
+        
+        batchDistance_1(src1.nativeObj, src2.nativeObj, dist.nativeObj, dtype, nidx.nativeObj, normType, K, mask.nativeObj, update);
+        
+        return;
+    }
+
+    //javadoc: batchDistance(src1, src2, dist, dtype, nidx, normType, K, mask)
+    public static void batchDistance(Mat src1, Mat src2, Mat dist, int dtype, Mat nidx, int normType, int K, Mat mask)
+    {
+        
+        batchDistance_2(src1.nativeObj, src2.nativeObj, dist.nativeObj, dtype, nidx.nativeObj, normType, K, mask.nativeObj);
+        
+        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_3(src1.nativeObj, src2.nativeObj, dist.nativeObj, dtype, nidx.nativeObj, normType, K);
+        
+        return;
+    }
+
+    //javadoc: batchDistance(src1, src2, dist, dtype, nidx, normType)
+    public static void batchDistance(Mat src1, Mat src2, Mat dist, int dtype, Mat nidx, int normType)
+    {
+        
+        batchDistance_4(src1.nativeObj, src2.nativeObj, dist.nativeObj, dtype, nidx.nativeObj, normType);
+        
+        return;
+    }
+
+    //javadoc: batchDistance(src1, src2, dist, dtype, nidx)
+    public static void batchDistance(Mat src1, Mat src2, Mat dist, int dtype, Mat nidx)
+    {
+        
+        batchDistance_5(src1.nativeObj, src2.nativeObj, dist.nativeObj, dtype, nidx.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::completeSymm(Mat& m, bool lowerToUpper = false)
+    //
+
+    //javadoc: completeSymm(m, lowerToUpper)
+    public static void completeSymm(Mat m, boolean lowerToUpper)
+    {
+        
+        completeSymm_0(m.nativeObj, lowerToUpper);
+        
+        return;
+    }
+
+    //javadoc: completeSymm(m)
+    public static void completeSymm(Mat m)
+    {
+        
+        completeSymm_1(m.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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, alpha)
+    public static void convertScaleAbs(Mat src, Mat dst, double alpha)
+    {
+        
+        convertScaleAbs_1(src.nativeObj, dst.nativeObj, alpha);
+        
+        return;
+    }
+
+    //javadoc: convertScaleAbs(src, dst)
+    public static void convertScaleAbs(Mat src, Mat dst)
+    {
+        
+        convertScaleAbs_2(src.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::copyTo(Mat src, Mat& dst, Mat mask)
+    //
+
+    //javadoc: copyTo(src, dst, mask)
+    public static void copyTo(Mat src, Mat dst, Mat mask)
+    {
+        
+        copyTo_0(src.nativeObj, dst.nativeObj, mask.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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, flags)
+    public static void dft(Mat src, Mat dst, int flags)
+    {
+        
+        dft_1(src.nativeObj, dst.nativeObj, flags);
+        
+        return;
+    }
+
+    //javadoc: dft(src, dst)
+    public static void dft(Mat src, Mat dst)
+    {
+        
+        dft_2(src.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::hconcat(vector_Mat src, Mat& dst)
+    //
+
+    //javadoc: hconcat(src, dst)
+    public static void hconcat(List<Mat> src, Mat dst)
+    {
+        Mat src_mat = Converters.vector_Mat_to_Mat(src);
+        hconcat_0(src_mat.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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, flags)
+    public static void idft(Mat src, Mat dst, int flags)
+    {
+        
+        idft_1(src.nativeObj, dst.nativeObj, flags);
+        
+        return;
+    }
+
+    //javadoc: idft(src, dst)
+    public static void idft(Mat src, Mat dst)
+    {
+        
+        idft_2(src.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::merge(vector_Mat mv, Mat& dst)
+    //
+
+    //javadoc: merge(mv, dst)
+    public static void merge(List<Mat> mv, Mat dst)
+    {
+        Mat mv_mat = Converters.vector_Mat_to_Mat(mv);
+        merge_0(mv_mat.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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 cv::mixChannels(vector_Mat src, vector_Mat dst, vector_int fromTo)
+    //
+
+    //javadoc: mixChannels(src, dst, fromTo)
+    public static void mixChannels(List<Mat> src, List<Mat> dst, MatOfInt fromTo)
+    {
+        Mat src_mat = Converters.vector_Mat_to_Mat(src);
+        Mat dst_mat = Converters.vector_Mat_to_Mat(dst);
+        Mat fromTo_mat = fromTo;
+        mixChannels_0(src_mat.nativeObj, dst_mat.nativeObj, fromTo_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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, delta)
+    public static void mulTransposed(Mat src, Mat dst, boolean aTa, Mat delta)
+    {
+        
+        mulTransposed_2(src.nativeObj, dst.nativeObj, aTa, delta.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: mulTransposed(src, dst, aTa)
+    public static void mulTransposed(Mat src, Mat dst, boolean aTa)
+    {
+        
+        mulTransposed_3(src.nativeObj, dst.nativeObj, aTa);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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 cv::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, alpha, beta)
+    public static void normalize(Mat src, Mat dst, double alpha, double beta)
+    {
+        
+        normalize_3(src.nativeObj, dst.nativeObj, alpha, beta);
+        
+        return;
+    }
+
+    //javadoc: normalize(src, dst, alpha)
+    public static void normalize(Mat src, Mat dst, double alpha)
+    {
+        
+        normalize_4(src.nativeObj, dst.nativeObj, alpha);
+        
+        return;
+    }
+
+    //javadoc: normalize(src, dst)
+    public static void normalize(Mat src, Mat dst)
+    {
+        
+        normalize_5(src.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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 cv::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 cv::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 cv::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 cv::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_2(dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::setErrorVerbosity(bool verbose)
+    //
+
+    //javadoc: setErrorVerbosity(verbose)
+    public static void setErrorVerbosity(boolean verbose)
+    {
+        
+        setErrorVerbosity_0(verbose);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::setNumThreads(int nthreads)
+    //
+
+    //javadoc: setNumThreads(nthreads)
+    public static void setNumThreads(int nthreads)
+    {
+        
+        setNumThreads_0(nthreads);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::setRNGSeed(int seed)
+    //
+
+    //javadoc: setRNGSeed(seed)
+    public static void setRNGSeed(int seed)
+    {
+        
+        setRNGSeed_0(seed);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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 cv::split(Mat m, vector_Mat& mv)
+    //
+
+    //javadoc: split(m, mv)
+    public static void split(Mat m, List<Mat> mv)
+    {
+        Mat mv_mat = new Mat();
+        split_0(m.nativeObj, mv_mat.nativeObj);
+        Converters.Mat_to_vector_Mat(mv_mat, mv);
+        mv_mat.release();
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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 cv::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 cv::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 cv::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 cv::vconcat(vector_Mat src, Mat& dst)
+    //
+
+    //javadoc: vconcat(src, dst)
+    public static void vconcat(List<Mat> src, Mat dst)
+    {
+        Mat src_mat = Converters.vector_Mat_to_Mat(src);
+        vconcat_0(src_mat.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ipp::setUseIPP(bool flag)
+    //
+
+    //javadoc: setUseIPP(flag)
+    public static void setUseIPP(boolean flag)
+    {
+        
+        setUseIPP_0(flag);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ipp::setUseIPP_NotExact(bool flag)
+    //
+
+    //javadoc: setUseIPP_NotExact(flag)
+    public static void setUseIPP_NotExact(boolean flag)
+    {
+        
+        setUseIPP_NotExact_0(flag);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::samples::addSamplesDataSearchPath(String path)
+    //
+
+    //javadoc: addSamplesDataSearchPath(path)
+    public static void addSamplesDataSearchPath(String path)
+    {
+        
+        addSamplesDataSearchPath_0(path);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::samples::addSamplesDataSearchSubDirectory(String subdir)
+    //
+
+    //javadoc: addSamplesDataSearchSubDirectory(subdir)
+    public static void addSamplesDataSearchSubDirectory(String subdir)
+    {
+        
+        addSamplesDataSearchSubDirectory_0(subdir);
+        
+        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 cv::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 cv::sum(Mat src)
+    private static native double[] sumElems_0(long src_nativeObj);
+
+    // C++:  Scalar cv::trace(Mat mtx)
+    private static native double[] trace_0(long mtx_nativeObj);
+
+    // C++:  String cv::getBuildInformation()
+    private static native String getBuildInformation_0();
+
+    // C++:  String cv::getHardwareFeatureName(int feature)
+    private static native String getHardwareFeatureName_0(int feature);
+
+    // C++:  String cv::getVersionString()
+    private static native String getVersionString_0();
+
+    // C++:  String cv::ipp::getIppVersion()
+    private static native String getIppVersion_0();
+
+    // C++:  String cv::samples::findFile(String relative_path, bool required = true, bool silentMode = false)
+    private static native String findFile_0(String relative_path, boolean required, boolean silentMode);
+    private static native String findFile_1(String relative_path, boolean required);
+    private static native String findFile_2(String relative_path);
+
+    // C++:  String cv::samples::findFileOrKeep(String relative_path, bool silentMode = false)
+    private static native String findFileOrKeep_0(String relative_path, boolean silentMode);
+    private static native String findFileOrKeep_1(String relative_path);
+
+    // C++:  bool cv::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, boolean quiet, double minVal);
+    private static native boolean checkRange_2(long a_nativeObj, boolean quiet);
+    private static native boolean checkRange_4(long a_nativeObj);
+
+    // C++:  bool cv::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 cv::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 cv::ipp::useIPP()
+    private static native boolean useIPP_0();
+
+    // C++:  bool cv::ipp::useIPP_NotExact()
+    private static native boolean useIPP_NotExact_0();
+
+    // C++:  double cv::Mahalanobis(Mat v1, Mat v2, Mat icovar)
+    private static native double Mahalanobis_0(long v1_nativeObj, long v2_nativeObj, long icovar_nativeObj);
+
+    // C++:  double cv::PSNR(Mat src1, Mat src2, double R = 255.)
+    private static native double PSNR_0(long src1_nativeObj, long src2_nativeObj, double R);
+    private static native double PSNR_1(long src1_nativeObj, long src2_nativeObj);
+
+    // C++:  double cv::determinant(Mat mtx)
+    private static native double determinant_0(long mtx_nativeObj);
+
+    // C++:  double cv::getTickFrequency()
+    private static native double getTickFrequency_0();
+
+    // C++:  double cv::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 cv::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 cv::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 cv::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 cv::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 cv::cubeRoot(float val)
+    private static native float cubeRoot_0(float val);
+
+    // C++:  float cv::fastAtan2(float y, float x)
+    private static native float fastAtan2_0(float y, float x);
+
+    // C++:  int cv::borderInterpolate(int p, int len, int borderType)
+    private static native int borderInterpolate_0(int p, int len, int borderType);
+
+    // C++:  int cv::countNonZero(Mat src)
+    private static native int countNonZero_0(long src_nativeObj);
+
+    // C++:  int cv::getNumThreads()
+    private static native int getNumThreads_0();
+
+    // C++:  int cv::getNumberOfCPUs()
+    private static native int getNumberOfCPUs_0();
+
+    // C++:  int cv::getOptimalDFTSize(int vecsize)
+    private static native int getOptimalDFTSize_0(int vecsize);
+
+    // C++:  int cv::getThreadNum()
+    private static native int getThreadNum_0();
+
+    // C++:  int cv::getVersionMajor()
+    private static native int getVersionMajor_0();
+
+    // C++:  int cv::getVersionMinor()
+    private static native int getVersionMinor_0();
+
+    // C++:  int cv::getVersionRevision()
+    private static native int getVersionRevision_0();
+
+    // C++:  int cv::solveCubic(Mat coeffs, Mat& roots)
+    private static native int solveCubic_0(long coeffs_nativeObj, long roots_nativeObj);
+
+    // C++:  int64 cv::getCPUTickCount()
+    private static native long getCPUTickCount_0();
+
+    // C++:  int64 cv::getTickCount()
+    private static native long getTickCount_0();
+
+    // C++:  void cv::LUT(Mat src, Mat lut, Mat& dst)
+    private static native void LUT_0(long src_nativeObj, long lut_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::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 cv::PCACompute(Mat data, Mat& mean, Mat& eigenvectors, Mat& eigenvalues, double retainedVariance)
+    private static native void PCACompute2_0(long data_nativeObj, long mean_nativeObj, long eigenvectors_nativeObj, long eigenvalues_nativeObj, double retainedVariance);
+
+    // C++:  void cv::PCACompute(Mat data, Mat& mean, Mat& eigenvectors, Mat& eigenvalues, int maxComponents = 0)
+    private static native void PCACompute2_1(long data_nativeObj, long mean_nativeObj, long eigenvectors_nativeObj, long eigenvalues_nativeObj, int maxComponents);
+    private static native void PCACompute2_2(long data_nativeObj, long mean_nativeObj, long eigenvectors_nativeObj, long eigenvalues_nativeObj);
+
+    // C++:  void cv::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 cv::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 cv::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 cv::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 cv::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 cv::absdiff(Mat src1, Mat src2, Mat& dst)
+    private static native void absdiff_0(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::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 cv::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 cv::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 cv::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 cv::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, long mask_nativeObj, int update);
+    private static native void batchDistance_2(long src1_nativeObj, long src2_nativeObj, long dist_nativeObj, int dtype, long nidx_nativeObj, int normType, int K, long mask_nativeObj);
+    private static native void batchDistance_3(long src1_nativeObj, long src2_nativeObj, long dist_nativeObj, int dtype, long nidx_nativeObj, int normType, int K);
+    private static native void batchDistance_4(long src1_nativeObj, long src2_nativeObj, long dist_nativeObj, int dtype, long nidx_nativeObj, int normType);
+    private static native void batchDistance_5(long src1_nativeObj, long src2_nativeObj, long dist_nativeObj, int dtype, long nidx_nativeObj);
+
+    // C++:  void cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::completeSymm(Mat& m, bool lowerToUpper = false)
+    private static native void completeSymm_0(long m_nativeObj, boolean lowerToUpper);
+    private static native void completeSymm_1(long m_nativeObj);
+
+    // C++:  void cv::convertFp16(Mat src, Mat& dst)
+    private static native void convertFp16_0(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::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, double alpha);
+    private static native void convertScaleAbs_2(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::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 cv::copyTo(Mat src, Mat& dst, Mat mask)
+    private static native void copyTo_0(long src_nativeObj, long dst_nativeObj, long mask_nativeObj);
+
+    // C++:  void cv::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 cv::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, int flags);
+    private static native void dft_2(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::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 cv::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 cv::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 cv::eigenNonSymmetric(Mat src, Mat& eigenvalues, Mat& eigenvectors)
+    private static native void eigenNonSymmetric_0(long src_nativeObj, long eigenvalues_nativeObj, long eigenvectors_nativeObj);
+
+    // C++:  void cv::exp(Mat src, Mat& dst)
+    private static native void exp_0(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::extractChannel(Mat src, Mat& dst, int coi)
+    private static native void extractChannel_0(long src_nativeObj, long dst_nativeObj, int coi);
+
+    // C++:  void cv::findNonZero(Mat src, Mat& idx)
+    private static native void findNonZero_0(long src_nativeObj, long idx_nativeObj);
+
+    // C++:  void cv::flip(Mat src, Mat& dst, int flipCode)
+    private static native void flip_0(long src_nativeObj, long dst_nativeObj, int flipCode);
+
+    // C++:  void cv::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 cv::hconcat(vector_Mat src, Mat& dst)
+    private static native void hconcat_0(long src_mat_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::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 cv::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, int flags);
+    private static native void idft_2(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::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 cv::insertChannel(Mat src, Mat& dst, int coi)
+    private static native void insertChannel_0(long src_nativeObj, long dst_nativeObj, int coi);
+
+    // C++:  void cv::log(Mat src, Mat& dst)
+    private static native void log_0(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::magnitude(Mat x, Mat y, Mat& magnitude)
+    private static native void magnitude_0(long x_nativeObj, long y_nativeObj, long magnitude_nativeObj);
+
+    // C++:  void cv::max(Mat src1, Mat src2, Mat& dst)
+    private static native void max_0(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::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 cv::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 cv::merge(vector_Mat mv, Mat& dst)
+    private static native void merge_0(long mv_mat_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::min(Mat src1, Mat src2, Mat& dst)
+    private static native void min_0(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::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 cv::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 cv::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 cv::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, long delta_nativeObj);
+    private static native void mulTransposed_3(long src_nativeObj, long dst_nativeObj, boolean aTa);
+
+    // C++:  void cv::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 cv::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 cv::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, double alpha, double beta);
+    private static native void normalize_4(long src_nativeObj, long dst_nativeObj, double alpha);
+    private static native void normalize_5(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::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 cv::perspectiveTransform(Mat src, Mat& dst, Mat m)
+    private static native void perspectiveTransform_0(long src_nativeObj, long dst_nativeObj, long m_nativeObj);
+
+    // C++:  void cv::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 cv::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 cv::pow(Mat src, double power, Mat& dst)
+    private static native void pow_0(long src_nativeObj, double power, long dst_nativeObj);
+
+    // C++:  void cv::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_2(long dst_nativeObj);
+
+    // C++:  void cv::randn(Mat& dst, double mean, double stddev)
+    private static native void randn_0(long dst_nativeObj, double mean, double stddev);
+
+    // C++:  void cv::randu(Mat& dst, double low, double high)
+    private static native void randu_0(long dst_nativeObj, double low, double high);
+
+    // C++:  void cv::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 cv::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 cv::rotate(Mat src, Mat& dst, int rotateCode)
+    private static native void rotate_0(long src_nativeObj, long dst_nativeObj, int rotateCode);
+
+    // C++:  void cv::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 cv::setErrorVerbosity(bool verbose)
+    private static native void setErrorVerbosity_0(boolean verbose);
+
+    // C++:  void cv::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 cv::setNumThreads(int nthreads)
+    private static native void setNumThreads_0(int nthreads);
+
+    // C++:  void cv::setRNGSeed(int seed)
+    private static native void setRNGSeed_0(int seed);
+
+    // C++:  void cv::sort(Mat src, Mat& dst, int flags)
+    private static native void sort_0(long src_nativeObj, long dst_nativeObj, int flags);
+
+    // C++:  void cv::sortIdx(Mat src, Mat& dst, int flags)
+    private static native void sortIdx_0(long src_nativeObj, long dst_nativeObj, int flags);
+
+    // C++:  void cv::split(Mat m, vector_Mat& mv)
+    private static native void split_0(long m_nativeObj, long mv_mat_nativeObj);
+
+    // C++:  void cv::sqrt(Mat src, Mat& dst)
+    private static native void sqrt_0(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::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 cv::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 cv::transform(Mat src, Mat& dst, Mat m)
+    private static native void transform_0(long src_nativeObj, long dst_nativeObj, long m_nativeObj);
+
+    // C++:  void cv::transpose(Mat src, Mat& dst)
+    private static native void transpose_0(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::vconcat(vector_Mat src, Mat& dst)
+    private static native void vconcat_0(long src_mat_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::ipp::setUseIPP(bool flag)
+    private static native void setUseIPP_0(boolean flag);
+
+    // C++:  void cv::ipp::setUseIPP_NotExact(bool flag)
+    private static native void setUseIPP_NotExact_0(boolean flag);
+
+    // C++:  void cv::samples::addSamplesDataSearchPath(String path)
+    private static native void addSamplesDataSearchPath_0(String path);
+
+    // C++:  void cv::samples::addSamplesDataSearchSubDirectory(String subdir)
+    private static native void addSamplesDataSearchSubDirectory_0(String subdir);
+private static native double[] n_minMaxLocManual(long src_nativeObj, long mask_nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/core/CvException.java b/opencv41/src/main/java/org/opencv/core/CvException.java
new file mode 100644 (file)
index 0000000..e9241e6
--- /dev/null
@@ -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/opencv41/src/main/java/org/opencv/core/CvType.java b/opencv41/src/main/java/org/opencv/core/CvType.java
new file mode 100644 (file)
index 0000000..748c1cd
--- /dev/null
@@ -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/opencv41/src/main/java/org/opencv/core/DMatch.java b/opencv41/src/main/java/org/opencv/core/DMatch.java
new file mode 100644 (file)
index 0000000..db44d9a
--- /dev/null
@@ -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/opencv41/src/main/java/org/opencv/core/KeyPoint.java b/opencv41/src/main/java/org/opencv/core/KeyPoint.java
new file mode 100644 (file)
index 0000000..de5b215
--- /dev/null
@@ -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/opencv41/src/main/java/org/opencv/core/Mat.java b/opencv41/src/main/java/org/opencv/core/Mat.java
new file mode 100644 (file)
index 0000000..e42fca9
--- /dev/null
@@ -0,0 +1,1723 @@
+package org.opencv.core;
+
+import java.nio.ByteBuffer;
+
+// 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(int rows, int cols, int type, void* data)
+    //
+
+    // javadoc: Mat::Mat(rows, cols, type, data)
+    public Mat(int rows, int cols, int type, ByteBuffer data)
+    {
+
+        nativeObj = n_Mat(rows, cols, type, data);
+
+        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 ndims, const int* sizes, int type)
+    //
+
+    // javadoc: Mat::Mat(sizes, type)
+    public Mat(int[] sizes, int type)
+    {
+
+        nativeObj = n_Mat(sizes.length, sizes, 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(int ndims, const int* sizes, int type, Scalar s)
+    //
+
+    // javadoc: Mat::Mat(sizes, type, s)
+    public Mat(int[] sizes, int type, Scalar s)
+    {
+
+        nativeObj = n_Mat(sizes.length, sizes, 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(const Mat& m, const std::vector<Range>& ranges)
+    //
+
+    // javadoc: Mat::Mat(m, ranges)
+    public Mat(Mat m, Range[] ranges)
+    {
+
+        nativeObj = n_Mat(m.nativeObj, ranges);
+
+        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++: void Mat::create(int ndims, const int* sizes, int type)
+    //
+
+    // javadoc: Mat::create(sizes, type)
+    public void create(int[] sizes, int type)
+    {
+
+        n_create(nativeObj, sizes.length, sizes, type);
+
+        return;
+    }
+
+    //
+    // C++: void Mat::copySize(const Mat& m);
+    //
+
+    // javadoc: Mat::copySize(m)
+    public void copySize(Mat m)
+    {
+        n_copySize(nativeObj, m.nativeObj);
+
+        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++: static Mat Mat::ones(int ndims, const int* sizes, int type)
+    //
+
+    // javadoc: Mat::ones(sizes, type)
+    public static Mat ones(int[] sizes, int type)
+    {
+
+        Mat retVal = new Mat(n_ones(sizes.length, sizes, 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::reshape(int cn, int newndims, const int* newsz)
+    //
+
+    // javadoc: Mat::reshape(cn, newshape)
+    public Mat reshape(int cn, int[] newshape)
+    {
+        Mat retVal = new Mat(n_reshape_1(nativeObj, cn, newshape.length, newshape));
+
+        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++: int Mat::size(int i)
+    //
+
+    // javadoc: Mat::size(int i)
+    public int size(int i)
+    {
+        int retVal = n_size_i(nativeObj, i);
+
+        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()(const std::vector<Range>& ranges)
+    //
+
+    // javadoc: Mat::operator()(ranges[])
+    public Mat submat(Range[] ranges)
+    {
+
+        Mat retVal = new Mat(n_submat_ranges(nativeObj, ranges));
+
+        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;
+    }
+
+    //
+    // C++: static Mat Mat::zeros(int ndims, const int* sizes, int type)
+    //
+
+    // javadoc: Mat::zeros(sizes, type)
+    public static Mat zeros(int[] sizes, int type)
+    {
+
+        Mat retVal = new Mat(n_zeros(sizes.length, sizes, 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(idx,data)
+    public int put(int[] idx, 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 (idx.length != dims())
+            throw new IllegalArgumentException("Incorrect number of indices");
+        return nPutDIdx(nativeObj, idx, 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(idx,data)
+    public int put(int[] idx, 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 (idx.length != dims())
+            throw new IllegalArgumentException("Incorrect number of indices");
+        if (CvType.depth(t) == CvType.CV_32F) {
+            return nPutFIdx(nativeObj, idx, 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(idx,data)
+    public int put(int[] idx, 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 (idx.length != dims())
+            throw new IllegalArgumentException("Incorrect number of indices");
+        if (CvType.depth(t) == CvType.CV_32S) {
+            return nPutIIdx(nativeObj, idx, 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(idx,data)
+    public int put(int[] idx, 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 (idx.length != dims())
+            throw new IllegalArgumentException("Incorrect number of indices");
+        if (CvType.depth(t) == CvType.CV_16U || CvType.depth(t) == CvType.CV_16S) {
+            return nPutSIdx(nativeObj, idx, 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::put(idx,data)
+    public int put(int[] idx, 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 (idx.length != dims())
+            throw new IllegalArgumentException("Incorrect number of indices");
+        if (CvType.depth(t) == CvType.CV_8U || CvType.depth(t) == CvType.CV_8S) {
+            return nPutBIdx(nativeObj, idx, data.length, data);
+        }
+        throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+    }
+
+    // javadoc:Mat::put(row,col,data,offset,length)
+    public int put(int row, int col, byte[] data, int offset, int length) {
+        int t = type();
+        if (data == null || 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 nPutBwOffset(nativeObj, row, col, length, offset, data);
+        }
+        throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+    }
+
+    // javadoc:Mat::put(idx,data,offset,length)
+    public int put(int[] idx, byte[] data, int offset, int length) {
+        int t = type();
+        if (data == null || 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 (idx.length != dims())
+            throw new IllegalArgumentException("Incorrect number of indices");
+        if (CvType.depth(t) == CvType.CV_8U || CvType.depth(t) == CvType.CV_8S) {
+            return nPutBwIdxOffset(nativeObj, idx, length, offset, 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(idx,data)
+    public int get(int[] idx, 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 (idx.length != dims())
+            throw new IllegalArgumentException("Incorrect number of indices");
+        if (CvType.depth(t) == CvType.CV_8U || CvType.depth(t) == CvType.CV_8S) {
+            return nGetBIdx(nativeObj, idx, 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(idx,data)
+    public int get(int[] idx, 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 (idx.length != dims())
+            throw new IllegalArgumentException("Incorrect number of indices");
+        if (CvType.depth(t) == CvType.CV_16U || CvType.depth(t) == CvType.CV_16S) {
+            return nGetSIdx(nativeObj, idx, 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(idx,data)
+    public int get(int[] idx, 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 (idx.length != dims())
+            throw new IllegalArgumentException("Incorrect number of indices");
+        if (CvType.depth(t) == CvType.CV_32S) {
+            return nGetIIdx(nativeObj, idx, 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(idx,data)
+    public int get(int[] idx, 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 (idx.length != dims())
+            throw new IllegalArgumentException("Incorrect number of indices");
+        if (CvType.depth(t) == CvType.CV_32F) {
+            return nGetFIdx(nativeObj, idx, 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(idx,data)
+    public int get(int[] idx, 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 (idx.length != dims())
+            throw new IllegalArgumentException("Incorrect number of indices");
+        if (CvType.depth(t) == CvType.CV_64F) {
+            return nGetDIdx(nativeObj, idx, 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::get(idx)
+    public double[] get(int[] idx) {
+        if (idx.length != dims())
+            throw new IllegalArgumentException("Incorrect number of indices");
+        return nGetIdx(nativeObj, idx);
+    }
+
+    // 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(int ndims, const int* sizes, int type)
+    private static native long n_Mat(int ndims, int[] sizes, int type);
+
+    // C++: Mat::Mat(int rows, int cols, int type, void* data)
+    private static native long n_Mat(int rows, int cols, int type, ByteBuffer data);
+
+    // 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(int ndims, const int* sizes, int type, Scalar s)
+    private static native long n_Mat(int ndims, int[] sizes, 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(const Mat& m, const std::vector<Range>& ranges)
+    private static native long n_Mat(long m_nativeObj, Range[] ranges);
+
+    // 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++: void Mat::create(int ndims, const int* sizes, int type)
+    private static native void n_create(long nativeObj, int ndims, int[] sizes, int type);
+
+    // C++: void Mat::copySize(const Mat& m)
+    private static native void n_copySize(long nativeObj, long m_nativeObj);
+
+    // 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++: static Mat Mat::ones(int ndims, const int* sizes, int type)
+    private static native long n_ones(int ndims, int[] sizes, 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::reshape(int cn, int newndims, const int* newsz)
+    private static native long n_reshape_1(long nativeObj, int cn, int newndims, int[] newsz);
+
+    // 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++: int Mat::size(int i)
+    private static native int n_size_i(long nativeObj, int i);
+
+    // 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()(const std::vector<Range>& ranges)
+    private static native long n_submat_ranges(long nativeObj, Range[] ranges);
+
+    // 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);
+
+    // C++: static Mat Mat::zeros(int ndims, const int* sizes, int type)
+    private static native long n_zeros(int ndims, int[] sizes, 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 nPutDIdx(long self, int[] idx, int count, double[] data);
+
+    private static native int nPutF(long self, int row, int col, int count, float[] data);
+
+    private static native int nPutFIdx(long self, int[] idx, int count, float[] data);
+
+    private static native int nPutI(long self, int row, int col, int count, int[] data);
+
+    private static native int nPutIIdx(long self, int[] idx, int count, int[] data);
+
+    private static native int nPutS(long self, int row, int col, int count, short[] data);
+
+    private static native int nPutSIdx(long self, int[] idx, int count, short[] data);
+
+    private static native int nPutB(long self, int row, int col, int count, byte[] data);
+
+    private static native int nPutBIdx(long self, int[] idx, int count, byte[] data);
+
+    private static native int nPutBwOffset(long self, int row, int col, int count, int offset, byte[] data);
+
+    private static native int nPutBwIdxOffset(long self, int[] idx, int count, int offset, byte[] data);
+
+    private static native int nGetB(long self, int row, int col, int count, byte[] vals);
+
+    private static native int nGetBIdx(long self, int[] idx, int count, byte[] vals);
+
+    private static native int nGetS(long self, int row, int col, int count, short[] vals);
+
+    private static native int nGetSIdx(long self, int[] idx, int count, short[] vals);
+
+    private static native int nGetI(long self, int row, int col, int count, int[] vals);
+
+    private static native int nGetIIdx(long self, int[] idx, int count, int[] vals);
+
+    private static native int nGetF(long self, int row, int col, int count, float[] vals);
+
+    private static native int nGetFIdx(long self, int[] idx, int count, float[] vals);
+
+    private static native int nGetD(long self, int row, int col, int count, double[] vals);
+
+    private static native int nGetDIdx(long self, int[] idx, int count, double[] vals);
+
+    private static native double[] nGet(long self, int row, int col);
+
+    private static native double[] nGetIdx(long self, int[] idx);
+
+    private static native String nDump(long self);
+}
diff --git a/opencv41/src/main/java/org/opencv/core/MatOfByte.java b/opencv41/src/main/java/org/opencv/core/MatOfByte.java
new file mode 100644 (file)
index 0000000..eb928fb
--- /dev/null
@@ -0,0 +1,98 @@
+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 MatOfByte(int offset, int length, byte...a) {
+        super();
+        fromArray(offset, length, 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 void fromArray(int offset, int length, byte...a) {
+        if (offset < 0)
+            throw new IllegalArgumentException("offset < 0");
+        if (a == null)
+            throw new NullPointerException();
+        if (length < 0 || length + offset > a.length)
+            throw new IllegalArgumentException("invalid 'length' parameter: " + Integer.toString(length));
+        if (a.length == 0)
+            return;
+        int num = length / _channels;
+        alloc(num);
+        put(0, 0, a, offset, length); //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<Byte> 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<ab.length; i++)
+            a[i] = ab[i];
+        fromArray(a);
+    }
+
+    public List<Byte> toList() {
+        byte[] a = toArray();
+        Byte ab[] = new Byte[a.length];
+        for(int i=0; i<a.length; i++)
+            ab[i] = a[i];
+        return Arrays.asList(ab);
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/core/MatOfDMatch.java b/opencv41/src/main/java/org/opencv/core/MatOfDMatch.java
new file mode 100644 (file)
index 0000000..2c99e14
--- /dev/null
@@ -0,0 +1,83 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.opencv.core.DMatch;
+
+public class MatOfDMatch extends Mat {
+    // 32FC4
+    private static final int _depth = CvType.CV_32F;
+    private static final int _channels = 4;
+
+    public MatOfDMatch() {
+        super();
+    }
+
+    protected MatOfDMatch(long addr) {
+        super(addr);
+        if( !empty() && checkVector(_channels, _depth) < 0 )
+            throw new IllegalArgumentException("Incompatible Mat: " + toString());
+        //FIXME: do we need release() here?
+    }
+
+    public static MatOfDMatch fromNativeAddr(long addr) {
+        return new MatOfDMatch(addr);
+    }
+
+    public MatOfDMatch(Mat m) {
+        super(m, Range.all());
+        if( !empty() && checkVector(_channels, _depth) < 0 )
+            throw new IllegalArgumentException("Incompatible Mat: " + toString());
+        //FIXME: do we need release() here?
+    }
+
+    public MatOfDMatch(DMatch...ap) {
+        super();
+        fromArray(ap);
+    }
+
+    public void alloc(int elemNumber) {
+        if(elemNumber>0)
+            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<num; i++) {
+            DMatch m = a[i];
+            buff[_channels*i+0] = m.queryIdx;
+            buff[_channels*i+1] = m.trainIdx;
+            buff[_channels*i+2] = m.imgIdx;
+            buff[_channels*i+3] = m.distance;
+        }
+        put(0, 0, buff); //TODO: check ret val!
+    }
+
+    public DMatch[] toArray() {
+        int num = (int) total();
+        DMatch[] a = new DMatch[num];
+        if(num == 0)
+            return a;
+        float buff[] = new float[num * _channels];
+        get(0, 0, buff); //TODO: check ret val!
+        for(int i=0; i<num; i++)
+            a[i] = new DMatch((int) buff[_channels*i+0], (int) buff[_channels*i+1], (int) buff[_channels*i+2], buff[_channels*i+3]);
+        return a;
+    }
+
+    public void fromList(List<DMatch> ldm) {
+        DMatch adm[] = ldm.toArray(new DMatch[0]);
+        fromArray(adm);
+    }
+
+    public List<DMatch> toList() {
+        DMatch[] adm = toArray();
+        return Arrays.asList(adm);
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/core/MatOfDouble.java b/opencv41/src/main/java/org/opencv/core/MatOfDouble.java
new file mode 100644 (file)
index 0000000..1a8e23c
--- /dev/null
@@ -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<Double> 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<ab.length; i++)
+            a[i] = ab[i];
+        fromArray(a);
+    }
+
+    public List<Double> toList() {
+        double[] a = toArray();
+        Double ab[] = new Double[a.length];
+        for(int i=0; i<a.length; i++)
+            ab[i] = a[i];
+        return Arrays.asList(ab);
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/core/MatOfFloat.java b/opencv41/src/main/java/org/opencv/core/MatOfFloat.java
new file mode 100644 (file)
index 0000000..dfd6b84
--- /dev/null
@@ -0,0 +1,79 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class MatOfFloat extends Mat {
+    // 32FC1
+    private static final int _depth = CvType.CV_32F;
+    private static final int _channels = 1;
+
+    public MatOfFloat() {
+        super();
+    }
+
+    protected MatOfFloat(long addr) {
+        super(addr);
+        if( !empty() && checkVector(_channels, _depth) < 0 )
+            throw new IllegalArgumentException("Incompatible Mat");
+        //FIXME: do we need release() here?
+    }
+
+    public static MatOfFloat fromNativeAddr(long addr) {
+        return new MatOfFloat(addr);
+    }
+
+    public MatOfFloat(Mat m) {
+        super(m, Range.all());
+        if( !empty() && checkVector(_channels, _depth) < 0 )
+            throw new IllegalArgumentException("Incompatible Mat");
+        //FIXME: do we need release() here?
+    }
+
+    public MatOfFloat(float...a) {
+        super();
+        fromArray(a);
+    }
+
+    public void alloc(int elemNumber) {
+        if(elemNumber>0)
+            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<Float> 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<ab.length; i++)
+            a[i] = ab[i];
+        fromArray(a);
+    }
+
+    public List<Float> toList() {
+        float[] a = toArray();
+        Float ab[] = new Float[a.length];
+        for(int i=0; i<a.length; i++)
+            ab[i] = a[i];
+        return Arrays.asList(ab);
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/core/MatOfFloat4.java b/opencv41/src/main/java/org/opencv/core/MatOfFloat4.java
new file mode 100644 (file)
index 0000000..96f9e5c
--- /dev/null
@@ -0,0 +1,79 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class MatOfFloat4 extends Mat {
+    // 32FC4
+    private static final int _depth = CvType.CV_32F;
+    private static final int _channels = 4;
+
+    public MatOfFloat4() {
+        super();
+    }
+
+    protected MatOfFloat4(long addr) {
+        super(addr);
+        if( !empty() && checkVector(_channels, _depth) < 0 )
+            throw new IllegalArgumentException("Incompatible Mat");
+        //FIXME: do we need release() here?
+    }
+
+    public static MatOfFloat4 fromNativeAddr(long addr) {
+        return new MatOfFloat4(addr);
+    }
+
+    public MatOfFloat4(Mat m) {
+        super(m, Range.all());
+        if( !empty() && checkVector(_channels, _depth) < 0 )
+            throw new IllegalArgumentException("Incompatible Mat");
+        //FIXME: do we need release() here?
+    }
+
+    public MatOfFloat4(float...a) {
+        super();
+        fromArray(a);
+    }
+
+    public void alloc(int elemNumber) {
+        if(elemNumber>0)
+            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<Float> 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<ab.length; i++)
+            a[i] = ab[i];
+        fromArray(a);
+    }
+
+    public List<Float> toList() {
+        float[] a = toArray();
+        Float ab[] = new Float[a.length];
+        for(int i=0; i<a.length; i++)
+            ab[i] = a[i];
+        return Arrays.asList(ab);
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/core/MatOfFloat6.java b/opencv41/src/main/java/org/opencv/core/MatOfFloat6.java
new file mode 100644 (file)
index 0000000..140bb57
--- /dev/null
@@ -0,0 +1,79 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class MatOfFloat6 extends Mat {
+    // 32FC6
+    private static final int _depth = CvType.CV_32F;
+    private static final int _channels = 6;
+
+    public MatOfFloat6() {
+        super();
+    }
+
+    protected MatOfFloat6(long addr) {
+        super(addr);
+        if( !empty() && checkVector(_channels, _depth) < 0 )
+            throw new IllegalArgumentException("Incompatible Mat");
+        //FIXME: do we need release() here?
+    }
+
+    public static MatOfFloat6 fromNativeAddr(long addr) {
+        return new MatOfFloat6(addr);
+    }
+
+    public MatOfFloat6(Mat m) {
+        super(m, Range.all());
+        if( !empty() && checkVector(_channels, _depth) < 0 )
+            throw new IllegalArgumentException("Incompatible Mat");
+        //FIXME: do we need release() here?
+    }
+
+    public MatOfFloat6(float...a) {
+        super();
+        fromArray(a);
+    }
+
+    public void alloc(int elemNumber) {
+        if(elemNumber>0)
+            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<Float> 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<ab.length; i++)
+            a[i] = ab[i];
+        fromArray(a);
+    }
+
+    public List<Float> toList() {
+        float[] a = toArray();
+        Float ab[] = new Float[a.length];
+        for(int i=0; i<a.length; i++)
+            ab[i] = a[i];
+        return Arrays.asList(ab);
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/core/MatOfInt.java b/opencv41/src/main/java/org/opencv/core/MatOfInt.java
new file mode 100644 (file)
index 0000000..7d07687
--- /dev/null
@@ -0,0 +1,80 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+
+public class MatOfInt extends Mat {
+    // 32SC1
+    private static final int _depth = CvType.CV_32S;
+    private static final int _channels = 1;
+
+    public MatOfInt() {
+        super();
+    }
+
+    protected MatOfInt(long addr) {
+        super(addr);
+        if( !empty() && checkVector(_channels, _depth) < 0 )
+            throw new IllegalArgumentException("Incompatible Mat");
+        //FIXME: do we need release() here?
+    }
+
+    public static MatOfInt fromNativeAddr(long addr) {
+        return new MatOfInt(addr);
+    }
+
+    public MatOfInt(Mat m) {
+        super(m, Range.all());
+        if( !empty() && checkVector(_channels, _depth) < 0 )
+            throw new IllegalArgumentException("Incompatible Mat");
+        //FIXME: do we need release() here?
+    }
+
+    public MatOfInt(int...a) {
+        super();
+        fromArray(a);
+    }
+
+    public void alloc(int elemNumber) {
+        if(elemNumber>0)
+            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<Integer> 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<ab.length; i++)
+            a[i] = ab[i];
+        fromArray(a);
+    }
+
+    public List<Integer> toList() {
+        int[] a = toArray();
+        Integer ab[] = new Integer[a.length];
+        for(int i=0; i<a.length; i++)
+            ab[i] = a[i];
+        return Arrays.asList(ab);
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/core/MatOfInt4.java b/opencv41/src/main/java/org/opencv/core/MatOfInt4.java
new file mode 100644 (file)
index 0000000..4ca4d9e
--- /dev/null
@@ -0,0 +1,80 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+
+public class MatOfInt4 extends Mat {
+    // 32SC4
+    private static final int _depth = CvType.CV_32S;
+    private static final int _channels = 4;
+
+    public MatOfInt4() {
+        super();
+    }
+
+    protected MatOfInt4(long addr) {
+        super(addr);
+        if( !empty() && checkVector(_channels, _depth) < 0 )
+            throw new IllegalArgumentException("Incompatible Mat");
+        //FIXME: do we need release() here?
+    }
+
+    public static MatOfInt4 fromNativeAddr(long addr) {
+        return new MatOfInt4(addr);
+    }
+
+    public MatOfInt4(Mat m) {
+        super(m, Range.all());
+        if( !empty() && checkVector(_channels, _depth) < 0 )
+            throw new IllegalArgumentException("Incompatible Mat");
+        //FIXME: do we need release() here?
+    }
+
+    public MatOfInt4(int...a) {
+        super();
+        fromArray(a);
+    }
+
+    public void alloc(int elemNumber) {
+        if(elemNumber>0)
+            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<Integer> 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<ab.length; i++)
+            a[i] = ab[i];
+        fromArray(a);
+    }
+
+    public List<Integer> toList() {
+        int[] a = toArray();
+        Integer ab[] = new Integer[a.length];
+        for(int i=0; i<a.length; i++)
+            ab[i] = a[i];
+        return Arrays.asList(ab);
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/core/MatOfKeyPoint.java b/opencv41/src/main/java/org/opencv/core/MatOfKeyPoint.java
new file mode 100644 (file)
index 0000000..24b9a81
--- /dev/null
@@ -0,0 +1,86 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.opencv.core.KeyPoint;
+
+public class MatOfKeyPoint extends Mat {
+    // 32FC7
+    private static final int _depth = CvType.CV_32F;
+    private static final int _channels = 7;
+
+    public MatOfKeyPoint() {
+        super();
+    }
+
+    protected MatOfKeyPoint(long addr) {
+        super(addr);
+        if( !empty() && checkVector(_channels, _depth) < 0 )
+            throw new IllegalArgumentException("Incompatible Mat");
+        //FIXME: do we need release() here?
+    }
+
+    public static MatOfKeyPoint fromNativeAddr(long addr) {
+        return new MatOfKeyPoint(addr);
+    }
+
+    public MatOfKeyPoint(Mat m) {
+        super(m, Range.all());
+        if( !empty() && checkVector(_channels, _depth) < 0 )
+            throw new IllegalArgumentException("Incompatible Mat");
+        //FIXME: do we need release() here?
+    }
+
+    public MatOfKeyPoint(KeyPoint...a) {
+        super();
+        fromArray(a);
+    }
+
+    public void alloc(int elemNumber) {
+        if(elemNumber>0)
+            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<num; i++) {
+            KeyPoint kp = a[i];
+            buff[_channels*i+0] = (float) kp.pt.x;
+            buff[_channels*i+1] = (float) kp.pt.y;
+            buff[_channels*i+2] = kp.size;
+            buff[_channels*i+3] = kp.angle;
+            buff[_channels*i+4] = kp.response;
+            buff[_channels*i+5] = kp.octave;
+            buff[_channels*i+6] = kp.class_id;
+        }
+        put(0, 0, buff); //TODO: check ret val!
+    }
+
+    public KeyPoint[] toArray() {
+        int num = (int) total();
+        KeyPoint[] a = new KeyPoint[num];
+        if(num == 0)
+            return a;
+        float buff[] = new float[num * _channels];
+        get(0, 0, buff); //TODO: check ret val!
+        for(int i=0; i<num; i++)
+            a[i] = new KeyPoint( buff[_channels*i+0], buff[_channels*i+1], buff[_channels*i+2], buff[_channels*i+3],
+                                 buff[_channels*i+4], (int) buff[_channels*i+5], (int) buff[_channels*i+6] );
+        return a;
+    }
+
+    public void fromList(List<KeyPoint> lkp) {
+        KeyPoint akp[] = lkp.toArray(new KeyPoint[0]);
+        fromArray(akp);
+    }
+
+    public List<KeyPoint> toList() {
+        KeyPoint[] akp = toArray();
+        return Arrays.asList(akp);
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/core/MatOfPoint.java b/opencv41/src/main/java/org/opencv/core/MatOfPoint.java
new file mode 100644 (file)
index 0000000..f4d573b
--- /dev/null
@@ -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<num; i++) {
+            Point p = a[i];
+            buff[_channels*i+0] = (int) p.x;
+            buff[_channels*i+1] = (int) p.y;
+        }
+        put(0, 0, buff); //TODO: check ret val!
+    }
+
+    public Point[] toArray() {
+        int num = (int) total();
+        Point[] ap = new Point[num];
+        if(num == 0)
+            return ap;
+        int buff[] = new int[num * _channels];
+        get(0, 0, buff); //TODO: check ret val!
+        for(int i=0; i<num; i++)
+            ap[i] = new Point(buff[i*_channels], buff[i*_channels+1]);
+        return ap;
+    }
+
+    public void fromList(List<Point> lp) {
+        Point ap[] = lp.toArray(new Point[0]);
+        fromArray(ap);
+    }
+
+    public List<Point> toList() {
+        Point[] ap = toArray();
+        return Arrays.asList(ap);
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/core/MatOfPoint2f.java b/opencv41/src/main/java/org/opencv/core/MatOfPoint2f.java
new file mode 100644 (file)
index 0000000..4b8c926
--- /dev/null
@@ -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<num; i++) {
+            Point p = a[i];
+            buff[_channels*i+0] = (float) p.x;
+            buff[_channels*i+1] = (float) p.y;
+        }
+        put(0, 0, buff); //TODO: check ret val!
+    }
+
+    public Point[] toArray() {
+        int num = (int) total();
+        Point[] ap = new Point[num];
+        if(num == 0)
+            return ap;
+        float buff[] = new float[num * _channels];
+        get(0, 0, buff); //TODO: check ret val!
+        for(int i=0; i<num; i++)
+            ap[i] = new Point(buff[i*_channels], buff[i*_channels+1]);
+        return ap;
+    }
+
+    public void fromList(List<Point> lp) {
+        Point ap[] = lp.toArray(new Point[0]);
+        fromArray(ap);
+    }
+
+    public List<Point> toList() {
+        Point[] ap = toArray();
+        return Arrays.asList(ap);
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/core/MatOfPoint3.java b/opencv41/src/main/java/org/opencv/core/MatOfPoint3.java
new file mode 100644 (file)
index 0000000..3b50561
--- /dev/null
@@ -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<num; i++) {
+            Point3 p = a[i];
+            buff[_channels*i+0] = (int) p.x;
+            buff[_channels*i+1] = (int) p.y;
+            buff[_channels*i+2] = (int) p.z;
+        }
+        put(0, 0, buff); //TODO: check ret val!
+    }
+
+    public Point3[] toArray() {
+        int num = (int) total();
+        Point3[] ap = new Point3[num];
+        if(num == 0)
+            return ap;
+        int buff[] = new int[num * _channels];
+        get(0, 0, buff); //TODO: check ret val!
+        for(int i=0; i<num; i++)
+            ap[i] = new Point3(buff[i*_channels], buff[i*_channels+1], buff[i*_channels+2]);
+        return ap;
+    }
+
+    public void fromList(List<Point3> lp) {
+        Point3 ap[] = lp.toArray(new Point3[0]);
+        fromArray(ap);
+    }
+
+    public List<Point3> toList() {
+        Point3[] ap = toArray();
+        return Arrays.asList(ap);
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/core/MatOfPoint3f.java b/opencv41/src/main/java/org/opencv/core/MatOfPoint3f.java
new file mode 100644 (file)
index 0000000..fc5fee4
--- /dev/null
@@ -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<num; i++) {
+            Point3 p = a[i];
+            buff[_channels*i+0] = (float) p.x;
+            buff[_channels*i+1] = (float) p.y;
+            buff[_channels*i+2] = (float) p.z;
+        }
+        put(0, 0, buff); //TODO: check ret val!
+    }
+
+    public Point3[] toArray() {
+        int num = (int) total();
+        Point3[] ap = new Point3[num];
+        if(num == 0)
+            return ap;
+        float buff[] = new float[num * _channels];
+        get(0, 0, buff); //TODO: check ret val!
+        for(int i=0; i<num; i++)
+            ap[i] = new Point3(buff[i*_channels], buff[i*_channels+1], buff[i*_channels+2]);
+        return ap;
+    }
+
+    public void fromList(List<Point3> lp) {
+        Point3 ap[] = lp.toArray(new Point3[0]);
+        fromArray(ap);
+    }
+
+    public List<Point3> toList() {
+        Point3[] ap = toArray();
+        return Arrays.asList(ap);
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/core/MatOfRect.java b/opencv41/src/main/java/org/opencv/core/MatOfRect.java
new file mode 100644 (file)
index 0000000..ec0fb01
--- /dev/null
@@ -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<num; i++) {
+            Rect r = a[i];
+            buff[_channels*i+0] = (int) r.x;
+            buff[_channels*i+1] = (int) r.y;
+            buff[_channels*i+2] = (int) r.width;
+            buff[_channels*i+3] = (int) r.height;
+        }
+        put(0, 0, buff); //TODO: check ret val!
+    }
+
+
+    public Rect[] toArray() {
+        int num = (int) total();
+        Rect[] a = new Rect[num];
+        if(num == 0)
+            return a;
+        int buff[] = new int[num * _channels];
+        get(0, 0, buff); //TODO: check ret val!
+        for(int i=0; i<num; i++)
+            a[i] = new Rect(buff[i*_channels], buff[i*_channels+1], buff[i*_channels+2], buff[i*_channels+3]);
+        return a;
+    }
+    public void fromList(List<Rect> lr) {
+        Rect ap[] = lr.toArray(new Rect[0]);
+        fromArray(ap);
+    }
+
+    public List<Rect> toList() {
+        Rect[] ar = toArray();
+        return Arrays.asList(ar);
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/core/MatOfRect2d.java b/opencv41/src/main/java/org/opencv/core/MatOfRect2d.java
new file mode 100644 (file)
index 0000000..71c4b1a
--- /dev/null
@@ -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<num; i++) {
+            Rect2d r = a[i];
+            buff[_channels*i+0] = (double) r.x;
+            buff[_channels*i+1] = (double) r.y;
+            buff[_channels*i+2] = (double) r.width;
+            buff[_channels*i+3] = (double) r.height;
+        }
+        put(0, 0, buff); //TODO: check ret val!
+    }
+
+
+    public Rect2d[] toArray() {
+        int num = (int) total();
+        Rect2d[] a = new Rect2d[num];
+        if(num == 0)
+            return a;
+        double buff[] = new double[num * _channels];
+        get(0, 0, buff); //TODO: check ret val!
+        for(int i=0; i<num; i++)
+            a[i] = new Rect2d(buff[i*_channels], buff[i*_channels+1], buff[i*_channels+2], buff[i*_channels+3]);
+        return a;
+    }
+    public void fromList(List<Rect2d> lr) {
+        Rect2d ap[] = lr.toArray(new Rect2d[0]);
+        fromArray(ap);
+    }
+
+    public List<Rect2d> toList() {
+        Rect2d[] ar = toArray();
+        return Arrays.asList(ar);
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/core/MatOfRotatedRect.java b/opencv41/src/main/java/org/opencv/core/MatOfRotatedRect.java
new file mode 100644 (file)
index 0000000..6f36e6c
--- /dev/null
@@ -0,0 +1,86 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.opencv.core.RotatedRect;
+
+
+
+public class MatOfRotatedRect extends Mat {
+    // 32FC5
+    private static final int _depth = CvType.CV_32F;
+    private static final int _channels = 5;
+
+    public MatOfRotatedRect() {
+        super();
+    }
+
+    protected MatOfRotatedRect(long addr) {
+        super(addr);
+        if( !empty() && checkVector(_channels, _depth) < 0 )
+            throw new IllegalArgumentException("Incompatible Mat");
+        //FIXME: do we need release() here?
+    }
+
+    public static MatOfRotatedRect fromNativeAddr(long addr) {
+        return new MatOfRotatedRect(addr);
+    }
+
+    public MatOfRotatedRect(Mat m) {
+        super(m, Range.all());
+        if( !empty() && checkVector(_channels, _depth) < 0 )
+            throw new IllegalArgumentException("Incompatible Mat");
+        //FIXME: do we need release() here?
+    }
+
+    public MatOfRotatedRect(RotatedRect...a) {
+        super();
+        fromArray(a);
+    }
+
+    public void alloc(int elemNumber) {
+        if(elemNumber>0)
+            super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+    }
+
+    public void fromArray(RotatedRect...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<num; i++) {
+            RotatedRect r = a[i];
+            buff[_channels*i+0] = (float) r.center.x;
+            buff[_channels*i+1] = (float) r.center.y;
+            buff[_channels*i+2] = (float) r.size.width;
+            buff[_channels*i+3] = (float) r.size.height;
+            buff[_channels*i+4] = (float) r.angle;
+        }
+        put(0, 0, buff); //TODO: check ret val!
+    }
+
+    public RotatedRect[] toArray() {
+        int num = (int) total();
+        RotatedRect[] a = new RotatedRect[num];
+        if(num == 0)
+            return a;
+        float buff[] = new float[_channels];
+        for(int i=0; i<num; i++) {
+            get(i, 0, buff); //TODO: check ret val!
+            a[i] = new RotatedRect(new Point(buff[0],buff[1]),new Size(buff[2],buff[3]),buff[4]);
+        }
+        return a;
+    }
+
+    public void fromList(List<RotatedRect> lr) {
+        RotatedRect ap[] = lr.toArray(new RotatedRect[0]);
+        fromArray(ap);
+    }
+
+    public List<RotatedRect> toList() {
+        RotatedRect[] ar = toArray();
+        return Arrays.asList(ar);
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/core/Point.java b/opencv41/src/main/java/org/opencv/core/Point.java
new file mode 100644 (file)
index 0000000..ce493d7
--- /dev/null
@@ -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/opencv41/src/main/java/org/opencv/core/Point3.java b/opencv41/src/main/java/org/opencv/core/Point3.java
new file mode 100644 (file)
index 0000000..14b91c6
--- /dev/null
@@ -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/opencv41/src/main/java/org/opencv/core/Range.java b/opencv41/src/main/java/org/opencv/core/Range.java
new file mode 100644 (file)
index 0000000..f7eee4d
--- /dev/null
@@ -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/opencv41/src/main/java/org/opencv/core/Rect.java b/opencv41/src/main/java/org/opencv/core/Rect.java
new file mode 100644 (file)
index 0000000..c68e818
--- /dev/null
@@ -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/opencv41/src/main/java/org/opencv/core/Rect2d.java b/opencv41/src/main/java/org/opencv/core/Rect2d.java
new file mode 100644 (file)
index 0000000..4c27869
--- /dev/null
@@ -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/opencv41/src/main/java/org/opencv/core/RotatedRect.java b/opencv41/src/main/java/org/opencv/core/RotatedRect.java
new file mode 100644 (file)
index 0000000..05ee381
--- /dev/null
@@ -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.y = 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/opencv41/src/main/java/org/opencv/core/Scalar.java b/opencv41/src/main/java/org/opencv/core/Scalar.java
new file mode 100644 (file)
index 0000000..01676e4
--- /dev/null
@@ -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/opencv41/src/main/java/org/opencv/core/Size.java b/opencv41/src/main/java/org/opencv/core/Size.java
new file mode 100644 (file)
index 0000000..f7d69f3
--- /dev/null
@@ -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/opencv41/src/main/java/org/opencv/core/TermCriteria.java b/opencv41/src/main/java/org/opencv/core/TermCriteria.java
new file mode 100644 (file)
index 0000000..c67e51e
--- /dev/null
@@ -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/opencv41/src/main/java/org/opencv/core/TickMeter.java b/opencv41/src/main/java/org/opencv/core/TickMeter.java
new file mode 100644 (file)
index 0000000..1ad728d
--- /dev/null
@@ -0,0 +1,184 @@
+//
+// 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; }
+
+    // internal usage only
+    public static TickMeter __fromPtr__(long addr) { return new TickMeter(addr); }
+
+    //
+    // C++:   cv::TickMeter::TickMeter()
+    //
+
+    //javadoc: TickMeter::TickMeter()
+    public   TickMeter()
+    {
+        
+        nativeObj = TickMeter_0();
+        
+        return;
+    }
+
+
+    //
+    // C++:  double cv::TickMeter::getTimeMicro()
+    //
+
+    //javadoc: TickMeter::getTimeMicro()
+    public  double getTimeMicro()
+    {
+        
+        double retVal = getTimeMicro_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::TickMeter::getTimeMilli()
+    //
+
+    //javadoc: TickMeter::getTimeMilli()
+    public  double getTimeMilli()
+    {
+        
+        double retVal = getTimeMilli_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::TickMeter::getTimeSec()
+    //
+
+    //javadoc: TickMeter::getTimeSec()
+    public  double getTimeSec()
+    {
+        
+        double retVal = getTimeSec_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int64 cv::TickMeter::getCounter()
+    //
+
+    //javadoc: TickMeter::getCounter()
+    public  long getCounter()
+    {
+        
+        long retVal = getCounter_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int64 cv::TickMeter::getTimeTicks()
+    //
+
+    //javadoc: TickMeter::getTimeTicks()
+    public  long getTimeTicks()
+    {
+        
+        long retVal = getTimeTicks_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::TickMeter::reset()
+    //
+
+    //javadoc: TickMeter::reset()
+    public  void reset()
+    {
+        
+        reset_0(nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::TickMeter::start()
+    //
+
+    //javadoc: TickMeter::start()
+    public  void start()
+    {
+        
+        start_0(nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::TickMeter::stop()
+    //
+
+    //javadoc: TickMeter::stop()
+    public  void stop()
+    {
+        
+        stop_0(nativeObj);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:   cv::TickMeter::TickMeter()
+    private static native long TickMeter_0();
+
+    // C++:  double cv::TickMeter::getTimeMicro()
+    private static native double getTimeMicro_0(long nativeObj);
+
+    // C++:  double cv::TickMeter::getTimeMilli()
+    private static native double getTimeMilli_0(long nativeObj);
+
+    // C++:  double cv::TickMeter::getTimeSec()
+    private static native double getTimeSec_0(long nativeObj);
+
+    // C++:  int64 cv::TickMeter::getCounter()
+    private static native long getCounter_0(long nativeObj);
+
+    // C++:  int64 cv::TickMeter::getTimeTicks()
+    private static native long getTimeTicks_0(long nativeObj);
+
+    // C++:  void cv::TickMeter::reset()
+    private static native void reset_0(long nativeObj);
+
+    // C++:  void cv::TickMeter::start()
+    private static native void start_0(long nativeObj);
+
+    // C++:  void cv::TickMeter::stop()
+    private static native void stop_0(long nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/dnn/DictValue.java b/opencv41/src/main/java/org/opencv/dnn/DictValue.java
new file mode 100644 (file)
index 0000000..194429a
--- /dev/null
@@ -0,0 +1,214 @@
+//
+// 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; }
+
+    // internal usage only
+    public static DictValue __fromPtr__(long addr) { return new DictValue(addr); }
+
+    //
+    // C++:   cv::dnn::DictValue::DictValue(String s)
+    //
+
+    //javadoc: DictValue::DictValue(s)
+    public   DictValue(String s)
+    {
+        
+        nativeObj = DictValue_0(s);
+        
+        return;
+    }
+
+
+    //
+    // C++:   cv::dnn::DictValue::DictValue(double p)
+    //
+
+    //javadoc: DictValue::DictValue(p)
+    public   DictValue(double p)
+    {
+        
+        nativeObj = DictValue_1(p);
+        
+        return;
+    }
+
+
+    //
+    // C++:   cv::dnn::DictValue::DictValue(int i)
+    //
+
+    //javadoc: DictValue::DictValue(i)
+    public   DictValue(int i)
+    {
+        
+        nativeObj = DictValue_2(i);
+        
+        return;
+    }
+
+
+    //
+    // C++:  String cv::dnn::DictValue::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 cv::dnn::DictValue::isInt()
+    //
+
+    //javadoc: DictValue::isInt()
+    public  boolean isInt()
+    {
+        
+        boolean retVal = isInt_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::dnn::DictValue::isReal()
+    //
+
+    //javadoc: DictValue::isReal()
+    public  boolean isReal()
+    {
+        
+        boolean retVal = isReal_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::dnn::DictValue::isString()
+    //
+
+    //javadoc: DictValue::isString()
+    public  boolean isString()
+    {
+        
+        boolean retVal = isString_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::dnn::DictValue::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 cv::dnn::DictValue::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++:   cv::dnn::DictValue::DictValue(String s)
+    private static native long DictValue_0(String s);
+
+    // C++:   cv::dnn::DictValue::DictValue(double p)
+    private static native long DictValue_1(double p);
+
+    // C++:   cv::dnn::DictValue::DictValue(int i)
+    private static native long DictValue_2(int i);
+
+    // C++:  String cv::dnn::DictValue::getStringValue(int idx = -1)
+    private static native String getStringValue_0(long nativeObj, int idx);
+    private static native String getStringValue_1(long nativeObj);
+
+    // C++:  bool cv::dnn::DictValue::isInt()
+    private static native boolean isInt_0(long nativeObj);
+
+    // C++:  bool cv::dnn::DictValue::isReal()
+    private static native boolean isReal_0(long nativeObj);
+
+    // C++:  bool cv::dnn::DictValue::isString()
+    private static native boolean isString_0(long nativeObj);
+
+    // C++:  double cv::dnn::DictValue::getRealValue(int idx = -1)
+    private static native double getRealValue_0(long nativeObj, int idx);
+    private static native double getRealValue_1(long nativeObj);
+
+    // C++:  int cv::dnn::DictValue::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/opencv41/src/main/java/org/opencv/dnn/Dnn.java b/opencv41/src/main/java/org/opencv/dnn/Dnn.java
new file mode 100644 (file)
index 0000000..6e79be3
--- /dev/null
@@ -0,0 +1,771 @@
+//
+// 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.MatOfByte;
+import org.opencv.core.MatOfFloat;
+import org.opencv.core.MatOfInt;
+import org.opencv.core.MatOfRect;
+import org.opencv.core.MatOfRect2d;
+import org.opencv.core.MatOfRotatedRect;
+import org.opencv.core.Scalar;
+import org.opencv.core.Size;
+import org.opencv.dnn.Net;
+import org.opencv.utils.Converters;
+
+// C++: class Dnn
+//javadoc: Dnn
+
+public class Dnn {
+
+    // C++: enum Backend
+    public static final int
+            DNN_BACKEND_DEFAULT = 0,
+            DNN_BACKEND_HALIDE = 1,
+            DNN_BACKEND_INFERENCE_ENGINE = 2,
+            DNN_BACKEND_OPENCV = 3,
+            DNN_BACKEND_VKCOM = 4;
+
+
+    // C++: enum Target
+    public static final int
+            DNN_TARGET_CPU = 0,
+            DNN_TARGET_OPENCL = 1,
+            DNN_TARGET_OPENCL_FP16 = 2,
+            DNN_TARGET_MYRIAD = 3,
+            DNN_TARGET_VULKAN = 4,
+            DNN_TARGET_FPGA = 5;
+
+
+    //
+    // C++:  Mat cv::dnn::blobFromImage(Mat image, double scalefactor = 1.0, Size size = Size(), Scalar mean = Scalar(), bool swapRB = false, bool crop = false, int ddepth = CV_32F)
+    //
+
+    //javadoc: blobFromImage(image, scalefactor, size, mean, swapRB, crop, ddepth)
+    public static Mat blobFromImage(Mat image, double scalefactor, Size size, Scalar mean, boolean swapRB, boolean crop, int ddepth)
+    {
+        
+        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, ddepth));
+        
+        return retVal;
+    }
+
+    //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_1(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, scalefactor, size, mean, swapRB)
+    public static Mat blobFromImage(Mat image, double scalefactor, Size size, Scalar mean, boolean swapRB)
+    {
+        
+        Mat retVal = new Mat(blobFromImage_2(image.nativeObj, scalefactor, size.width, size.height, mean.val[0], mean.val[1], mean.val[2], mean.val[3], swapRB));
+        
+        return retVal;
+    }
+
+    //javadoc: blobFromImage(image, scalefactor, size, mean)
+    public static Mat blobFromImage(Mat image, double scalefactor, Size size, Scalar mean)
+    {
+        
+        Mat retVal = new Mat(blobFromImage_3(image.nativeObj, scalefactor, size.width, size.height, mean.val[0], mean.val[1], mean.val[2], mean.val[3]));
+        
+        return retVal;
+    }
+
+    //javadoc: blobFromImage(image, scalefactor, size)
+    public static Mat blobFromImage(Mat image, double scalefactor, Size size)
+    {
+        
+        Mat retVal = new Mat(blobFromImage_4(image.nativeObj, scalefactor, size.width, size.height));
+        
+        return retVal;
+    }
+
+    //javadoc: blobFromImage(image, scalefactor)
+    public static Mat blobFromImage(Mat image, double scalefactor)
+    {
+        
+        Mat retVal = new Mat(blobFromImage_5(image.nativeObj, scalefactor));
+        
+        return retVal;
+    }
+
+    //javadoc: blobFromImage(image)
+    public static Mat blobFromImage(Mat image)
+    {
+        
+        Mat retVal = new Mat(blobFromImage_6(image.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::dnn::blobFromImages(vector_Mat images, double scalefactor = 1.0, Size size = Size(), Scalar mean = Scalar(), bool swapRB = false, bool crop = false, int ddepth = CV_32F)
+    //
+
+    //javadoc: blobFromImages(images, scalefactor, size, mean, swapRB, crop, ddepth)
+    public static Mat blobFromImages(List<Mat> images, double scalefactor, Size size, Scalar mean, boolean swapRB, boolean crop, int ddepth)
+    {
+        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, ddepth));
+        
+        return retVal;
+    }
+
+    //javadoc: blobFromImages(images, scalefactor, size, mean, swapRB, crop)
+    public static Mat blobFromImages(List<Mat> 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_1(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, scalefactor, size, mean, swapRB)
+    public static Mat blobFromImages(List<Mat> images, double scalefactor, Size size, Scalar mean, boolean swapRB)
+    {
+        Mat images_mat = Converters.vector_Mat_to_Mat(images);
+        Mat retVal = new Mat(blobFromImages_2(images_mat.nativeObj, scalefactor, size.width, size.height, mean.val[0], mean.val[1], mean.val[2], mean.val[3], swapRB));
+        
+        return retVal;
+    }
+
+    //javadoc: blobFromImages(images, scalefactor, size, mean)
+    public static Mat blobFromImages(List<Mat> images, double scalefactor, Size size, Scalar mean)
+    {
+        Mat images_mat = Converters.vector_Mat_to_Mat(images);
+        Mat retVal = new Mat(blobFromImages_3(images_mat.nativeObj, scalefactor, size.width, size.height, mean.val[0], mean.val[1], mean.val[2], mean.val[3]));
+        
+        return retVal;
+    }
+
+    //javadoc: blobFromImages(images, scalefactor, size)
+    public static Mat blobFromImages(List<Mat> images, double scalefactor, Size size)
+    {
+        Mat images_mat = Converters.vector_Mat_to_Mat(images);
+        Mat retVal = new Mat(blobFromImages_4(images_mat.nativeObj, scalefactor, size.width, size.height));
+        
+        return retVal;
+    }
+
+    //javadoc: blobFromImages(images, scalefactor)
+    public static Mat blobFromImages(List<Mat> images, double scalefactor)
+    {
+        Mat images_mat = Converters.vector_Mat_to_Mat(images);
+        Mat retVal = new Mat(blobFromImages_5(images_mat.nativeObj, scalefactor));
+        
+        return retVal;
+    }
+
+    //javadoc: blobFromImages(images)
+    public static Mat blobFromImages(List<Mat> images)
+    {
+        Mat images_mat = Converters.vector_Mat_to_Mat(images);
+        Mat retVal = new Mat(blobFromImages_6(images_mat.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::dnn::readTensorFromONNX(String path)
+    //
+
+    //javadoc: readTensorFromONNX(path)
+    public static Mat readTensorFromONNX(String path)
+    {
+        
+        Mat retVal = new Mat(readTensorFromONNX_0(path));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::dnn::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 cv::dnn::readNet(String framework, vector_uchar bufferModel, vector_uchar bufferConfig = std::vector<uchar>())
+    //
+
+    //javadoc: readNet(framework, bufferModel, bufferConfig)
+    public static Net readNet(String framework, MatOfByte bufferModel, MatOfByte bufferConfig)
+    {
+        Mat bufferModel_mat = bufferModel;
+        Mat bufferConfig_mat = bufferConfig;
+        Net retVal = new Net(readNet_0(framework, bufferModel_mat.nativeObj, bufferConfig_mat.nativeObj));
+        
+        return retVal;
+    }
+
+    //javadoc: readNet(framework, bufferModel)
+    public static Net readNet(String framework, MatOfByte bufferModel)
+    {
+        Mat bufferModel_mat = bufferModel;
+        Net retVal = new Net(readNet_1(framework, bufferModel_mat.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Net cv::dnn::readNet(String model, String config = "", String framework = "")
+    //
+
+    //javadoc: readNet(model, config, framework)
+    public static Net readNet(String model, String config, String framework)
+    {
+        
+        Net retVal = new Net(readNet_2(model, config, framework));
+        
+        return retVal;
+    }
+
+    //javadoc: readNet(model, config)
+    public static Net readNet(String model, String config)
+    {
+        
+        Net retVal = new Net(readNet_3(model, config));
+        
+        return retVal;
+    }
+
+    //javadoc: readNet(model)
+    public static Net readNet(String model)
+    {
+        
+        Net retVal = new Net(readNet_4(model));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Net cv::dnn::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 cv::dnn::readNetFromCaffe(vector_uchar bufferProto, vector_uchar bufferModel = std::vector<uchar>())
+    //
+
+    //javadoc: readNetFromCaffe(bufferProto, bufferModel)
+    public static Net readNetFromCaffe(MatOfByte bufferProto, MatOfByte bufferModel)
+    {
+        Mat bufferProto_mat = bufferProto;
+        Mat bufferModel_mat = bufferModel;
+        Net retVal = new Net(readNetFromCaffe_2(bufferProto_mat.nativeObj, bufferModel_mat.nativeObj));
+        
+        return retVal;
+    }
+
+    //javadoc: readNetFromCaffe(bufferProto)
+    public static Net readNetFromCaffe(MatOfByte bufferProto)
+    {
+        Mat bufferProto_mat = bufferProto;
+        Net retVal = new Net(readNetFromCaffe_3(bufferProto_mat.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Net cv::dnn::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 cv::dnn::readNetFromDarknet(vector_uchar bufferCfg, vector_uchar bufferModel = std::vector<uchar>())
+    //
+
+    //javadoc: readNetFromDarknet(bufferCfg, bufferModel)
+    public static Net readNetFromDarknet(MatOfByte bufferCfg, MatOfByte bufferModel)
+    {
+        Mat bufferCfg_mat = bufferCfg;
+        Mat bufferModel_mat = bufferModel;
+        Net retVal = new Net(readNetFromDarknet_2(bufferCfg_mat.nativeObj, bufferModel_mat.nativeObj));
+        
+        return retVal;
+    }
+
+    //javadoc: readNetFromDarknet(bufferCfg)
+    public static Net readNetFromDarknet(MatOfByte bufferCfg)
+    {
+        Mat bufferCfg_mat = bufferCfg;
+        Net retVal = new Net(readNetFromDarknet_3(bufferCfg_mat.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Net cv::dnn::readNetFromModelOptimizer(String xml, String bin)
+    //
+
+    //javadoc: readNetFromModelOptimizer(xml, bin)
+    public static Net readNetFromModelOptimizer(String xml, String bin)
+    {
+        
+        Net retVal = new Net(readNetFromModelOptimizer_0(xml, bin));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Net cv::dnn::readNetFromONNX(String onnxFile)
+    //
+
+    //javadoc: readNetFromONNX(onnxFile)
+    public static Net readNetFromONNX(String onnxFile)
+    {
+        
+        Net retVal = new Net(readNetFromONNX_0(onnxFile));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Net cv::dnn::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 cv::dnn::readNetFromTensorflow(vector_uchar bufferModel, vector_uchar bufferConfig = std::vector<uchar>())
+    //
+
+    //javadoc: readNetFromTensorflow(bufferModel, bufferConfig)
+    public static Net readNetFromTensorflow(MatOfByte bufferModel, MatOfByte bufferConfig)
+    {
+        Mat bufferModel_mat = bufferModel;
+        Mat bufferConfig_mat = bufferConfig;
+        Net retVal = new Net(readNetFromTensorflow_2(bufferModel_mat.nativeObj, bufferConfig_mat.nativeObj));
+        
+        return retVal;
+    }
+
+    //javadoc: readNetFromTensorflow(bufferModel)
+    public static Net readNetFromTensorflow(MatOfByte bufferModel)
+    {
+        Mat bufferModel_mat = bufferModel;
+        Net retVal = new Net(readNetFromTensorflow_3(bufferModel_mat.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Net cv::dnn::readNetFromTorch(String model, bool isBinary = true, bool evaluate = true)
+    //
+
+    //javadoc: readNetFromTorch(model, isBinary, evaluate)
+    public static Net readNetFromTorch(String model, boolean isBinary, boolean evaluate)
+    {
+        
+        Net retVal = new Net(readNetFromTorch_0(model, isBinary, evaluate));
+        
+        return retVal;
+    }
+
+    //javadoc: readNetFromTorch(model, isBinary)
+    public static Net readNetFromTorch(String model, boolean isBinary)
+    {
+        
+        Net retVal = new Net(readNetFromTorch_1(model, isBinary));
+        
+        return retVal;
+    }
+
+    //javadoc: readNetFromTorch(model)
+    public static Net readNetFromTorch(String model)
+    {
+        
+        Net retVal = new Net(readNetFromTorch_2(model));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  String cv::dnn::getInferenceEngineVPUType()
+    //
+
+    //javadoc: getInferenceEngineVPUType()
+    public static String getInferenceEngineVPUType()
+    {
+        
+        String retVal = getInferenceEngineVPUType_0();
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::dnn::NMSBoxes(vector_Rect bboxes, vector_float scores, float score_threshold, float nms_threshold, vector_int& indices, float eta = 1.f, int top_k = 0)
+    //
+
+    //javadoc: NMSBoxes(bboxes, scores, score_threshold, nms_threshold, indices, eta, top_k)
+    public static void NMSBoxes(MatOfRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta, int top_k)
+    {
+        Mat bboxes_mat = bboxes;
+        Mat scores_mat = scores;
+        Mat indices_mat = indices;
+        NMSBoxes_0(bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj, eta, top_k);
+        
+        return;
+    }
+
+    //javadoc: NMSBoxes(bboxes, scores, score_threshold, nms_threshold, indices, eta)
+    public static void NMSBoxes(MatOfRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta)
+    {
+        Mat bboxes_mat = bboxes;
+        Mat scores_mat = scores;
+        Mat indices_mat = indices;
+        NMSBoxes_1(bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj, eta);
+        
+        return;
+    }
+
+    //javadoc: NMSBoxes(bboxes, scores, score_threshold, nms_threshold, indices)
+    public static void NMSBoxes(MatOfRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices)
+    {
+        Mat bboxes_mat = bboxes;
+        Mat scores_mat = scores;
+        Mat indices_mat = indices;
+        NMSBoxes_2(bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::dnn::NMSBoxes(vector_Rect2d bboxes, vector_float scores, float score_threshold, float nms_threshold, vector_int& indices, float eta = 1.f, int top_k = 0)
+    //
+
+    //javadoc: NMSBoxes(bboxes, scores, score_threshold, nms_threshold, indices, eta, top_k)
+    public static void NMSBoxes(MatOfRect2d bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta, int top_k)
+    {
+        Mat bboxes_mat = bboxes;
+        Mat scores_mat = scores;
+        Mat indices_mat = indices;
+        NMSBoxes_3(bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj, eta, top_k);
+        
+        return;
+    }
+
+    //javadoc: NMSBoxes(bboxes, scores, score_threshold, nms_threshold, indices, eta)
+    public static void NMSBoxes(MatOfRect2d bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta)
+    {
+        Mat bboxes_mat = bboxes;
+        Mat scores_mat = scores;
+        Mat indices_mat = indices;
+        NMSBoxes_4(bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj, eta);
+        
+        return;
+    }
+
+    //javadoc: NMSBoxes(bboxes, scores, score_threshold, nms_threshold, indices)
+    public static void NMSBoxes(MatOfRect2d bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices)
+    {
+        Mat bboxes_mat = bboxes;
+        Mat scores_mat = scores;
+        Mat indices_mat = indices;
+        NMSBoxes_5(bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::dnn::NMSBoxes(vector_RotatedRect bboxes, vector_float scores, float score_threshold, float nms_threshold, vector_int& indices, float eta = 1.f, int top_k = 0)
+    //
+
+    //javadoc: NMSBoxesRotated(bboxes, scores, score_threshold, nms_threshold, indices, eta, top_k)
+    public static void NMSBoxesRotated(MatOfRotatedRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta, int top_k)
+    {
+        Mat bboxes_mat = bboxes;
+        Mat scores_mat = scores;
+        Mat indices_mat = indices;
+        NMSBoxesRotated_0(bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj, eta, top_k);
+        
+        return;
+    }
+
+    //javadoc: NMSBoxesRotated(bboxes, scores, score_threshold, nms_threshold, indices, eta)
+    public static void NMSBoxesRotated(MatOfRotatedRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta)
+    {
+        Mat bboxes_mat = bboxes;
+        Mat scores_mat = scores;
+        Mat indices_mat = indices;
+        NMSBoxesRotated_1(bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj, eta);
+        
+        return;
+    }
+
+    //javadoc: NMSBoxesRotated(bboxes, scores, score_threshold, nms_threshold, indices)
+    public static void NMSBoxesRotated(MatOfRotatedRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices)
+    {
+        Mat bboxes_mat = bboxes;
+        Mat scores_mat = scores;
+        Mat indices_mat = indices;
+        NMSBoxesRotated_2(bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::dnn::imagesFromBlob(Mat blob_, vector_Mat& images_)
+    //
+
+    //javadoc: imagesFromBlob(blob_, images_)
+    public static void imagesFromBlob(Mat blob_, List<Mat> images_)
+    {
+        Mat images__mat = new Mat();
+        imagesFromBlob_0(blob_.nativeObj, images__mat.nativeObj);
+        Converters.Mat_to_vector_Mat(images__mat, images_);
+        images__mat.release();
+        return;
+    }
+
+
+    //
+    // C++:  void cv::dnn::resetMyriadDevice()
+    //
+
+    //javadoc: resetMyriadDevice()
+    public static void resetMyriadDevice()
+    {
+        
+        resetMyriadDevice_0();
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::dnn::shrinkCaffeModel(String src, String dst, vector_String layersTypes = std::vector<String>())
+    //
+
+    //javadoc: shrinkCaffeModel(src, dst, layersTypes)
+    public static void shrinkCaffeModel(String src, String dst, List<String> layersTypes)
+    {
+        
+        shrinkCaffeModel_0(src, dst, layersTypes);
+        
+        return;
+    }
+
+    //javadoc: shrinkCaffeModel(src, dst)
+    public static void shrinkCaffeModel(String src, String dst)
+    {
+        
+        shrinkCaffeModel_1(src, dst);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::dnn::writeTextGraph(String model, String output)
+    //
+
+    //javadoc: writeTextGraph(model, output)
+    public static void writeTextGraph(String model, String output)
+    {
+        
+        writeTextGraph_0(model, output);
+        
+        return;
+    }
+
+
+
+
+    // C++:  Mat cv::dnn::blobFromImage(Mat image, double scalefactor = 1.0, Size size = Size(), Scalar mean = Scalar(), bool swapRB = false, bool crop = false, int ddepth = CV_32F)
+    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, int ddepth);
+    private static native long blobFromImage_1(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_2(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);
+    private static native long blobFromImage_3(long image_nativeObj, double scalefactor, double size_width, double size_height, double mean_val0, double mean_val1, double mean_val2, double mean_val3);
+    private static native long blobFromImage_4(long image_nativeObj, double scalefactor, double size_width, double size_height);
+    private static native long blobFromImage_5(long image_nativeObj, double scalefactor);
+    private static native long blobFromImage_6(long image_nativeObj);
+
+    // C++:  Mat cv::dnn::blobFromImages(vector_Mat images, double scalefactor = 1.0, Size size = Size(), Scalar mean = Scalar(), bool swapRB = false, bool crop = false, int ddepth = CV_32F)
+    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, int ddepth);
+    private static native long blobFromImages_1(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_2(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);
+    private static native long blobFromImages_3(long images_mat_nativeObj, double scalefactor, double size_width, double size_height, double mean_val0, double mean_val1, double mean_val2, double mean_val3);
+    private static native long blobFromImages_4(long images_mat_nativeObj, double scalefactor, double size_width, double size_height);
+    private static native long blobFromImages_5(long images_mat_nativeObj, double scalefactor);
+    private static native long blobFromImages_6(long images_mat_nativeObj);
+
+    // C++:  Mat cv::dnn::readTensorFromONNX(String path)
+    private static native long readTensorFromONNX_0(String path);
+
+    // C++:  Mat cv::dnn::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 cv::dnn::readNet(String framework, vector_uchar bufferModel, vector_uchar bufferConfig = std::vector<uchar>())
+    private static native long readNet_0(String framework, long bufferModel_mat_nativeObj, long bufferConfig_mat_nativeObj);
+    private static native long readNet_1(String framework, long bufferModel_mat_nativeObj);
+
+    // C++:  Net cv::dnn::readNet(String model, String config = "", String framework = "")
+    private static native long readNet_2(String model, String config, String framework);
+    private static native long readNet_3(String model, String config);
+    private static native long readNet_4(String model);
+
+    // C++:  Net cv::dnn::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 cv::dnn::readNetFromCaffe(vector_uchar bufferProto, vector_uchar bufferModel = std::vector<uchar>())
+    private static native long readNetFromCaffe_2(long bufferProto_mat_nativeObj, long bufferModel_mat_nativeObj);
+    private static native long readNetFromCaffe_3(long bufferProto_mat_nativeObj);
+
+    // C++:  Net cv::dnn::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 cv::dnn::readNetFromDarknet(vector_uchar bufferCfg, vector_uchar bufferModel = std::vector<uchar>())
+    private static native long readNetFromDarknet_2(long bufferCfg_mat_nativeObj, long bufferModel_mat_nativeObj);
+    private static native long readNetFromDarknet_3(long bufferCfg_mat_nativeObj);
+
+    // C++:  Net cv::dnn::readNetFromModelOptimizer(String xml, String bin)
+    private static native long readNetFromModelOptimizer_0(String xml, String bin);
+
+    // C++:  Net cv::dnn::readNetFromONNX(String onnxFile)
+    private static native long readNetFromONNX_0(String onnxFile);
+
+    // C++:  Net cv::dnn::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 cv::dnn::readNetFromTensorflow(vector_uchar bufferModel, vector_uchar bufferConfig = std::vector<uchar>())
+    private static native long readNetFromTensorflow_2(long bufferModel_mat_nativeObj, long bufferConfig_mat_nativeObj);
+    private static native long readNetFromTensorflow_3(long bufferModel_mat_nativeObj);
+
+    // C++:  Net cv::dnn::readNetFromTorch(String model, bool isBinary = true, bool evaluate = true)
+    private static native long readNetFromTorch_0(String model, boolean isBinary, boolean evaluate);
+    private static native long readNetFromTorch_1(String model, boolean isBinary);
+    private static native long readNetFromTorch_2(String model);
+
+    // C++:  String cv::dnn::getInferenceEngineVPUType()
+    private static native String getInferenceEngineVPUType_0();
+
+    // C++:  void cv::dnn::NMSBoxes(vector_Rect bboxes, vector_float scores, float score_threshold, float nms_threshold, vector_int& indices, float eta = 1.f, int top_k = 0)
+    private static native void NMSBoxes_0(long bboxes_mat_nativeObj, long scores_mat_nativeObj, float score_threshold, float nms_threshold, long indices_mat_nativeObj, float eta, int top_k);
+    private static native void NMSBoxes_1(long bboxes_mat_nativeObj, long scores_mat_nativeObj, float score_threshold, float nms_threshold, long indices_mat_nativeObj, float eta);
+    private static native void NMSBoxes_2(long bboxes_mat_nativeObj, long scores_mat_nativeObj, float score_threshold, float nms_threshold, long indices_mat_nativeObj);
+
+    // C++:  void cv::dnn::NMSBoxes(vector_Rect2d bboxes, vector_float scores, float score_threshold, float nms_threshold, vector_int& indices, float eta = 1.f, int top_k = 0)
+    private static native void NMSBoxes_3(long bboxes_mat_nativeObj, long scores_mat_nativeObj, float score_threshold, float nms_threshold, long indices_mat_nativeObj, float eta, int top_k);
+    private static native void NMSBoxes_4(long bboxes_mat_nativeObj, long scores_mat_nativeObj, float score_threshold, float nms_threshold, long indices_mat_nativeObj, float eta);
+    private static native void NMSBoxes_5(long bboxes_mat_nativeObj, long scores_mat_nativeObj, float score_threshold, float nms_threshold, long indices_mat_nativeObj);
+
+    // C++:  void cv::dnn::NMSBoxes(vector_RotatedRect bboxes, vector_float scores, float score_threshold, float nms_threshold, vector_int& indices, float eta = 1.f, int top_k = 0)
+    private static native void NMSBoxesRotated_0(long bboxes_mat_nativeObj, long scores_mat_nativeObj, float score_threshold, float nms_threshold, long indices_mat_nativeObj, float eta, int top_k);
+    private static native void NMSBoxesRotated_1(long bboxes_mat_nativeObj, long scores_mat_nativeObj, float score_threshold, float nms_threshold, long indices_mat_nativeObj, float eta);
+    private static native void NMSBoxesRotated_2(long bboxes_mat_nativeObj, long scores_mat_nativeObj, float score_threshold, float nms_threshold, long indices_mat_nativeObj);
+
+    // C++:  void cv::dnn::imagesFromBlob(Mat blob_, vector_Mat& images_)
+    private static native void imagesFromBlob_0(long blob__nativeObj, long images__mat_nativeObj);
+
+    // C++:  void cv::dnn::resetMyriadDevice()
+    private static native void resetMyriadDevice_0();
+
+    // C++:  void cv::dnn::shrinkCaffeModel(String src, String dst, vector_String layersTypes = std::vector<String>())
+    private static native void shrinkCaffeModel_0(String src, String dst, List<String> layersTypes);
+    private static native void shrinkCaffeModel_1(String src, String dst);
+
+    // C++:  void cv::dnn::writeTextGraph(String model, String output)
+    private static native void writeTextGraph_0(String model, String output);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/dnn/Layer.java b/opencv41/src/main/java/org/opencv/dnn/Layer.java
new file mode 100644 (file)
index 0000000..e1384c6
--- /dev/null
@@ -0,0 +1,177 @@
+//
+// 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); }
+
+    // internal usage only
+    public static Layer __fromPtr__(long addr) { return new Layer(addr); }
+
+    //
+    // C++:  int cv::dnn::Layer::outputNameToIndex(String outputName)
+    //
+
+    //javadoc: Layer::outputNameToIndex(outputName)
+    public  int outputNameToIndex(String outputName)
+    {
+        
+        int retVal = outputNameToIndex_0(nativeObj, outputName);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::dnn::Layer::finalize(vector_Mat inputs, vector_Mat& outputs)
+    //
+
+    //javadoc: Layer::finalize(inputs, outputs)
+    public  void finalize(List<Mat> inputs, List<Mat> outputs)
+    {
+        Mat inputs_mat = Converters.vector_Mat_to_Mat(inputs);
+        Mat outputs_mat = new Mat();
+        finalize_0(nativeObj, inputs_mat.nativeObj, outputs_mat.nativeObj);
+        Converters.Mat_to_vector_Mat(outputs_mat, outputs);
+        outputs_mat.release();
+        return;
+    }
+
+
+    //
+    // C++:  void cv::dnn::Layer::run(vector_Mat inputs, vector_Mat& outputs, vector_Mat& internals)
+    //
+
+    //javadoc: Layer::run(inputs, outputs, internals)
+    @Deprecated
+    public  void run(List<Mat> inputs, List<Mat> outputs, List<Mat> 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<Mat> get_blobs()
+    {
+        List<Mat> retVal = new ArrayList<Mat>();
+        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<Mat> 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++:  int cv::dnn::Layer::outputNameToIndex(String outputName)
+    private static native int outputNameToIndex_0(long nativeObj, String outputName);
+
+    // C++:  void cv::dnn::Layer::finalize(vector_Mat inputs, vector_Mat& outputs)
+    private static native void finalize_0(long nativeObj, long inputs_mat_nativeObj, long outputs_mat_nativeObj);
+
+    // C++:  void cv::dnn::Layer::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/opencv41/src/main/java/org/opencv/dnn/Net.java b/opencv41/src/main/java/org/opencv/dnn/Net.java
new file mode 100644 (file)
index 0000000..64cabf0
--- /dev/null
@@ -0,0 +1,643 @@
+//
+// 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.core.Scalar;
+import org.opencv.dnn.DictValue;
+import org.opencv.dnn.Layer;
+import org.opencv.dnn.Net;
+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; }
+
+    // internal usage only
+    public static Net __fromPtr__(long addr) { return new Net(addr); }
+
+    //
+    // C++:   cv::dnn::Net::Net()
+    //
+
+    //javadoc: Net::Net()
+    public   Net()
+    {
+        
+        nativeObj = Net_0();
+        
+        return;
+    }
+
+
+    //
+    // C++:  Mat cv::dnn::Net::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 cv::dnn::Net::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++: static Net cv::dnn::Net::readFromModelOptimizer(String xml, String bin)
+    //
+
+    //javadoc: Net::readFromModelOptimizer(xml, bin)
+    public static Net readFromModelOptimizer(String xml, String bin)
+    {
+        
+        Net retVal = new Net(readFromModelOptimizer_0(xml, bin));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Ptr_Layer cv::dnn::Net::getLayer(LayerId layerId)
+    //
+
+    //javadoc: Net::getLayer(layerId)
+    public  Layer getLayer(DictValue layerId)
+    {
+        
+        Layer retVal = Layer.__fromPtr__(getLayer_0(nativeObj, layerId.getNativeObjAddr()));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::dnn::Net::empty()
+    //
+
+    //javadoc: Net::empty()
+    public  boolean empty()
+    {
+        
+        boolean retVal = empty_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::dnn::Net::getLayerId(String layer)
+    //
+
+    //javadoc: Net::getLayerId(layer)
+    public  int getLayerId(String layer)
+    {
+        
+        int retVal = getLayerId_0(nativeObj, layer);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::dnn::Net::getLayersCount(String layerType)
+    //
+
+    //javadoc: Net::getLayersCount(layerType)
+    public  int getLayersCount(String layerType)
+    {
+        
+        int retVal = getLayersCount_0(nativeObj, layerType);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int64 cv::dnn::Net::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 cv::dnn::Net::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 cv::dnn::Net::getFLOPS(int layerId, vector_MatShape netInputShapes)
+    //
+
+    //javadoc: Net::getFLOPS(layerId, netInputShapes)
+    public  long getFLOPS(int layerId, List<MatOfInt> netInputShapes)
+    {
+        
+        long retVal = getFLOPS_2(nativeObj, layerId, netInputShapes);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int64 cv::dnn::Net::getFLOPS(vector_MatShape netInputShapes)
+    //
+
+    //javadoc: Net::getFLOPS(netInputShapes)
+    public  long getFLOPS(List<MatOfInt> netInputShapes)
+    {
+        
+        long retVal = getFLOPS_3(nativeObj, netInputShapes);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int64 cv::dnn::Net::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 cv::dnn::Net::getLayerNames()
+    //
+
+    //javadoc: Net::getLayerNames()
+    public  List<String> getLayerNames()
+    {
+        
+        List<String> retVal = getLayerNames_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  vector_String cv::dnn::Net::getUnconnectedOutLayersNames()
+    //
+
+    //javadoc: Net::getUnconnectedOutLayersNames()
+    public  List<String> getUnconnectedOutLayersNames()
+    {
+        
+        List<String> retVal = getUnconnectedOutLayersNames_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  vector_int cv::dnn::Net::getUnconnectedOutLayers()
+    //
+
+    //javadoc: Net::getUnconnectedOutLayers()
+    public  MatOfInt getUnconnectedOutLayers()
+    {
+        
+        MatOfInt retVal = MatOfInt.fromNativeAddr(getUnconnectedOutLayers_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::dnn::Net::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 cv::dnn::Net::enableFusion(bool fusion)
+    //
+
+    //javadoc: Net::enableFusion(fusion)
+    public  void enableFusion(boolean fusion)
+    {
+        
+        enableFusion_0(nativeObj, fusion);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::dnn::Net::forward(vector_Mat& outputBlobs, String outputName = String())
+    //
+
+    //javadoc: Net::forward(outputBlobs, outputName)
+    public  void forward(List<Mat> outputBlobs, String outputName)
+    {
+        Mat outputBlobs_mat = new Mat();
+        forward_2(nativeObj, outputBlobs_mat.nativeObj, outputName);
+        Converters.Mat_to_vector_Mat(outputBlobs_mat, outputBlobs);
+        outputBlobs_mat.release();
+        return;
+    }
+
+    //javadoc: Net::forward(outputBlobs)
+    public  void forward(List<Mat> outputBlobs)
+    {
+        Mat outputBlobs_mat = new Mat();
+        forward_3(nativeObj, outputBlobs_mat.nativeObj);
+        Converters.Mat_to_vector_Mat(outputBlobs_mat, outputBlobs);
+        outputBlobs_mat.release();
+        return;
+    }
+
+
+    //
+    // C++:  void cv::dnn::Net::forward(vector_Mat& outputBlobs, vector_String outBlobNames)
+    //
+
+    //javadoc: Net::forward(outputBlobs, outBlobNames)
+    public  void forward(List<Mat> outputBlobs, List<String> outBlobNames)
+    {
+        Mat outputBlobs_mat = new Mat();
+        forward_4(nativeObj, outputBlobs_mat.nativeObj, outBlobNames);
+        Converters.Mat_to_vector_Mat(outputBlobs_mat, outputBlobs);
+        outputBlobs_mat.release();
+        return;
+    }
+
+
+    //
+    // C++:  void cv::dnn::Net::forward(vector_vector_Mat& outputBlobs, vector_String outBlobNames)
+    //
+
+    // Unknown type 'vector_vector_Mat' (O), skipping the function
+
+
+    //
+    // C++:  void cv::dnn::Net::getLayerTypes(vector_String& layersTypes)
+    //
+
+    //javadoc: Net::getLayerTypes(layersTypes)
+    public  void getLayerTypes(List<String> layersTypes)
+    {
+        
+        getLayerTypes_0(nativeObj, layersTypes);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::dnn::Net::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 cv::dnn::Net::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 cv::dnn::Net::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 cv::dnn::Net::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 cv::dnn::Net::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<MatOfInt> 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 cv::dnn::Net::setHalideScheduler(String scheduler)
+    //
+
+    //javadoc: Net::setHalideScheduler(scheduler)
+    public  void setHalideScheduler(String scheduler)
+    {
+        
+        setHalideScheduler_0(nativeObj, scheduler);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::dnn::Net::setInput(Mat blob, String name = "", double scalefactor = 1.0, Scalar mean = Scalar())
+    //
+
+    //javadoc: Net::setInput(blob, name, scalefactor, mean)
+    public  void setInput(Mat blob, String name, double scalefactor, Scalar mean)
+    {
+        
+        setInput_0(nativeObj, blob.nativeObj, name, scalefactor, mean.val[0], mean.val[1], mean.val[2], mean.val[3]);
+        
+        return;
+    }
+
+    //javadoc: Net::setInput(blob, name, scalefactor)
+    public  void setInput(Mat blob, String name, double scalefactor)
+    {
+        
+        setInput_1(nativeObj, blob.nativeObj, name, scalefactor);
+        
+        return;
+    }
+
+    //javadoc: Net::setInput(blob, name)
+    public  void setInput(Mat blob, String name)
+    {
+        
+        setInput_2(nativeObj, blob.nativeObj, name);
+        
+        return;
+    }
+
+    //javadoc: Net::setInput(blob)
+    public  void setInput(Mat blob)
+    {
+        
+        setInput_3(nativeObj, blob.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::dnn::Net::setInputsNames(vector_String inputBlobNames)
+    //
+
+    //javadoc: Net::setInputsNames(inputBlobNames)
+    public  void setInputsNames(List<String> inputBlobNames)
+    {
+        
+        setInputsNames_0(nativeObj, inputBlobNames);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::dnn::Net::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 cv::dnn::Net::setPreferableBackend(int backendId)
+    //
+
+    //javadoc: Net::setPreferableBackend(backendId)
+    public  void setPreferableBackend(int backendId)
+    {
+        
+        setPreferableBackend_0(nativeObj, backendId);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::dnn::Net::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++:   cv::dnn::Net::Net()
+    private static native long Net_0();
+
+    // C++:  Mat cv::dnn::Net::forward(String outputName = String())
+    private static native long forward_0(long nativeObj, String outputName);
+    private static native long forward_1(long nativeObj);
+
+    // C++:  Mat cv::dnn::Net::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++: static Net cv::dnn::Net::readFromModelOptimizer(String xml, String bin)
+    private static native long readFromModelOptimizer_0(String xml, String bin);
+
+    // C++:  Ptr_Layer cv::dnn::Net::getLayer(LayerId layerId)
+    private static native long getLayer_0(long nativeObj, long layerId_nativeObj);
+
+    // C++:  bool cv::dnn::Net::empty()
+    private static native boolean empty_0(long nativeObj);
+
+    // C++:  int cv::dnn::Net::getLayerId(String layer)
+    private static native int getLayerId_0(long nativeObj, String layer);
+
+    // C++:  int cv::dnn::Net::getLayersCount(String layerType)
+    private static native int getLayersCount_0(long nativeObj, String layerType);
+
+    // C++:  int64 cv::dnn::Net::getFLOPS(MatShape netInputShape)
+    private static native long getFLOPS_0(long nativeObj, long netInputShape_mat_nativeObj);
+
+    // C++:  int64 cv::dnn::Net::getFLOPS(int layerId, MatShape netInputShape)
+    private static native long getFLOPS_1(long nativeObj, int layerId, long netInputShape_mat_nativeObj);
+
+    // C++:  int64 cv::dnn::Net::getFLOPS(int layerId, vector_MatShape netInputShapes)
+    private static native long getFLOPS_2(long nativeObj, int layerId, List<MatOfInt> netInputShapes);
+
+    // C++:  int64 cv::dnn::Net::getFLOPS(vector_MatShape netInputShapes)
+    private static native long getFLOPS_3(long nativeObj, List<MatOfInt> netInputShapes);
+
+    // C++:  int64 cv::dnn::Net::getPerfProfile(vector_double& timings)
+    private static native long getPerfProfile_0(long nativeObj, long timings_mat_nativeObj);
+
+    // C++:  vector_String cv::dnn::Net::getLayerNames()
+    private static native List<String> getLayerNames_0(long nativeObj);
+
+    // C++:  vector_String cv::dnn::Net::getUnconnectedOutLayersNames()
+    private static native List<String> getUnconnectedOutLayersNames_0(long nativeObj);
+
+    // C++:  vector_int cv::dnn::Net::getUnconnectedOutLayers()
+    private static native long getUnconnectedOutLayers_0(long nativeObj);
+
+    // C++:  void cv::dnn::Net::connect(String outPin, String inpPin)
+    private static native void connect_0(long nativeObj, String outPin, String inpPin);
+
+    // C++:  void cv::dnn::Net::enableFusion(bool fusion)
+    private static native void enableFusion_0(long nativeObj, boolean fusion);
+
+    // C++:  void cv::dnn::Net::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 cv::dnn::Net::forward(vector_Mat& outputBlobs, vector_String outBlobNames)
+    private static native void forward_4(long nativeObj, long outputBlobs_mat_nativeObj, List<String> outBlobNames);
+
+    // C++:  void cv::dnn::Net::getLayerTypes(vector_String& layersTypes)
+    private static native void getLayerTypes_0(long nativeObj, List<String> layersTypes);
+
+    // C++:  void cv::dnn::Net::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 cv::dnn::Net::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 cv::dnn::Net::getMemoryConsumption(int layerId, vector_MatShape netInputShapes, size_t& weights, size_t& blobs)
+    private static native void getMemoryConsumption_2(long nativeObj, int layerId, List<MatOfInt> netInputShapes, double[] weights_out, double[] blobs_out);
+
+    // C++:  void cv::dnn::Net::setHalideScheduler(String scheduler)
+    private static native void setHalideScheduler_0(long nativeObj, String scheduler);
+
+    // C++:  void cv::dnn::Net::setInput(Mat blob, String name = "", double scalefactor = 1.0, Scalar mean = Scalar())
+    private static native void setInput_0(long nativeObj, long blob_nativeObj, String name, double scalefactor, double mean_val0, double mean_val1, double mean_val2, double mean_val3);
+    private static native void setInput_1(long nativeObj, long blob_nativeObj, String name, double scalefactor);
+    private static native void setInput_2(long nativeObj, long blob_nativeObj, String name);
+    private static native void setInput_3(long nativeObj, long blob_nativeObj);
+
+    // C++:  void cv::dnn::Net::setInputsNames(vector_String inputBlobNames)
+    private static native void setInputsNames_0(long nativeObj, List<String> inputBlobNames);
+
+    // C++:  void cv::dnn::Net::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 cv::dnn::Net::setPreferableBackend(int backendId)
+    private static native void setPreferableBackend_0(long nativeObj, int backendId);
+
+    // C++:  void cv::dnn::Net::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/opencv41/src/main/java/org/opencv/features2d/AKAZE.java b/opencv41/src/main/java/org/opencv/features2d/AKAZE.java
new file mode 100644 (file)
index 0000000..016968a
--- /dev/null
@@ -0,0 +1,380 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import java.lang.String;
+import org.opencv.features2d.AKAZE;
+import org.opencv.features2d.Feature2D;
+
+// C++: class AKAZE
+//javadoc: AKAZE
+
+public class AKAZE extends Feature2D {
+
+    protected AKAZE(long addr) { super(addr); }
+
+    // internal usage only
+    public static AKAZE __fromPtr__(long addr) { return new AKAZE(addr); }
+
+    // C++: enum DescriptorType
+    public static final int
+            DESCRIPTOR_KAZE_UPRIGHT = 2,
+            DESCRIPTOR_KAZE = 3,
+            DESCRIPTOR_MLDB_UPRIGHT = 4,
+            DESCRIPTOR_MLDB = 5;
+
+
+    //
+    // C++:  AKAZE_DescriptorType cv::AKAZE::getDescriptorType()
+    //
+
+    //javadoc: AKAZE::getDescriptorType()
+    public  int getDescriptorType()
+    {
+        
+        int retVal = getDescriptorType_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  KAZE_DiffusivityType cv::AKAZE::getDiffusivity()
+    //
+
+    //javadoc: AKAZE::getDiffusivity()
+    public  int getDiffusivity()
+    {
+        
+        int retVal = getDiffusivity_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_AKAZE cv::AKAZE::create(AKAZE_DescriptorType descriptor_type = AKAZE::DESCRIPTOR_MLDB, int descriptor_size = 0, int descriptor_channels = 3, float threshold = 0.001f, int nOctaves = 4, int nOctaveLayers = 4, KAZE_DiffusivityType 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 = AKAZE.__fromPtr__(create_0(descriptor_type, descriptor_size, descriptor_channels, threshold, nOctaves, nOctaveLayers, diffusivity));
+        
+        return retVal;
+    }
+
+    //javadoc: AKAZE::create(descriptor_type, descriptor_size, descriptor_channels, threshold, nOctaves, nOctaveLayers)
+    public static AKAZE create(int descriptor_type, int descriptor_size, int descriptor_channels, float threshold, int nOctaves, int nOctaveLayers)
+    {
+        
+        AKAZE retVal = AKAZE.__fromPtr__(create_1(descriptor_type, descriptor_size, descriptor_channels, threshold, nOctaves, nOctaveLayers));
+        
+        return retVal;
+    }
+
+    //javadoc: AKAZE::create(descriptor_type, descriptor_size, descriptor_channels, threshold, nOctaves)
+    public static AKAZE create(int descriptor_type, int descriptor_size, int descriptor_channels, float threshold, int nOctaves)
+    {
+        
+        AKAZE retVal = AKAZE.__fromPtr__(create_2(descriptor_type, descriptor_size, descriptor_channels, threshold, nOctaves));
+        
+        return retVal;
+    }
+
+    //javadoc: AKAZE::create(descriptor_type, descriptor_size, descriptor_channels, threshold)
+    public static AKAZE create(int descriptor_type, int descriptor_size, int descriptor_channels, float threshold)
+    {
+        
+        AKAZE retVal = AKAZE.__fromPtr__(create_3(descriptor_type, descriptor_size, descriptor_channels, threshold));
+        
+        return retVal;
+    }
+
+    //javadoc: AKAZE::create(descriptor_type, descriptor_size, descriptor_channels)
+    public static AKAZE create(int descriptor_type, int descriptor_size, int descriptor_channels)
+    {
+        
+        AKAZE retVal = AKAZE.__fromPtr__(create_4(descriptor_type, descriptor_size, descriptor_channels));
+        
+        return retVal;
+    }
+
+    //javadoc: AKAZE::create(descriptor_type, descriptor_size)
+    public static AKAZE create(int descriptor_type, int descriptor_size)
+    {
+        
+        AKAZE retVal = AKAZE.__fromPtr__(create_5(descriptor_type, descriptor_size));
+        
+        return retVal;
+    }
+
+    //javadoc: AKAZE::create(descriptor_type)
+    public static AKAZE create(int descriptor_type)
+    {
+        
+        AKAZE retVal = AKAZE.__fromPtr__(create_6(descriptor_type));
+        
+        return retVal;
+    }
+
+    //javadoc: AKAZE::create()
+    public static AKAZE create()
+    {
+        
+        AKAZE retVal = AKAZE.__fromPtr__(create_7());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  String cv::AKAZE::getDefaultName()
+    //
+
+    //javadoc: AKAZE::getDefaultName()
+    public  String getDefaultName()
+    {
+        
+        String retVal = getDefaultName_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::AKAZE::getThreshold()
+    //
+
+    //javadoc: AKAZE::getThreshold()
+    public  double getThreshold()
+    {
+        
+        double retVal = getThreshold_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::AKAZE::getDescriptorChannels()
+    //
+
+    //javadoc: AKAZE::getDescriptorChannels()
+    public  int getDescriptorChannels()
+    {
+        
+        int retVal = getDescriptorChannels_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::AKAZE::getDescriptorSize()
+    //
+
+    //javadoc: AKAZE::getDescriptorSize()
+    public  int getDescriptorSize()
+    {
+        
+        int retVal = getDescriptorSize_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::AKAZE::getNOctaveLayers()
+    //
+
+    //javadoc: AKAZE::getNOctaveLayers()
+    public  int getNOctaveLayers()
+    {
+        
+        int retVal = getNOctaveLayers_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::AKAZE::getNOctaves()
+    //
+
+    //javadoc: AKAZE::getNOctaves()
+    public  int getNOctaves()
+    {
+        
+        int retVal = getNOctaves_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::AKAZE::setDescriptorChannels(int dch)
+    //
+
+    //javadoc: AKAZE::setDescriptorChannels(dch)
+    public  void setDescriptorChannels(int dch)
+    {
+        
+        setDescriptorChannels_0(nativeObj, dch);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::AKAZE::setDescriptorSize(int dsize)
+    //
+
+    //javadoc: AKAZE::setDescriptorSize(dsize)
+    public  void setDescriptorSize(int dsize)
+    {
+        
+        setDescriptorSize_0(nativeObj, dsize);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::AKAZE::setDescriptorType(AKAZE_DescriptorType dtype)
+    //
+
+    //javadoc: AKAZE::setDescriptorType(dtype)
+    public  void setDescriptorType(int dtype)
+    {
+        
+        setDescriptorType_0(nativeObj, dtype);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::AKAZE::setDiffusivity(KAZE_DiffusivityType diff)
+    //
+
+    //javadoc: AKAZE::setDiffusivity(diff)
+    public  void setDiffusivity(int diff)
+    {
+        
+        setDiffusivity_0(nativeObj, diff);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::AKAZE::setNOctaveLayers(int octaveLayers)
+    //
+
+    //javadoc: AKAZE::setNOctaveLayers(octaveLayers)
+    public  void setNOctaveLayers(int octaveLayers)
+    {
+        
+        setNOctaveLayers_0(nativeObj, octaveLayers);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::AKAZE::setNOctaves(int octaves)
+    //
+
+    //javadoc: AKAZE::setNOctaves(octaves)
+    public  void setNOctaves(int octaves)
+    {
+        
+        setNOctaves_0(nativeObj, octaves);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::AKAZE::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++:  AKAZE_DescriptorType cv::AKAZE::getDescriptorType()
+    private static native int getDescriptorType_0(long nativeObj);
+
+    // C++:  KAZE_DiffusivityType cv::AKAZE::getDiffusivity()
+    private static native int getDiffusivity_0(long nativeObj);
+
+    // C++: static Ptr_AKAZE cv::AKAZE::create(AKAZE_DescriptorType descriptor_type = AKAZE::DESCRIPTOR_MLDB, int descriptor_size = 0, int descriptor_channels = 3, float threshold = 0.001f, int nOctaves = 4, int nOctaveLayers = 4, KAZE_DiffusivityType 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(int descriptor_type, int descriptor_size, int descriptor_channels, float threshold, int nOctaves, int nOctaveLayers);
+    private static native long create_2(int descriptor_type, int descriptor_size, int descriptor_channels, float threshold, int nOctaves);
+    private static native long create_3(int descriptor_type, int descriptor_size, int descriptor_channels, float threshold);
+    private static native long create_4(int descriptor_type, int descriptor_size, int descriptor_channels);
+    private static native long create_5(int descriptor_type, int descriptor_size);
+    private static native long create_6(int descriptor_type);
+    private static native long create_7();
+
+    // C++:  String cv::AKAZE::getDefaultName()
+    private static native String getDefaultName_0(long nativeObj);
+
+    // C++:  double cv::AKAZE::getThreshold()
+    private static native double getThreshold_0(long nativeObj);
+
+    // C++:  int cv::AKAZE::getDescriptorChannels()
+    private static native int getDescriptorChannels_0(long nativeObj);
+
+    // C++:  int cv::AKAZE::getDescriptorSize()
+    private static native int getDescriptorSize_0(long nativeObj);
+
+    // C++:  int cv::AKAZE::getNOctaveLayers()
+    private static native int getNOctaveLayers_0(long nativeObj);
+
+    // C++:  int cv::AKAZE::getNOctaves()
+    private static native int getNOctaves_0(long nativeObj);
+
+    // C++:  void cv::AKAZE::setDescriptorChannels(int dch)
+    private static native void setDescriptorChannels_0(long nativeObj, int dch);
+
+    // C++:  void cv::AKAZE::setDescriptorSize(int dsize)
+    private static native void setDescriptorSize_0(long nativeObj, int dsize);
+
+    // C++:  void cv::AKAZE::setDescriptorType(AKAZE_DescriptorType dtype)
+    private static native void setDescriptorType_0(long nativeObj, int dtype);
+
+    // C++:  void cv::AKAZE::setDiffusivity(KAZE_DiffusivityType diff)
+    private static native void setDiffusivity_0(long nativeObj, int diff);
+
+    // C++:  void cv::AKAZE::setNOctaveLayers(int octaveLayers)
+    private static native void setNOctaveLayers_0(long nativeObj, int octaveLayers);
+
+    // C++:  void cv::AKAZE::setNOctaves(int octaves)
+    private static native void setNOctaves_0(long nativeObj, int octaves);
+
+    // C++:  void cv::AKAZE::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/opencv41/src/main/java/org/opencv/features2d/AgastFeatureDetector.java b/opencv41/src/main/java/org/opencv/features2d/AgastFeatureDetector.java
new file mode 100644 (file)
index 0000000..71e039f
--- /dev/null
@@ -0,0 +1,210 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import java.lang.String;
+import org.opencv.features2d.AgastFeatureDetector;
+import org.opencv.features2d.Feature2D;
+
+// C++: class AgastFeatureDetector
+//javadoc: AgastFeatureDetector
+
+public class AgastFeatureDetector extends Feature2D {
+
+    protected AgastFeatureDetector(long addr) { super(addr); }
+
+    // internal usage only
+    public static AgastFeatureDetector __fromPtr__(long addr) { return new AgastFeatureDetector(addr); }
+
+    // C++: enum <unnamed>
+    public static final int
+            THRESHOLD = 10000,
+            NONMAX_SUPPRESSION = 10001;
+
+
+    // C++: enum DetectorType
+    public static final int
+            AGAST_5_8 = 0,
+            AGAST_7_12d = 1,
+            AGAST_7_12s = 2,
+            OAST_9_16 = 3;
+
+
+    //
+    // C++:  AgastFeatureDetector_DetectorType cv::AgastFeatureDetector::getType()
+    //
+
+    //javadoc: AgastFeatureDetector::getType()
+    public  int getType()
+    {
+        
+        int retVal = getType_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_AgastFeatureDetector cv::AgastFeatureDetector::create(int threshold = 10, bool nonmaxSuppression = true, AgastFeatureDetector_DetectorType type = AgastFeatureDetector::OAST_9_16)
+    //
+
+    //javadoc: AgastFeatureDetector::create(threshold, nonmaxSuppression, type)
+    public static AgastFeatureDetector create(int threshold, boolean nonmaxSuppression, int type)
+    {
+        
+        AgastFeatureDetector retVal = AgastFeatureDetector.__fromPtr__(create_0(threshold, nonmaxSuppression, type));
+        
+        return retVal;
+    }
+
+    //javadoc: AgastFeatureDetector::create(threshold, nonmaxSuppression)
+    public static AgastFeatureDetector create(int threshold, boolean nonmaxSuppression)
+    {
+        
+        AgastFeatureDetector retVal = AgastFeatureDetector.__fromPtr__(create_1(threshold, nonmaxSuppression));
+        
+        return retVal;
+    }
+
+    //javadoc: AgastFeatureDetector::create(threshold)
+    public static AgastFeatureDetector create(int threshold)
+    {
+        
+        AgastFeatureDetector retVal = AgastFeatureDetector.__fromPtr__(create_2(threshold));
+        
+        return retVal;
+    }
+
+    //javadoc: AgastFeatureDetector::create()
+    public static AgastFeatureDetector create()
+    {
+        
+        AgastFeatureDetector retVal = AgastFeatureDetector.__fromPtr__(create_3());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  String cv::AgastFeatureDetector::getDefaultName()
+    //
+
+    //javadoc: AgastFeatureDetector::getDefaultName()
+    public  String getDefaultName()
+    {
+        
+        String retVal = getDefaultName_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::AgastFeatureDetector::getNonmaxSuppression()
+    //
+
+    //javadoc: AgastFeatureDetector::getNonmaxSuppression()
+    public  boolean getNonmaxSuppression()
+    {
+        
+        boolean retVal = getNonmaxSuppression_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::AgastFeatureDetector::getThreshold()
+    //
+
+    //javadoc: AgastFeatureDetector::getThreshold()
+    public  int getThreshold()
+    {
+        
+        int retVal = getThreshold_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::AgastFeatureDetector::setNonmaxSuppression(bool f)
+    //
+
+    //javadoc: AgastFeatureDetector::setNonmaxSuppression(f)
+    public  void setNonmaxSuppression(boolean f)
+    {
+        
+        setNonmaxSuppression_0(nativeObj, f);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::AgastFeatureDetector::setThreshold(int threshold)
+    //
+
+    //javadoc: AgastFeatureDetector::setThreshold(threshold)
+    public  void setThreshold(int threshold)
+    {
+        
+        setThreshold_0(nativeObj, threshold);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::AgastFeatureDetector::setType(AgastFeatureDetector_DetectorType type)
+    //
+
+    //javadoc: AgastFeatureDetector::setType(type)
+    public  void setType(int type)
+    {
+        
+        setType_0(nativeObj, type);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  AgastFeatureDetector_DetectorType cv::AgastFeatureDetector::getType()
+    private static native int getType_0(long nativeObj);
+
+    // C++: static Ptr_AgastFeatureDetector cv::AgastFeatureDetector::create(int threshold = 10, bool nonmaxSuppression = true, AgastFeatureDetector_DetectorType type = AgastFeatureDetector::OAST_9_16)
+    private static native long create_0(int threshold, boolean nonmaxSuppression, int type);
+    private static native long create_1(int threshold, boolean nonmaxSuppression);
+    private static native long create_2(int threshold);
+    private static native long create_3();
+
+    // C++:  String cv::AgastFeatureDetector::getDefaultName()
+    private static native String getDefaultName_0(long nativeObj);
+
+    // C++:  bool cv::AgastFeatureDetector::getNonmaxSuppression()
+    private static native boolean getNonmaxSuppression_0(long nativeObj);
+
+    // C++:  int cv::AgastFeatureDetector::getThreshold()
+    private static native int getThreshold_0(long nativeObj);
+
+    // C++:  void cv::AgastFeatureDetector::setNonmaxSuppression(bool f)
+    private static native void setNonmaxSuppression_0(long nativeObj, boolean f);
+
+    // C++:  void cv::AgastFeatureDetector::setThreshold(int threshold)
+    private static native void setThreshold_0(long nativeObj, int threshold);
+
+    // C++:  void cv::AgastFeatureDetector::setType(AgastFeatureDetector_DetectorType 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/opencv41/src/main/java/org/opencv/features2d/BFMatcher.java b/opencv41/src/main/java/org/opencv/features2d/BFMatcher.java
new file mode 100644 (file)
index 0000000..15a1ffa
--- /dev/null
@@ -0,0 +1,103 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import org.opencv.features2d.BFMatcher;
+import org.opencv.features2d.DescriptorMatcher;
+
+// C++: class BFMatcher
+//javadoc: BFMatcher
+
+public class BFMatcher extends DescriptorMatcher {
+
+    protected BFMatcher(long addr) { super(addr); }
+
+    // internal usage only
+    public static BFMatcher __fromPtr__(long addr) { return new BFMatcher(addr); }
+
+    //
+    // C++:   cv::BFMatcher::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(normType)
+    public   BFMatcher(int normType)
+    {
+        
+        super( BFMatcher_1(normType) );
+        
+        return;
+    }
+
+    //javadoc: BFMatcher::BFMatcher()
+    public   BFMatcher()
+    {
+        
+        super( BFMatcher_2() );
+        
+        return;
+    }
+
+
+    //
+    // C++: static Ptr_BFMatcher cv::BFMatcher::create(int normType = NORM_L2, bool crossCheck = false)
+    //
+
+    //javadoc: BFMatcher::create(normType, crossCheck)
+    public static BFMatcher create(int normType, boolean crossCheck)
+    {
+        
+        BFMatcher retVal = BFMatcher.__fromPtr__(create_0(normType, crossCheck));
+        
+        return retVal;
+    }
+
+    //javadoc: BFMatcher::create(normType)
+    public static BFMatcher create(int normType)
+    {
+        
+        BFMatcher retVal = BFMatcher.__fromPtr__(create_1(normType));
+        
+        return retVal;
+    }
+
+    //javadoc: BFMatcher::create()
+    public static BFMatcher create()
+    {
+        
+        BFMatcher retVal = BFMatcher.__fromPtr__(create_2());
+        
+        return retVal;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:   cv::BFMatcher::BFMatcher(int normType = NORM_L2, bool crossCheck = false)
+    private static native long BFMatcher_0(int normType, boolean crossCheck);
+    private static native long BFMatcher_1(int normType);
+    private static native long BFMatcher_2();
+
+    // C++: static Ptr_BFMatcher cv::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(int normType);
+    private static native long create_2();
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/features2d/BOWImgDescriptorExtractor.java b/opencv41/src/main/java/org/opencv/features2d/BOWImgDescriptorExtractor.java
new file mode 100644 (file)
index 0000000..6de2cb6
--- /dev/null
@@ -0,0 +1,127 @@
+//
+// 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; }
+
+    // internal usage only
+    public static BOWImgDescriptorExtractor __fromPtr__(long addr) { return new BOWImgDescriptorExtractor(addr); }
+
+    //
+    // C++:   cv::BOWImgDescriptorExtractor::BOWImgDescriptorExtractor(Ptr_DescriptorExtractor dextractor, Ptr_DescriptorMatcher dmatcher)
+    //
+
+    // Unknown type 'Ptr_DescriptorExtractor' (I), skipping the function
+
+
+    //
+    // C++:  Mat cv::BOWImgDescriptorExtractor::getVocabulary()
+    //
+
+    //javadoc: BOWImgDescriptorExtractor::getVocabulary()
+    public  Mat getVocabulary()
+    {
+        
+        Mat retVal = new Mat(getVocabulary_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::BOWImgDescriptorExtractor::descriptorSize()
+    //
+
+    //javadoc: BOWImgDescriptorExtractor::descriptorSize()
+    public  int descriptorSize()
+    {
+        
+        int retVal = descriptorSize_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::BOWImgDescriptorExtractor::descriptorType()
+    //
+
+    //javadoc: BOWImgDescriptorExtractor::descriptorType()
+    public  int descriptorType()
+    {
+        
+        int retVal = descriptorType_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::BOWImgDescriptorExtractor::compute2(Mat image, vector_KeyPoint keypoints, Mat& imgDescriptor)
+    //
+
+    //javadoc: BOWImgDescriptorExtractor::compute(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 cv::BOWImgDescriptorExtractor::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 cv::BOWImgDescriptorExtractor::getVocabulary()
+    private static native long getVocabulary_0(long nativeObj);
+
+    // C++:  int cv::BOWImgDescriptorExtractor::descriptorSize()
+    private static native int descriptorSize_0(long nativeObj);
+
+    // C++:  int cv::BOWImgDescriptorExtractor::descriptorType()
+    private static native int descriptorType_0(long nativeObj);
+
+    // C++:  void cv::BOWImgDescriptorExtractor::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 cv::BOWImgDescriptorExtractor::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/opencv41/src/main/java/org/opencv/features2d/BOWKMeansTrainer.java b/opencv41/src/main/java/org/opencv/features2d/BOWKMeansTrainer.java
new file mode 100644 (file)
index 0000000..c578aba
--- /dev/null
@@ -0,0 +1,111 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import org.opencv.core.Mat;
+import org.opencv.core.TermCriteria;
+import org.opencv.features2d.BOWTrainer;
+
+// C++: class BOWKMeansTrainer
+//javadoc: BOWKMeansTrainer
+
+public class BOWKMeansTrainer extends BOWTrainer {
+
+    protected BOWKMeansTrainer(long addr) { super(addr); }
+
+    // internal usage only
+    public static BOWKMeansTrainer __fromPtr__(long addr) { return new BOWKMeansTrainer(addr); }
+
+    //
+    // C++:   cv::BOWKMeansTrainer::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, termcrit, attempts)
+    public   BOWKMeansTrainer(int clusterCount, TermCriteria termcrit, int attempts)
+    {
+        
+        super( BOWKMeansTrainer_1(clusterCount, termcrit.type, termcrit.maxCount, termcrit.epsilon, attempts) );
+        
+        return;
+    }
+
+    //javadoc: BOWKMeansTrainer::BOWKMeansTrainer(clusterCount, termcrit)
+    public   BOWKMeansTrainer(int clusterCount, TermCriteria termcrit)
+    {
+        
+        super( BOWKMeansTrainer_2(clusterCount, termcrit.type, termcrit.maxCount, termcrit.epsilon) );
+        
+        return;
+    }
+
+    //javadoc: BOWKMeansTrainer::BOWKMeansTrainer(clusterCount)
+    public   BOWKMeansTrainer(int clusterCount)
+    {
+        
+        super( BOWKMeansTrainer_3(clusterCount) );
+        
+        return;
+    }
+
+
+    //
+    // C++:  Mat cv::BOWKMeansTrainer::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 cv::BOWKMeansTrainer::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++:   cv::BOWKMeansTrainer::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, int termcrit_type, int termcrit_maxCount, double termcrit_epsilon, int attempts);
+    private static native long BOWKMeansTrainer_2(int clusterCount, int termcrit_type, int termcrit_maxCount, double termcrit_epsilon);
+    private static native long BOWKMeansTrainer_3(int clusterCount);
+
+    // C++:  Mat cv::BOWKMeansTrainer::cluster(Mat descriptors)
+    private static native long cluster_0(long nativeObj, long descriptors_nativeObj);
+
+    // C++:  Mat cv::BOWKMeansTrainer::cluster()
+    private static native long cluster_1(long nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/features2d/BOWTrainer.java b/opencv41/src/main/java/org/opencv/features2d/BOWTrainer.java
new file mode 100644 (file)
index 0000000..80b2497
--- /dev/null
@@ -0,0 +1,136 @@
+//
+// 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; }
+
+    // internal usage only
+    public static BOWTrainer __fromPtr__(long addr) { return new BOWTrainer(addr); }
+
+    //
+    // C++:  Mat cv::BOWTrainer::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 cv::BOWTrainer::cluster()
+    //
+
+    //javadoc: BOWTrainer::cluster()
+    public  Mat cluster()
+    {
+        
+        Mat retVal = new Mat(cluster_1(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::BOWTrainer::descriptorsCount()
+    //
+
+    //javadoc: BOWTrainer::descriptorsCount()
+    public  int descriptorsCount()
+    {
+        
+        int retVal = descriptorsCount_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  vector_Mat cv::BOWTrainer::getDescriptors()
+    //
+
+    //javadoc: BOWTrainer::getDescriptors()
+    public  List<Mat> getDescriptors()
+    {
+        List<Mat> retVal = new ArrayList<Mat>();
+        Mat retValMat = new Mat(getDescriptors_0(nativeObj));
+        Converters.Mat_to_vector_Mat(retValMat, retVal);
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::BOWTrainer::add(Mat descriptors)
+    //
+
+    //javadoc: BOWTrainer::add(descriptors)
+    public  void add(Mat descriptors)
+    {
+        
+        add_0(nativeObj, descriptors.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BOWTrainer::clear()
+    //
+
+    //javadoc: BOWTrainer::clear()
+    public  void clear()
+    {
+        
+        clear_0(nativeObj);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  Mat cv::BOWTrainer::cluster(Mat descriptors)
+    private static native long cluster_0(long nativeObj, long descriptors_nativeObj);
+
+    // C++:  Mat cv::BOWTrainer::cluster()
+    private static native long cluster_1(long nativeObj);
+
+    // C++:  int cv::BOWTrainer::descriptorsCount()
+    private static native int descriptorsCount_0(long nativeObj);
+
+    // C++:  vector_Mat cv::BOWTrainer::getDescriptors()
+    private static native long getDescriptors_0(long nativeObj);
+
+    // C++:  void cv::BOWTrainer::add(Mat descriptors)
+    private static native void add_0(long nativeObj, long descriptors_nativeObj);
+
+    // C++:  void cv::BOWTrainer::clear()
+    private static native void clear_0(long nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/features2d/BRISK.java b/opencv41/src/main/java/org/opencv/features2d/BRISK.java
new file mode 100644 (file)
index 0000000..58247da
--- /dev/null
@@ -0,0 +1,272 @@
+//
+// 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.features2d.BRISK;
+import org.opencv.features2d.Feature2D;
+import org.opencv.utils.Converters;
+
+// C++: class BRISK
+//javadoc: BRISK
+
+public class BRISK extends Feature2D {
+
+    protected BRISK(long addr) { super(addr); }
+
+    // internal usage only
+    public static BRISK __fromPtr__(long addr) { return new BRISK(addr); }
+
+    //
+    // C++: static Ptr_BRISK cv::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<int>())
+    //
+
+    //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 = BRISK.__fromPtr__(create_0(thresh, octaves, radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax, dMin, indexChange_mat.nativeObj));
+        
+        return retVal;
+    }
+
+    //javadoc: BRISK::create(thresh, octaves, radiusList, numberList, dMax, dMin)
+    public static BRISK create(int thresh, int octaves, MatOfFloat radiusList, MatOfInt numberList, float dMax, float dMin)
+    {
+        Mat radiusList_mat = radiusList;
+        Mat numberList_mat = numberList;
+        BRISK retVal = BRISK.__fromPtr__(create_1(thresh, octaves, radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax, dMin));
+        
+        return retVal;
+    }
+
+    //javadoc: BRISK::create(thresh, octaves, radiusList, numberList, dMax)
+    public static BRISK create(int thresh, int octaves, MatOfFloat radiusList, MatOfInt numberList, float dMax)
+    {
+        Mat radiusList_mat = radiusList;
+        Mat numberList_mat = numberList;
+        BRISK retVal = BRISK.__fromPtr__(create_2(thresh, octaves, radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax));
+        
+        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 = BRISK.__fromPtr__(create_3(thresh, octaves, radiusList_mat.nativeObj, numberList_mat.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_BRISK cv::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 = BRISK.__fromPtr__(create_4(thresh, octaves, patternScale));
+        
+        return retVal;
+    }
+
+    //javadoc: BRISK::create(thresh, octaves)
+    public static BRISK create(int thresh, int octaves)
+    {
+        
+        BRISK retVal = BRISK.__fromPtr__(create_5(thresh, octaves));
+        
+        return retVal;
+    }
+
+    //javadoc: BRISK::create(thresh)
+    public static BRISK create(int thresh)
+    {
+        
+        BRISK retVal = BRISK.__fromPtr__(create_6(thresh));
+        
+        return retVal;
+    }
+
+    //javadoc: BRISK::create()
+    public static BRISK create()
+    {
+        
+        BRISK retVal = BRISK.__fromPtr__(create_7());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_BRISK cv::BRISK::create(vector_float radiusList, vector_int numberList, float dMax = 5.85f, float dMin = 8.2f, vector_int indexChange = std::vector<int>())
+    //
+
+    //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 = BRISK.__fromPtr__(create_8(radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax, dMin, indexChange_mat.nativeObj));
+        
+        return retVal;
+    }
+
+    //javadoc: BRISK::create(radiusList, numberList, dMax, dMin)
+    public static BRISK create(MatOfFloat radiusList, MatOfInt numberList, float dMax, float dMin)
+    {
+        Mat radiusList_mat = radiusList;
+        Mat numberList_mat = numberList;
+        BRISK retVal = BRISK.__fromPtr__(create_9(radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax, dMin));
+        
+        return retVal;
+    }
+
+    //javadoc: BRISK::create(radiusList, numberList, dMax)
+    public static BRISK create(MatOfFloat radiusList, MatOfInt numberList, float dMax)
+    {
+        Mat radiusList_mat = radiusList;
+        Mat numberList_mat = numberList;
+        BRISK retVal = BRISK.__fromPtr__(create_10(radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax));
+        
+        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 = BRISK.__fromPtr__(create_11(radiusList_mat.nativeObj, numberList_mat.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  String cv::BRISK::getDefaultName()
+    //
+
+    //javadoc: BRISK::getDefaultName()
+    public  String getDefaultName()
+    {
+        
+        String retVal = getDefaultName_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::BRISK::getOctaves()
+    //
+
+    //javadoc: BRISK::getOctaves()
+    public  int getOctaves()
+    {
+        
+        int retVal = getOctaves_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::BRISK::getThreshold()
+    //
+
+    //javadoc: BRISK::getThreshold()
+    public  int getThreshold()
+    {
+        
+        int retVal = getThreshold_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::BRISK::setOctaves(int octaves)
+    //
+
+    //javadoc: BRISK::setOctaves(octaves)
+    public  void setOctaves(int octaves)
+    {
+        
+        setOctaves_0(nativeObj, octaves);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BRISK::setThreshold(int threshold)
+    //
+
+    //javadoc: BRISK::setThreshold(threshold)
+    public  void setThreshold(int threshold)
+    {
+        
+        setThreshold_0(nativeObj, threshold);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++: static Ptr_BRISK cv::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<int>())
+    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, float dMax, float dMin);
+    private static native long create_2(int thresh, int octaves, long radiusList_mat_nativeObj, long numberList_mat_nativeObj, float dMax);
+    private static native long create_3(int thresh, int octaves, long radiusList_mat_nativeObj, long numberList_mat_nativeObj);
+
+    // C++: static Ptr_BRISK cv::BRISK::create(int thresh = 30, int octaves = 3, float patternScale = 1.0f)
+    private static native long create_4(int thresh, int octaves, float patternScale);
+    private static native long create_5(int thresh, int octaves);
+    private static native long create_6(int thresh);
+    private static native long create_7();
+
+    // C++: static Ptr_BRISK cv::BRISK::create(vector_float radiusList, vector_int numberList, float dMax = 5.85f, float dMin = 8.2f, vector_int indexChange = std::vector<int>())
+    private static native long create_8(long radiusList_mat_nativeObj, long numberList_mat_nativeObj, float dMax, float dMin, long indexChange_mat_nativeObj);
+    private static native long create_9(long radiusList_mat_nativeObj, long numberList_mat_nativeObj, float dMax, float dMin);
+    private static native long create_10(long radiusList_mat_nativeObj, long numberList_mat_nativeObj, float dMax);
+    private static native long create_11(long radiusList_mat_nativeObj, long numberList_mat_nativeObj);
+
+    // C++:  String cv::BRISK::getDefaultName()
+    private static native String getDefaultName_0(long nativeObj);
+
+    // C++:  int cv::BRISK::getOctaves()
+    private static native int getOctaves_0(long nativeObj);
+
+    // C++:  int cv::BRISK::getThreshold()
+    private static native int getThreshold_0(long nativeObj);
+
+    // C++:  void cv::BRISK::setOctaves(int octaves)
+    private static native void setOctaves_0(long nativeObj, int octaves);
+
+    // C++:  void cv::BRISK::setThreshold(int threshold)
+    private static native void setThreshold_0(long nativeObj, int threshold);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/features2d/DescriptorMatcher.java b/opencv41/src/main/java/org/opencv/features2d/DescriptorMatcher.java
new file mode 100644 (file)
index 0000000..b36595b
--- /dev/null
@@ -0,0 +1,475 @@
+//
+// 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.features2d.DescriptorMatcher;
+import org.opencv.utils.Converters;
+
+// C++: class DescriptorMatcher
+//javadoc: DescriptorMatcher
+
+public class DescriptorMatcher extends Algorithm {
+
+    protected DescriptorMatcher(long addr) { super(addr); }
+
+    // internal usage only
+    public static DescriptorMatcher __fromPtr__(long addr) { return new DescriptorMatcher(addr); }
+
+    // C++: enum MatcherType
+    public static final int
+            FLANNBASED = 1,
+            BRUTEFORCE = 2,
+            BRUTEFORCE_L1 = 3,
+            BRUTEFORCE_HAMMING = 4,
+            BRUTEFORCE_HAMMINGLUT = 5,
+            BRUTEFORCE_SL2 = 6;
+
+
+    //
+    // C++:  Ptr_DescriptorMatcher cv::DescriptorMatcher::clone(bool emptyTrainData = false)
+    //
+
+    //javadoc: DescriptorMatcher::clone(emptyTrainData)
+    public  DescriptorMatcher clone(boolean emptyTrainData)
+    {
+        
+        DescriptorMatcher retVal = DescriptorMatcher.__fromPtr__(clone_0(nativeObj, emptyTrainData));
+        
+        return retVal;
+    }
+
+    //javadoc: DescriptorMatcher::clone()
+    public  DescriptorMatcher clone()
+    {
+        
+        DescriptorMatcher retVal = DescriptorMatcher.__fromPtr__(clone_1(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_DescriptorMatcher cv::DescriptorMatcher::create(DescriptorMatcher_MatcherType matcherType)
+    //
+
+    //javadoc: DescriptorMatcher::create(matcherType)
+    public static DescriptorMatcher create(int matcherType)
+    {
+        
+        DescriptorMatcher retVal = DescriptorMatcher.__fromPtr__(create_0(matcherType));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_DescriptorMatcher cv::DescriptorMatcher::create(String descriptorMatcherType)
+    //
+
+    //javadoc: DescriptorMatcher::create(descriptorMatcherType)
+    public static DescriptorMatcher create(String descriptorMatcherType)
+    {
+        
+        DescriptorMatcher retVal = DescriptorMatcher.__fromPtr__(create_1(descriptorMatcherType));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::DescriptorMatcher::empty()
+    //
+
+    //javadoc: DescriptorMatcher::empty()
+    public  boolean empty()
+    {
+        
+        boolean retVal = empty_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::DescriptorMatcher::isMaskSupported()
+    //
+
+    //javadoc: DescriptorMatcher::isMaskSupported()
+    public  boolean isMaskSupported()
+    {
+        
+        boolean retVal = isMaskSupported_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  vector_Mat cv::DescriptorMatcher::getTrainDescriptors()
+    //
+
+    //javadoc: DescriptorMatcher::getTrainDescriptors()
+    public  List<Mat> getTrainDescriptors()
+    {
+        List<Mat> retVal = new ArrayList<Mat>();
+        Mat retValMat = new Mat(getTrainDescriptors_0(nativeObj));
+        Converters.Mat_to_vector_Mat(retValMat, retVal);
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::DescriptorMatcher::add(vector_Mat descriptors)
+    //
+
+    //javadoc: DescriptorMatcher::add(descriptors)
+    public  void add(List<Mat> descriptors)
+    {
+        Mat descriptors_mat = Converters.vector_Mat_to_Mat(descriptors);
+        add_0(nativeObj, descriptors_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::DescriptorMatcher::clear()
+    //
+
+    //javadoc: DescriptorMatcher::clear()
+    public  void clear()
+    {
+        
+        clear_0(nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::DescriptorMatcher::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<MatOfDMatch> matches, int k, Mat mask, boolean compactResult)
+    {
+        Mat matches_mat = new Mat();
+        knnMatch_0(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, k, mask.nativeObj, compactResult);
+        Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
+        matches_mat.release();
+        return;
+    }
+
+    //javadoc: DescriptorMatcher::knnMatch(queryDescriptors, trainDescriptors, matches, k, mask)
+    public  void knnMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, int k, Mat mask)
+    {
+        Mat matches_mat = new Mat();
+        knnMatch_1(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, k, mask.nativeObj);
+        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<MatOfDMatch> matches, int k)
+    {
+        Mat matches_mat = new Mat();
+        knnMatch_2(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, k);
+        Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
+        matches_mat.release();
+        return;
+    }
+
+
+    //
+    // C++:  void cv::DescriptorMatcher::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<MatOfDMatch> matches, int k, List<Mat> masks, boolean compactResult)
+    {
+        Mat matches_mat = new Mat();
+        Mat masks_mat = Converters.vector_Mat_to_Mat(masks);
+        knnMatch_3(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, masks)
+    public  void knnMatch(Mat queryDescriptors, List<MatOfDMatch> matches, int k, List<Mat> masks)
+    {
+        Mat matches_mat = new Mat();
+        Mat masks_mat = Converters.vector_Mat_to_Mat(masks);
+        knnMatch_4(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, k, masks_mat.nativeObj);
+        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<MatOfDMatch> matches, int k)
+    {
+        Mat matches_mat = new Mat();
+        knnMatch_5(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, k);
+        Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
+        matches_mat.release();
+        return;
+    }
+
+
+    //
+    // C++:  void cv::DescriptorMatcher::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 cv::DescriptorMatcher::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<Mat> masks)
+    {
+        Mat matches_mat = matches;
+        Mat masks_mat = Converters.vector_Mat_to_Mat(masks);
+        match_2(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, masks_mat.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: 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 cv::DescriptorMatcher::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<MatOfDMatch> matches, float maxDistance, Mat mask, boolean compactResult)
+    {
+        Mat matches_mat = new Mat();
+        radiusMatch_0(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, maxDistance, mask.nativeObj, compactResult);
+        Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
+        matches_mat.release();
+        return;
+    }
+
+    //javadoc: DescriptorMatcher::radiusMatch(queryDescriptors, trainDescriptors, matches, maxDistance, mask)
+    public  void radiusMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, float maxDistance, Mat mask)
+    {
+        Mat matches_mat = new Mat();
+        radiusMatch_1(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, maxDistance, mask.nativeObj);
+        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<MatOfDMatch> matches, float maxDistance)
+    {
+        Mat matches_mat = new Mat();
+        radiusMatch_2(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, maxDistance);
+        Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
+        matches_mat.release();
+        return;
+    }
+
+
+    //
+    // C++:  void cv::DescriptorMatcher::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<MatOfDMatch> matches, float maxDistance, List<Mat> masks, boolean compactResult)
+    {
+        Mat matches_mat = new Mat();
+        Mat masks_mat = Converters.vector_Mat_to_Mat(masks);
+        radiusMatch_3(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, masks)
+    public  void radiusMatch(Mat queryDescriptors, List<MatOfDMatch> matches, float maxDistance, List<Mat> masks)
+    {
+        Mat matches_mat = new Mat();
+        Mat masks_mat = Converters.vector_Mat_to_Mat(masks);
+        radiusMatch_4(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, maxDistance, masks_mat.nativeObj);
+        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<MatOfDMatch> matches, float maxDistance)
+    {
+        Mat matches_mat = new Mat();
+        radiusMatch_5(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, maxDistance);
+        Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
+        matches_mat.release();
+        return;
+    }
+
+
+    //
+    // C++:  void cv::DescriptorMatcher::read(FileNode arg1)
+    //
+
+    // Unknown type 'FileNode' (I), skipping the function
+
+
+    //
+    // C++:  void cv::DescriptorMatcher::read(String fileName)
+    //
+
+    //javadoc: DescriptorMatcher::read(fileName)
+    public  void read(String fileName)
+    {
+        
+        read_0(nativeObj, fileName);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::DescriptorMatcher::train()
+    //
+
+    //javadoc: DescriptorMatcher::train()
+    public  void train()
+    {
+        
+        train_0(nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::DescriptorMatcher::write(Ptr_FileStorage fs, String name = String())
+    //
+
+    // Unknown type 'Ptr_FileStorage' (I), skipping the function
+
+
+    //
+    // C++:  void cv::DescriptorMatcher::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 cv::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 cv::DescriptorMatcher::create(DescriptorMatcher_MatcherType matcherType)
+    private static native long create_0(int matcherType);
+
+    // C++: static Ptr_DescriptorMatcher cv::DescriptorMatcher::create(String descriptorMatcherType)
+    private static native long create_1(String descriptorMatcherType);
+
+    // C++:  bool cv::DescriptorMatcher::empty()
+    private static native boolean empty_0(long nativeObj);
+
+    // C++:  bool cv::DescriptorMatcher::isMaskSupported()
+    private static native boolean isMaskSupported_0(long nativeObj);
+
+    // C++:  vector_Mat cv::DescriptorMatcher::getTrainDescriptors()
+    private static native long getTrainDescriptors_0(long nativeObj);
+
+    // C++:  void cv::DescriptorMatcher::add(vector_Mat descriptors)
+    private static native void add_0(long nativeObj, long descriptors_mat_nativeObj);
+
+    // C++:  void cv::DescriptorMatcher::clear()
+    private static native void clear_0(long nativeObj);
+
+    // C++:  void cv::DescriptorMatcher::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, long mask_nativeObj);
+    private static native void knnMatch_2(long nativeObj, long queryDescriptors_nativeObj, long trainDescriptors_nativeObj, long matches_mat_nativeObj, int k);
+
+    // C++:  void cv::DescriptorMatcher::knnMatch(Mat queryDescriptors, vector_vector_DMatch& matches, int k, vector_Mat masks = vector_Mat(), bool compactResult = false)
+    private static native void knnMatch_3(long nativeObj, long queryDescriptors_nativeObj, long matches_mat_nativeObj, int k, long masks_mat_nativeObj, boolean compactResult);
+    private static native void knnMatch_4(long nativeObj, long queryDescriptors_nativeObj, long matches_mat_nativeObj, int k, long masks_mat_nativeObj);
+    private static native void knnMatch_5(long nativeObj, long queryDescriptors_nativeObj, long matches_mat_nativeObj, int k);
+
+    // C++:  void cv::DescriptorMatcher::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 cv::DescriptorMatcher::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 cv::DescriptorMatcher::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, long mask_nativeObj);
+    private static native void radiusMatch_2(long nativeObj, long queryDescriptors_nativeObj, long trainDescriptors_nativeObj, long matches_mat_nativeObj, float maxDistance);
+
+    // C++:  void cv::DescriptorMatcher::radiusMatch(Mat queryDescriptors, vector_vector_DMatch& matches, float maxDistance, vector_Mat masks = vector_Mat(), bool compactResult = false)
+    private static native void radiusMatch_3(long nativeObj, long queryDescriptors_nativeObj, long matches_mat_nativeObj, float maxDistance, long masks_mat_nativeObj, boolean compactResult);
+    private static native void radiusMatch_4(long nativeObj, long queryDescriptors_nativeObj, long matches_mat_nativeObj, float maxDistance, long masks_mat_nativeObj);
+    private static native void radiusMatch_5(long nativeObj, long queryDescriptors_nativeObj, long matches_mat_nativeObj, float maxDistance);
+
+    // C++:  void cv::DescriptorMatcher::read(String fileName)
+    private static native void read_0(long nativeObj, String fileName);
+
+    // C++:  void cv::DescriptorMatcher::train()
+    private static native void train_0(long nativeObj);
+
+    // C++:  void cv::DescriptorMatcher::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/opencv41/src/main/java/org/opencv/features2d/FastFeatureDetector.java b/opencv41/src/main/java/org/opencv/features2d/FastFeatureDetector.java
new file mode 100644 (file)
index 0000000..3b78b34
--- /dev/null
@@ -0,0 +1,210 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import java.lang.String;
+import org.opencv.features2d.FastFeatureDetector;
+import org.opencv.features2d.Feature2D;
+
+// C++: class FastFeatureDetector
+//javadoc: FastFeatureDetector
+
+public class FastFeatureDetector extends Feature2D {
+
+    protected FastFeatureDetector(long addr) { super(addr); }
+
+    // internal usage only
+    public static FastFeatureDetector __fromPtr__(long addr) { return new FastFeatureDetector(addr); }
+
+    // C++: enum DetectorType
+    public static final int
+            TYPE_5_8 = 0,
+            TYPE_7_12 = 1,
+            TYPE_9_16 = 2;
+
+
+    // C++: enum <unnamed>
+    public static final int
+            THRESHOLD = 10000,
+            NONMAX_SUPPRESSION = 10001,
+            FAST_N = 10002;
+
+
+    //
+    // C++:  FastFeatureDetector_DetectorType cv::FastFeatureDetector::getType()
+    //
+
+    //javadoc: FastFeatureDetector::getType()
+    public  int getType()
+    {
+        
+        int retVal = getType_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_FastFeatureDetector cv::FastFeatureDetector::create(int threshold = 10, bool nonmaxSuppression = true, FastFeatureDetector_DetectorType type = FastFeatureDetector::TYPE_9_16)
+    //
+
+    //javadoc: FastFeatureDetector::create(threshold, nonmaxSuppression, type)
+    public static FastFeatureDetector create(int threshold, boolean nonmaxSuppression, int type)
+    {
+        
+        FastFeatureDetector retVal = FastFeatureDetector.__fromPtr__(create_0(threshold, nonmaxSuppression, type));
+        
+        return retVal;
+    }
+
+    //javadoc: FastFeatureDetector::create(threshold, nonmaxSuppression)
+    public static FastFeatureDetector create(int threshold, boolean nonmaxSuppression)
+    {
+        
+        FastFeatureDetector retVal = FastFeatureDetector.__fromPtr__(create_1(threshold, nonmaxSuppression));
+        
+        return retVal;
+    }
+
+    //javadoc: FastFeatureDetector::create(threshold)
+    public static FastFeatureDetector create(int threshold)
+    {
+        
+        FastFeatureDetector retVal = FastFeatureDetector.__fromPtr__(create_2(threshold));
+        
+        return retVal;
+    }
+
+    //javadoc: FastFeatureDetector::create()
+    public static FastFeatureDetector create()
+    {
+        
+        FastFeatureDetector retVal = FastFeatureDetector.__fromPtr__(create_3());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  String cv::FastFeatureDetector::getDefaultName()
+    //
+
+    //javadoc: FastFeatureDetector::getDefaultName()
+    public  String getDefaultName()
+    {
+        
+        String retVal = getDefaultName_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::FastFeatureDetector::getNonmaxSuppression()
+    //
+
+    //javadoc: FastFeatureDetector::getNonmaxSuppression()
+    public  boolean getNonmaxSuppression()
+    {
+        
+        boolean retVal = getNonmaxSuppression_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::FastFeatureDetector::getThreshold()
+    //
+
+    //javadoc: FastFeatureDetector::getThreshold()
+    public  int getThreshold()
+    {
+        
+        int retVal = getThreshold_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::FastFeatureDetector::setNonmaxSuppression(bool f)
+    //
+
+    //javadoc: FastFeatureDetector::setNonmaxSuppression(f)
+    public  void setNonmaxSuppression(boolean f)
+    {
+        
+        setNonmaxSuppression_0(nativeObj, f);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::FastFeatureDetector::setThreshold(int threshold)
+    //
+
+    //javadoc: FastFeatureDetector::setThreshold(threshold)
+    public  void setThreshold(int threshold)
+    {
+        
+        setThreshold_0(nativeObj, threshold);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::FastFeatureDetector::setType(FastFeatureDetector_DetectorType type)
+    //
+
+    //javadoc: FastFeatureDetector::setType(type)
+    public  void setType(int type)
+    {
+        
+        setType_0(nativeObj, type);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  FastFeatureDetector_DetectorType cv::FastFeatureDetector::getType()
+    private static native int getType_0(long nativeObj);
+
+    // C++: static Ptr_FastFeatureDetector cv::FastFeatureDetector::create(int threshold = 10, bool nonmaxSuppression = true, FastFeatureDetector_DetectorType type = FastFeatureDetector::TYPE_9_16)
+    private static native long create_0(int threshold, boolean nonmaxSuppression, int type);
+    private static native long create_1(int threshold, boolean nonmaxSuppression);
+    private static native long create_2(int threshold);
+    private static native long create_3();
+
+    // C++:  String cv::FastFeatureDetector::getDefaultName()
+    private static native String getDefaultName_0(long nativeObj);
+
+    // C++:  bool cv::FastFeatureDetector::getNonmaxSuppression()
+    private static native boolean getNonmaxSuppression_0(long nativeObj);
+
+    // C++:  int cv::FastFeatureDetector::getThreshold()
+    private static native int getThreshold_0(long nativeObj);
+
+    // C++:  void cv::FastFeatureDetector::setNonmaxSuppression(bool f)
+    private static native void setNonmaxSuppression_0(long nativeObj, boolean f);
+
+    // C++:  void cv::FastFeatureDetector::setThreshold(int threshold)
+    private static native void setThreshold_0(long nativeObj, int threshold);
+
+    // C++:  void cv::FastFeatureDetector::setType(FastFeatureDetector_DetectorType 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/opencv41/src/main/java/org/opencv/features2d/Feature2D.java b/opencv41/src/main/java/org/opencv/features2d/Feature2D.java
new file mode 100644 (file)
index 0000000..0710034
--- /dev/null
@@ -0,0 +1,293 @@
+//
+// 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); }
+
+    // internal usage only
+    public static Feature2D __fromPtr__(long addr) { return new Feature2D(addr); }
+
+    //
+    // C++:  String cv::Feature2D::getDefaultName()
+    //
+
+    //javadoc: Feature2D::getDefaultName()
+    public  String getDefaultName()
+    {
+        
+        String retVal = getDefaultName_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::Feature2D::empty()
+    //
+
+    //javadoc: Feature2D::empty()
+    public  boolean empty()
+    {
+        
+        boolean retVal = empty_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::Feature2D::defaultNorm()
+    //
+
+    //javadoc: Feature2D::defaultNorm()
+    public  int defaultNorm()
+    {
+        
+        int retVal = defaultNorm_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::Feature2D::descriptorSize()
+    //
+
+    //javadoc: Feature2D::descriptorSize()
+    public  int descriptorSize()
+    {
+        
+        int retVal = descriptorSize_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::Feature2D::descriptorType()
+    //
+
+    //javadoc: Feature2D::descriptorType()
+    public  int descriptorType()
+    {
+        
+        int retVal = descriptorType_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::Feature2D::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 cv::Feature2D::compute(vector_Mat images, vector_vector_KeyPoint& keypoints, vector_Mat& descriptors)
+    //
+
+    //javadoc: Feature2D::compute(images, keypoints, descriptors)
+    public  void compute(List<Mat> images, List<MatOfKeyPoint> keypoints, List<Mat> descriptors)
+    {
+        Mat images_mat = Converters.vector_Mat_to_Mat(images);
+        List<Mat> keypoints_tmplm = new ArrayList<Mat>((keypoints != null) ? keypoints.size() : 0);
+        Mat keypoints_mat = Converters.vector_vector_KeyPoint_to_Mat(keypoints, keypoints_tmplm);
+        Mat descriptors_mat = new Mat();
+        compute_1(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj, descriptors_mat.nativeObj);
+        Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints);
+        keypoints_mat.release();
+        Converters.Mat_to_vector_Mat(descriptors_mat, descriptors);
+        descriptors_mat.release();
+        return;
+    }
+
+
+    //
+    // C++:  void cv::Feature2D::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 cv::Feature2D::detect(vector_Mat images, vector_vector_KeyPoint& keypoints, vector_Mat masks = vector_Mat())
+    //
+
+    //javadoc: Feature2D::detect(images, keypoints, masks)
+    public  void detect(List<Mat> images, List<MatOfKeyPoint> keypoints, List<Mat> masks)
+    {
+        Mat images_mat = Converters.vector_Mat_to_Mat(images);
+        Mat keypoints_mat = new Mat();
+        Mat masks_mat = Converters.vector_Mat_to_Mat(masks);
+        detect_2(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj, masks_mat.nativeObj);
+        Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints);
+        keypoints_mat.release();
+        return;
+    }
+
+    //javadoc: Feature2D::detect(images, keypoints)
+    public  void detect(List<Mat> images, List<MatOfKeyPoint> keypoints)
+    {
+        Mat images_mat = Converters.vector_Mat_to_Mat(images);
+        Mat keypoints_mat = new Mat();
+        detect_3(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj);
+        Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints);
+        keypoints_mat.release();
+        return;
+    }
+
+
+    //
+    // C++:  void cv::Feature2D::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 cv::Feature2D::read(FileNode arg1)
+    //
+
+    // Unknown type 'FileNode' (I), skipping the function
+
+
+    //
+    // C++:  void cv::Feature2D::read(String fileName)
+    //
+
+    //javadoc: Feature2D::read(fileName)
+    public  void read(String fileName)
+    {
+        
+        read_0(nativeObj, fileName);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::Feature2D::write(Ptr_FileStorage fs, String name = String())
+    //
+
+    // Unknown type 'Ptr_FileStorage' (I), skipping the function
+
+
+    //
+    // C++:  void cv::Feature2D::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 cv::Feature2D::getDefaultName()
+    private static native String getDefaultName_0(long nativeObj);
+
+    // C++:  bool cv::Feature2D::empty()
+    private static native boolean empty_0(long nativeObj);
+
+    // C++:  int cv::Feature2D::defaultNorm()
+    private static native int defaultNorm_0(long nativeObj);
+
+    // C++:  int cv::Feature2D::descriptorSize()
+    private static native int descriptorSize_0(long nativeObj);
+
+    // C++:  int cv::Feature2D::descriptorType()
+    private static native int descriptorType_0(long nativeObj);
+
+    // C++:  void cv::Feature2D::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 cv::Feature2D::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 cv::Feature2D::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 cv::Feature2D::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 cv::Feature2D::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 cv::Feature2D::read(String fileName)
+    private static native void read_0(long nativeObj, String fileName);
+
+    // C++:  void cv::Feature2D::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/opencv41/src/main/java/org/opencv/features2d/Features2d.java b/opencv41/src/main/java/org/opencv/features2d/Features2d.java
new file mode 100644 (file)
index 0000000..6bb2db1
--- /dev/null
@@ -0,0 +1,212 @@
+//
+// 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;
+
+// C++: class Features2d
+//javadoc: Features2d
+
+public class Features2d {
+
+    // C++: enum DrawMatchesFlags
+    public static final int
+            DrawMatchesFlags_DEFAULT = 0,
+            DrawMatchesFlags_DRAW_OVER_OUTIMG = 1,
+            DrawMatchesFlags_NOT_DRAW_SINGLE_POINTS = 2,
+            DrawMatchesFlags_DRAW_RICH_KEYPOINTS = 4;
+
+
+    //
+    // C++:  void cv::drawKeypoints(Mat image, vector_KeyPoint keypoints, Mat& outImage, Scalar color = Scalar::all(-1), DrawMatchesFlags 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, color)
+    public static void drawKeypoints(Mat image, MatOfKeyPoint keypoints, Mat outImage, Scalar color)
+    {
+        Mat keypoints_mat = keypoints;
+        drawKeypoints_1(image.nativeObj, keypoints_mat.nativeObj, outImage.nativeObj, color.val[0], color.val[1], color.val[2], color.val[3]);
+        
+        return;
+    }
+
+    //javadoc: drawKeypoints(image, keypoints, outImage)
+    public static void drawKeypoints(Mat image, MatOfKeyPoint keypoints, Mat outImage)
+    {
+        Mat keypoints_mat = keypoints;
+        drawKeypoints_2(image.nativeObj, keypoints_mat.nativeObj, outImage.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::drawMatches(Mat img1, vector_KeyPoint keypoints1, Mat img2, vector_KeyPoint keypoints2, vector_DMatch matches1to2, Mat& outImg, Scalar matchColor = Scalar::all(-1), Scalar singlePointColor = Scalar::all(-1), vector_char matchesMask = std::vector<char>(), DrawMatchesFlags 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, matchColor, singlePointColor, matchesMask)
+    public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor, MatOfByte matchesMask)
+    {
+        Mat keypoints1_mat = keypoints1;
+        Mat keypoints2_mat = keypoints2;
+        Mat matches1to2_mat = matches1to2;
+        Mat matchesMask_mat = matchesMask;
+        drawMatches_1(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);
+        
+        return;
+    }
+
+    //javadoc: drawMatches(img1, keypoints1, img2, keypoints2, matches1to2, outImg, matchColor, singlePointColor)
+    public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor)
+    {
+        Mat keypoints1_mat = keypoints1;
+        Mat keypoints2_mat = keypoints2;
+        Mat matches1to2_mat = matches1to2;
+        drawMatches_2(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]);
+        
+        return;
+    }
+
+    //javadoc: drawMatches(img1, keypoints1, img2, keypoints2, matches1to2, outImg, matchColor)
+    public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg, Scalar matchColor)
+    {
+        Mat keypoints1_mat = keypoints1;
+        Mat keypoints2_mat = keypoints2;
+        Mat matches1to2_mat = matches1to2;
+        drawMatches_3(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]);
+        
+        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_4(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::drawMatches(Mat img1, vector_KeyPoint keypoints1, Mat img2, vector_KeyPoint keypoints2, vector_vector_DMatch matches1to2, Mat& outImg, Scalar matchColor = Scalar::all(-1), Scalar singlePointColor = Scalar::all(-1), vector_vector_char matchesMask = std::vector<std::vector<char> >(), DrawMatchesFlags flags = DrawMatchesFlags::DEFAULT)
+    //
+
+    //javadoc: drawMatchesKnn(img1, keypoints1, img2, keypoints2, matches1to2, outImg, matchColor, singlePointColor, matchesMask, flags)
+    public static void drawMatchesKnn(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List<MatOfDMatch> matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor, List<MatOfByte> matchesMask, int flags)
+    {
+        Mat keypoints1_mat = keypoints1;
+        Mat keypoints2_mat = keypoints2;
+        List<Mat> matches1to2_tmplm = new ArrayList<Mat>((matches1to2 != null) ? matches1to2.size() : 0);
+        Mat matches1to2_mat = Converters.vector_vector_DMatch_to_Mat(matches1to2, matches1to2_tmplm);
+        List<Mat> matchesMask_tmplm = new ArrayList<Mat>((matchesMask != null) ? matchesMask.size() : 0);
+        Mat matchesMask_mat = Converters.vector_vector_char_to_Mat(matchesMask, matchesMask_tmplm);
+        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: drawMatchesKnn(img1, keypoints1, img2, keypoints2, matches1to2, outImg, matchColor, singlePointColor, matchesMask)
+    public static void drawMatchesKnn(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List<MatOfDMatch> matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor, List<MatOfByte> matchesMask)
+    {
+        Mat keypoints1_mat = keypoints1;
+        Mat keypoints2_mat = keypoints2;
+        List<Mat> matches1to2_tmplm = new ArrayList<Mat>((matches1to2 != null) ? matches1to2.size() : 0);
+        Mat matches1to2_mat = Converters.vector_vector_DMatch_to_Mat(matches1to2, matches1to2_tmplm);
+        List<Mat> matchesMask_tmplm = new ArrayList<Mat>((matchesMask != null) ? matchesMask.size() : 0);
+        Mat matchesMask_mat = Converters.vector_vector_char_to_Mat(matchesMask, matchesMask_tmplm);
+        drawMatchesKnn_1(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);
+        
+        return;
+    }
+
+    //javadoc: drawMatchesKnn(img1, keypoints1, img2, keypoints2, matches1to2, outImg, matchColor, singlePointColor)
+    public static void drawMatchesKnn(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List<MatOfDMatch> matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor)
+    {
+        Mat keypoints1_mat = keypoints1;
+        Mat keypoints2_mat = keypoints2;
+        List<Mat> matches1to2_tmplm = new ArrayList<Mat>((matches1to2 != null) ? matches1to2.size() : 0);
+        Mat matches1to2_mat = Converters.vector_vector_DMatch_to_Mat(matches1to2, matches1to2_tmplm);
+        drawMatchesKnn_2(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]);
+        
+        return;
+    }
+
+    //javadoc: drawMatchesKnn(img1, keypoints1, img2, keypoints2, matches1to2, outImg, matchColor)
+    public static void drawMatchesKnn(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List<MatOfDMatch> matches1to2, Mat outImg, Scalar matchColor)
+    {
+        Mat keypoints1_mat = keypoints1;
+        Mat keypoints2_mat = keypoints2;
+        List<Mat> matches1to2_tmplm = new ArrayList<Mat>((matches1to2 != null) ? matches1to2.size() : 0);
+        Mat matches1to2_mat = Converters.vector_vector_DMatch_to_Mat(matches1to2, matches1to2_tmplm);
+        drawMatchesKnn_3(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]);
+        
+        return;
+    }
+
+    //javadoc: drawMatchesKnn(img1, keypoints1, img2, keypoints2, matches1to2, outImg)
+    public static void drawMatchesKnn(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List<MatOfDMatch> matches1to2, Mat outImg)
+    {
+        Mat keypoints1_mat = keypoints1;
+        Mat keypoints2_mat = keypoints2;
+        List<Mat> matches1to2_tmplm = new ArrayList<Mat>((matches1to2 != null) ? matches1to2.size() : 0);
+        Mat matches1to2_mat = Converters.vector_vector_DMatch_to_Mat(matches1to2, matches1to2_tmplm);
+        drawMatchesKnn_4(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj);
+        
+        return;
+    }
+
+
+
+
+    // C++:  void cv::drawKeypoints(Mat image, vector_KeyPoint keypoints, Mat& outImage, Scalar color = Scalar::all(-1), DrawMatchesFlags 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, double color_val0, double color_val1, double color_val2, double color_val3);
+    private static native void drawKeypoints_2(long image_nativeObj, long keypoints_mat_nativeObj, long outImage_nativeObj);
+
+    // C++:  void cv::drawMatches(Mat img1, vector_KeyPoint keypoints1, Mat img2, vector_KeyPoint keypoints2, vector_DMatch matches1to2, Mat& outImg, Scalar matchColor = Scalar::all(-1), Scalar singlePointColor = Scalar::all(-1), vector_char matchesMask = std::vector<char>(), DrawMatchesFlags 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, 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);
+    private static native void drawMatches_2(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);
+    private static native void drawMatches_3(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);
+    private static native void drawMatches_4(long img1_nativeObj, long keypoints1_mat_nativeObj, long img2_nativeObj, long keypoints2_mat_nativeObj, long matches1to2_mat_nativeObj, long outImg_nativeObj);
+
+    // C++:  void cv::drawMatches(Mat img1, vector_KeyPoint keypoints1, Mat img2, vector_KeyPoint keypoints2, vector_vector_DMatch matches1to2, Mat& outImg, Scalar matchColor = Scalar::all(-1), Scalar singlePointColor = Scalar::all(-1), vector_vector_char matchesMask = std::vector<std::vector<char> >(), DrawMatchesFlags 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, 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);
+    private static native void drawMatchesKnn_2(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);
+    private static native void drawMatchesKnn_3(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);
+    private static native void drawMatchesKnn_4(long img1_nativeObj, long keypoints1_mat_nativeObj, long img2_nativeObj, long keypoints2_mat_nativeObj, long matches1to2_mat_nativeObj, long outImg_nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/features2d/FlannBasedMatcher.java b/opencv41/src/main/java/org/opencv/features2d/FlannBasedMatcher.java
new file mode 100644 (file)
index 0000000..1de9318
--- /dev/null
@@ -0,0 +1,63 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import org.opencv.features2d.DescriptorMatcher;
+import org.opencv.features2d.FlannBasedMatcher;
+
+// C++: class FlannBasedMatcher
+//javadoc: FlannBasedMatcher
+
+public class FlannBasedMatcher extends DescriptorMatcher {
+
+    protected FlannBasedMatcher(long addr) { super(addr); }
+
+    // internal usage only
+    public static FlannBasedMatcher __fromPtr__(long addr) { return new FlannBasedMatcher(addr); }
+
+    //
+    // C++:   cv::FlannBasedMatcher::FlannBasedMatcher(Ptr_flann_IndexParams indexParams = makePtr<flann::KDTreeIndexParams>(), Ptr_flann_SearchParams searchParams = makePtr<flann::SearchParams>())
+    //
+
+    //javadoc: FlannBasedMatcher::FlannBasedMatcher()
+    public   FlannBasedMatcher()
+    {
+        
+        super( FlannBasedMatcher_0() );
+        
+        return;
+    }
+
+
+    //
+    // C++: static Ptr_FlannBasedMatcher cv::FlannBasedMatcher::create()
+    //
+
+    //javadoc: FlannBasedMatcher::create()
+    public static FlannBasedMatcher create()
+    {
+        
+        FlannBasedMatcher retVal = FlannBasedMatcher.__fromPtr__(create_0());
+        
+        return retVal;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:   cv::FlannBasedMatcher::FlannBasedMatcher(Ptr_flann_IndexParams indexParams = makePtr<flann::KDTreeIndexParams>(), Ptr_flann_SearchParams searchParams = makePtr<flann::SearchParams>())
+    private static native long FlannBasedMatcher_0();
+
+    // C++: static Ptr_FlannBasedMatcher cv::FlannBasedMatcher::create()
+    private static native long create_0();
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/features2d/GFTTDetector.java b/opencv41/src/main/java/org/opencv/features2d/GFTTDetector.java
new file mode 100644 (file)
index 0000000..e1609df
--- /dev/null
@@ -0,0 +1,365 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import java.lang.String;
+import org.opencv.features2d.Feature2D;
+import org.opencv.features2d.GFTTDetector;
+
+// C++: class GFTTDetector
+//javadoc: GFTTDetector
+
+public class GFTTDetector extends Feature2D {
+
+    protected GFTTDetector(long addr) { super(addr); }
+
+    // internal usage only
+    public static GFTTDetector __fromPtr__(long addr) { return new GFTTDetector(addr); }
+
+    //
+    // C++: static Ptr_GFTTDetector cv::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 = GFTTDetector.__fromPtr__(create_0(maxCorners, qualityLevel, minDistance, blockSize, gradiantSize, useHarrisDetector, k));
+        
+        return retVal;
+    }
+
+    //javadoc: GFTTDetector::create(maxCorners, qualityLevel, minDistance, blockSize, gradiantSize, useHarrisDetector)
+    public static GFTTDetector create(int maxCorners, double qualityLevel, double minDistance, int blockSize, int gradiantSize, boolean useHarrisDetector)
+    {
+        
+        GFTTDetector retVal = GFTTDetector.__fromPtr__(create_1(maxCorners, qualityLevel, minDistance, blockSize, gradiantSize, useHarrisDetector));
+        
+        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 = GFTTDetector.__fromPtr__(create_2(maxCorners, qualityLevel, minDistance, blockSize, gradiantSize));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_GFTTDetector cv::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 = GFTTDetector.__fromPtr__(create_3(maxCorners, qualityLevel, minDistance, blockSize, useHarrisDetector, k));
+        
+        return retVal;
+    }
+
+    //javadoc: GFTTDetector::create(maxCorners, qualityLevel, minDistance, blockSize, useHarrisDetector)
+    public static GFTTDetector create(int maxCorners, double qualityLevel, double minDistance, int blockSize, boolean useHarrisDetector)
+    {
+        
+        GFTTDetector retVal = GFTTDetector.__fromPtr__(create_4(maxCorners, qualityLevel, minDistance, blockSize, useHarrisDetector));
+        
+        return retVal;
+    }
+
+    //javadoc: GFTTDetector::create(maxCorners, qualityLevel, minDistance, blockSize)
+    public static GFTTDetector create(int maxCorners, double qualityLevel, double minDistance, int blockSize)
+    {
+        
+        GFTTDetector retVal = GFTTDetector.__fromPtr__(create_5(maxCorners, qualityLevel, minDistance, blockSize));
+        
+        return retVal;
+    }
+
+    //javadoc: GFTTDetector::create(maxCorners, qualityLevel, minDistance)
+    public static GFTTDetector create(int maxCorners, double qualityLevel, double minDistance)
+    {
+        
+        GFTTDetector retVal = GFTTDetector.__fromPtr__(create_6(maxCorners, qualityLevel, minDistance));
+        
+        return retVal;
+    }
+
+    //javadoc: GFTTDetector::create(maxCorners, qualityLevel)
+    public static GFTTDetector create(int maxCorners, double qualityLevel)
+    {
+        
+        GFTTDetector retVal = GFTTDetector.__fromPtr__(create_7(maxCorners, qualityLevel));
+        
+        return retVal;
+    }
+
+    //javadoc: GFTTDetector::create(maxCorners)
+    public static GFTTDetector create(int maxCorners)
+    {
+        
+        GFTTDetector retVal = GFTTDetector.__fromPtr__(create_8(maxCorners));
+        
+        return retVal;
+    }
+
+    //javadoc: GFTTDetector::create()
+    public static GFTTDetector create()
+    {
+        
+        GFTTDetector retVal = GFTTDetector.__fromPtr__(create_9());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  String cv::GFTTDetector::getDefaultName()
+    //
+
+    //javadoc: GFTTDetector::getDefaultName()
+    public  String getDefaultName()
+    {
+        
+        String retVal = getDefaultName_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::GFTTDetector::getHarrisDetector()
+    //
+
+    //javadoc: GFTTDetector::getHarrisDetector()
+    public  boolean getHarrisDetector()
+    {
+        
+        boolean retVal = getHarrisDetector_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::GFTTDetector::getK()
+    //
+
+    //javadoc: GFTTDetector::getK()
+    public  double getK()
+    {
+        
+        double retVal = getK_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::GFTTDetector::getMinDistance()
+    //
+
+    //javadoc: GFTTDetector::getMinDistance()
+    public  double getMinDistance()
+    {
+        
+        double retVal = getMinDistance_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::GFTTDetector::getQualityLevel()
+    //
+
+    //javadoc: GFTTDetector::getQualityLevel()
+    public  double getQualityLevel()
+    {
+        
+        double retVal = getQualityLevel_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::GFTTDetector::getBlockSize()
+    //
+
+    //javadoc: GFTTDetector::getBlockSize()
+    public  int getBlockSize()
+    {
+        
+        int retVal = getBlockSize_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::GFTTDetector::getMaxFeatures()
+    //
+
+    //javadoc: GFTTDetector::getMaxFeatures()
+    public  int getMaxFeatures()
+    {
+        
+        int retVal = getMaxFeatures_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::GFTTDetector::setBlockSize(int blockSize)
+    //
+
+    //javadoc: GFTTDetector::setBlockSize(blockSize)
+    public  void setBlockSize(int blockSize)
+    {
+        
+        setBlockSize_0(nativeObj, blockSize);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::GFTTDetector::setHarrisDetector(bool val)
+    //
+
+    //javadoc: GFTTDetector::setHarrisDetector(val)
+    public  void setHarrisDetector(boolean val)
+    {
+        
+        setHarrisDetector_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::GFTTDetector::setK(double k)
+    //
+
+    //javadoc: GFTTDetector::setK(k)
+    public  void setK(double k)
+    {
+        
+        setK_0(nativeObj, k);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::GFTTDetector::setMaxFeatures(int maxFeatures)
+    //
+
+    //javadoc: GFTTDetector::setMaxFeatures(maxFeatures)
+    public  void setMaxFeatures(int maxFeatures)
+    {
+        
+        setMaxFeatures_0(nativeObj, maxFeatures);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::GFTTDetector::setMinDistance(double minDistance)
+    //
+
+    //javadoc: GFTTDetector::setMinDistance(minDistance)
+    public  void setMinDistance(double minDistance)
+    {
+        
+        setMinDistance_0(nativeObj, minDistance);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::GFTTDetector::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 cv::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, boolean useHarrisDetector);
+    private static native long create_2(int maxCorners, double qualityLevel, double minDistance, int blockSize, int gradiantSize);
+
+    // C++: static Ptr_GFTTDetector cv::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_3(int maxCorners, double qualityLevel, double minDistance, int blockSize, boolean useHarrisDetector, double k);
+    private static native long create_4(int maxCorners, double qualityLevel, double minDistance, int blockSize, boolean useHarrisDetector);
+    private static native long create_5(int maxCorners, double qualityLevel, double minDistance, int blockSize);
+    private static native long create_6(int maxCorners, double qualityLevel, double minDistance);
+    private static native long create_7(int maxCorners, double qualityLevel);
+    private static native long create_8(int maxCorners);
+    private static native long create_9();
+
+    // C++:  String cv::GFTTDetector::getDefaultName()
+    private static native String getDefaultName_0(long nativeObj);
+
+    // C++:  bool cv::GFTTDetector::getHarrisDetector()
+    private static native boolean getHarrisDetector_0(long nativeObj);
+
+    // C++:  double cv::GFTTDetector::getK()
+    private static native double getK_0(long nativeObj);
+
+    // C++:  double cv::GFTTDetector::getMinDistance()
+    private static native double getMinDistance_0(long nativeObj);
+
+    // C++:  double cv::GFTTDetector::getQualityLevel()
+    private static native double getQualityLevel_0(long nativeObj);
+
+    // C++:  int cv::GFTTDetector::getBlockSize()
+    private static native int getBlockSize_0(long nativeObj);
+
+    // C++:  int cv::GFTTDetector::getMaxFeatures()
+    private static native int getMaxFeatures_0(long nativeObj);
+
+    // C++:  void cv::GFTTDetector::setBlockSize(int blockSize)
+    private static native void setBlockSize_0(long nativeObj, int blockSize);
+
+    // C++:  void cv::GFTTDetector::setHarrisDetector(bool val)
+    private static native void setHarrisDetector_0(long nativeObj, boolean val);
+
+    // C++:  void cv::GFTTDetector::setK(double k)
+    private static native void setK_0(long nativeObj, double k);
+
+    // C++:  void cv::GFTTDetector::setMaxFeatures(int maxFeatures)
+    private static native void setMaxFeatures_0(long nativeObj, int maxFeatures);
+
+    // C++:  void cv::GFTTDetector::setMinDistance(double minDistance)
+    private static native void setMinDistance_0(long nativeObj, double minDistance);
+
+    // C++:  void cv::GFTTDetector::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/opencv41/src/main/java/org/opencv/features2d/KAZE.java b/opencv41/src/main/java/org/opencv/features2d/KAZE.java
new file mode 100644 (file)
index 0000000..7a69b03
--- /dev/null
@@ -0,0 +1,336 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import java.lang.String;
+import org.opencv.features2d.Feature2D;
+import org.opencv.features2d.KAZE;
+
+// C++: class KAZE
+//javadoc: KAZE
+
+public class KAZE extends Feature2D {
+
+    protected KAZE(long addr) { super(addr); }
+
+    // internal usage only
+    public static KAZE __fromPtr__(long addr) { return new KAZE(addr); }
+
+    // C++: enum DiffusivityType
+    public static final int
+            DIFF_PM_G1 = 0,
+            DIFF_PM_G2 = 1,
+            DIFF_WEICKERT = 2,
+            DIFF_CHARBONNIER = 3;
+
+
+    //
+    // C++:  KAZE_DiffusivityType cv::KAZE::getDiffusivity()
+    //
+
+    //javadoc: KAZE::getDiffusivity()
+    public  int getDiffusivity()
+    {
+        
+        int retVal = getDiffusivity_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_KAZE cv::KAZE::create(bool extended = false, bool upright = false, float threshold = 0.001f, int nOctaves = 4, int nOctaveLayers = 4, KAZE_DiffusivityType 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 = KAZE.__fromPtr__(create_0(extended, upright, threshold, nOctaves, nOctaveLayers, diffusivity));
+        
+        return retVal;
+    }
+
+    //javadoc: KAZE::create(extended, upright, threshold, nOctaves, nOctaveLayers)
+    public static KAZE create(boolean extended, boolean upright, float threshold, int nOctaves, int nOctaveLayers)
+    {
+        
+        KAZE retVal = KAZE.__fromPtr__(create_1(extended, upright, threshold, nOctaves, nOctaveLayers));
+        
+        return retVal;
+    }
+
+    //javadoc: KAZE::create(extended, upright, threshold, nOctaves)
+    public static KAZE create(boolean extended, boolean upright, float threshold, int nOctaves)
+    {
+        
+        KAZE retVal = KAZE.__fromPtr__(create_2(extended, upright, threshold, nOctaves));
+        
+        return retVal;
+    }
+
+    //javadoc: KAZE::create(extended, upright, threshold)
+    public static KAZE create(boolean extended, boolean upright, float threshold)
+    {
+        
+        KAZE retVal = KAZE.__fromPtr__(create_3(extended, upright, threshold));
+        
+        return retVal;
+    }
+
+    //javadoc: KAZE::create(extended, upright)
+    public static KAZE create(boolean extended, boolean upright)
+    {
+        
+        KAZE retVal = KAZE.__fromPtr__(create_4(extended, upright));
+        
+        return retVal;
+    }
+
+    //javadoc: KAZE::create(extended)
+    public static KAZE create(boolean extended)
+    {
+        
+        KAZE retVal = KAZE.__fromPtr__(create_5(extended));
+        
+        return retVal;
+    }
+
+    //javadoc: KAZE::create()
+    public static KAZE create()
+    {
+        
+        KAZE retVal = KAZE.__fromPtr__(create_6());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  String cv::KAZE::getDefaultName()
+    //
+
+    //javadoc: KAZE::getDefaultName()
+    public  String getDefaultName()
+    {
+        
+        String retVal = getDefaultName_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::KAZE::getExtended()
+    //
+
+    //javadoc: KAZE::getExtended()
+    public  boolean getExtended()
+    {
+        
+        boolean retVal = getExtended_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::KAZE::getUpright()
+    //
+
+    //javadoc: KAZE::getUpright()
+    public  boolean getUpright()
+    {
+        
+        boolean retVal = getUpright_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::KAZE::getThreshold()
+    //
+
+    //javadoc: KAZE::getThreshold()
+    public  double getThreshold()
+    {
+        
+        double retVal = getThreshold_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::KAZE::getNOctaveLayers()
+    //
+
+    //javadoc: KAZE::getNOctaveLayers()
+    public  int getNOctaveLayers()
+    {
+        
+        int retVal = getNOctaveLayers_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::KAZE::getNOctaves()
+    //
+
+    //javadoc: KAZE::getNOctaves()
+    public  int getNOctaves()
+    {
+        
+        int retVal = getNOctaves_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::KAZE::setDiffusivity(KAZE_DiffusivityType diff)
+    //
+
+    //javadoc: KAZE::setDiffusivity(diff)
+    public  void setDiffusivity(int diff)
+    {
+        
+        setDiffusivity_0(nativeObj, diff);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::KAZE::setExtended(bool extended)
+    //
+
+    //javadoc: KAZE::setExtended(extended)
+    public  void setExtended(boolean extended)
+    {
+        
+        setExtended_0(nativeObj, extended);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::KAZE::setNOctaveLayers(int octaveLayers)
+    //
+
+    //javadoc: KAZE::setNOctaveLayers(octaveLayers)
+    public  void setNOctaveLayers(int octaveLayers)
+    {
+        
+        setNOctaveLayers_0(nativeObj, octaveLayers);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::KAZE::setNOctaves(int octaves)
+    //
+
+    //javadoc: KAZE::setNOctaves(octaves)
+    public  void setNOctaves(int octaves)
+    {
+        
+        setNOctaves_0(nativeObj, octaves);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::KAZE::setThreshold(double threshold)
+    //
+
+    //javadoc: KAZE::setThreshold(threshold)
+    public  void setThreshold(double threshold)
+    {
+        
+        setThreshold_0(nativeObj, threshold);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::KAZE::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++:  KAZE_DiffusivityType cv::KAZE::getDiffusivity()
+    private static native int getDiffusivity_0(long nativeObj);
+
+    // C++: static Ptr_KAZE cv::KAZE::create(bool extended = false, bool upright = false, float threshold = 0.001f, int nOctaves = 4, int nOctaveLayers = 4, KAZE_DiffusivityType 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(boolean extended, boolean upright, float threshold, int nOctaves, int nOctaveLayers);
+    private static native long create_2(boolean extended, boolean upright, float threshold, int nOctaves);
+    private static native long create_3(boolean extended, boolean upright, float threshold);
+    private static native long create_4(boolean extended, boolean upright);
+    private static native long create_5(boolean extended);
+    private static native long create_6();
+
+    // C++:  String cv::KAZE::getDefaultName()
+    private static native String getDefaultName_0(long nativeObj);
+
+    // C++:  bool cv::KAZE::getExtended()
+    private static native boolean getExtended_0(long nativeObj);
+
+    // C++:  bool cv::KAZE::getUpright()
+    private static native boolean getUpright_0(long nativeObj);
+
+    // C++:  double cv::KAZE::getThreshold()
+    private static native double getThreshold_0(long nativeObj);
+
+    // C++:  int cv::KAZE::getNOctaveLayers()
+    private static native int getNOctaveLayers_0(long nativeObj);
+
+    // C++:  int cv::KAZE::getNOctaves()
+    private static native int getNOctaves_0(long nativeObj);
+
+    // C++:  void cv::KAZE::setDiffusivity(KAZE_DiffusivityType diff)
+    private static native void setDiffusivity_0(long nativeObj, int diff);
+
+    // C++:  void cv::KAZE::setExtended(bool extended)
+    private static native void setExtended_0(long nativeObj, boolean extended);
+
+    // C++:  void cv::KAZE::setNOctaveLayers(int octaveLayers)
+    private static native void setNOctaveLayers_0(long nativeObj, int octaveLayers);
+
+    // C++:  void cv::KAZE::setNOctaves(int octaves)
+    private static native void setNOctaves_0(long nativeObj, int octaves);
+
+    // C++:  void cv::KAZE::setThreshold(double threshold)
+    private static native void setThreshold_0(long nativeObj, double threshold);
+
+    // C++:  void cv::KAZE::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/opencv41/src/main/java/org/opencv/features2d/MSER.java b/opencv41/src/main/java/org/opencv/features2d/MSER.java
new file mode 100644 (file)
index 0000000..ac78cc0
--- /dev/null
@@ -0,0 +1,315 @@
+//
+// 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.features2d.Feature2D;
+import org.opencv.features2d.MSER;
+import org.opencv.utils.Converters;
+
+// C++: class MSER
+//javadoc: MSER
+
+public class MSER extends Feature2D {
+
+    protected MSER(long addr) { super(addr); }
+
+    // internal usage only
+    public static MSER __fromPtr__(long addr) { return new MSER(addr); }
+
+    //
+    // C++: static Ptr_MSER cv::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 = MSER.__fromPtr__(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(_delta, _min_area, _max_area, _max_variation, _min_diversity, _max_evolution, _area_threshold, _min_margin)
+    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)
+    {
+        
+        MSER retVal = MSER.__fromPtr__(create_1(_delta, _min_area, _max_area, _max_variation, _min_diversity, _max_evolution, _area_threshold, _min_margin));
+        
+        return retVal;
+    }
+
+    //javadoc: MSER::create(_delta, _min_area, _max_area, _max_variation, _min_diversity, _max_evolution, _area_threshold)
+    public static MSER create(int _delta, int _min_area, int _max_area, double _max_variation, double _min_diversity, int _max_evolution, double _area_threshold)
+    {
+        
+        MSER retVal = MSER.__fromPtr__(create_2(_delta, _min_area, _max_area, _max_variation, _min_diversity, _max_evolution, _area_threshold));
+        
+        return retVal;
+    }
+
+    //javadoc: MSER::create(_delta, _min_area, _max_area, _max_variation, _min_diversity, _max_evolution)
+    public static MSER create(int _delta, int _min_area, int _max_area, double _max_variation, double _min_diversity, int _max_evolution)
+    {
+        
+        MSER retVal = MSER.__fromPtr__(create_3(_delta, _min_area, _max_area, _max_variation, _min_diversity, _max_evolution));
+        
+        return retVal;
+    }
+
+    //javadoc: MSER::create(_delta, _min_area, _max_area, _max_variation, _min_diversity)
+    public static MSER create(int _delta, int _min_area, int _max_area, double _max_variation, double _min_diversity)
+    {
+        
+        MSER retVal = MSER.__fromPtr__(create_4(_delta, _min_area, _max_area, _max_variation, _min_diversity));
+        
+        return retVal;
+    }
+
+    //javadoc: MSER::create(_delta, _min_area, _max_area, _max_variation)
+    public static MSER create(int _delta, int _min_area, int _max_area, double _max_variation)
+    {
+        
+        MSER retVal = MSER.__fromPtr__(create_5(_delta, _min_area, _max_area, _max_variation));
+        
+        return retVal;
+    }
+
+    //javadoc: MSER::create(_delta, _min_area, _max_area)
+    public static MSER create(int _delta, int _min_area, int _max_area)
+    {
+        
+        MSER retVal = MSER.__fromPtr__(create_6(_delta, _min_area, _max_area));
+        
+        return retVal;
+    }
+
+    //javadoc: MSER::create(_delta, _min_area)
+    public static MSER create(int _delta, int _min_area)
+    {
+        
+        MSER retVal = MSER.__fromPtr__(create_7(_delta, _min_area));
+        
+        return retVal;
+    }
+
+    //javadoc: MSER::create(_delta)
+    public static MSER create(int _delta)
+    {
+        
+        MSER retVal = MSER.__fromPtr__(create_8(_delta));
+        
+        return retVal;
+    }
+
+    //javadoc: MSER::create()
+    public static MSER create()
+    {
+        
+        MSER retVal = MSER.__fromPtr__(create_9());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  String cv::MSER::getDefaultName()
+    //
+
+    //javadoc: MSER::getDefaultName()
+    public  String getDefaultName()
+    {
+        
+        String retVal = getDefaultName_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::MSER::getPass2Only()
+    //
+
+    //javadoc: MSER::getPass2Only()
+    public  boolean getPass2Only()
+    {
+        
+        boolean retVal = getPass2Only_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::MSER::getDelta()
+    //
+
+    //javadoc: MSER::getDelta()
+    public  int getDelta()
+    {
+        
+        int retVal = getDelta_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::MSER::getMaxArea()
+    //
+
+    //javadoc: MSER::getMaxArea()
+    public  int getMaxArea()
+    {
+        
+        int retVal = getMaxArea_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::MSER::getMinArea()
+    //
+
+    //javadoc: MSER::getMinArea()
+    public  int getMinArea()
+    {
+        
+        int retVal = getMinArea_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::MSER::detectRegions(Mat image, vector_vector_Point& msers, vector_Rect& bboxes)
+    //
+
+    //javadoc: MSER::detectRegions(image, msers, bboxes)
+    public  void detectRegions(Mat image, List<MatOfPoint> 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 cv::MSER::setDelta(int delta)
+    //
+
+    //javadoc: MSER::setDelta(delta)
+    public  void setDelta(int delta)
+    {
+        
+        setDelta_0(nativeObj, delta);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::MSER::setMaxArea(int maxArea)
+    //
+
+    //javadoc: MSER::setMaxArea(maxArea)
+    public  void setMaxArea(int maxArea)
+    {
+        
+        setMaxArea_0(nativeObj, maxArea);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::MSER::setMinArea(int minArea)
+    //
+
+    //javadoc: MSER::setMinArea(minArea)
+    public  void setMinArea(int minArea)
+    {
+        
+        setMinArea_0(nativeObj, minArea);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::MSER::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 cv::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(int _delta, int _min_area, int _max_area, double _max_variation, double _min_diversity, int _max_evolution, double _area_threshold, double _min_margin);
+    private static native long create_2(int _delta, int _min_area, int _max_area, double _max_variation, double _min_diversity, int _max_evolution, double _area_threshold);
+    private static native long create_3(int _delta, int _min_area, int _max_area, double _max_variation, double _min_diversity, int _max_evolution);
+    private static native long create_4(int _delta, int _min_area, int _max_area, double _max_variation, double _min_diversity);
+    private static native long create_5(int _delta, int _min_area, int _max_area, double _max_variation);
+    private static native long create_6(int _delta, int _min_area, int _max_area);
+    private static native long create_7(int _delta, int _min_area);
+    private static native long create_8(int _delta);
+    private static native long create_9();
+
+    // C++:  String cv::MSER::getDefaultName()
+    private static native String getDefaultName_0(long nativeObj);
+
+    // C++:  bool cv::MSER::getPass2Only()
+    private static native boolean getPass2Only_0(long nativeObj);
+
+    // C++:  int cv::MSER::getDelta()
+    private static native int getDelta_0(long nativeObj);
+
+    // C++:  int cv::MSER::getMaxArea()
+    private static native int getMaxArea_0(long nativeObj);
+
+    // C++:  int cv::MSER::getMinArea()
+    private static native int getMinArea_0(long nativeObj);
+
+    // C++:  void cv::MSER::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 cv::MSER::setDelta(int delta)
+    private static native void setDelta_0(long nativeObj, int delta);
+
+    // C++:  void cv::MSER::setMaxArea(int maxArea)
+    private static native void setMaxArea_0(long nativeObj, int maxArea);
+
+    // C++:  void cv::MSER::setMinArea(int minArea)
+    private static native void setMinArea_0(long nativeObj, int minArea);
+
+    // C++:  void cv::MSER::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/opencv41/src/main/java/org/opencv/features2d/ORB.java b/opencv41/src/main/java/org/opencv/features2d/ORB.java
new file mode 100644 (file)
index 0000000..e46d31c
--- /dev/null
@@ -0,0 +1,466 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import java.lang.String;
+import org.opencv.features2d.Feature2D;
+import org.opencv.features2d.ORB;
+
+// C++: class ORB
+//javadoc: ORB
+
+public class ORB extends Feature2D {
+
+    protected ORB(long addr) { super(addr); }
+
+    // internal usage only
+    public static ORB __fromPtr__(long addr) { return new ORB(addr); }
+
+    // C++: enum ScoreType
+    public static final int
+            HARRIS_SCORE = 0,
+            FAST_SCORE = 1;
+
+
+    //
+    // C++:  ORB_ScoreType cv::ORB::getScoreType()
+    //
+
+    //javadoc: ORB::getScoreType()
+    public  int getScoreType()
+    {
+        
+        int retVal = getScoreType_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_ORB cv::ORB::create(int nfeatures = 500, float scaleFactor = 1.2f, int nlevels = 8, int edgeThreshold = 31, int firstLevel = 0, int WTA_K = 2, ORB_ScoreType 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 = ORB.__fromPtr__(create_0(nfeatures, scaleFactor, nlevels, edgeThreshold, firstLevel, WTA_K, scoreType, patchSize, fastThreshold));
+        
+        return retVal;
+    }
+
+    //javadoc: ORB::create(nfeatures, scaleFactor, nlevels, edgeThreshold, firstLevel, WTA_K, scoreType, patchSize)
+    public static ORB create(int nfeatures, float scaleFactor, int nlevels, int edgeThreshold, int firstLevel, int WTA_K, int scoreType, int patchSize)
+    {
+        
+        ORB retVal = ORB.__fromPtr__(create_1(nfeatures, scaleFactor, nlevels, edgeThreshold, firstLevel, WTA_K, scoreType, patchSize));
+        
+        return retVal;
+    }
+
+    //javadoc: ORB::create(nfeatures, scaleFactor, nlevels, edgeThreshold, firstLevel, WTA_K, scoreType)
+    public static ORB create(int nfeatures, float scaleFactor, int nlevels, int edgeThreshold, int firstLevel, int WTA_K, int scoreType)
+    {
+        
+        ORB retVal = ORB.__fromPtr__(create_2(nfeatures, scaleFactor, nlevels, edgeThreshold, firstLevel, WTA_K, scoreType));
+        
+        return retVal;
+    }
+
+    //javadoc: ORB::create(nfeatures, scaleFactor, nlevels, edgeThreshold, firstLevel, WTA_K)
+    public static ORB create(int nfeatures, float scaleFactor, int nlevels, int edgeThreshold, int firstLevel, int WTA_K)
+    {
+        
+        ORB retVal = ORB.__fromPtr__(create_3(nfeatures, scaleFactor, nlevels, edgeThreshold, firstLevel, WTA_K));
+        
+        return retVal;
+    }
+
+    //javadoc: ORB::create(nfeatures, scaleFactor, nlevels, edgeThreshold, firstLevel)
+    public static ORB create(int nfeatures, float scaleFactor, int nlevels, int edgeThreshold, int firstLevel)
+    {
+        
+        ORB retVal = ORB.__fromPtr__(create_4(nfeatures, scaleFactor, nlevels, edgeThreshold, firstLevel));
+        
+        return retVal;
+    }
+
+    //javadoc: ORB::create(nfeatures, scaleFactor, nlevels, edgeThreshold)
+    public static ORB create(int nfeatures, float scaleFactor, int nlevels, int edgeThreshold)
+    {
+        
+        ORB retVal = ORB.__fromPtr__(create_5(nfeatures, scaleFactor, nlevels, edgeThreshold));
+        
+        return retVal;
+    }
+
+    //javadoc: ORB::create(nfeatures, scaleFactor, nlevels)
+    public static ORB create(int nfeatures, float scaleFactor, int nlevels)
+    {
+        
+        ORB retVal = ORB.__fromPtr__(create_6(nfeatures, scaleFactor, nlevels));
+        
+        return retVal;
+    }
+
+    //javadoc: ORB::create(nfeatures, scaleFactor)
+    public static ORB create(int nfeatures, float scaleFactor)
+    {
+        
+        ORB retVal = ORB.__fromPtr__(create_7(nfeatures, scaleFactor));
+        
+        return retVal;
+    }
+
+    //javadoc: ORB::create(nfeatures)
+    public static ORB create(int nfeatures)
+    {
+        
+        ORB retVal = ORB.__fromPtr__(create_8(nfeatures));
+        
+        return retVal;
+    }
+
+    //javadoc: ORB::create()
+    public static ORB create()
+    {
+        
+        ORB retVal = ORB.__fromPtr__(create_9());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  String cv::ORB::getDefaultName()
+    //
+
+    //javadoc: ORB::getDefaultName()
+    public  String getDefaultName()
+    {
+        
+        String retVal = getDefaultName_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ORB::getScaleFactor()
+    //
+
+    //javadoc: ORB::getScaleFactor()
+    public  double getScaleFactor()
+    {
+        
+        double retVal = getScaleFactor_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ORB::getEdgeThreshold()
+    //
+
+    //javadoc: ORB::getEdgeThreshold()
+    public  int getEdgeThreshold()
+    {
+        
+        int retVal = getEdgeThreshold_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ORB::getFastThreshold()
+    //
+
+    //javadoc: ORB::getFastThreshold()
+    public  int getFastThreshold()
+    {
+        
+        int retVal = getFastThreshold_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ORB::getFirstLevel()
+    //
+
+    //javadoc: ORB::getFirstLevel()
+    public  int getFirstLevel()
+    {
+        
+        int retVal = getFirstLevel_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ORB::getMaxFeatures()
+    //
+
+    //javadoc: ORB::getMaxFeatures()
+    public  int getMaxFeatures()
+    {
+        
+        int retVal = getMaxFeatures_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ORB::getNLevels()
+    //
+
+    //javadoc: ORB::getNLevels()
+    public  int getNLevels()
+    {
+        
+        int retVal = getNLevels_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ORB::getPatchSize()
+    //
+
+    //javadoc: ORB::getPatchSize()
+    public  int getPatchSize()
+    {
+        
+        int retVal = getPatchSize_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ORB::getWTA_K()
+    //
+
+    //javadoc: ORB::getWTA_K()
+    public  int getWTA_K()
+    {
+        
+        int retVal = getWTA_K_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::ORB::setEdgeThreshold(int edgeThreshold)
+    //
+
+    //javadoc: ORB::setEdgeThreshold(edgeThreshold)
+    public  void setEdgeThreshold(int edgeThreshold)
+    {
+        
+        setEdgeThreshold_0(nativeObj, edgeThreshold);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ORB::setFastThreshold(int fastThreshold)
+    //
+
+    //javadoc: ORB::setFastThreshold(fastThreshold)
+    public  void setFastThreshold(int fastThreshold)
+    {
+        
+        setFastThreshold_0(nativeObj, fastThreshold);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ORB::setFirstLevel(int firstLevel)
+    //
+
+    //javadoc: ORB::setFirstLevel(firstLevel)
+    public  void setFirstLevel(int firstLevel)
+    {
+        
+        setFirstLevel_0(nativeObj, firstLevel);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ORB::setMaxFeatures(int maxFeatures)
+    //
+
+    //javadoc: ORB::setMaxFeatures(maxFeatures)
+    public  void setMaxFeatures(int maxFeatures)
+    {
+        
+        setMaxFeatures_0(nativeObj, maxFeatures);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ORB::setNLevels(int nlevels)
+    //
+
+    //javadoc: ORB::setNLevels(nlevels)
+    public  void setNLevels(int nlevels)
+    {
+        
+        setNLevels_0(nativeObj, nlevels);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ORB::setPatchSize(int patchSize)
+    //
+
+    //javadoc: ORB::setPatchSize(patchSize)
+    public  void setPatchSize(int patchSize)
+    {
+        
+        setPatchSize_0(nativeObj, patchSize);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ORB::setScaleFactor(double scaleFactor)
+    //
+
+    //javadoc: ORB::setScaleFactor(scaleFactor)
+    public  void setScaleFactor(double scaleFactor)
+    {
+        
+        setScaleFactor_0(nativeObj, scaleFactor);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ORB::setScoreType(ORB_ScoreType scoreType)
+    //
+
+    //javadoc: ORB::setScoreType(scoreType)
+    public  void setScoreType(int scoreType)
+    {
+        
+        setScoreType_0(nativeObj, scoreType);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ORB::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++:  ORB_ScoreType cv::ORB::getScoreType()
+    private static native int getScoreType_0(long nativeObj);
+
+    // C++: static Ptr_ORB cv::ORB::create(int nfeatures = 500, float scaleFactor = 1.2f, int nlevels = 8, int edgeThreshold = 31, int firstLevel = 0, int WTA_K = 2, ORB_ScoreType 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(int nfeatures, float scaleFactor, int nlevels, int edgeThreshold, int firstLevel, int WTA_K, int scoreType, int patchSize);
+    private static native long create_2(int nfeatures, float scaleFactor, int nlevels, int edgeThreshold, int firstLevel, int WTA_K, int scoreType);
+    private static native long create_3(int nfeatures, float scaleFactor, int nlevels, int edgeThreshold, int firstLevel, int WTA_K);
+    private static native long create_4(int nfeatures, float scaleFactor, int nlevels, int edgeThreshold, int firstLevel);
+    private static native long create_5(int nfeatures, float scaleFactor, int nlevels, int edgeThreshold);
+    private static native long create_6(int nfeatures, float scaleFactor, int nlevels);
+    private static native long create_7(int nfeatures, float scaleFactor);
+    private static native long create_8(int nfeatures);
+    private static native long create_9();
+
+    // C++:  String cv::ORB::getDefaultName()
+    private static native String getDefaultName_0(long nativeObj);
+
+    // C++:  double cv::ORB::getScaleFactor()
+    private static native double getScaleFactor_0(long nativeObj);
+
+    // C++:  int cv::ORB::getEdgeThreshold()
+    private static native int getEdgeThreshold_0(long nativeObj);
+
+    // C++:  int cv::ORB::getFastThreshold()
+    private static native int getFastThreshold_0(long nativeObj);
+
+    // C++:  int cv::ORB::getFirstLevel()
+    private static native int getFirstLevel_0(long nativeObj);
+
+    // C++:  int cv::ORB::getMaxFeatures()
+    private static native int getMaxFeatures_0(long nativeObj);
+
+    // C++:  int cv::ORB::getNLevels()
+    private static native int getNLevels_0(long nativeObj);
+
+    // C++:  int cv::ORB::getPatchSize()
+    private static native int getPatchSize_0(long nativeObj);
+
+    // C++:  int cv::ORB::getWTA_K()
+    private static native int getWTA_K_0(long nativeObj);
+
+    // C++:  void cv::ORB::setEdgeThreshold(int edgeThreshold)
+    private static native void setEdgeThreshold_0(long nativeObj, int edgeThreshold);
+
+    // C++:  void cv::ORB::setFastThreshold(int fastThreshold)
+    private static native void setFastThreshold_0(long nativeObj, int fastThreshold);
+
+    // C++:  void cv::ORB::setFirstLevel(int firstLevel)
+    private static native void setFirstLevel_0(long nativeObj, int firstLevel);
+
+    // C++:  void cv::ORB::setMaxFeatures(int maxFeatures)
+    private static native void setMaxFeatures_0(long nativeObj, int maxFeatures);
+
+    // C++:  void cv::ORB::setNLevels(int nlevels)
+    private static native void setNLevels_0(long nativeObj, int nlevels);
+
+    // C++:  void cv::ORB::setPatchSize(int patchSize)
+    private static native void setPatchSize_0(long nativeObj, int patchSize);
+
+    // C++:  void cv::ORB::setScaleFactor(double scaleFactor)
+    private static native void setScaleFactor_0(long nativeObj, double scaleFactor);
+
+    // C++:  void cv::ORB::setScoreType(ORB_ScoreType scoreType)
+    private static native void setScoreType_0(long nativeObj, int scoreType);
+
+    // C++:  void cv::ORB::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/opencv41/src/main/java/org/opencv/features2d/Params.java b/opencv41/src/main/java/org/opencv/features2d/Params.java
new file mode 100644 (file)
index 0000000..3323fac
--- /dev/null
@@ -0,0 +1,674 @@
+//
+// 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; }
+
+    // internal usage only
+    public static Params __fromPtr__(long addr) { return new Params(addr); }
+
+    //
+    // C++:   cv::SimpleBlobDetector::Params::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++:   cv::SimpleBlobDetector::Params::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/opencv41/src/main/java/org/opencv/imgcodecs/Imgcodecs.java b/opencv41/src/main/java/org/opencv/imgcodecs/Imgcodecs.java
new file mode 100644 (file)
index 0000000..17d632e
--- /dev/null
@@ -0,0 +1,247 @@
+//
+// 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;
+
+// C++: class Imgcodecs
+//javadoc: Imgcodecs
+
+public class Imgcodecs {
+
+    // C++: enum ImwriteFlags
+    public static final int
+            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_EXR_TYPE = (3 << 4) + 0,
+            IMWRITE_WEBP_QUALITY = 64,
+            IMWRITE_PAM_TUPLETYPE = 128,
+            IMWRITE_TIFF_RESUNIT = 256,
+            IMWRITE_TIFF_XDPI = 257,
+            IMWRITE_TIFF_YDPI = 258,
+            IMWRITE_TIFF_COMPRESSION = 259,
+            IMWRITE_JPEG2000_COMPRESSION_X1000 = 272;
+
+
+    // C++: enum ImreadModes
+    public static final int
+            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;
+
+
+    // C++: enum ImwritePAMFlags
+    public static final int
+            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++: enum ImwriteEXRTypeFlags
+    public static final int
+            IMWRITE_EXR_TYPE_HALF = 1,
+            IMWRITE_EXR_TYPE_FLOAT = 2;
+
+
+    // C++: enum ImwritePNGFlags
+    public static final int
+            IMWRITE_PNG_STRATEGY_DEFAULT = 0,
+            IMWRITE_PNG_STRATEGY_FILTERED = 1,
+            IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY = 2,
+            IMWRITE_PNG_STRATEGY_RLE = 3,
+            IMWRITE_PNG_STRATEGY_FIXED = 4;
+
+
+    //
+    // C++:  Mat cv::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 cv::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 cv::haveImageReader(String filename)
+    //
+
+    //javadoc: haveImageReader(filename)
+    public static boolean haveImageReader(String filename)
+    {
+        
+        boolean retVal = haveImageReader_0(filename);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::haveImageWriter(String filename)
+    //
+
+    //javadoc: haveImageWriter(filename)
+    public static boolean haveImageWriter(String filename)
+    {
+        
+        boolean retVal = haveImageWriter_0(filename);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::imencode(String ext, Mat img, vector_uchar& buf, vector_int params = std::vector<int>())
+    //
+
+    //javadoc: imencode(ext, img, buf, params)
+    public static boolean imencode(String ext, Mat img, MatOfByte buf, MatOfInt params)
+    {
+        Mat buf_mat = buf;
+        Mat params_mat = params;
+        boolean retVal = imencode_0(ext, img.nativeObj, buf_mat.nativeObj, params_mat.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: imencode(ext, img, buf)
+    public static boolean imencode(String ext, Mat img, MatOfByte buf)
+    {
+        Mat buf_mat = buf;
+        boolean retVal = imencode_1(ext, img.nativeObj, buf_mat.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::imreadmulti(String filename, vector_Mat& mats, int flags = IMREAD_ANYCOLOR)
+    //
+
+    //javadoc: imreadmulti(filename, mats, flags)
+    public static boolean imreadmulti(String filename, List<Mat> mats, int flags)
+    {
+        Mat mats_mat = 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<Mat> 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 cv::imwrite(String filename, Mat img, vector_int params = std::vector<int>())
+    //
+
+    //javadoc: imwrite(filename, img, params)
+    public static boolean imwrite(String filename, Mat img, MatOfInt params)
+    {
+        Mat params_mat = params;
+        boolean retVal = imwrite_0(filename, img.nativeObj, params_mat.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: imwrite(filename, img)
+    public static boolean imwrite(String filename, Mat img)
+    {
+        
+        boolean retVal = imwrite_1(filename, img.nativeObj);
+        
+        return retVal;
+    }
+
+
+
+
+    // C++:  Mat cv::imdecode(Mat buf, int flags)
+    private static native long imdecode_0(long buf_nativeObj, int flags);
+
+    // C++:  Mat cv::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 cv::haveImageReader(String filename)
+    private static native boolean haveImageReader_0(String filename);
+
+    // C++:  bool cv::haveImageWriter(String filename)
+    private static native boolean haveImageWriter_0(String filename);
+
+    // C++:  bool cv::imencode(String ext, Mat img, vector_uchar& buf, vector_int params = std::vector<int>())
+    private static native boolean imencode_0(String ext, long img_nativeObj, long buf_mat_nativeObj, long params_mat_nativeObj);
+    private static native boolean imencode_1(String ext, long img_nativeObj, long buf_mat_nativeObj);
+
+    // C++:  bool cv::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 cv::imwrite(String filename, Mat img, vector_int params = std::vector<int>())
+    private static native boolean imwrite_0(String filename, long img_nativeObj, long params_mat_nativeObj);
+    private static native boolean imwrite_1(String filename, long img_nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/imgproc/CLAHE.java b/opencv41/src/main/java/org/opencv/imgproc/CLAHE.java
new file mode 100644 (file)
index 0000000..8a320d4
--- /dev/null
@@ -0,0 +1,132 @@
+//
+// 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); }
+
+    // internal usage only
+    public static CLAHE __fromPtr__(long addr) { return new CLAHE(addr); }
+
+    //
+    // C++:  Size cv::CLAHE::getTilesGridSize()
+    //
+
+    //javadoc: CLAHE::getTilesGridSize()
+    public  Size getTilesGridSize()
+    {
+        
+        Size retVal = new Size(getTilesGridSize_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::CLAHE::getClipLimit()
+    //
+
+    //javadoc: CLAHE::getClipLimit()
+    public  double getClipLimit()
+    {
+        
+        double retVal = getClipLimit_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::CLAHE::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 cv::CLAHE::collectGarbage()
+    //
+
+    //javadoc: CLAHE::collectGarbage()
+    public  void collectGarbage()
+    {
+        
+        collectGarbage_0(nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::CLAHE::setClipLimit(double clipLimit)
+    //
+
+    //javadoc: CLAHE::setClipLimit(clipLimit)
+    public  void setClipLimit(double clipLimit)
+    {
+        
+        setClipLimit_0(nativeObj, clipLimit);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::CLAHE::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 cv::CLAHE::getTilesGridSize()
+    private static native double[] getTilesGridSize_0(long nativeObj);
+
+    // C++:  double cv::CLAHE::getClipLimit()
+    private static native double getClipLimit_0(long nativeObj);
+
+    // C++:  void cv::CLAHE::apply(Mat src, Mat& dst)
+    private static native void apply_0(long nativeObj, long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::CLAHE::collectGarbage()
+    private static native void collectGarbage_0(long nativeObj);
+
+    // C++:  void cv::CLAHE::setClipLimit(double clipLimit)
+    private static native void setClipLimit_0(long nativeObj, double clipLimit);
+
+    // C++:  void cv::CLAHE::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/opencv41/src/main/java/org/opencv/imgproc/GeneralizedHough.java b/opencv41/src/main/java/org/opencv/imgproc/GeneralizedHough.java
new file mode 100644 (file)
index 0000000..e5184ee
--- /dev/null
@@ -0,0 +1,308 @@
+//
+// 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.Point;
+
+// C++: class GeneralizedHough
+//javadoc: GeneralizedHough
+
+public class GeneralizedHough extends Algorithm {
+
+    protected GeneralizedHough(long addr) { super(addr); }
+
+    // internal usage only
+    public static GeneralizedHough __fromPtr__(long addr) { return new GeneralizedHough(addr); }
+
+    //
+    // C++:  double cv::GeneralizedHough::getDp()
+    //
+
+    //javadoc: GeneralizedHough::getDp()
+    public  double getDp()
+    {
+        
+        double retVal = getDp_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::GeneralizedHough::getMinDist()
+    //
+
+    //javadoc: GeneralizedHough::getMinDist()
+    public  double getMinDist()
+    {
+        
+        double retVal = getMinDist_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::GeneralizedHough::getCannyHighThresh()
+    //
+
+    //javadoc: GeneralizedHough::getCannyHighThresh()
+    public  int getCannyHighThresh()
+    {
+        
+        int retVal = getCannyHighThresh_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::GeneralizedHough::getCannyLowThresh()
+    //
+
+    //javadoc: GeneralizedHough::getCannyLowThresh()
+    public  int getCannyLowThresh()
+    {
+        
+        int retVal = getCannyLowThresh_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::GeneralizedHough::getMaxBufferSize()
+    //
+
+    //javadoc: GeneralizedHough::getMaxBufferSize()
+    public  int getMaxBufferSize()
+    {
+        
+        int retVal = getMaxBufferSize_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::GeneralizedHough::detect(Mat edges, Mat dx, Mat dy, Mat& positions, Mat& votes = Mat())
+    //
+
+    //javadoc: GeneralizedHough::detect(edges, dx, dy, positions, votes)
+    public  void detect(Mat edges, Mat dx, Mat dy, Mat positions, Mat votes)
+    {
+        
+        detect_0(nativeObj, edges.nativeObj, dx.nativeObj, dy.nativeObj, positions.nativeObj, votes.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: GeneralizedHough::detect(edges, dx, dy, positions)
+    public  void detect(Mat edges, Mat dx, Mat dy, Mat positions)
+    {
+        
+        detect_1(nativeObj, edges.nativeObj, dx.nativeObj, dy.nativeObj, positions.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::GeneralizedHough::detect(Mat image, Mat& positions, Mat& votes = Mat())
+    //
+
+    //javadoc: GeneralizedHough::detect(image, positions, votes)
+    public  void detect(Mat image, Mat positions, Mat votes)
+    {
+        
+        detect_2(nativeObj, image.nativeObj, positions.nativeObj, votes.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: GeneralizedHough::detect(image, positions)
+    public  void detect(Mat image, Mat positions)
+    {
+        
+        detect_3(nativeObj, image.nativeObj, positions.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::GeneralizedHough::setCannyHighThresh(int cannyHighThresh)
+    //
+
+    //javadoc: GeneralizedHough::setCannyHighThresh(cannyHighThresh)
+    public  void setCannyHighThresh(int cannyHighThresh)
+    {
+        
+        setCannyHighThresh_0(nativeObj, cannyHighThresh);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::GeneralizedHough::setCannyLowThresh(int cannyLowThresh)
+    //
+
+    //javadoc: GeneralizedHough::setCannyLowThresh(cannyLowThresh)
+    public  void setCannyLowThresh(int cannyLowThresh)
+    {
+        
+        setCannyLowThresh_0(nativeObj, cannyLowThresh);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::GeneralizedHough::setDp(double dp)
+    //
+
+    //javadoc: GeneralizedHough::setDp(dp)
+    public  void setDp(double dp)
+    {
+        
+        setDp_0(nativeObj, dp);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::GeneralizedHough::setMaxBufferSize(int maxBufferSize)
+    //
+
+    //javadoc: GeneralizedHough::setMaxBufferSize(maxBufferSize)
+    public  void setMaxBufferSize(int maxBufferSize)
+    {
+        
+        setMaxBufferSize_0(nativeObj, maxBufferSize);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::GeneralizedHough::setMinDist(double minDist)
+    //
+
+    //javadoc: GeneralizedHough::setMinDist(minDist)
+    public  void setMinDist(double minDist)
+    {
+        
+        setMinDist_0(nativeObj, minDist);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::GeneralizedHough::setTemplate(Mat edges, Mat dx, Mat dy, Point templCenter = Point(-1, -1))
+    //
+
+    //javadoc: GeneralizedHough::setTemplate(edges, dx, dy, templCenter)
+    public  void setTemplate(Mat edges, Mat dx, Mat dy, Point templCenter)
+    {
+        
+        setTemplate_0(nativeObj, edges.nativeObj, dx.nativeObj, dy.nativeObj, templCenter.x, templCenter.y);
+        
+        return;
+    }
+
+    //javadoc: GeneralizedHough::setTemplate(edges, dx, dy)
+    public  void setTemplate(Mat edges, Mat dx, Mat dy)
+    {
+        
+        setTemplate_1(nativeObj, edges.nativeObj, dx.nativeObj, dy.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::GeneralizedHough::setTemplate(Mat templ, Point templCenter = Point(-1, -1))
+    //
+
+    //javadoc: GeneralizedHough::setTemplate(templ, templCenter)
+    public  void setTemplate(Mat templ, Point templCenter)
+    {
+        
+        setTemplate_2(nativeObj, templ.nativeObj, templCenter.x, templCenter.y);
+        
+        return;
+    }
+
+    //javadoc: GeneralizedHough::setTemplate(templ)
+    public  void setTemplate(Mat templ)
+    {
+        
+        setTemplate_3(nativeObj, templ.nativeObj);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  double cv::GeneralizedHough::getDp()
+    private static native double getDp_0(long nativeObj);
+
+    // C++:  double cv::GeneralizedHough::getMinDist()
+    private static native double getMinDist_0(long nativeObj);
+
+    // C++:  int cv::GeneralizedHough::getCannyHighThresh()
+    private static native int getCannyHighThresh_0(long nativeObj);
+
+    // C++:  int cv::GeneralizedHough::getCannyLowThresh()
+    private static native int getCannyLowThresh_0(long nativeObj);
+
+    // C++:  int cv::GeneralizedHough::getMaxBufferSize()
+    private static native int getMaxBufferSize_0(long nativeObj);
+
+    // C++:  void cv::GeneralizedHough::detect(Mat edges, Mat dx, Mat dy, Mat& positions, Mat& votes = Mat())
+    private static native void detect_0(long nativeObj, long edges_nativeObj, long dx_nativeObj, long dy_nativeObj, long positions_nativeObj, long votes_nativeObj);
+    private static native void detect_1(long nativeObj, long edges_nativeObj, long dx_nativeObj, long dy_nativeObj, long positions_nativeObj);
+
+    // C++:  void cv::GeneralizedHough::detect(Mat image, Mat& positions, Mat& votes = Mat())
+    private static native void detect_2(long nativeObj, long image_nativeObj, long positions_nativeObj, long votes_nativeObj);
+    private static native void detect_3(long nativeObj, long image_nativeObj, long positions_nativeObj);
+
+    // C++:  void cv::GeneralizedHough::setCannyHighThresh(int cannyHighThresh)
+    private static native void setCannyHighThresh_0(long nativeObj, int cannyHighThresh);
+
+    // C++:  void cv::GeneralizedHough::setCannyLowThresh(int cannyLowThresh)
+    private static native void setCannyLowThresh_0(long nativeObj, int cannyLowThresh);
+
+    // C++:  void cv::GeneralizedHough::setDp(double dp)
+    private static native void setDp_0(long nativeObj, double dp);
+
+    // C++:  void cv::GeneralizedHough::setMaxBufferSize(int maxBufferSize)
+    private static native void setMaxBufferSize_0(long nativeObj, int maxBufferSize);
+
+    // C++:  void cv::GeneralizedHough::setMinDist(double minDist)
+    private static native void setMinDist_0(long nativeObj, double minDist);
+
+    // C++:  void cv::GeneralizedHough::setTemplate(Mat edges, Mat dx, Mat dy, Point templCenter = Point(-1, -1))
+    private static native void setTemplate_0(long nativeObj, long edges_nativeObj, long dx_nativeObj, long dy_nativeObj, double templCenter_x, double templCenter_y);
+    private static native void setTemplate_1(long nativeObj, long edges_nativeObj, long dx_nativeObj, long dy_nativeObj);
+
+    // C++:  void cv::GeneralizedHough::setTemplate(Mat templ, Point templCenter = Point(-1, -1))
+    private static native void setTemplate_2(long nativeObj, long templ_nativeObj, double templCenter_x, double templCenter_y);
+    private static native void setTemplate_3(long nativeObj, long templ_nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/imgproc/GeneralizedHoughBallard.java b/opencv41/src/main/java/org/opencv/imgproc/GeneralizedHoughBallard.java
new file mode 100644 (file)
index 0000000..e49aeff
--- /dev/null
@@ -0,0 +1,96 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.imgproc;
+
+import org.opencv.imgproc.GeneralizedHough;
+
+// C++: class GeneralizedHoughBallard
+//javadoc: GeneralizedHoughBallard
+
+public class GeneralizedHoughBallard extends GeneralizedHough {
+
+    protected GeneralizedHoughBallard(long addr) { super(addr); }
+
+    // internal usage only
+    public static GeneralizedHoughBallard __fromPtr__(long addr) { return new GeneralizedHoughBallard(addr); }
+
+    //
+    // C++:  int cv::GeneralizedHoughBallard::getLevels()
+    //
+
+    //javadoc: GeneralizedHoughBallard::getLevels()
+    public  int getLevels()
+    {
+        
+        int retVal = getLevels_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::GeneralizedHoughBallard::getVotesThreshold()
+    //
+
+    //javadoc: GeneralizedHoughBallard::getVotesThreshold()
+    public  int getVotesThreshold()
+    {
+        
+        int retVal = getVotesThreshold_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::GeneralizedHoughBallard::setLevels(int levels)
+    //
+
+    //javadoc: GeneralizedHoughBallard::setLevels(levels)
+    public  void setLevels(int levels)
+    {
+        
+        setLevels_0(nativeObj, levels);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::GeneralizedHoughBallard::setVotesThreshold(int votesThreshold)
+    //
+
+    //javadoc: GeneralizedHoughBallard::setVotesThreshold(votesThreshold)
+    public  void setVotesThreshold(int votesThreshold)
+    {
+        
+        setVotesThreshold_0(nativeObj, votesThreshold);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  int cv::GeneralizedHoughBallard::getLevels()
+    private static native int getLevels_0(long nativeObj);
+
+    // C++:  int cv::GeneralizedHoughBallard::getVotesThreshold()
+    private static native int getVotesThreshold_0(long nativeObj);
+
+    // C++:  void cv::GeneralizedHoughBallard::setLevels(int levels)
+    private static native void setLevels_0(long nativeObj, int levels);
+
+    // C++:  void cv::GeneralizedHoughBallard::setVotesThreshold(int votesThreshold)
+    private static native void setVotesThreshold_0(long nativeObj, int votesThreshold);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/imgproc/GeneralizedHoughGuil.java b/opencv41/src/main/java/org/opencv/imgproc/GeneralizedHoughGuil.java
new file mode 100644 (file)
index 0000000..1e881c1
--- /dev/null
@@ -0,0 +1,28 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.imgproc;
+
+import org.opencv.imgproc.GeneralizedHough;
+
+// C++: class GeneralizedHoughGuil
+//javadoc: GeneralizedHoughGuil
+
+public class GeneralizedHoughGuil extends GeneralizedHough {
+
+    protected GeneralizedHoughGuil(long addr) { super(addr); }
+
+    // internal usage only
+    public static GeneralizedHoughGuil __fromPtr__(long addr) { return new GeneralizedHoughGuil(addr); }
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/imgproc/Imgproc.java b/opencv41/src/main/java/org/opencv/imgproc/Imgproc.java
new file mode 100644 (file)
index 0000000..d676935
--- /dev/null
@@ -0,0 +1,4439 @@
+//
+// 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.imgproc.CLAHE;
+import org.opencv.imgproc.LineSegmentDetector;
+import org.opencv.utils.Converters;
+
+// C++: class Imgproc
+//javadoc: Imgproc
+
+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;
+
+
+    // C++: enum HersheyFonts
+    public static final int
+            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;
+
+
+    // C++: enum InterpolationMasks
+    public static final int
+            INTER_BITS = 5,
+            INTER_BITS2 = INTER_BITS * 2,
+            INTER_TAB_SIZE = 1 << INTER_BITS,
+            INTER_TAB_SIZE2 = INTER_TAB_SIZE * INTER_TAB_SIZE;
+
+
+    // C++: enum MorphTypes
+    public static final int
+            MORPH_ERODE = 0,
+            MORPH_DILATE = 1,
+            MORPH_OPEN = 2,
+            MORPH_CLOSE = 3,
+            MORPH_GRADIENT = 4,
+            MORPH_TOPHAT = 5,
+            MORPH_BLACKHAT = 6,
+            MORPH_HITMISS = 7;
+
+
+    // C++: enum FloodFillFlags
+    public static final int
+            FLOODFILL_FIXED_RANGE = 1 << 16,
+            FLOODFILL_MASK_ONLY = 1 << 17;
+
+
+    // C++: enum HoughModes
+    public static final int
+            HOUGH_STANDARD = 0,
+            HOUGH_PROBABILISTIC = 1,
+            HOUGH_MULTI_SCALE = 2,
+            HOUGH_GRADIENT = 3;
+
+
+    // C++: enum ConnectedComponentsAlgorithmsTypes
+    public static final int
+            CCL_WU = 0,
+            CCL_DEFAULT = -1,
+            CCL_GRANA = 1;
+
+
+    // C++: enum RetrievalModes
+    public static final int
+            RETR_EXTERNAL = 0,
+            RETR_LIST = 1,
+            RETR_CCOMP = 2,
+            RETR_TREE = 3,
+            RETR_FLOODFILL = 4;
+
+
+    // C++: enum GrabCutClasses
+    public static final int
+            GC_BGD = 0,
+            GC_FGD = 1,
+            GC_PR_BGD = 2,
+            GC_PR_FGD = 3;
+
+
+    // C++: enum ColormapTypes
+    public static final int
+            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,
+            COLORMAP_MAGMA = 13,
+            COLORMAP_INFERNO = 14,
+            COLORMAP_PLASMA = 15,
+            COLORMAP_VIRIDIS = 16,
+            COLORMAP_CIVIDIS = 17,
+            COLORMAP_TWILIGHT = 18,
+            COLORMAP_TWILIGHT_SHIFTED = 19;
+
+
+    // C++: enum HistCompMethods
+    public static final int
+            HISTCMP_CORREL = 0,
+            HISTCMP_CHISQR = 1,
+            HISTCMP_INTERSECT = 2,
+            HISTCMP_BHATTACHARYYA = 3,
+            HISTCMP_HELLINGER = HISTCMP_BHATTACHARYYA,
+            HISTCMP_CHISQR_ALT = 4,
+            HISTCMP_KL_DIV = 5;
+
+
+    // C++: enum LineTypes
+    public static final int
+            FILLED = -1,
+            LINE_4 = 4,
+            LINE_8 = 8,
+            LINE_AA = 16;
+
+
+    // C++: enum InterpolationFlags
+    public static final int
+            INTER_NEAREST = 0,
+            INTER_LINEAR = 1,
+            INTER_CUBIC = 2,
+            INTER_AREA = 3,
+            INTER_LANCZOS4 = 4,
+            INTER_LINEAR_EXACT = 5,
+            INTER_MAX = 7,
+            WARP_FILL_OUTLIERS = 8,
+            WARP_INVERSE_MAP = 16;
+
+
+    // C++: enum SpecialFilter
+    public static final int
+            FILTER_SCHARR = -1;
+
+
+    // C++: enum ContourApproximationModes
+    public static final int
+            CHAIN_APPROX_NONE = 1,
+            CHAIN_APPROX_SIMPLE = 2,
+            CHAIN_APPROX_TC89_L1 = 3,
+            CHAIN_APPROX_TC89_KCOS = 4;
+
+
+    // C++: enum RectanglesIntersectTypes
+    public static final int
+            INTERSECT_NONE = 0,
+            INTERSECT_PARTIAL = 1,
+            INTERSECT_FULL = 2;
+
+
+    // C++: enum <unnamed>
+    public static final int
+            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_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;
+
+
+    // C++: enum ShapeMatchModes
+    public static final int
+            CONTOURS_MATCH_I1 = 1,
+            CONTOURS_MATCH_I2 = 2,
+            CONTOURS_MATCH_I3 = 3;
+
+
+    // C++: enum WarpPolarMode
+    public static final int
+            WARP_POLAR_LINEAR = 0,
+            WARP_POLAR_LOG = 256;
+
+
+    // C++: enum ColorConversionCodes
+    public static final int
+            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;
+
+
+    // C++: enum LineSegmentDetectorModes
+    public static final int
+            LSD_REFINE_NONE = 0,
+            LSD_REFINE_STD = 1,
+            LSD_REFINE_ADV = 2;
+
+
+    // C++: enum ThresholdTypes
+    public static final int
+            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;
+
+
+    // C++: enum AdaptiveThresholdTypes
+    public static final int
+            ADAPTIVE_THRESH_MEAN_C = 0,
+            ADAPTIVE_THRESH_GAUSSIAN_C = 1;
+
+
+    // C++: enum MorphShapes_c
+    public static final int
+            CV_SHAPE_RECT = 0,
+            CV_SHAPE_CROSS = 1,
+            CV_SHAPE_ELLIPSE = 2,
+            CV_SHAPE_CUSTOM = 100;
+
+
+    // C++: enum GrabCutModes
+    public static final int
+            GC_INIT_WITH_RECT = 0,
+            GC_INIT_WITH_MASK = 1,
+            GC_EVAL = 2,
+            GC_EVAL_FREEZE_MODEL = 3;
+
+
+    // C++: enum MorphShapes
+    public static final int
+            MORPH_RECT = 0,
+            MORPH_CROSS = 1,
+            MORPH_ELLIPSE = 2;
+
+
+    // C++: enum DistanceTransformLabelTypes
+    public static final int
+            DIST_LABEL_CCOMP = 0,
+            DIST_LABEL_PIXEL = 1;
+
+
+    // C++: enum DistanceTypes
+    public static final int
+            DIST_USER = -1,
+            DIST_L1 = 1,
+            DIST_L2 = 2,
+            DIST_C = 3,
+            DIST_L12 = 4,
+            DIST_FAIR = 5,
+            DIST_WELSCH = 6,
+            DIST_HUBER = 7;
+
+
+    // C++: enum TemplateMatchModes
+    public static final int
+            TM_SQDIFF = 0,
+            TM_SQDIFF_NORMED = 1,
+            TM_CCORR = 2,
+            TM_CCORR_NORMED = 3,
+            TM_CCOEFF = 4,
+            TM_CCOEFF_NORMED = 5;
+
+
+    // C++: enum DistanceTransformMasks
+    public static final int
+            DIST_MASK_3 = 3,
+            DIST_MASK_5 = 5,
+            DIST_MASK_PRECISE = 0;
+
+
+    // C++: enum ConnectedComponentsTypes
+    public static final int
+            CC_STAT_LEFT = 0,
+            CC_STAT_TOP = 1,
+            CC_STAT_WIDTH = 2,
+            CC_STAT_HEIGHT = 3,
+            CC_STAT_AREA = 4,
+            CC_STAT_MAX = 5;
+
+
+    // C++: enum SmoothMethod_c
+    public static final int
+            CV_BLUR_NO_SCALE = 0,
+            CV_BLUR = 1,
+            CV_GAUSSIAN = 2,
+            CV_MEDIAN = 3,
+            CV_BILATERAL = 4;
+
+
+    // C++: enum MarkerTypes
+    public static final int
+            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 cv::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 cv::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, psi)
+    public static Mat getGaborKernel(Size ksize, double sigma, double theta, double lambd, double gamma, double psi)
+    {
+        
+        Mat retVal = new Mat(getGaborKernel_1(ksize.width, ksize.height, sigma, theta, lambd, gamma, psi));
+        
+        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_2(ksize.width, ksize.height, sigma, theta, lambd, gamma));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::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 cv::getPerspectiveTransform(Mat src, Mat dst, int solveMethod = DECOMP_LU)
+    //
+
+    //javadoc: getPerspectiveTransform(src, dst, solveMethod)
+    public static Mat getPerspectiveTransform(Mat src, Mat dst, int solveMethod)
+    {
+        
+        Mat retVal = new Mat(getPerspectiveTransform_0(src.nativeObj, dst.nativeObj, solveMethod));
+        
+        return retVal;
+    }
+
+    //javadoc: getPerspectiveTransform(src, dst)
+    public static Mat getPerspectiveTransform(Mat src, Mat dst)
+    {
+        
+        Mat retVal = new Mat(getPerspectiveTransform_1(src.nativeObj, dst.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::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 cv::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 cv::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 cv::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, window)
+    public static Point phaseCorrelate(Mat src1, Mat src2, Mat window)
+    {
+        
+        Point retVal = new Point(phaseCorrelate_1(src1.nativeObj, src2.nativeObj, window.nativeObj));
+        
+        return retVal;
+    }
+
+    //javadoc: phaseCorrelate(src1, src2)
+    public static Point phaseCorrelate(Mat src1, Mat src2)
+    {
+        
+        Point retVal = new Point(phaseCorrelate_2(src1.nativeObj, src2.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Ptr_CLAHE cv::createCLAHE(double clipLimit = 40.0, Size tileGridSize = Size(8, 8))
+    //
+
+    //javadoc: createCLAHE(clipLimit, tileGridSize)
+    public static CLAHE createCLAHE(double clipLimit, Size tileGridSize)
+    {
+        
+        CLAHE retVal = CLAHE.__fromPtr__(createCLAHE_0(clipLimit, tileGridSize.width, tileGridSize.height));
+        
+        return retVal;
+    }
+
+    //javadoc: createCLAHE(clipLimit)
+    public static CLAHE createCLAHE(double clipLimit)
+    {
+        
+        CLAHE retVal = CLAHE.__fromPtr__(createCLAHE_1(clipLimit));
+        
+        return retVal;
+    }
+
+    //javadoc: createCLAHE()
+    public static CLAHE createCLAHE()
+    {
+        
+        CLAHE retVal = CLAHE.__fromPtr__(createCLAHE_2());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Ptr_LineSegmentDetector cv::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 = LineSegmentDetector.__fromPtr__(createLineSegmentDetector_0(_refine, _scale, _sigma_scale, _quant, _ang_th, _log_eps, _density_th, _n_bins));
+        
+        return retVal;
+    }
+
+    //javadoc: createLineSegmentDetector(_refine, _scale, _sigma_scale, _quant, _ang_th, _log_eps, _density_th)
+    public static LineSegmentDetector createLineSegmentDetector(int _refine, double _scale, double _sigma_scale, double _quant, double _ang_th, double _log_eps, double _density_th)
+    {
+        
+        LineSegmentDetector retVal = LineSegmentDetector.__fromPtr__(createLineSegmentDetector_1(_refine, _scale, _sigma_scale, _quant, _ang_th, _log_eps, _density_th));
+        
+        return retVal;
+    }
+
+    //javadoc: createLineSegmentDetector(_refine, _scale, _sigma_scale, _quant, _ang_th, _log_eps)
+    public static LineSegmentDetector createLineSegmentDetector(int _refine, double _scale, double _sigma_scale, double _quant, double _ang_th, double _log_eps)
+    {
+        
+        LineSegmentDetector retVal = LineSegmentDetector.__fromPtr__(createLineSegmentDetector_2(_refine, _scale, _sigma_scale, _quant, _ang_th, _log_eps));
+        
+        return retVal;
+    }
+
+    //javadoc: createLineSegmentDetector(_refine, _scale, _sigma_scale, _quant, _ang_th)
+    public static LineSegmentDetector createLineSegmentDetector(int _refine, double _scale, double _sigma_scale, double _quant, double _ang_th)
+    {
+        
+        LineSegmentDetector retVal = LineSegmentDetector.__fromPtr__(createLineSegmentDetector_3(_refine, _scale, _sigma_scale, _quant, _ang_th));
+        
+        return retVal;
+    }
+
+    //javadoc: createLineSegmentDetector(_refine, _scale, _sigma_scale, _quant)
+    public static LineSegmentDetector createLineSegmentDetector(int _refine, double _scale, double _sigma_scale, double _quant)
+    {
+        
+        LineSegmentDetector retVal = LineSegmentDetector.__fromPtr__(createLineSegmentDetector_4(_refine, _scale, _sigma_scale, _quant));
+        
+        return retVal;
+    }
+
+    //javadoc: createLineSegmentDetector(_refine, _scale, _sigma_scale)
+    public static LineSegmentDetector createLineSegmentDetector(int _refine, double _scale, double _sigma_scale)
+    {
+        
+        LineSegmentDetector retVal = LineSegmentDetector.__fromPtr__(createLineSegmentDetector_5(_refine, _scale, _sigma_scale));
+        
+        return retVal;
+    }
+
+    //javadoc: createLineSegmentDetector(_refine, _scale)
+    public static LineSegmentDetector createLineSegmentDetector(int _refine, double _scale)
+    {
+        
+        LineSegmentDetector retVal = LineSegmentDetector.__fromPtr__(createLineSegmentDetector_6(_refine, _scale));
+        
+        return retVal;
+    }
+
+    //javadoc: createLineSegmentDetector(_refine)
+    public static LineSegmentDetector createLineSegmentDetector(int _refine)
+    {
+        
+        LineSegmentDetector retVal = LineSegmentDetector.__fromPtr__(createLineSegmentDetector_7(_refine));
+        
+        return retVal;
+    }
+
+    //javadoc: createLineSegmentDetector()
+    public static LineSegmentDetector createLineSegmentDetector()
+    {
+        
+        LineSegmentDetector retVal = LineSegmentDetector.__fromPtr__(createLineSegmentDetector_8());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Rect cv::boundingRect(Mat array)
+    //
+
+    //javadoc: boundingRect(array)
+    public static Rect boundingRect(Mat array)
+    {
+        
+        Rect retVal = new Rect(boundingRect_0(array.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  RotatedRect cv::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 cv::fitEllipseAMS(Mat points)
+    //
+
+    //javadoc: fitEllipseAMS(points)
+    public static RotatedRect fitEllipseAMS(Mat points)
+    {
+        
+        RotatedRect retVal = new RotatedRect(fitEllipseAMS_0(points.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  RotatedRect cv::fitEllipseDirect(Mat points)
+    //
+
+    //javadoc: fitEllipseDirect(points)
+    public static RotatedRect fitEllipseDirect(Mat points)
+    {
+        
+        RotatedRect retVal = new RotatedRect(fitEllipseDirect_0(points.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  RotatedRect cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::getFontScaleFromHeight(int fontFace, int pixelHeight, int thickness = 1)
+    //
+
+    //javadoc: getFontScaleFromHeight(fontFace, pixelHeight, thickness)
+    public static double getFontScaleFromHeight(int fontFace, int pixelHeight, int thickness)
+    {
+        
+        double retVal = getFontScaleFromHeight_0(fontFace, pixelHeight, thickness);
+        
+        return retVal;
+    }
+
+    //javadoc: getFontScaleFromHeight(fontFace, pixelHeight)
+    public static double getFontScaleFromHeight(int fontFace, int pixelHeight)
+    {
+        
+        double retVal = getFontScaleFromHeight_1(fontFace, pixelHeight);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::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 cv::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 cv::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 cv::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 cv::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 cv::wrapperEMD(Mat signature1, Mat signature2, int distType, Mat cost = Mat(), Ptr_float& lowerBound = Ptr<float>(), Mat& flow = Mat())
+    //
+
+    //javadoc: EMD(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: EMD(signature1, signature2, distType, cost)
+    public static float EMD(Mat signature1, Mat signature2, int distType, Mat cost)
+    {
+        
+        float retVal = EMD_1(signature1.nativeObj, signature2.nativeObj, distType, cost.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: EMD(signature1, signature2, distType)
+    public static float EMD(Mat signature1, Mat signature2, int distType)
+    {
+        
+        float retVal = EMD_3(signature1.nativeObj, signature2.nativeObj, distType);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::connectedComponents(Mat image, Mat& labels, int connectivity, int ltype, int ccltype)
+    //
+
+    //javadoc: connectedComponentsWithAlgorithm(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 cv::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, connectivity)
+    public static int connectedComponents(Mat image, Mat labels, int connectivity)
+    {
+        
+        int retVal = connectedComponents_1(image.nativeObj, labels.nativeObj, connectivity);
+        
+        return retVal;
+    }
+
+    //javadoc: connectedComponents(image, labels)
+    public static int connectedComponents(Mat image, Mat labels)
+    {
+        
+        int retVal = connectedComponents_2(image.nativeObj, labels.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::connectedComponentsWithStats(Mat image, Mat& labels, Mat& stats, Mat& centroids, int connectivity, int ltype, int ccltype)
+    //
+
+    //javadoc: connectedComponentsWithStatsWithAlgorithm(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 cv::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, connectivity)
+    public static int connectedComponentsWithStats(Mat image, Mat labels, Mat stats, Mat centroids, int connectivity)
+    {
+        
+        int retVal = connectedComponentsWithStats_1(image.nativeObj, labels.nativeObj, stats.nativeObj, centroids.nativeObj, connectivity);
+        
+        return retVal;
+    }
+
+    //javadoc: connectedComponentsWithStats(image, labels, stats, centroids)
+    public static int connectedComponentsWithStats(Mat image, Mat labels, Mat stats, Mat centroids)
+    {
+        
+        int retVal = connectedComponentsWithStats_2(image.nativeObj, labels.nativeObj, stats.nativeObj, centroids.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::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, rect, loDiff, upDiff)
+    public static int floodFill(Mat image, Mat mask, Point seedPoint, Scalar newVal, Rect rect, Scalar loDiff, Scalar upDiff)
+    {
+        double[] rect_out = new double[4];
+        int retVal = floodFill_1(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]);
+        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, rect, loDiff)
+    public static int floodFill(Mat image, Mat mask, Point seedPoint, Scalar newVal, Rect rect, Scalar loDiff)
+    {
+        double[] rect_out = new double[4];
+        int retVal = floodFill_2(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]);
+        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, rect)
+    public static int floodFill(Mat image, Mat mask, Point seedPoint, Scalar newVal, Rect rect)
+    {
+        double[] rect_out = new double[4];
+        int retVal = floodFill_3(image.nativeObj, mask.nativeObj, seedPoint.x, seedPoint.y, newVal.val[0], newVal.val[1], newVal.val[2], newVal.val[3], rect_out);
+        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_4(image.nativeObj, mask.nativeObj, seedPoint.x, seedPoint.y, newVal.val[0], newVal.val[1], newVal.val[2], newVal.val[3]);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::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 cv::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 cv::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, apertureSize)
+    public static void Canny(Mat image, Mat edges, double threshold1, double threshold2, int apertureSize)
+    {
+        
+        Canny_3(image.nativeObj, edges.nativeObj, threshold1, threshold2, apertureSize);
+        
+        return;
+    }
+
+    //javadoc: Canny(image, edges, threshold1, threshold2)
+    public static void Canny(Mat image, Mat edges, double threshold1, double threshold2)
+    {
+        
+        Canny_4(image.nativeObj, edges.nativeObj, threshold1, threshold2);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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, param1, param2, minRadius)
+    public static void HoughCircles(Mat image, Mat circles, int method, double dp, double minDist, double param1, double param2, int minRadius)
+    {
+        
+        HoughCircles_1(image.nativeObj, circles.nativeObj, method, dp, minDist, param1, param2, minRadius);
+        
+        return;
+    }
+
+    //javadoc: HoughCircles(image, circles, method, dp, minDist, param1, param2)
+    public static void HoughCircles(Mat image, Mat circles, int method, double dp, double minDist, double param1, double param2)
+    {
+        
+        HoughCircles_2(image.nativeObj, circles.nativeObj, method, dp, minDist, param1, param2);
+        
+        return;
+    }
+
+    //javadoc: HoughCircles(image, circles, method, dp, minDist, param1)
+    public static void HoughCircles(Mat image, Mat circles, int method, double dp, double minDist, double param1)
+    {
+        
+        HoughCircles_3(image.nativeObj, circles.nativeObj, method, dp, minDist, param1);
+        
+        return;
+    }
+
+    //javadoc: HoughCircles(image, circles, method, dp, minDist)
+    public static void HoughCircles(Mat image, Mat circles, int method, double dp, double minDist)
+    {
+        
+        HoughCircles_4(image.nativeObj, circles.nativeObj, method, dp, minDist);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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, srn, stn, min_theta)
+    public static void HoughLines(Mat image, Mat lines, double rho, double theta, int threshold, double srn, double stn, double min_theta)
+    {
+        
+        HoughLines_1(image.nativeObj, lines.nativeObj, rho, theta, threshold, srn, stn, min_theta);
+        
+        return;
+    }
+
+    //javadoc: HoughLines(image, lines, rho, theta, threshold, srn, stn)
+    public static void HoughLines(Mat image, Mat lines, double rho, double theta, int threshold, double srn, double stn)
+    {
+        
+        HoughLines_2(image.nativeObj, lines.nativeObj, rho, theta, threshold, srn, stn);
+        
+        return;
+    }
+
+    //javadoc: HoughLines(image, lines, rho, theta, threshold, srn)
+    public static void HoughLines(Mat image, Mat lines, double rho, double theta, int threshold, double srn)
+    {
+        
+        HoughLines_3(image.nativeObj, lines.nativeObj, rho, theta, threshold, srn);
+        
+        return;
+    }
+
+    //javadoc: HoughLines(image, lines, rho, theta, threshold)
+    public static void HoughLines(Mat image, Mat lines, double rho, double theta, int threshold)
+    {
+        
+        HoughLines_4(image.nativeObj, lines.nativeObj, rho, theta, threshold);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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, minLineLength)
+    public static void HoughLinesP(Mat image, Mat lines, double rho, double theta, int threshold, double minLineLength)
+    {
+        
+        HoughLinesP_1(image.nativeObj, lines.nativeObj, rho, theta, threshold, minLineLength);
+        
+        return;
+    }
+
+    //javadoc: HoughLinesP(image, lines, rho, theta, threshold)
+    public static void HoughLinesP(Mat image, Mat lines, double rho, double theta, int threshold)
+    {
+        
+        HoughLinesP_2(image.nativeObj, lines.nativeObj, rho, theta, threshold);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::HoughLinesPointSet(Mat _point, Mat& _lines, int lines_max, int threshold, double min_rho, double max_rho, double rho_step, double min_theta, double max_theta, double theta_step)
+    //
+
+    //javadoc: HoughLinesPointSet(_point, _lines, lines_max, threshold, min_rho, max_rho, rho_step, min_theta, max_theta, theta_step)
+    public static void HoughLinesPointSet(Mat _point, Mat _lines, int lines_max, int threshold, double min_rho, double max_rho, double rho_step, double min_theta, double max_theta, double theta_step)
+    {
+        
+        HoughLinesPointSet_0(_point.nativeObj, _lines.nativeObj, lines_max, threshold, min_rho, max_rho, rho_step, min_theta, max_theta, theta_step);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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, ksize, scale)
+    public static void Laplacian(Mat src, Mat dst, int ddepth, int ksize, double scale)
+    {
+        
+        Laplacian_2(src.nativeObj, dst.nativeObj, ddepth, ksize, scale);
+        
+        return;
+    }
+
+    //javadoc: Laplacian(src, dst, ddepth, ksize)
+    public static void Laplacian(Mat src, Mat dst, int ddepth, int ksize)
+    {
+        
+        Laplacian_3(src.nativeObj, dst.nativeObj, ddepth, ksize);
+        
+        return;
+    }
+
+    //javadoc: Laplacian(src, dst, ddepth)
+    public static void Laplacian(Mat src, Mat dst, int ddepth)
+    {
+        
+        Laplacian_4(src.nativeObj, dst.nativeObj, ddepth);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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, scale)
+    public static void Scharr(Mat src, Mat dst, int ddepth, int dx, int dy, double scale)
+    {
+        
+        Scharr_2(src.nativeObj, dst.nativeObj, ddepth, dx, dy, scale);
+        
+        return;
+    }
+
+    //javadoc: Scharr(src, dst, ddepth, dx, dy)
+    public static void Scharr(Mat src, Mat dst, int ddepth, int dx, int dy)
+    {
+        
+        Scharr_3(src.nativeObj, dst.nativeObj, ddepth, dx, dy);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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, ksize, scale)
+    public static void Sobel(Mat src, Mat dst, int ddepth, int dx, int dy, int ksize, double scale)
+    {
+        
+        Sobel_2(src.nativeObj, dst.nativeObj, ddepth, dx, dy, ksize, scale);
+        
+        return;
+    }
+
+    //javadoc: Sobel(src, dst, ddepth, dx, dy, ksize)
+    public static void Sobel(Mat src, Mat dst, int ddepth, int dx, int dy, int ksize)
+    {
+        
+        Sobel_3(src.nativeObj, dst.nativeObj, ddepth, dx, dy, ksize);
+        
+        return;
+    }
+
+    //javadoc: Sobel(src, dst, ddepth, dx, dy)
+    public static void Sobel(Mat src, Mat dst, int ddepth, int dx, int dy)
+    {
+        
+        Sobel_4(src.nativeObj, dst.nativeObj, ddepth, dx, dy);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::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, thickness, line_type, shift)
+    public static void arrowedLine(Mat img, Point pt1, Point pt2, Scalar color, int thickness, int line_type, int shift)
+    {
+        
+        arrowedLine_1(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);
+        
+        return;
+    }
+
+    //javadoc: arrowedLine(img, pt1, pt2, color, thickness, line_type)
+    public static void arrowedLine(Mat img, Point pt1, Point pt2, Scalar color, int thickness, int line_type)
+    {
+        
+        arrowedLine_2(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);
+        
+        return;
+    }
+
+    //javadoc: arrowedLine(img, pt1, pt2, color, thickness)
+    public static void arrowedLine(Mat img, Point pt1, Point pt2, Scalar color, int thickness)
+    {
+        
+        arrowedLine_3(img.nativeObj, pt1.x, pt1.y, pt2.x, pt2.y, color.val[0], color.val[1], color.val[2], color.val[3], thickness);
+        
+        return;
+    }
+
+    //javadoc: arrowedLine(img, pt1, pt2, color)
+    public static void arrowedLine(Mat img, Point pt1, Point pt2, Scalar color)
+    {
+        
+        arrowedLine_4(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 cv::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 cv::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 cv::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, anchor)
+    public static void boxFilter(Mat src, Mat dst, int ddepth, Size ksize, Point anchor)
+    {
+        
+        boxFilter_2(src.nativeObj, dst.nativeObj, ddepth, ksize.width, ksize.height, anchor.x, anchor.y);
+        
+        return;
+    }
+
+    //javadoc: boxFilter(src, dst, ddepth, ksize)
+    public static void boxFilter(Mat src, Mat dst, int ddepth, Size ksize)
+    {
+        
+        boxFilter_3(src.nativeObj, dst.nativeObj, ddepth, ksize.width, ksize.height);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::calcBackProject(vector_Mat images, vector_int channels, Mat hist, Mat& dst, vector_float ranges, double scale)
+    //
+
+    //javadoc: calcBackProject(images, channels, hist, dst, ranges, scale)
+    public static void calcBackProject(List<Mat> images, MatOfInt channels, Mat hist, Mat dst, MatOfFloat ranges, double scale)
+    {
+        Mat images_mat = Converters.vector_Mat_to_Mat(images);
+        Mat channels_mat = channels;
+        Mat ranges_mat = ranges;
+        calcBackProject_0(images_mat.nativeObj, channels_mat.nativeObj, hist.nativeObj, dst.nativeObj, ranges_mat.nativeObj, scale);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::calcHist(vector_Mat images, vector_int channels, Mat mask, Mat& hist, vector_int histSize, vector_float ranges, bool accumulate = false)
+    //
+
+    //javadoc: calcHist(images, channels, mask, hist, histSize, ranges, accumulate)
+    public static void calcHist(List<Mat> images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges, boolean accumulate)
+    {
+        Mat images_mat = Converters.vector_Mat_to_Mat(images);
+        Mat channels_mat = channels;
+        Mat histSize_mat = histSize;
+        Mat ranges_mat = ranges;
+        calcHist_0(images_mat.nativeObj, channels_mat.nativeObj, mask.nativeObj, hist.nativeObj, histSize_mat.nativeObj, ranges_mat.nativeObj, accumulate);
+        
+        return;
+    }
+
+    //javadoc: calcHist(images, channels, mask, hist, histSize, ranges)
+    public static void calcHist(List<Mat> images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges)
+    {
+        Mat images_mat = Converters.vector_Mat_to_Mat(images);
+        Mat channels_mat = channels;
+        Mat histSize_mat = histSize;
+        Mat ranges_mat = ranges;
+        calcHist_1(images_mat.nativeObj, channels_mat.nativeObj, mask.nativeObj, hist.nativeObj, histSize_mat.nativeObj, ranges_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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, lineType)
+    public static void circle(Mat img, Point center, int radius, Scalar color, int thickness, int lineType)
+    {
+        
+        circle_1(img.nativeObj, center.x, center.y, radius, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType);
+        
+        return;
+    }
+
+    //javadoc: circle(img, center, radius, color, thickness)
+    public static void circle(Mat img, Point center, int radius, Scalar color, int thickness)
+    {
+        
+        circle_2(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_3(img.nativeObj, center.x, center.y, radius, color.val[0], color.val[1], color.val[2], color.val[3]);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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_2(points_mat.nativeObj, hull_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::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 cv::cvtColorTwoPlane(Mat src1, Mat src2, Mat& dst, int code)
+    //
+
+    //javadoc: cvtColorTwoPlane(src1, src2, dst, code)
+    public static void cvtColorTwoPlane(Mat src1, Mat src2, Mat dst, int code)
+    {
+        
+        cvtColorTwoPlane_0(src1.nativeObj, src2.nativeObj, dst.nativeObj, code);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::demosaicing(Mat src, Mat& dst, int code, int dstCn = 0)
+    //
+
+    //javadoc: demosaicing(src, dst, code, dstCn)
+    public static void demosaicing(Mat src, Mat dst, int code, int dstCn)
+    {
+        
+        demosaicing_0(src.nativeObj, dst.nativeObj, code, dstCn);
+        
+        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 cv::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, borderType)
+    public static void dilate(Mat src, Mat dst, Mat kernel, Point anchor, int iterations, int borderType)
+    {
+        
+        dilate_1(src.nativeObj, dst.nativeObj, kernel.nativeObj, anchor.x, anchor.y, iterations, borderType);
+        
+        return;
+    }
+
+    //javadoc: dilate(src, dst, kernel, anchor, iterations)
+    public static void dilate(Mat src, Mat dst, Mat kernel, Point anchor, int iterations)
+    {
+        
+        dilate_2(src.nativeObj, dst.nativeObj, kernel.nativeObj, anchor.x, anchor.y, iterations);
+        
+        return;
+    }
+
+    //javadoc: dilate(src, dst, kernel, anchor)
+    public static void dilate(Mat src, Mat dst, Mat kernel, Point anchor)
+    {
+        
+        dilate_3(src.nativeObj, dst.nativeObj, kernel.nativeObj, anchor.x, anchor.y);
+        
+        return;
+    }
+
+    //javadoc: dilate(src, dst, kernel)
+    public static void dilate(Mat src, Mat dst, Mat kernel)
+    {
+        
+        dilate_4(src.nativeObj, dst.nativeObj, kernel.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::distanceTransform(Mat src, Mat& dst, Mat& labels, int distanceType, int maskSize, int labelType = DIST_LABEL_CCOMP)
+    //
+
+    //javadoc: distanceTransformWithLabels(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: distanceTransformWithLabels(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 cv::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 cv::drawContours(Mat& image, vector_vector_Point contours, int contourIdx, Scalar color, int thickness = 1, int lineType = LINE_8, Mat hierarchy = Mat(), int maxLevel = INT_MAX, Point offset = Point())
+    //
+
+    //javadoc: drawContours(image, contours, contourIdx, color, thickness, lineType, hierarchy, maxLevel, offset)
+    public static void drawContours(Mat image, List<MatOfPoint> contours, int contourIdx, Scalar color, int thickness, int lineType, Mat hierarchy, int maxLevel, Point offset)
+    {
+        List<Mat> contours_tmplm = new ArrayList<Mat>((contours != null) ? contours.size() : 0);
+        Mat contours_mat = Converters.vector_vector_Point_to_Mat(contours, contours_tmplm);
+        drawContours_0(image.nativeObj, contours_mat.nativeObj, contourIdx, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, hierarchy.nativeObj, maxLevel, offset.x, offset.y);
+        
+        return;
+    }
+
+    //javadoc: drawContours(image, contours, contourIdx, color, thickness, lineType, hierarchy, maxLevel)
+    public static void drawContours(Mat image, List<MatOfPoint> contours, int contourIdx, Scalar color, int thickness, int lineType, Mat hierarchy, int maxLevel)
+    {
+        List<Mat> contours_tmplm = new ArrayList<Mat>((contours != null) ? contours.size() : 0);
+        Mat contours_mat = Converters.vector_vector_Point_to_Mat(contours, contours_tmplm);
+        drawContours_1(image.nativeObj, contours_mat.nativeObj, contourIdx, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, hierarchy.nativeObj, maxLevel);
+        
+        return;
+    }
+
+    //javadoc: drawContours(image, contours, contourIdx, color, thickness, lineType, hierarchy)
+    public static void drawContours(Mat image, List<MatOfPoint> contours, int contourIdx, Scalar color, int thickness, int lineType, Mat hierarchy)
+    {
+        List<Mat> contours_tmplm = new ArrayList<Mat>((contours != null) ? contours.size() : 0);
+        Mat contours_mat = Converters.vector_vector_Point_to_Mat(contours, contours_tmplm);
+        drawContours_2(image.nativeObj, contours_mat.nativeObj, contourIdx, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, hierarchy.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: drawContours(image, contours, contourIdx, color, thickness, lineType)
+    public static void drawContours(Mat image, List<MatOfPoint> contours, int contourIdx, Scalar color, int thickness, int lineType)
+    {
+        List<Mat> contours_tmplm = new ArrayList<Mat>((contours != null) ? contours.size() : 0);
+        Mat contours_mat = Converters.vector_vector_Point_to_Mat(contours, contours_tmplm);
+        drawContours_3(image.nativeObj, contours_mat.nativeObj, contourIdx, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType);
+        
+        return;
+    }
+
+    //javadoc: drawContours(image, contours, contourIdx, color, thickness)
+    public static void drawContours(Mat image, List<MatOfPoint> contours, int contourIdx, Scalar color, int thickness)
+    {
+        List<Mat> contours_tmplm = new ArrayList<Mat>((contours != null) ? contours.size() : 0);
+        Mat contours_mat = Converters.vector_vector_Point_to_Mat(contours, contours_tmplm);
+        drawContours_4(image.nativeObj, contours_mat.nativeObj, contourIdx, color.val[0], color.val[1], color.val[2], color.val[3], thickness);
+        
+        return;
+    }
+
+    //javadoc: drawContours(image, contours, contourIdx, color)
+    public static void drawContours(Mat image, List<MatOfPoint> contours, int contourIdx, Scalar color)
+    {
+        List<Mat> contours_tmplm = new ArrayList<Mat>((contours != null) ? contours.size() : 0);
+        Mat contours_mat = Converters.vector_vector_Point_to_Mat(contours, contours_tmplm);
+        drawContours_5(image.nativeObj, contours_mat.nativeObj, contourIdx, color.val[0], color.val[1], color.val[2], color.val[3]);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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, markerType, markerSize, thickness)
+    public static void drawMarker(Mat img, Point position, Scalar color, int markerType, int markerSize, int thickness)
+    {
+        
+        drawMarker_1(img.nativeObj, position.x, position.y, color.val[0], color.val[1], color.val[2], color.val[3], markerType, markerSize, thickness);
+        
+        return;
+    }
+
+    //javadoc: drawMarker(img, position, color, markerType, markerSize)
+    public static void drawMarker(Mat img, Point position, Scalar color, int markerType, int markerSize)
+    {
+        
+        drawMarker_2(img.nativeObj, position.x, position.y, color.val[0], color.val[1], color.val[2], color.val[3], markerType, markerSize);
+        
+        return;
+    }
+
+    //javadoc: drawMarker(img, position, color, markerType)
+    public static void drawMarker(Mat img, Point position, Scalar color, int markerType)
+    {
+        
+        drawMarker_3(img.nativeObj, position.x, position.y, color.val[0], color.val[1], color.val[2], color.val[3], markerType);
+        
+        return;
+    }
+
+    //javadoc: drawMarker(img, position, color)
+    public static void drawMarker(Mat img, Point position, Scalar color)
+    {
+        
+        drawMarker_4(img.nativeObj, position.x, position.y, color.val[0], color.val[1], color.val[2], color.val[3]);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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, lineType)
+    public static void ellipse(Mat img, Point center, Size axes, double angle, double startAngle, double endAngle, Scalar color, int thickness, int lineType)
+    {
+        
+        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, lineType);
+        
+        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_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], 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_3(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 cv::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_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, lineType);
+        
+        return;
+    }
+
+    //javadoc: ellipse(img, box, color, thickness)
+    public static void ellipse(Mat img, RotatedRect box, Scalar color, int thickness)
+    {
+        
+        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], thickness);
+        
+        return;
+    }
+
+    //javadoc: ellipse(img, box, color)
+    public static void ellipse(Mat img, RotatedRect box, Scalar color)
+    {
+        
+        ellipse_6(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 cv::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 cv::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 cv::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, borderType)
+    public static void erode(Mat src, Mat dst, Mat kernel, Point anchor, int iterations, int borderType)
+    {
+        
+        erode_1(src.nativeObj, dst.nativeObj, kernel.nativeObj, anchor.x, anchor.y, iterations, borderType);
+        
+        return;
+    }
+
+    //javadoc: erode(src, dst, kernel, anchor, iterations)
+    public static void erode(Mat src, Mat dst, Mat kernel, Point anchor, int iterations)
+    {
+        
+        erode_2(src.nativeObj, dst.nativeObj, kernel.nativeObj, anchor.x, anchor.y, iterations);
+        
+        return;
+    }
+
+    //javadoc: erode(src, dst, kernel, anchor)
+    public static void erode(Mat src, Mat dst, Mat kernel, Point anchor)
+    {
+        
+        erode_3(src.nativeObj, dst.nativeObj, kernel.nativeObj, anchor.x, anchor.y);
+        
+        return;
+    }
+
+    //javadoc: erode(src, dst, kernel)
+    public static void erode(Mat src, Mat dst, Mat kernel)
+    {
+        
+        erode_4(src.nativeObj, dst.nativeObj, kernel.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::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, lineType)
+    public static void fillConvexPoly(Mat img, MatOfPoint points, Scalar color, int lineType)
+    {
+        Mat points_mat = points;
+        fillConvexPoly_1(img.nativeObj, points_mat.nativeObj, color.val[0], color.val[1], color.val[2], color.val[3], lineType);
+        
+        return;
+    }
+
+    //javadoc: fillConvexPoly(img, points, color)
+    public static void fillConvexPoly(Mat img, MatOfPoint points, Scalar color)
+    {
+        Mat points_mat = points;
+        fillConvexPoly_2(img.nativeObj, points_mat.nativeObj, color.val[0], color.val[1], color.val[2], color.val[3]);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::fillPoly(Mat& img, vector_vector_Point pts, Scalar color, int lineType = LINE_8, int shift = 0, Point offset = Point())
+    //
+
+    //javadoc: fillPoly(img, pts, color, lineType, shift, offset)
+    public static void fillPoly(Mat img, List<MatOfPoint> pts, Scalar color, int lineType, int shift, Point offset)
+    {
+        List<Mat> pts_tmplm = new ArrayList<Mat>((pts != null) ? pts.size() : 0);
+        Mat pts_mat = Converters.vector_vector_Point_to_Mat(pts, pts_tmplm);
+        fillPoly_0(img.nativeObj, pts_mat.nativeObj, color.val[0], color.val[1], color.val[2], color.val[3], lineType, shift, offset.x, offset.y);
+        
+        return;
+    }
+
+    //javadoc: fillPoly(img, pts, color, lineType, shift)
+    public static void fillPoly(Mat img, List<MatOfPoint> pts, Scalar color, int lineType, int shift)
+    {
+        List<Mat> pts_tmplm = new ArrayList<Mat>((pts != null) ? pts.size() : 0);
+        Mat pts_mat = Converters.vector_vector_Point_to_Mat(pts, pts_tmplm);
+        fillPoly_1(img.nativeObj, pts_mat.nativeObj, color.val[0], color.val[1], color.val[2], color.val[3], lineType, shift);
+        
+        return;
+    }
+
+    //javadoc: fillPoly(img, pts, color, lineType)
+    public static void fillPoly(Mat img, List<MatOfPoint> pts, Scalar color, int lineType)
+    {
+        List<Mat> pts_tmplm = new ArrayList<Mat>((pts != null) ? pts.size() : 0);
+        Mat pts_mat = Converters.vector_vector_Point_to_Mat(pts, pts_tmplm);
+        fillPoly_2(img.nativeObj, pts_mat.nativeObj, color.val[0], color.val[1], color.val[2], color.val[3], lineType);
+        
+        return;
+    }
+
+    //javadoc: fillPoly(img, pts, color)
+    public static void fillPoly(Mat img, List<MatOfPoint> pts, Scalar color)
+    {
+        List<Mat> pts_tmplm = new ArrayList<Mat>((pts != null) ? pts.size() : 0);
+        Mat pts_mat = Converters.vector_vector_Point_to_Mat(pts, pts_tmplm);
+        fillPoly_3(img.nativeObj, pts_mat.nativeObj, color.val[0], color.val[1], color.val[2], color.val[3]);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::filter2D(Mat src, Mat& dst, int ddepth, Mat kernel, Point anchor = Point(-1,-1), double delta = 0, int borderType = BORDER_DEFAULT)
+    //
+
+    //javadoc: filter2D(src, dst, ddepth, kernel, anchor, delta, borderType)
+    public static void filter2D(Mat src, Mat dst, int ddepth, Mat kernel, Point anchor, double delta, int borderType)
+    {
+        
+        filter2D_0(src.nativeObj, dst.nativeObj, ddepth, kernel.nativeObj, anchor.x, anchor.y, delta, borderType);
+        
+        return;
+    }
+
+    //javadoc: filter2D(src, dst, ddepth, kernel, anchor, delta)
+    public static void filter2D(Mat src, Mat dst, int ddepth, Mat kernel, Point anchor, double delta)
+    {
+        
+        filter2D_1(src.nativeObj, dst.nativeObj, ddepth, kernel.nativeObj, anchor.x, anchor.y, delta);
+        
+        return;
+    }
+
+    //javadoc: filter2D(src, dst, ddepth, kernel, anchor)
+    public static void filter2D(Mat src, Mat dst, int ddepth, Mat kernel, Point anchor)
+    {
+        
+        filter2D_2(src.nativeObj, dst.nativeObj, ddepth, kernel.nativeObj, anchor.x, anchor.y);
+        
+        return;
+    }
+
+    //javadoc: filter2D(src, dst, ddepth, kernel)
+    public static void filter2D(Mat src, Mat dst, int ddepth, Mat kernel)
+    {
+        
+        filter2D_3(src.nativeObj, dst.nativeObj, ddepth, kernel.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::findContours(Mat image, vector_vector_Point& contours, Mat& hierarchy, int mode, int method, Point offset = Point())
+    //
+
+    //javadoc: findContours(image, contours, hierarchy, mode, method, offset)
+    public static void findContours(Mat image, List<MatOfPoint> contours, Mat hierarchy, int mode, int method, Point offset)
+    {
+        Mat contours_mat = new Mat();
+        findContours_0(image.nativeObj, contours_mat.nativeObj, hierarchy.nativeObj, mode, method, offset.x, offset.y);
+        Converters.Mat_to_vector_vector_Point(contours_mat, contours);
+        contours_mat.release();
+        return;
+    }
+
+    //javadoc: findContours(image, contours, hierarchy, mode, method)
+    public static void findContours(Mat image, List<MatOfPoint> contours, Mat hierarchy, int mode, int method)
+    {
+        Mat contours_mat = new Mat();
+        findContours_1(image.nativeObj, contours_mat.nativeObj, hierarchy.nativeObj, mode, method);
+        Converters.Mat_to_vector_vector_Point(contours_mat, contours);
+        contours_mat.release();
+        return;
+    }
+
+
+    //
+    // C++:  void cv::fitLine(Mat points, Mat& line, int distType, double param, double reps, double aeps)
+    //
+
+    //javadoc: fitLine(points, line, distType, param, reps, aeps)
+    public static void fitLine(Mat points, Mat line, int distType, double param, double reps, double aeps)
+    {
+        
+        fitLine_0(points.nativeObj, line.nativeObj, distType, param, reps, aeps);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::getDerivKernels(Mat& kx, Mat& ky, int dx, int dy, int ksize, bool normalize = false, int ktype = CV_32F)
+    //
+
+    //javadoc: getDerivKernels(kx, ky, dx, dy, ksize, normalize, ktype)
+    public static void getDerivKernels(Mat kx, Mat ky, int dx, int dy, int ksize, boolean normalize, int ktype)
+    {
+        
+        getDerivKernels_0(kx.nativeObj, ky.nativeObj, dx, dy, ksize, normalize, ktype);
+        
+        return;
+    }
+
+    //javadoc: getDerivKernels(kx, ky, dx, dy, ksize, normalize)
+    public static void getDerivKernels(Mat kx, Mat ky, int dx, int dy, int ksize, boolean normalize)
+    {
+        
+        getDerivKernels_1(kx.nativeObj, ky.nativeObj, dx, dy, ksize, normalize);
+        
+        return;
+    }
+
+    //javadoc: getDerivKernels(kx, ky, dx, dy, ksize)
+    public static void getDerivKernels(Mat kx, Mat ky, int dx, int dy, int ksize)
+    {
+        
+        getDerivKernels_2(kx.nativeObj, ky.nativeObj, dx, dy, ksize);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::getRectSubPix(Mat image, Size patchSize, Point2f center, Mat& patch, int patchType = -1)
+    //
+
+    //javadoc: getRectSubPix(image, patchSize, center, patch, patchType)
+    public static void getRectSubPix(Mat image, Size patchSize, Point center, Mat patch, int patchType)
+    {
+        
+        getRectSubPix_0(image.nativeObj, patchSize.width, patchSize.height, center.x, center.y, patch.nativeObj, patchType);
+        
+        return;
+    }
+
+    //javadoc: getRectSubPix(image, patchSize, center, patch)
+    public static void getRectSubPix(Mat image, Size patchSize, Point center, Mat patch)
+    {
+        
+        getRectSubPix_1(image.nativeObj, patchSize.width, patchSize.height, center.x, center.y, patch.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::goodFeaturesToTrack(Mat image, vector_Point& corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, int gradientSize, bool useHarrisDetector = false, double k = 0.04)
+    //
+
+    //javadoc: goodFeaturesToTrack(image, corners, maxCorners, qualityLevel, minDistance, mask, blockSize, gradientSize, useHarrisDetector, k)
+    public static void goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, int gradientSize, boolean useHarrisDetector, double k)
+    {
+        Mat corners_mat = corners;
+        goodFeaturesToTrack_0(image.nativeObj, corners_mat.nativeObj, maxCorners, qualityLevel, minDistance, mask.nativeObj, blockSize, gradientSize, useHarrisDetector, k);
+        
+        return;
+    }
+
+    //javadoc: goodFeaturesToTrack(image, corners, maxCorners, qualityLevel, minDistance, mask, blockSize, gradientSize, useHarrisDetector)
+    public static void goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, int gradientSize, boolean useHarrisDetector)
+    {
+        Mat corners_mat = corners;
+        goodFeaturesToTrack_1(image.nativeObj, corners_mat.nativeObj, maxCorners, qualityLevel, minDistance, mask.nativeObj, blockSize, gradientSize, useHarrisDetector);
+        
+        return;
+    }
+
+    //javadoc: goodFeaturesToTrack(image, corners, maxCorners, qualityLevel, minDistance, mask, blockSize, gradientSize)
+    public static void goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, int gradientSize)
+    {
+        Mat corners_mat = corners;
+        goodFeaturesToTrack_2(image.nativeObj, corners_mat.nativeObj, maxCorners, qualityLevel, minDistance, mask.nativeObj, blockSize, gradientSize);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::goodFeaturesToTrack(Mat image, vector_Point& corners, int maxCorners, double qualityLevel, double minDistance, Mat mask = Mat(), int blockSize = 3, bool useHarrisDetector = false, double k = 0.04)
+    //
+
+    //javadoc: goodFeaturesToTrack(image, corners, maxCorners, qualityLevel, minDistance, mask, blockSize, useHarrisDetector, k)
+    public static void goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, boolean useHarrisDetector, double k)
+    {
+        Mat corners_mat = corners;
+        goodFeaturesToTrack_3(image.nativeObj, corners_mat.nativeObj, maxCorners, qualityLevel, minDistance, mask.nativeObj, blockSize, useHarrisDetector, k);
+        
+        return;
+    }
+
+    //javadoc: goodFeaturesToTrack(image, corners, maxCorners, qualityLevel, minDistance, mask, blockSize, useHarrisDetector)
+    public static void goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, boolean useHarrisDetector)
+    {
+        Mat corners_mat = corners;
+        goodFeaturesToTrack_4(image.nativeObj, corners_mat.nativeObj, maxCorners, qualityLevel, minDistance, mask.nativeObj, blockSize, useHarrisDetector);
+        
+        return;
+    }
+
+    //javadoc: goodFeaturesToTrack(image, corners, maxCorners, qualityLevel, minDistance, mask, blockSize)
+    public static void goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize)
+    {
+        Mat corners_mat = corners;
+        goodFeaturesToTrack_5(image.nativeObj, corners_mat.nativeObj, maxCorners, qualityLevel, minDistance, mask.nativeObj, blockSize);
+        
+        return;
+    }
+
+    //javadoc: goodFeaturesToTrack(image, corners, maxCorners, qualityLevel, minDistance, mask)
+    public static void goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask)
+    {
+        Mat corners_mat = corners;
+        goodFeaturesToTrack_6(image.nativeObj, corners_mat.nativeObj, maxCorners, qualityLevel, minDistance, mask.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: goodFeaturesToTrack(image, corners, maxCorners, qualityLevel, minDistance)
+    public static void goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance)
+    {
+        Mat corners_mat = corners;
+        goodFeaturesToTrack_7(image.nativeObj, corners_mat.nativeObj, maxCorners, qualityLevel, minDistance);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::grabCut(Mat img, Mat& mask, Rect rect, Mat& bgdModel, Mat& fgdModel, int iterCount, int mode = GC_EVAL)
+    //
+
+    //javadoc: grabCut(img, mask, rect, bgdModel, fgdModel, iterCount, mode)
+    public static void grabCut(Mat img, Mat mask, Rect rect, Mat bgdModel, Mat fgdModel, int iterCount, int mode)
+    {
+        
+        grabCut_0(img.nativeObj, mask.nativeObj, rect.x, rect.y, rect.width, rect.height, bgdModel.nativeObj, fgdModel.nativeObj, iterCount, mode);
+        
+        return;
+    }
+
+    //javadoc: grabCut(img, mask, rect, bgdModel, fgdModel, iterCount)
+    public static void grabCut(Mat img, Mat mask, Rect rect, Mat bgdModel, Mat fgdModel, int iterCount)
+    {
+        
+        grabCut_1(img.nativeObj, mask.nativeObj, rect.x, rect.y, rect.width, rect.height, bgdModel.nativeObj, fgdModel.nativeObj, iterCount);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::integral(Mat src, Mat& sum, Mat& sqsum, Mat& tilted, int sdepth = -1, int sqdepth = -1)
+    //
+
+    //javadoc: integral3(src, sum, sqsum, tilted, sdepth, sqdepth)
+    public static void integral3(Mat src, Mat sum, Mat sqsum, Mat tilted, int sdepth, int sqdepth)
+    {
+        
+        integral3_0(src.nativeObj, sum.nativeObj, sqsum.nativeObj, tilted.nativeObj, sdepth, sqdepth);
+        
+        return;
+    }
+
+    //javadoc: integral3(src, sum, sqsum, tilted, sdepth)
+    public static void integral3(Mat src, Mat sum, Mat sqsum, Mat tilted, int sdepth)
+    {
+        
+        integral3_1(src.nativeObj, sum.nativeObj, sqsum.nativeObj, tilted.nativeObj, sdepth);
+        
+        return;
+    }
+
+    //javadoc: integral3(src, sum, sqsum, tilted)
+    public static void integral3(Mat src, Mat sum, Mat sqsum, Mat tilted)
+    {
+        
+        integral3_2(src.nativeObj, sum.nativeObj, sqsum.nativeObj, tilted.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::integral(Mat src, Mat& sum, Mat& sqsum, int sdepth = -1, int sqdepth = -1)
+    //
+
+    //javadoc: integral2(src, sum, sqsum, sdepth, sqdepth)
+    public static void integral2(Mat src, Mat sum, Mat sqsum, int sdepth, int sqdepth)
+    {
+        
+        integral2_0(src.nativeObj, sum.nativeObj, sqsum.nativeObj, sdepth, sqdepth);
+        
+        return;
+    }
+
+    //javadoc: integral2(src, sum, sqsum, sdepth)
+    public static void integral2(Mat src, Mat sum, Mat sqsum, int sdepth)
+    {
+        
+        integral2_1(src.nativeObj, sum.nativeObj, sqsum.nativeObj, sdepth);
+        
+        return;
+    }
+
+    //javadoc: integral2(src, sum, sqsum)
+    public static void integral2(Mat src, Mat sum, Mat sqsum)
+    {
+        
+        integral2_2(src.nativeObj, sum.nativeObj, sqsum.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::integral(Mat src, Mat& sum, int sdepth = -1)
+    //
+
+    //javadoc: integral(src, sum, sdepth)
+    public static void integral(Mat src, Mat sum, int sdepth)
+    {
+        
+        integral_0(src.nativeObj, sum.nativeObj, sdepth);
+        
+        return;
+    }
+
+    //javadoc: integral(src, sum)
+    public static void integral(Mat src, Mat sum)
+    {
+        
+        integral_1(src.nativeObj, sum.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::invertAffineTransform(Mat M, Mat& iM)
+    //
+
+    //javadoc: invertAffineTransform(M, iM)
+    public static void invertAffineTransform(Mat M, Mat iM)
+    {
+        
+        invertAffineTransform_0(M.nativeObj, iM.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::line(Mat& img, Point pt1, Point pt2, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+    //
+
+    //javadoc: line(img, pt1, pt2, color, thickness, lineType, shift)
+    public static void line(Mat img, Point pt1, Point pt2, Scalar color, int thickness, int lineType, int shift)
+    {
+        
+        line_0(img.nativeObj, pt1.x, pt1.y, pt2.x, pt2.y, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, shift);
+        
+        return;
+    }
+
+    //javadoc: line(img, pt1, pt2, color, thickness, lineType)
+    public static void line(Mat img, Point pt1, Point pt2, Scalar color, int thickness, int lineType)
+    {
+        
+        line_1(img.nativeObj, pt1.x, pt1.y, pt2.x, pt2.y, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType);
+        
+        return;
+    }
+
+    //javadoc: line(img, pt1, pt2, color, thickness)
+    public static void line(Mat img, Point pt1, Point pt2, Scalar color, int thickness)
+    {
+        
+        line_2(img.nativeObj, pt1.x, pt1.y, pt2.x, pt2.y, color.val[0], color.val[1], color.val[2], color.val[3], thickness);
+        
+        return;
+    }
+
+    //javadoc: line(img, pt1, pt2, color)
+    public static void line(Mat img, Point pt1, Point pt2, Scalar color)
+    {
+        
+        line_3(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 cv::linearPolar(Mat src, Mat& dst, Point2f center, double maxRadius, int flags)
+    //
+
+    //javadoc: linearPolar(src, dst, center, maxRadius, flags)
+    @Deprecated
+    public static void linearPolar(Mat src, Mat dst, Point center, double maxRadius, int flags)
+    {
+        
+        linearPolar_0(src.nativeObj, dst.nativeObj, center.x, center.y, maxRadius, flags);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::logPolar(Mat src, Mat& dst, Point2f center, double M, int flags)
+    //
+
+    //javadoc: logPolar(src, dst, center, M, flags)
+    @Deprecated
+    public static void logPolar(Mat src, Mat dst, Point center, double M, int flags)
+    {
+        
+        logPolar_0(src.nativeObj, dst.nativeObj, center.x, center.y, M, flags);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::matchTemplate(Mat image, Mat templ, Mat& result, int method, Mat mask = Mat())
+    //
+
+    //javadoc: matchTemplate(image, templ, result, method, mask)
+    public static void matchTemplate(Mat image, Mat templ, Mat result, int method, Mat mask)
+    {
+        
+        matchTemplate_0(image.nativeObj, templ.nativeObj, result.nativeObj, method, mask.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: matchTemplate(image, templ, result, method)
+    public static void matchTemplate(Mat image, Mat templ, Mat result, int method)
+    {
+        
+        matchTemplate_1(image.nativeObj, templ.nativeObj, result.nativeObj, method);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::medianBlur(Mat src, Mat& dst, int ksize)
+    //
+
+    //javadoc: medianBlur(src, dst, ksize)
+    public static void medianBlur(Mat src, Mat dst, int ksize)
+    {
+        
+        medianBlur_0(src.nativeObj, dst.nativeObj, ksize);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::minEnclosingCircle(vector_Point2f points, Point2f& center, float& radius)
+    //
+
+    //javadoc: minEnclosingCircle(points, center, radius)
+    public static void minEnclosingCircle(MatOfPoint2f points, Point center, float[] radius)
+    {
+        Mat points_mat = points;
+        double[] center_out = new double[2];
+        double[] radius_out = new double[1];
+        minEnclosingCircle_0(points_mat.nativeObj, center_out, radius_out);
+        if(center!=null){ center.x = center_out[0]; center.y = center_out[1]; } 
+        if(radius!=null) radius[0] = (float)radius_out[0];
+        return;
+    }
+
+
+    //
+    // C++:  void cv::morphologyEx(Mat src, Mat& dst, int op, Mat kernel, Point anchor = Point(-1,-1), int iterations = 1, int borderType = BORDER_CONSTANT, Scalar borderValue = morphologyDefaultBorderValue())
+    //
+
+    //javadoc: morphologyEx(src, dst, op, kernel, anchor, iterations, borderType, borderValue)
+    public static void morphologyEx(Mat src, Mat dst, int op, Mat kernel, Point anchor, int iterations, int borderType, Scalar borderValue)
+    {
+        
+        morphologyEx_0(src.nativeObj, dst.nativeObj, op, kernel.nativeObj, anchor.x, anchor.y, iterations, borderType, borderValue.val[0], borderValue.val[1], borderValue.val[2], borderValue.val[3]);
+        
+        return;
+    }
+
+    //javadoc: morphologyEx(src, dst, op, kernel, anchor, iterations, borderType)
+    public static void morphologyEx(Mat src, Mat dst, int op, Mat kernel, Point anchor, int iterations, int borderType)
+    {
+        
+        morphologyEx_1(src.nativeObj, dst.nativeObj, op, kernel.nativeObj, anchor.x, anchor.y, iterations, borderType);
+        
+        return;
+    }
+
+    //javadoc: morphologyEx(src, dst, op, kernel, anchor, iterations)
+    public static void morphologyEx(Mat src, Mat dst, int op, Mat kernel, Point anchor, int iterations)
+    {
+        
+        morphologyEx_2(src.nativeObj, dst.nativeObj, op, kernel.nativeObj, anchor.x, anchor.y, iterations);
+        
+        return;
+    }
+
+    //javadoc: morphologyEx(src, dst, op, kernel, anchor)
+    public static void morphologyEx(Mat src, Mat dst, int op, Mat kernel, Point anchor)
+    {
+        
+        morphologyEx_3(src.nativeObj, dst.nativeObj, op, kernel.nativeObj, anchor.x, anchor.y);
+        
+        return;
+    }
+
+    //javadoc: morphologyEx(src, dst, op, kernel)
+    public static void morphologyEx(Mat src, Mat dst, int op, Mat kernel)
+    {
+        
+        morphologyEx_4(src.nativeObj, dst.nativeObj, op, kernel.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::polylines(Mat& img, vector_vector_Point pts, bool isClosed, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+    //
+
+    //javadoc: polylines(img, pts, isClosed, color, thickness, lineType, shift)
+    public static void polylines(Mat img, List<MatOfPoint> pts, boolean isClosed, Scalar color, int thickness, int lineType, int shift)
+    {
+        List<Mat> pts_tmplm = new ArrayList<Mat>((pts != null) ? pts.size() : 0);
+        Mat pts_mat = Converters.vector_vector_Point_to_Mat(pts, pts_tmplm);
+        polylines_0(img.nativeObj, pts_mat.nativeObj, isClosed, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, shift);
+        
+        return;
+    }
+
+    //javadoc: polylines(img, pts, isClosed, color, thickness, lineType)
+    public static void polylines(Mat img, List<MatOfPoint> pts, boolean isClosed, Scalar color, int thickness, int lineType)
+    {
+        List<Mat> pts_tmplm = new ArrayList<Mat>((pts != null) ? pts.size() : 0);
+        Mat pts_mat = Converters.vector_vector_Point_to_Mat(pts, pts_tmplm);
+        polylines_1(img.nativeObj, pts_mat.nativeObj, isClosed, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType);
+        
+        return;
+    }
+
+    //javadoc: polylines(img, pts, isClosed, color, thickness)
+    public static void polylines(Mat img, List<MatOfPoint> pts, boolean isClosed, Scalar color, int thickness)
+    {
+        List<Mat> pts_tmplm = new ArrayList<Mat>((pts != null) ? pts.size() : 0);
+        Mat pts_mat = Converters.vector_vector_Point_to_Mat(pts, pts_tmplm);
+        polylines_2(img.nativeObj, pts_mat.nativeObj, isClosed, color.val[0], color.val[1], color.val[2], color.val[3], thickness);
+        
+        return;
+    }
+
+    //javadoc: polylines(img, pts, isClosed, color)
+    public static void polylines(Mat img, List<MatOfPoint> pts, boolean isClosed, Scalar color)
+    {
+        List<Mat> pts_tmplm = new ArrayList<Mat>((pts != null) ? pts.size() : 0);
+        Mat pts_mat = Converters.vector_vector_Point_to_Mat(pts, pts_tmplm);
+        polylines_3(img.nativeObj, pts_mat.nativeObj, isClosed, color.val[0], color.val[1], color.val[2], color.val[3]);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::preCornerDetect(Mat src, Mat& dst, int ksize, int borderType = BORDER_DEFAULT)
+    //
+
+    //javadoc: preCornerDetect(src, dst, ksize, borderType)
+    public static void preCornerDetect(Mat src, Mat dst, int ksize, int borderType)
+    {
+        
+        preCornerDetect_0(src.nativeObj, dst.nativeObj, ksize, borderType);
+        
+        return;
+    }
+
+    //javadoc: preCornerDetect(src, dst, ksize)
+    public static void preCornerDetect(Mat src, Mat dst, int ksize)
+    {
+        
+        preCornerDetect_1(src.nativeObj, dst.nativeObj, ksize);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::putText(Mat& img, String text, Point org, int fontFace, double fontScale, Scalar color, int thickness = 1, int lineType = LINE_8, bool bottomLeftOrigin = false)
+    //
+
+    //javadoc: putText(img, text, org, fontFace, fontScale, color, thickness, lineType, bottomLeftOrigin)
+    public static void putText(Mat img, String text, Point org, int fontFace, double fontScale, Scalar color, int thickness, int lineType, boolean bottomLeftOrigin)
+    {
+        
+        putText_0(img.nativeObj, text, org.x, org.y, fontFace, fontScale, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, bottomLeftOrigin);
+        
+        return;
+    }
+
+    //javadoc: putText(img, text, org, fontFace, fontScale, color, thickness, lineType)
+    public static void putText(Mat img, String text, Point org, int fontFace, double fontScale, Scalar color, int thickness, int lineType)
+    {
+        
+        putText_1(img.nativeObj, text, org.x, org.y, fontFace, fontScale, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType);
+        
+        return;
+    }
+
+    //javadoc: putText(img, text, org, fontFace, fontScale, color, thickness)
+    public static void putText(Mat img, String text, Point org, int fontFace, double fontScale, Scalar color, int thickness)
+    {
+        
+        putText_2(img.nativeObj, text, org.x, org.y, fontFace, fontScale, color.val[0], color.val[1], color.val[2], color.val[3], thickness);
+        
+        return;
+    }
+
+    //javadoc: putText(img, text, org, fontFace, fontScale, color)
+    public static void putText(Mat img, String text, Point org, int fontFace, double fontScale, Scalar color)
+    {
+        
+        putText_3(img.nativeObj, text, org.x, org.y, fontFace, fontScale, color.val[0], color.val[1], color.val[2], color.val[3]);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::pyrDown(Mat src, Mat& dst, Size dstsize = Size(), int borderType = BORDER_DEFAULT)
+    //
+
+    //javadoc: pyrDown(src, dst, dstsize, borderType)
+    public static void pyrDown(Mat src, Mat dst, Size dstsize, int borderType)
+    {
+        
+        pyrDown_0(src.nativeObj, dst.nativeObj, dstsize.width, dstsize.height, borderType);
+        
+        return;
+    }
+
+    //javadoc: pyrDown(src, dst, dstsize)
+    public static void pyrDown(Mat src, Mat dst, Size dstsize)
+    {
+        
+        pyrDown_1(src.nativeObj, dst.nativeObj, dstsize.width, dstsize.height);
+        
+        return;
+    }
+
+    //javadoc: pyrDown(src, dst)
+    public static void pyrDown(Mat src, Mat dst)
+    {
+        
+        pyrDown_2(src.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::pyrMeanShiftFiltering(Mat src, Mat& dst, double sp, double sr, int maxLevel = 1, TermCriteria termcrit = TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,1))
+    //
+
+    //javadoc: pyrMeanShiftFiltering(src, dst, sp, sr, maxLevel, termcrit)
+    public static void pyrMeanShiftFiltering(Mat src, Mat dst, double sp, double sr, int maxLevel, TermCriteria termcrit)
+    {
+        
+        pyrMeanShiftFiltering_0(src.nativeObj, dst.nativeObj, sp, sr, maxLevel, termcrit.type, termcrit.maxCount, termcrit.epsilon);
+        
+        return;
+    }
+
+    //javadoc: pyrMeanShiftFiltering(src, dst, sp, sr, maxLevel)
+    public static void pyrMeanShiftFiltering(Mat src, Mat dst, double sp, double sr, int maxLevel)
+    {
+        
+        pyrMeanShiftFiltering_1(src.nativeObj, dst.nativeObj, sp, sr, maxLevel);
+        
+        return;
+    }
+
+    //javadoc: pyrMeanShiftFiltering(src, dst, sp, sr)
+    public static void pyrMeanShiftFiltering(Mat src, Mat dst, double sp, double sr)
+    {
+        
+        pyrMeanShiftFiltering_2(src.nativeObj, dst.nativeObj, sp, sr);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::pyrUp(Mat src, Mat& dst, Size dstsize = Size(), int borderType = BORDER_DEFAULT)
+    //
+
+    //javadoc: pyrUp(src, dst, dstsize, borderType)
+    public static void pyrUp(Mat src, Mat dst, Size dstsize, int borderType)
+    {
+        
+        pyrUp_0(src.nativeObj, dst.nativeObj, dstsize.width, dstsize.height, borderType);
+        
+        return;
+    }
+
+    //javadoc: pyrUp(src, dst, dstsize)
+    public static void pyrUp(Mat src, Mat dst, Size dstsize)
+    {
+        
+        pyrUp_1(src.nativeObj, dst.nativeObj, dstsize.width, dstsize.height);
+        
+        return;
+    }
+
+    //javadoc: pyrUp(src, dst)
+    public static void pyrUp(Mat src, Mat dst)
+    {
+        
+        pyrUp_2(src.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::rectangle(Mat& img, Point pt1, Point pt2, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+    //
+
+    //javadoc: rectangle(img, pt1, pt2, color, thickness, lineType, shift)
+    public static void rectangle(Mat img, Point pt1, Point pt2, Scalar color, int thickness, int lineType, int shift)
+    {
+        
+        rectangle_0(img.nativeObj, pt1.x, pt1.y, pt2.x, pt2.y, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, shift);
+        
+        return;
+    }
+
+    //javadoc: rectangle(img, pt1, pt2, color, thickness, lineType)
+    public static void rectangle(Mat img, Point pt1, Point pt2, Scalar color, int thickness, int lineType)
+    {
+        
+        rectangle_1(img.nativeObj, pt1.x, pt1.y, pt2.x, pt2.y, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType);
+        
+        return;
+    }
+
+    //javadoc: rectangle(img, pt1, pt2, color, thickness)
+    public static void rectangle(Mat img, Point pt1, Point pt2, Scalar color, int thickness)
+    {
+        
+        rectangle_2(img.nativeObj, pt1.x, pt1.y, pt2.x, pt2.y, color.val[0], color.val[1], color.val[2], color.val[3], thickness);
+        
+        return;
+    }
+
+    //javadoc: rectangle(img, pt1, pt2, color)
+    public static void rectangle(Mat img, Point pt1, Point pt2, Scalar color)
+    {
+        
+        rectangle_3(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 cv::rectangle(Mat& img, Rect rec, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+    //
+
+    //javadoc: rectangle(img, rec, color, thickness, lineType, shift)
+    public static void rectangle(Mat img, Rect rec, Scalar color, int thickness, int lineType, int shift)
+    {
+        
+        rectangle_4(img.nativeObj, rec.x, rec.y, rec.width, rec.height, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, shift);
+        
+        return;
+    }
+
+    //javadoc: rectangle(img, rec, color, thickness, lineType)
+    public static void rectangle(Mat img, Rect rec, Scalar color, int thickness, int lineType)
+    {
+        
+        rectangle_5(img.nativeObj, rec.x, rec.y, rec.width, rec.height, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType);
+        
+        return;
+    }
+
+    //javadoc: rectangle(img, rec, color, thickness)
+    public static void rectangle(Mat img, Rect rec, Scalar color, int thickness)
+    {
+        
+        rectangle_6(img.nativeObj, rec.x, rec.y, rec.width, rec.height, color.val[0], color.val[1], color.val[2], color.val[3], thickness);
+        
+        return;
+    }
+
+    //javadoc: rectangle(img, rec, color)
+    public static void rectangle(Mat img, Rect rec, Scalar color)
+    {
+        
+        rectangle_7(img.nativeObj, rec.x, rec.y, rec.width, rec.height, color.val[0], color.val[1], color.val[2], color.val[3]);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::remap(Mat src, Mat& dst, Mat map1, Mat map2, int interpolation, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar())
+    //
+
+    //javadoc: remap(src, dst, map1, map2, interpolation, borderMode, borderValue)
+    public static void remap(Mat src, Mat dst, Mat map1, Mat map2, int interpolation, int borderMode, Scalar borderValue)
+    {
+        
+        remap_0(src.nativeObj, dst.nativeObj, map1.nativeObj, map2.nativeObj, interpolation, borderMode, borderValue.val[0], borderValue.val[1], borderValue.val[2], borderValue.val[3]);
+        
+        return;
+    }
+
+    //javadoc: remap(src, dst, map1, map2, interpolation, borderMode)
+    public static void remap(Mat src, Mat dst, Mat map1, Mat map2, int interpolation, int borderMode)
+    {
+        
+        remap_1(src.nativeObj, dst.nativeObj, map1.nativeObj, map2.nativeObj, interpolation, borderMode);
+        
+        return;
+    }
+
+    //javadoc: remap(src, dst, map1, map2, interpolation)
+    public static void remap(Mat src, Mat dst, Mat map1, Mat map2, int interpolation)
+    {
+        
+        remap_2(src.nativeObj, dst.nativeObj, map1.nativeObj, map2.nativeObj, interpolation);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::resize(Mat src, Mat& dst, Size dsize, double fx = 0, double fy = 0, int interpolation = INTER_LINEAR)
+    //
+
+    //javadoc: resize(src, dst, dsize, fx, fy, interpolation)
+    public static void resize(Mat src, Mat dst, Size dsize, double fx, double fy, int interpolation)
+    {
+        
+        resize_0(src.nativeObj, dst.nativeObj, dsize.width, dsize.height, fx, fy, interpolation);
+        
+        return;
+    }
+
+    //javadoc: resize(src, dst, dsize, fx, fy)
+    public static void resize(Mat src, Mat dst, Size dsize, double fx, double fy)
+    {
+        
+        resize_1(src.nativeObj, dst.nativeObj, dsize.width, dsize.height, fx, fy);
+        
+        return;
+    }
+
+    //javadoc: resize(src, dst, dsize, fx)
+    public static void resize(Mat src, Mat dst, Size dsize, double fx)
+    {
+        
+        resize_2(src.nativeObj, dst.nativeObj, dsize.width, dsize.height, fx);
+        
+        return;
+    }
+
+    //javadoc: resize(src, dst, dsize)
+    public static void resize(Mat src, Mat dst, Size dsize)
+    {
+        
+        resize_3(src.nativeObj, dst.nativeObj, dsize.width, dsize.height);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::sepFilter2D(Mat src, Mat& dst, int ddepth, Mat kernelX, Mat kernelY, Point anchor = Point(-1,-1), double delta = 0, int borderType = BORDER_DEFAULT)
+    //
+
+    //javadoc: sepFilter2D(src, dst, ddepth, kernelX, kernelY, anchor, delta, borderType)
+    public static void sepFilter2D(Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY, Point anchor, double delta, int borderType)
+    {
+        
+        sepFilter2D_0(src.nativeObj, dst.nativeObj, ddepth, kernelX.nativeObj, kernelY.nativeObj, anchor.x, anchor.y, delta, borderType);
+        
+        return;
+    }
+
+    //javadoc: sepFilter2D(src, dst, ddepth, kernelX, kernelY, anchor, delta)
+    public static void sepFilter2D(Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY, Point anchor, double delta)
+    {
+        
+        sepFilter2D_1(src.nativeObj, dst.nativeObj, ddepth, kernelX.nativeObj, kernelY.nativeObj, anchor.x, anchor.y, delta);
+        
+        return;
+    }
+
+    //javadoc: sepFilter2D(src, dst, ddepth, kernelX, kernelY, anchor)
+    public static void sepFilter2D(Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY, Point anchor)
+    {
+        
+        sepFilter2D_2(src.nativeObj, dst.nativeObj, ddepth, kernelX.nativeObj, kernelY.nativeObj, anchor.x, anchor.y);
+        
+        return;
+    }
+
+    //javadoc: sepFilter2D(src, dst, ddepth, kernelX, kernelY)
+    public static void sepFilter2D(Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY)
+    {
+        
+        sepFilter2D_3(src.nativeObj, dst.nativeObj, ddepth, kernelX.nativeObj, kernelY.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::spatialGradient(Mat src, Mat& dx, Mat& dy, int ksize = 3, int borderType = BORDER_DEFAULT)
+    //
+
+    //javadoc: spatialGradient(src, dx, dy, ksize, borderType)
+    public static void spatialGradient(Mat src, Mat dx, Mat dy, int ksize, int borderType)
+    {
+        
+        spatialGradient_0(src.nativeObj, dx.nativeObj, dy.nativeObj, ksize, borderType);
+        
+        return;
+    }
+
+    //javadoc: spatialGradient(src, dx, dy, ksize)
+    public static void spatialGradient(Mat src, Mat dx, Mat dy, int ksize)
+    {
+        
+        spatialGradient_1(src.nativeObj, dx.nativeObj, dy.nativeObj, ksize);
+        
+        return;
+    }
+
+    //javadoc: spatialGradient(src, dx, dy)
+    public static void spatialGradient(Mat src, Mat dx, Mat dy)
+    {
+        
+        spatialGradient_2(src.nativeObj, dx.nativeObj, dy.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::sqrBoxFilter(Mat src, Mat& dst, int ddepth, Size ksize, Point anchor = Point(-1, -1), bool normalize = true, int borderType = BORDER_DEFAULT)
+    //
+
+    //javadoc: sqrBoxFilter(src, dst, ddepth, ksize, anchor, normalize, borderType)
+    public static void sqrBoxFilter(Mat src, Mat dst, int ddepth, Size ksize, Point anchor, boolean normalize, int borderType)
+    {
+        
+        sqrBoxFilter_0(src.nativeObj, dst.nativeObj, ddepth, ksize.width, ksize.height, anchor.x, anchor.y, normalize, borderType);
+        
+        return;
+    }
+
+    //javadoc: sqrBoxFilter(src, dst, ddepth, ksize, anchor, normalize)
+    public static void sqrBoxFilter(Mat src, Mat dst, int ddepth, Size ksize, Point anchor, boolean normalize)
+    {
+        
+        sqrBoxFilter_1(src.nativeObj, dst.nativeObj, ddepth, ksize.width, ksize.height, anchor.x, anchor.y, normalize);
+        
+        return;
+    }
+
+    //javadoc: sqrBoxFilter(src, dst, ddepth, ksize, anchor)
+    public static void sqrBoxFilter(Mat src, Mat dst, int ddepth, Size ksize, Point anchor)
+    {
+        
+        sqrBoxFilter_2(src.nativeObj, dst.nativeObj, ddepth, ksize.width, ksize.height, anchor.x, anchor.y);
+        
+        return;
+    }
+
+    //javadoc: sqrBoxFilter(src, dst, ddepth, ksize)
+    public static void sqrBoxFilter(Mat src, Mat dst, int ddepth, Size ksize)
+    {
+        
+        sqrBoxFilter_3(src.nativeObj, dst.nativeObj, ddepth, ksize.width, ksize.height);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::warpAffine(Mat src, Mat& dst, Mat M, Size dsize, int flags = INTER_LINEAR, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar())
+    //
+
+    //javadoc: warpAffine(src, dst, M, dsize, flags, borderMode, borderValue)
+    public static void warpAffine(Mat src, Mat dst, Mat M, Size dsize, int flags, int borderMode, Scalar borderValue)
+    {
+        
+        warpAffine_0(src.nativeObj, dst.nativeObj, M.nativeObj, dsize.width, dsize.height, flags, borderMode, borderValue.val[0], borderValue.val[1], borderValue.val[2], borderValue.val[3]);
+        
+        return;
+    }
+
+    //javadoc: warpAffine(src, dst, M, dsize, flags, borderMode)
+    public static void warpAffine(Mat src, Mat dst, Mat M, Size dsize, int flags, int borderMode)
+    {
+        
+        warpAffine_1(src.nativeObj, dst.nativeObj, M.nativeObj, dsize.width, dsize.height, flags, borderMode);
+        
+        return;
+    }
+
+    //javadoc: warpAffine(src, dst, M, dsize, flags)
+    public static void warpAffine(Mat src, Mat dst, Mat M, Size dsize, int flags)
+    {
+        
+        warpAffine_2(src.nativeObj, dst.nativeObj, M.nativeObj, dsize.width, dsize.height, flags);
+        
+        return;
+    }
+
+    //javadoc: warpAffine(src, dst, M, dsize)
+    public static void warpAffine(Mat src, Mat dst, Mat M, Size dsize)
+    {
+        
+        warpAffine_3(src.nativeObj, dst.nativeObj, M.nativeObj, dsize.width, dsize.height);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::warpPerspective(Mat src, Mat& dst, Mat M, Size dsize, int flags = INTER_LINEAR, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar())
+    //
+
+    //javadoc: warpPerspective(src, dst, M, dsize, flags, borderMode, borderValue)
+    public static void warpPerspective(Mat src, Mat dst, Mat M, Size dsize, int flags, int borderMode, Scalar borderValue)
+    {
+        
+        warpPerspective_0(src.nativeObj, dst.nativeObj, M.nativeObj, dsize.width, dsize.height, flags, borderMode, borderValue.val[0], borderValue.val[1], borderValue.val[2], borderValue.val[3]);
+        
+        return;
+    }
+
+    //javadoc: warpPerspective(src, dst, M, dsize, flags, borderMode)
+    public static void warpPerspective(Mat src, Mat dst, Mat M, Size dsize, int flags, int borderMode)
+    {
+        
+        warpPerspective_1(src.nativeObj, dst.nativeObj, M.nativeObj, dsize.width, dsize.height, flags, borderMode);
+        
+        return;
+    }
+
+    //javadoc: warpPerspective(src, dst, M, dsize, flags)
+    public static void warpPerspective(Mat src, Mat dst, Mat M, Size dsize, int flags)
+    {
+        
+        warpPerspective_2(src.nativeObj, dst.nativeObj, M.nativeObj, dsize.width, dsize.height, flags);
+        
+        return;
+    }
+
+    //javadoc: warpPerspective(src, dst, M, dsize)
+    public static void warpPerspective(Mat src, Mat dst, Mat M, Size dsize)
+    {
+        
+        warpPerspective_3(src.nativeObj, dst.nativeObj, M.nativeObj, dsize.width, dsize.height);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::warpPolar(Mat src, Mat& dst, Size dsize, Point2f center, double maxRadius, int flags)
+    //
+
+    //javadoc: warpPolar(src, dst, dsize, center, maxRadius, flags)
+    public static void warpPolar(Mat src, Mat dst, Size dsize, Point center, double maxRadius, int flags)
+    {
+        
+        warpPolar_0(src.nativeObj, dst.nativeObj, dsize.width, dsize.height, center.x, center.y, maxRadius, flags);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::watershed(Mat image, Mat& markers)
+    //
+
+    //javadoc: watershed(image, markers)
+    public static void watershed(Mat image, Mat markers)
+    {
+        
+        watershed_0(image.nativeObj, markers.nativeObj);
+        
+        return;
+    }
+
+
+
+// C++: Size getTextSize(const String& text, int fontFace, double fontScale, int thickness, int* baseLine);
+//javadoc:getTextSize(text, fontFace, fontScale, thickness, baseLine)
+public static Size getTextSize(String text, int fontFace, double fontScale, int thickness, int[] baseLine) {
+    if(baseLine != null && baseLine.length != 1)
+        throw new java.lang.IllegalArgumentException("'baseLine' must be 'int[1]' or 'null'.");
+    Size retVal = new Size(n_getTextSize(text, fontFace, fontScale, thickness, baseLine));
+    return retVal;
+}
+
+
+
+
+    // C++:  Mat cv::getAffineTransform(vector_Point2f src, vector_Point2f dst)
+    private static native long getAffineTransform_0(long src_mat_nativeObj, long dst_mat_nativeObj);
+
+    // C++:  Mat cv::getGaborKernel(Size ksize, double sigma, double theta, double lambd, double gamma, double psi = CV_PI*0.5, int ktype = CV_64F)
+    private static native long getGaborKernel_0(double ksize_width, double ksize_height, double sigma, double theta, double lambd, double gamma, double psi, int ktype);
+    private static native long getGaborKernel_1(double ksize_width, double ksize_height, double sigma, double theta, double lambd, double gamma, double psi);
+    private static native long getGaborKernel_2(double ksize_width, double ksize_height, double sigma, double theta, double lambd, double gamma);
+
+    // C++:  Mat cv::getGaussianKernel(int ksize, double sigma, int ktype = CV_64F)
+    private static native long getGaussianKernel_0(int ksize, double sigma, int ktype);
+    private static native long getGaussianKernel_1(int ksize, double sigma);
+
+    // C++:  Mat cv::getPerspectiveTransform(Mat src, Mat dst, int solveMethod = DECOMP_LU)
+    private static native long getPerspectiveTransform_0(long src_nativeObj, long dst_nativeObj, int solveMethod);
+    private static native long getPerspectiveTransform_1(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  Mat cv::getRotationMatrix2D(Point2f center, double angle, double scale)
+    private static native long getRotationMatrix2D_0(double center_x, double center_y, double angle, double scale);
+
+    // C++:  Mat cv::getStructuringElement(int shape, Size ksize, Point anchor = Point(-1,-1))
+    private static native long getStructuringElement_0(int shape, double ksize_width, double ksize_height, double anchor_x, double anchor_y);
+    private static native long getStructuringElement_1(int shape, double ksize_width, double ksize_height);
+
+    // C++:  Moments cv::moments(Mat array, bool binaryImage = false)
+    private static native double[] moments_0(long array_nativeObj, boolean binaryImage);
+    private static native double[] moments_1(long array_nativeObj);
+
+    // C++:  Point2d cv::phaseCorrelate(Mat src1, Mat src2, Mat window = Mat(), double* response = 0)
+    private static native double[] phaseCorrelate_0(long src1_nativeObj, long src2_nativeObj, long window_nativeObj, double[] response_out);
+    private static native double[] phaseCorrelate_1(long src1_nativeObj, long src2_nativeObj, long window_nativeObj);
+    private static native double[] phaseCorrelate_2(long src1_nativeObj, long src2_nativeObj);
+
+    // C++:  Ptr_CLAHE cv::createCLAHE(double clipLimit = 40.0, Size tileGridSize = Size(8, 8))
+    private static native long createCLAHE_0(double clipLimit, double tileGridSize_width, double tileGridSize_height);
+    private static native long createCLAHE_1(double clipLimit);
+    private static native long createCLAHE_2();
+
+    // C++:  Ptr_LineSegmentDetector cv::createLineSegmentDetector(int _refine = LSD_REFINE_STD, double _scale = 0.8, double _sigma_scale = 0.6, double _quant = 2.0, double _ang_th = 22.5, double _log_eps = 0, double _density_th = 0.7, int _n_bins = 1024)
+    private static native long createLineSegmentDetector_0(int _refine, double _scale, double _sigma_scale, double _quant, double _ang_th, double _log_eps, double _density_th, int _n_bins);
+    private static native long createLineSegmentDetector_1(int _refine, double _scale, double _sigma_scale, double _quant, double _ang_th, double _log_eps, double _density_th);
+    private static native long createLineSegmentDetector_2(int _refine, double _scale, double _sigma_scale, double _quant, double _ang_th, double _log_eps);
+    private static native long createLineSegmentDetector_3(int _refine, double _scale, double _sigma_scale, double _quant, double _ang_th);
+    private static native long createLineSegmentDetector_4(int _refine, double _scale, double _sigma_scale, double _quant);
+    private static native long createLineSegmentDetector_5(int _refine, double _scale, double _sigma_scale);
+    private static native long createLineSegmentDetector_6(int _refine, double _scale);
+    private static native long createLineSegmentDetector_7(int _refine);
+    private static native long createLineSegmentDetector_8();
+
+    // C++:  Rect cv::boundingRect(Mat array)
+    private static native double[] boundingRect_0(long array_nativeObj);
+
+    // C++:  RotatedRect cv::fitEllipse(vector_Point2f points)
+    private static native double[] fitEllipse_0(long points_mat_nativeObj);
+
+    // C++:  RotatedRect cv::fitEllipseAMS(Mat points)
+    private static native double[] fitEllipseAMS_0(long points_nativeObj);
+
+    // C++:  RotatedRect cv::fitEllipseDirect(Mat points)
+    private static native double[] fitEllipseDirect_0(long points_nativeObj);
+
+    // C++:  RotatedRect cv::minAreaRect(vector_Point2f points)
+    private static native double[] minAreaRect_0(long points_mat_nativeObj);
+
+    // C++:  bool cv::clipLine(Rect imgRect, Point& pt1, Point& pt2)
+    private static native boolean clipLine_0(int imgRect_x, int imgRect_y, int imgRect_width, int imgRect_height, double pt1_x, double pt1_y, double[] pt1_out, double pt2_x, double pt2_y, double[] pt2_out);
+
+    // C++:  bool cv::isContourConvex(vector_Point contour)
+    private static native boolean isContourConvex_0(long contour_mat_nativeObj);
+
+    // C++:  double cv::arcLength(vector_Point2f curve, bool closed)
+    private static native double arcLength_0(long curve_mat_nativeObj, boolean closed);
+
+    // C++:  double cv::compareHist(Mat H1, Mat H2, int method)
+    private static native double compareHist_0(long H1_nativeObj, long H2_nativeObj, int method);
+
+    // C++:  double cv::contourArea(Mat contour, bool oriented = false)
+    private static native double contourArea_0(long contour_nativeObj, boolean oriented);
+    private static native double contourArea_1(long contour_nativeObj);
+
+    // C++:  double cv::getFontScaleFromHeight(int fontFace, int pixelHeight, int thickness = 1)
+    private static native double getFontScaleFromHeight_0(int fontFace, int pixelHeight, int thickness);
+    private static native double getFontScaleFromHeight_1(int fontFace, int pixelHeight);
+
+    // C++:  double cv::matchShapes(Mat contour1, Mat contour2, int method, double parameter)
+    private static native double matchShapes_0(long contour1_nativeObj, long contour2_nativeObj, int method, double parameter);
+
+    // C++:  double cv::minEnclosingTriangle(Mat points, Mat& triangle)
+    private static native double minEnclosingTriangle_0(long points_nativeObj, long triangle_nativeObj);
+
+    // C++:  double cv::pointPolygonTest(vector_Point2f contour, Point2f pt, bool measureDist)
+    private static native double pointPolygonTest_0(long contour_mat_nativeObj, double pt_x, double pt_y, boolean measureDist);
+
+    // C++:  double cv::threshold(Mat src, Mat& dst, double thresh, double maxval, int type)
+    private static native double threshold_0(long src_nativeObj, long dst_nativeObj, double thresh, double maxval, int type);
+
+    // C++:  float cv::intersectConvexConvex(Mat _p1, Mat _p2, Mat& _p12, bool handleNested = true)
+    private static native float intersectConvexConvex_0(long _p1_nativeObj, long _p2_nativeObj, long _p12_nativeObj, boolean handleNested);
+    private static native float intersectConvexConvex_1(long _p1_nativeObj, long _p2_nativeObj, long _p12_nativeObj);
+
+    // C++:  float cv::wrapperEMD(Mat signature1, Mat signature2, int distType, Mat cost = Mat(), Ptr_float& lowerBound = Ptr<float>(), Mat& flow = Mat())
+    private static native float EMD_0(long signature1_nativeObj, long signature2_nativeObj, int distType, long cost_nativeObj, long flow_nativeObj);
+    private static native float EMD_1(long signature1_nativeObj, long signature2_nativeObj, int distType, long cost_nativeObj);
+    private static native float EMD_3(long signature1_nativeObj, long signature2_nativeObj, int distType);
+
+    // C++:  int cv::connectedComponents(Mat image, Mat& labels, int connectivity, int ltype, int ccltype)
+    private static native int connectedComponentsWithAlgorithm_0(long image_nativeObj, long labels_nativeObj, int connectivity, int ltype, int ccltype);
+
+    // C++:  int cv::connectedComponents(Mat image, Mat& labels, int connectivity = 8, int ltype = CV_32S)
+    private static native int connectedComponents_0(long image_nativeObj, long labels_nativeObj, int connectivity, int ltype);
+    private static native int connectedComponents_1(long image_nativeObj, long labels_nativeObj, int connectivity);
+    private static native int connectedComponents_2(long image_nativeObj, long labels_nativeObj);
+
+    // C++:  int cv::connectedComponentsWithStats(Mat image, Mat& labels, Mat& stats, Mat& centroids, int connectivity, int ltype, int ccltype)
+    private static native int connectedComponentsWithStatsWithAlgorithm_0(long image_nativeObj, long labels_nativeObj, long stats_nativeObj, long centroids_nativeObj, int connectivity, int ltype, int ccltype);
+
+    // C++:  int cv::connectedComponentsWithStats(Mat image, Mat& labels, Mat& stats, Mat& centroids, int connectivity = 8, int ltype = CV_32S)
+    private static native int connectedComponentsWithStats_0(long image_nativeObj, long labels_nativeObj, long stats_nativeObj, long centroids_nativeObj, int connectivity, int ltype);
+    private static native int connectedComponentsWithStats_1(long image_nativeObj, long labels_nativeObj, long stats_nativeObj, long centroids_nativeObj, int connectivity);
+    private static native int connectedComponentsWithStats_2(long image_nativeObj, long labels_nativeObj, long stats_nativeObj, long centroids_nativeObj);
+
+    // C++:  int cv::floodFill(Mat& image, Mat& mask, Point seedPoint, Scalar newVal, Rect* rect = 0, Scalar loDiff = Scalar(), Scalar upDiff = Scalar(), int flags = 4)
+    private static native int floodFill_0(long image_nativeObj, long mask_nativeObj, double seedPoint_x, double seedPoint_y, double newVal_val0, double newVal_val1, double newVal_val2, double newVal_val3, double[] rect_out, double loDiff_val0, double loDiff_val1, double loDiff_val2, double loDiff_val3, double upDiff_val0, double upDiff_val1, double upDiff_val2, double upDiff_val3, int flags);
+    private static native int floodFill_1(long image_nativeObj, long mask_nativeObj, double seedPoint_x, double seedPoint_y, double newVal_val0, double newVal_val1, double newVal_val2, double newVal_val3, double[] rect_out, double loDiff_val0, double loDiff_val1, double loDiff_val2, double loDiff_val3, double upDiff_val0, double upDiff_val1, double upDiff_val2, double upDiff_val3);
+    private static native int floodFill_2(long image_nativeObj, long mask_nativeObj, double seedPoint_x, double seedPoint_y, double newVal_val0, double newVal_val1, double newVal_val2, double newVal_val3, double[] rect_out, double loDiff_val0, double loDiff_val1, double loDiff_val2, double loDiff_val3);
+    private static native int floodFill_3(long image_nativeObj, long mask_nativeObj, double seedPoint_x, double seedPoint_y, double newVal_val0, double newVal_val1, double newVal_val2, double newVal_val3, double[] rect_out);
+    private static native int floodFill_4(long image_nativeObj, long mask_nativeObj, double seedPoint_x, double seedPoint_y, double newVal_val0, double newVal_val1, double newVal_val2, double newVal_val3);
+
+    // C++:  int cv::rotatedRectangleIntersection(RotatedRect rect1, RotatedRect rect2, Mat& intersectingRegion)
+    private static native int rotatedRectangleIntersection_0(double rect1_center_x, double rect1_center_y, double rect1_size_width, double rect1_size_height, double rect1_angle, double rect2_center_x, double rect2_center_y, double rect2_size_width, double rect2_size_height, double rect2_angle, long intersectingRegion_nativeObj);
+
+    // C++:  void cv::Canny(Mat dx, Mat dy, Mat& edges, double threshold1, double threshold2, bool L2gradient = false)
+    private static native void Canny_0(long dx_nativeObj, long dy_nativeObj, long edges_nativeObj, double threshold1, double threshold2, boolean L2gradient);
+    private static native void Canny_1(long dx_nativeObj, long dy_nativeObj, long edges_nativeObj, double threshold1, double threshold2);
+
+    // C++:  void cv::Canny(Mat image, Mat& edges, double threshold1, double threshold2, int apertureSize = 3, bool L2gradient = false)
+    private static native void Canny_2(long image_nativeObj, long edges_nativeObj, double threshold1, double threshold2, int apertureSize, boolean L2gradient);
+    private static native void Canny_3(long image_nativeObj, long edges_nativeObj, double threshold1, double threshold2, int apertureSize);
+    private static native void Canny_4(long image_nativeObj, long edges_nativeObj, double threshold1, double threshold2);
+
+    // C++:  void cv::GaussianBlur(Mat src, Mat& dst, Size ksize, double sigmaX, double sigmaY = 0, int borderType = BORDER_DEFAULT)
+    private static native void GaussianBlur_0(long src_nativeObj, long dst_nativeObj, double ksize_width, double ksize_height, double sigmaX, double sigmaY, int borderType);
+    private static native void GaussianBlur_1(long src_nativeObj, long dst_nativeObj, double ksize_width, double ksize_height, double sigmaX, double sigmaY);
+    private static native void GaussianBlur_2(long src_nativeObj, long dst_nativeObj, double ksize_width, double ksize_height, double sigmaX);
+
+    // C++:  void cv::HoughCircles(Mat image, Mat& circles, int method, double dp, double minDist, double param1 = 100, double param2 = 100, int minRadius = 0, int maxRadius = 0)
+    private static native void HoughCircles_0(long image_nativeObj, long circles_nativeObj, int method, double dp, double minDist, double param1, double param2, int minRadius, int maxRadius);
+    private static native void HoughCircles_1(long image_nativeObj, long circles_nativeObj, int method, double dp, double minDist, double param1, double param2, int minRadius);
+    private static native void HoughCircles_2(long image_nativeObj, long circles_nativeObj, int method, double dp, double minDist, double param1, double param2);
+    private static native void HoughCircles_3(long image_nativeObj, long circles_nativeObj, int method, double dp, double minDist, double param1);
+    private static native void HoughCircles_4(long image_nativeObj, long circles_nativeObj, int method, double dp, double minDist);
+
+    // C++:  void cv::HoughLines(Mat image, Mat& lines, double rho, double theta, int threshold, double srn = 0, double stn = 0, double min_theta = 0, double max_theta = CV_PI)
+    private static native void HoughLines_0(long image_nativeObj, long lines_nativeObj, double rho, double theta, int threshold, double srn, double stn, double min_theta, double max_theta);
+    private static native void HoughLines_1(long image_nativeObj, long lines_nativeObj, double rho, double theta, int threshold, double srn, double stn, double min_theta);
+    private static native void HoughLines_2(long image_nativeObj, long lines_nativeObj, double rho, double theta, int threshold, double srn, double stn);
+    private static native void HoughLines_3(long image_nativeObj, long lines_nativeObj, double rho, double theta, int threshold, double srn);
+    private static native void HoughLines_4(long image_nativeObj, long lines_nativeObj, double rho, double theta, int threshold);
+
+    // C++:  void cv::HoughLinesP(Mat image, Mat& lines, double rho, double theta, int threshold, double minLineLength = 0, double maxLineGap = 0)
+    private static native void HoughLinesP_0(long image_nativeObj, long lines_nativeObj, double rho, double theta, int threshold, double minLineLength, double maxLineGap);
+    private static native void HoughLinesP_1(long image_nativeObj, long lines_nativeObj, double rho, double theta, int threshold, double minLineLength);
+    private static native void HoughLinesP_2(long image_nativeObj, long lines_nativeObj, double rho, double theta, int threshold);
+
+    // C++:  void cv::HoughLinesPointSet(Mat _point, Mat& _lines, int lines_max, int threshold, double min_rho, double max_rho, double rho_step, double min_theta, double max_theta, double theta_step)
+    private static native void HoughLinesPointSet_0(long _point_nativeObj, long _lines_nativeObj, int lines_max, int threshold, double min_rho, double max_rho, double rho_step, double min_theta, double max_theta, double theta_step);
+
+    // C++:  void cv::HuMoments(Moments m, Mat& hu)
+    private static native void HuMoments_0(double m_m00, double m_m10, double m_m01, double m_m20, double m_m11, double m_m02, double m_m30, double m_m21, double m_m12, double m_m03, long hu_nativeObj);
+
+    // C++:  void cv::Laplacian(Mat src, Mat& dst, int ddepth, int ksize = 1, double scale = 1, double delta = 0, int borderType = BORDER_DEFAULT)
+    private static native void Laplacian_0(long src_nativeObj, long dst_nativeObj, int ddepth, int ksize, double scale, double delta, int borderType);
+    private static native void Laplacian_1(long src_nativeObj, long dst_nativeObj, int ddepth, int ksize, double scale, double delta);
+    private static native void Laplacian_2(long src_nativeObj, long dst_nativeObj, int ddepth, int ksize, double scale);
+    private static native void Laplacian_3(long src_nativeObj, long dst_nativeObj, int ddepth, int ksize);
+    private static native void Laplacian_4(long src_nativeObj, long dst_nativeObj, int ddepth);
+
+    // C++:  void cv::Scharr(Mat src, Mat& dst, int ddepth, int dx, int dy, double scale = 1, double delta = 0, int borderType = BORDER_DEFAULT)
+    private static native void Scharr_0(long src_nativeObj, long dst_nativeObj, int ddepth, int dx, int dy, double scale, double delta, int borderType);
+    private static native void Scharr_1(long src_nativeObj, long dst_nativeObj, int ddepth, int dx, int dy, double scale, double delta);
+    private static native void Scharr_2(long src_nativeObj, long dst_nativeObj, int ddepth, int dx, int dy, double scale);
+    private static native void Scharr_3(long src_nativeObj, long dst_nativeObj, int ddepth, int dx, int dy);
+
+    // C++:  void cv::Sobel(Mat src, Mat& dst, int ddepth, int dx, int dy, int ksize = 3, double scale = 1, double delta = 0, int borderType = BORDER_DEFAULT)
+    private static native void Sobel_0(long src_nativeObj, long dst_nativeObj, int ddepth, int dx, int dy, int ksize, double scale, double delta, int borderType);
+    private static native void Sobel_1(long src_nativeObj, long dst_nativeObj, int ddepth, int dx, int dy, int ksize, double scale, double delta);
+    private static native void Sobel_2(long src_nativeObj, long dst_nativeObj, int ddepth, int dx, int dy, int ksize, double scale);
+    private static native void Sobel_3(long src_nativeObj, long dst_nativeObj, int ddepth, int dx, int dy, int ksize);
+    private static native void Sobel_4(long src_nativeObj, long dst_nativeObj, int ddepth, int dx, int dy);
+
+    // C++:  void cv::accumulate(Mat src, Mat& dst, Mat mask = Mat())
+    private static native void accumulate_0(long src_nativeObj, long dst_nativeObj, long mask_nativeObj);
+    private static native void accumulate_1(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::accumulateProduct(Mat src1, Mat src2, Mat& dst, Mat mask = Mat())
+    private static native void accumulateProduct_0(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj, long mask_nativeObj);
+    private static native void accumulateProduct_1(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::accumulateSquare(Mat src, Mat& dst, Mat mask = Mat())
+    private static native void accumulateSquare_0(long src_nativeObj, long dst_nativeObj, long mask_nativeObj);
+    private static native void accumulateSquare_1(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::accumulateWeighted(Mat src, Mat& dst, double alpha, Mat mask = Mat())
+    private static native void accumulateWeighted_0(long src_nativeObj, long dst_nativeObj, double alpha, long mask_nativeObj);
+    private static native void accumulateWeighted_1(long src_nativeObj, long dst_nativeObj, double alpha);
+
+    // C++:  void cv::adaptiveThreshold(Mat src, Mat& dst, double maxValue, int adaptiveMethod, int thresholdType, int blockSize, double C)
+    private static native void adaptiveThreshold_0(long src_nativeObj, long dst_nativeObj, double maxValue, int adaptiveMethod, int thresholdType, int blockSize, double C);
+
+    // C++:  void cv::applyColorMap(Mat src, Mat& dst, Mat userColor)
+    private static native void applyColorMap_0(long src_nativeObj, long dst_nativeObj, long userColor_nativeObj);
+
+    // C++:  void cv::applyColorMap(Mat src, Mat& dst, int colormap)
+    private static native void applyColorMap_1(long src_nativeObj, long dst_nativeObj, int colormap);
+
+    // C++:  void cv::approxPolyDP(vector_Point2f curve, vector_Point2f& approxCurve, double epsilon, bool closed)
+    private static native void approxPolyDP_0(long curve_mat_nativeObj, long approxCurve_mat_nativeObj, double epsilon, boolean closed);
+
+    // C++:  void cv::arrowedLine(Mat& img, Point pt1, Point pt2, Scalar color, int thickness = 1, int line_type = 8, int shift = 0, double tipLength = 0.1)
+    private static native void arrowedLine_0(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int line_type, int shift, double tipLength);
+    private static native void arrowedLine_1(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int line_type, int shift);
+    private static native void arrowedLine_2(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int line_type);
+    private static native void arrowedLine_3(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3, int thickness);
+    private static native void arrowedLine_4(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3);
+
+    // C++:  void cv::bilateralFilter(Mat src, Mat& dst, int d, double sigmaColor, double sigmaSpace, int borderType = BORDER_DEFAULT)
+    private static native void bilateralFilter_0(long src_nativeObj, long dst_nativeObj, int d, double sigmaColor, double sigmaSpace, int borderType);
+    private static native void bilateralFilter_1(long src_nativeObj, long dst_nativeObj, int d, double sigmaColor, double sigmaSpace);
+
+    // C++:  void cv::blur(Mat src, Mat& dst, Size ksize, Point anchor = Point(-1,-1), int borderType = BORDER_DEFAULT)
+    private static native void blur_0(long src_nativeObj, long dst_nativeObj, double ksize_width, double ksize_height, double anchor_x, double anchor_y, int borderType);
+    private static native void blur_1(long src_nativeObj, long dst_nativeObj, double ksize_width, double ksize_height, double anchor_x, double anchor_y);
+    private static native void blur_2(long src_nativeObj, long dst_nativeObj, double ksize_width, double ksize_height);
+
+    // C++:  void cv::boxFilter(Mat src, Mat& dst, int ddepth, Size ksize, Point anchor = Point(-1,-1), bool normalize = true, int borderType = BORDER_DEFAULT)
+    private static native void boxFilter_0(long src_nativeObj, long dst_nativeObj, int ddepth, double ksize_width, double ksize_height, double anchor_x, double anchor_y, boolean normalize, int borderType);
+    private static native void boxFilter_1(long src_nativeObj, long dst_nativeObj, int ddepth, double ksize_width, double ksize_height, double anchor_x, double anchor_y, boolean normalize);
+    private static native void boxFilter_2(long src_nativeObj, long dst_nativeObj, int ddepth, double ksize_width, double ksize_height, double anchor_x, double anchor_y);
+    private static native void boxFilter_3(long src_nativeObj, long dst_nativeObj, int ddepth, double ksize_width, double ksize_height);
+
+    // C++:  void cv::boxPoints(RotatedRect box, Mat& points)
+    private static native void boxPoints_0(double box_center_x, double box_center_y, double box_size_width, double box_size_height, double box_angle, long points_nativeObj);
+
+    // C++:  void cv::calcBackProject(vector_Mat images, vector_int channels, Mat hist, Mat& dst, vector_float ranges, double scale)
+    private static native void calcBackProject_0(long images_mat_nativeObj, long channels_mat_nativeObj, long hist_nativeObj, long dst_nativeObj, long ranges_mat_nativeObj, double scale);
+
+    // C++:  void cv::calcHist(vector_Mat images, vector_int channels, Mat mask, Mat& hist, vector_int histSize, vector_float ranges, bool accumulate = false)
+    private static native void calcHist_0(long images_mat_nativeObj, long channels_mat_nativeObj, long mask_nativeObj, long hist_nativeObj, long histSize_mat_nativeObj, long ranges_mat_nativeObj, boolean accumulate);
+    private static native void calcHist_1(long images_mat_nativeObj, long channels_mat_nativeObj, long mask_nativeObj, long hist_nativeObj, long histSize_mat_nativeObj, long ranges_mat_nativeObj);
+
+    // C++:  void cv::circle(Mat& img, Point center, int radius, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+    private static native void circle_0(long img_nativeObj, double center_x, double center_y, int radius, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType, int shift);
+    private static native void circle_1(long img_nativeObj, double center_x, double center_y, int radius, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType);
+    private static native void circle_2(long img_nativeObj, double center_x, double center_y, int radius, double color_val0, double color_val1, double color_val2, double color_val3, int thickness);
+    private static native void circle_3(long img_nativeObj, double center_x, double center_y, int radius, double color_val0, double color_val1, double color_val2, double color_val3);
+
+    // C++:  void cv::convertMaps(Mat map1, Mat map2, Mat& dstmap1, Mat& dstmap2, int dstmap1type, bool nninterpolation = false)
+    private static native void convertMaps_0(long map1_nativeObj, long map2_nativeObj, long dstmap1_nativeObj, long dstmap2_nativeObj, int dstmap1type, boolean nninterpolation);
+    private static native void convertMaps_1(long map1_nativeObj, long map2_nativeObj, long dstmap1_nativeObj, long dstmap2_nativeObj, int dstmap1type);
+
+    // C++:  void cv::convexHull(vector_Point points, vector_int& hull, bool clockwise = false,  _hidden_  returnPoints = true)
+    private static native void convexHull_0(long points_mat_nativeObj, long hull_mat_nativeObj, boolean clockwise);
+    private static native void convexHull_2(long points_mat_nativeObj, long hull_mat_nativeObj);
+
+    // C++:  void cv::convexityDefects(vector_Point contour, vector_int convexhull, vector_Vec4i& convexityDefects)
+    private static native void convexityDefects_0(long contour_mat_nativeObj, long convexhull_mat_nativeObj, long convexityDefects_mat_nativeObj);
+
+    // C++:  void cv::cornerEigenValsAndVecs(Mat src, Mat& dst, int blockSize, int ksize, int borderType = BORDER_DEFAULT)
+    private static native void cornerEigenValsAndVecs_0(long src_nativeObj, long dst_nativeObj, int blockSize, int ksize, int borderType);
+    private static native void cornerEigenValsAndVecs_1(long src_nativeObj, long dst_nativeObj, int blockSize, int ksize);
+
+    // C++:  void cv::cornerHarris(Mat src, Mat& dst, int blockSize, int ksize, double k, int borderType = BORDER_DEFAULT)
+    private static native void cornerHarris_0(long src_nativeObj, long dst_nativeObj, int blockSize, int ksize, double k, int borderType);
+    private static native void cornerHarris_1(long src_nativeObj, long dst_nativeObj, int blockSize, int ksize, double k);
+
+    // C++:  void cv::cornerMinEigenVal(Mat src, Mat& dst, int blockSize, int ksize = 3, int borderType = BORDER_DEFAULT)
+    private static native void cornerMinEigenVal_0(long src_nativeObj, long dst_nativeObj, int blockSize, int ksize, int borderType);
+    private static native void cornerMinEigenVal_1(long src_nativeObj, long dst_nativeObj, int blockSize, int ksize);
+    private static native void cornerMinEigenVal_2(long src_nativeObj, long dst_nativeObj, int blockSize);
+
+    // C++:  void cv::cornerSubPix(Mat image, Mat& corners, Size winSize, Size zeroZone, TermCriteria criteria)
+    private static native void cornerSubPix_0(long image_nativeObj, long corners_nativeObj, double winSize_width, double winSize_height, double zeroZone_width, double zeroZone_height, int criteria_type, int criteria_maxCount, double criteria_epsilon);
+
+    // C++:  void cv::createHanningWindow(Mat& dst, Size winSize, int type)
+    private static native void createHanningWindow_0(long dst_nativeObj, double winSize_width, double winSize_height, int type);
+
+    // C++:  void cv::cvtColor(Mat src, Mat& dst, int code, int dstCn = 0)
+    private static native void cvtColor_0(long src_nativeObj, long dst_nativeObj, int code, int dstCn);
+    private static native void cvtColor_1(long src_nativeObj, long dst_nativeObj, int code);
+
+    // C++:  void cv::cvtColorTwoPlane(Mat src1, Mat src2, Mat& dst, int code)
+    private static native void cvtColorTwoPlane_0(long src1_nativeObj, long src2_nativeObj, long dst_nativeObj, int code);
+
+    // C++:  void cv::demosaicing(Mat src, Mat& dst, int code, int dstCn = 0)
+    private static native void demosaicing_0(long src_nativeObj, long dst_nativeObj, int code, int dstCn);
+    private static native void demosaicing_1(long src_nativeObj, long dst_nativeObj, int code);
+
+    // C++:  void cv::dilate(Mat src, Mat& dst, Mat kernel, Point anchor = Point(-1,-1), int iterations = 1, int borderType = BORDER_CONSTANT, Scalar borderValue = morphologyDefaultBorderValue())
+    private static native void dilate_0(long src_nativeObj, long dst_nativeObj, long kernel_nativeObj, double anchor_x, double anchor_y, int iterations, int borderType, double borderValue_val0, double borderValue_val1, double borderValue_val2, double borderValue_val3);
+    private static native void dilate_1(long src_nativeObj, long dst_nativeObj, long kernel_nativeObj, double anchor_x, double anchor_y, int iterations, int borderType);
+    private static native void dilate_2(long src_nativeObj, long dst_nativeObj, long kernel_nativeObj, double anchor_x, double anchor_y, int iterations);
+    private static native void dilate_3(long src_nativeObj, long dst_nativeObj, long kernel_nativeObj, double anchor_x, double anchor_y);
+    private static native void dilate_4(long src_nativeObj, long dst_nativeObj, long kernel_nativeObj);
+
+    // C++:  void cv::distanceTransform(Mat src, Mat& dst, Mat& labels, int distanceType, int maskSize, int labelType = DIST_LABEL_CCOMP)
+    private static native void distanceTransformWithLabels_0(long src_nativeObj, long dst_nativeObj, long labels_nativeObj, int distanceType, int maskSize, int labelType);
+    private static native void distanceTransformWithLabels_1(long src_nativeObj, long dst_nativeObj, long labels_nativeObj, int distanceType, int maskSize);
+
+    // C++:  void cv::distanceTransform(Mat src, Mat& dst, int distanceType, int maskSize, int dstType = CV_32F)
+    private static native void distanceTransform_0(long src_nativeObj, long dst_nativeObj, int distanceType, int maskSize, int dstType);
+    private static native void distanceTransform_1(long src_nativeObj, long dst_nativeObj, int distanceType, int maskSize);
+
+    // C++:  void cv::drawContours(Mat& image, vector_vector_Point contours, int contourIdx, Scalar color, int thickness = 1, int lineType = LINE_8, Mat hierarchy = Mat(), int maxLevel = INT_MAX, Point offset = Point())
+    private static native void drawContours_0(long image_nativeObj, long contours_mat_nativeObj, int contourIdx, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType, long hierarchy_nativeObj, int maxLevel, double offset_x, double offset_y);
+    private static native void drawContours_1(long image_nativeObj, long contours_mat_nativeObj, int contourIdx, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType, long hierarchy_nativeObj, int maxLevel);
+    private static native void drawContours_2(long image_nativeObj, long contours_mat_nativeObj, int contourIdx, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType, long hierarchy_nativeObj);
+    private static native void drawContours_3(long image_nativeObj, long contours_mat_nativeObj, int contourIdx, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType);
+    private static native void drawContours_4(long image_nativeObj, long contours_mat_nativeObj, int contourIdx, double color_val0, double color_val1, double color_val2, double color_val3, int thickness);
+    private static native void drawContours_5(long image_nativeObj, long contours_mat_nativeObj, int contourIdx, double color_val0, double color_val1, double color_val2, double color_val3);
+
+    // C++:  void cv::drawMarker(Mat& img, Point position, Scalar color, int markerType = MARKER_CROSS, int markerSize = 20, int thickness = 1, int line_type = 8)
+    private static native void drawMarker_0(long img_nativeObj, double position_x, double position_y, double color_val0, double color_val1, double color_val2, double color_val3, int markerType, int markerSize, int thickness, int line_type);
+    private static native void drawMarker_1(long img_nativeObj, double position_x, double position_y, double color_val0, double color_val1, double color_val2, double color_val3, int markerType, int markerSize, int thickness);
+    private static native void drawMarker_2(long img_nativeObj, double position_x, double position_y, double color_val0, double color_val1, double color_val2, double color_val3, int markerType, int markerSize);
+    private static native void drawMarker_3(long img_nativeObj, double position_x, double position_y, double color_val0, double color_val1, double color_val2, double color_val3, int markerType);
+    private static native void drawMarker_4(long img_nativeObj, double position_x, double position_y, double color_val0, double color_val1, double color_val2, double color_val3);
+
+    // C++:  void cv::ellipse(Mat& img, Point center, Size axes, double angle, double startAngle, double endAngle, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+    private static native void ellipse_0(long img_nativeObj, double center_x, double center_y, double axes_width, double axes_height, double angle, double startAngle, double endAngle, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType, int shift);
+    private static native void ellipse_1(long img_nativeObj, double center_x, double center_y, double axes_width, double axes_height, double angle, double startAngle, double endAngle, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType);
+    private static native void ellipse_2(long img_nativeObj, double center_x, double center_y, double axes_width, double axes_height, double angle, double startAngle, double endAngle, double color_val0, double color_val1, double color_val2, double color_val3, int thickness);
+    private static native void ellipse_3(long img_nativeObj, double center_x, double center_y, double axes_width, double axes_height, double angle, double startAngle, double endAngle, double color_val0, double color_val1, double color_val2, double color_val3);
+
+    // C++:  void cv::ellipse(Mat& img, RotatedRect box, Scalar color, int thickness = 1, int lineType = LINE_8)
+    private static native void ellipse_4(long img_nativeObj, double box_center_x, double box_center_y, double box_size_width, double box_size_height, double box_angle, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType);
+    private static native void ellipse_5(long img_nativeObj, double box_center_x, double box_center_y, double box_size_width, double box_size_height, double box_angle, double color_val0, double color_val1, double color_val2, double color_val3, int thickness);
+    private static native void ellipse_6(long img_nativeObj, double box_center_x, double box_center_y, double box_size_width, double box_size_height, double box_angle, double color_val0, double color_val1, double color_val2, double color_val3);
+
+    // C++:  void cv::ellipse2Poly(Point center, Size axes, int angle, int arcStart, int arcEnd, int delta, vector_Point& pts)
+    private static native void ellipse2Poly_0(double center_x, double center_y, double axes_width, double axes_height, int angle, int arcStart, int arcEnd, int delta, long pts_mat_nativeObj);
+
+    // C++:  void cv::equalizeHist(Mat src, Mat& dst)
+    private static native void equalizeHist_0(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::erode(Mat src, Mat& dst, Mat kernel, Point anchor = Point(-1,-1), int iterations = 1, int borderType = BORDER_CONSTANT, Scalar borderValue = morphologyDefaultBorderValue())
+    private static native void erode_0(long src_nativeObj, long dst_nativeObj, long kernel_nativeObj, double anchor_x, double anchor_y, int iterations, int borderType, double borderValue_val0, double borderValue_val1, double borderValue_val2, double borderValue_val3);
+    private static native void erode_1(long src_nativeObj, long dst_nativeObj, long kernel_nativeObj, double anchor_x, double anchor_y, int iterations, int borderType);
+    private static native void erode_2(long src_nativeObj, long dst_nativeObj, long kernel_nativeObj, double anchor_x, double anchor_y, int iterations);
+    private static native void erode_3(long src_nativeObj, long dst_nativeObj, long kernel_nativeObj, double anchor_x, double anchor_y);
+    private static native void erode_4(long src_nativeObj, long dst_nativeObj, long kernel_nativeObj);
+
+    // C++:  void cv::fillConvexPoly(Mat& img, vector_Point points, Scalar color, int lineType = LINE_8, int shift = 0)
+    private static native void fillConvexPoly_0(long img_nativeObj, long points_mat_nativeObj, double color_val0, double color_val1, double color_val2, double color_val3, int lineType, int shift);
+    private static native void fillConvexPoly_1(long img_nativeObj, long points_mat_nativeObj, double color_val0, double color_val1, double color_val2, double color_val3, int lineType);
+    private static native void fillConvexPoly_2(long img_nativeObj, long points_mat_nativeObj, double color_val0, double color_val1, double color_val2, double color_val3);
+
+    // C++:  void cv::fillPoly(Mat& img, vector_vector_Point pts, Scalar color, int lineType = LINE_8, int shift = 0, Point offset = Point())
+    private static native void fillPoly_0(long img_nativeObj, long pts_mat_nativeObj, double color_val0, double color_val1, double color_val2, double color_val3, int lineType, int shift, double offset_x, double offset_y);
+    private static native void fillPoly_1(long img_nativeObj, long pts_mat_nativeObj, double color_val0, double color_val1, double color_val2, double color_val3, int lineType, int shift);
+    private static native void fillPoly_2(long img_nativeObj, long pts_mat_nativeObj, double color_val0, double color_val1, double color_val2, double color_val3, int lineType);
+    private static native void fillPoly_3(long img_nativeObj, long pts_mat_nativeObj, double color_val0, double color_val1, double color_val2, double color_val3);
+
+    // C++:  void cv::filter2D(Mat src, Mat& dst, int ddepth, Mat kernel, Point anchor = Point(-1,-1), double delta = 0, int borderType = BORDER_DEFAULT)
+    private static native void filter2D_0(long src_nativeObj, long dst_nativeObj, int ddepth, long kernel_nativeObj, double anchor_x, double anchor_y, double delta, int borderType);
+    private static native void filter2D_1(long src_nativeObj, long dst_nativeObj, int ddepth, long kernel_nativeObj, double anchor_x, double anchor_y, double delta);
+    private static native void filter2D_2(long src_nativeObj, long dst_nativeObj, int ddepth, long kernel_nativeObj, double anchor_x, double anchor_y);
+    private static native void filter2D_3(long src_nativeObj, long dst_nativeObj, int ddepth, long kernel_nativeObj);
+
+    // C++:  void cv::findContours(Mat image, vector_vector_Point& contours, Mat& hierarchy, int mode, int method, Point offset = Point())
+    private static native void findContours_0(long image_nativeObj, long contours_mat_nativeObj, long hierarchy_nativeObj, int mode, int method, double offset_x, double offset_y);
+    private static native void findContours_1(long image_nativeObj, long contours_mat_nativeObj, long hierarchy_nativeObj, int mode, int method);
+
+    // C++:  void cv::fitLine(Mat points, Mat& line, int distType, double param, double reps, double aeps)
+    private static native void fitLine_0(long points_nativeObj, long line_nativeObj, int distType, double param, double reps, double aeps);
+
+    // C++:  void cv::getDerivKernels(Mat& kx, Mat& ky, int dx, int dy, int ksize, bool normalize = false, int ktype = CV_32F)
+    private static native void getDerivKernels_0(long kx_nativeObj, long ky_nativeObj, int dx, int dy, int ksize, boolean normalize, int ktype);
+    private static native void getDerivKernels_1(long kx_nativeObj, long ky_nativeObj, int dx, int dy, int ksize, boolean normalize);
+    private static native void getDerivKernels_2(long kx_nativeObj, long ky_nativeObj, int dx, int dy, int ksize);
+
+    // C++:  void cv::getRectSubPix(Mat image, Size patchSize, Point2f center, Mat& patch, int patchType = -1)
+    private static native void getRectSubPix_0(long image_nativeObj, double patchSize_width, double patchSize_height, double center_x, double center_y, long patch_nativeObj, int patchType);
+    private static native void getRectSubPix_1(long image_nativeObj, double patchSize_width, double patchSize_height, double center_x, double center_y, long patch_nativeObj);
+
+    // C++:  void cv::goodFeaturesToTrack(Mat image, vector_Point& corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, int gradientSize, bool useHarrisDetector = false, double k = 0.04)
+    private static native void goodFeaturesToTrack_0(long image_nativeObj, long corners_mat_nativeObj, int maxCorners, double qualityLevel, double minDistance, long mask_nativeObj, int blockSize, int gradientSize, boolean useHarrisDetector, double k);
+    private static native void goodFeaturesToTrack_1(long image_nativeObj, long corners_mat_nativeObj, int maxCorners, double qualityLevel, double minDistance, long mask_nativeObj, int blockSize, int gradientSize, boolean useHarrisDetector);
+    private static native void goodFeaturesToTrack_2(long image_nativeObj, long corners_mat_nativeObj, int maxCorners, double qualityLevel, double minDistance, long mask_nativeObj, int blockSize, int gradientSize);
+
+    // C++:  void cv::goodFeaturesToTrack(Mat image, vector_Point& corners, int maxCorners, double qualityLevel, double minDistance, Mat mask = Mat(), int blockSize = 3, bool useHarrisDetector = false, double k = 0.04)
+    private static native void goodFeaturesToTrack_3(long image_nativeObj, long corners_mat_nativeObj, int maxCorners, double qualityLevel, double minDistance, long mask_nativeObj, int blockSize, boolean useHarrisDetector, double k);
+    private static native void goodFeaturesToTrack_4(long image_nativeObj, long corners_mat_nativeObj, int maxCorners, double qualityLevel, double minDistance, long mask_nativeObj, int blockSize, boolean useHarrisDetector);
+    private static native void goodFeaturesToTrack_5(long image_nativeObj, long corners_mat_nativeObj, int maxCorners, double qualityLevel, double minDistance, long mask_nativeObj, int blockSize);
+    private static native void goodFeaturesToTrack_6(long image_nativeObj, long corners_mat_nativeObj, int maxCorners, double qualityLevel, double minDistance, long mask_nativeObj);
+    private static native void goodFeaturesToTrack_7(long image_nativeObj, long corners_mat_nativeObj, int maxCorners, double qualityLevel, double minDistance);
+
+    // C++:  void cv::grabCut(Mat img, Mat& mask, Rect rect, Mat& bgdModel, Mat& fgdModel, int iterCount, int mode = GC_EVAL)
+    private static native void grabCut_0(long img_nativeObj, long mask_nativeObj, int rect_x, int rect_y, int rect_width, int rect_height, long bgdModel_nativeObj, long fgdModel_nativeObj, int iterCount, int mode);
+    private static native void grabCut_1(long img_nativeObj, long mask_nativeObj, int rect_x, int rect_y, int rect_width, int rect_height, long bgdModel_nativeObj, long fgdModel_nativeObj, int iterCount);
+
+    // C++:  void cv::integral(Mat src, Mat& sum, Mat& sqsum, Mat& tilted, int sdepth = -1, int sqdepth = -1)
+    private static native void integral3_0(long src_nativeObj, long sum_nativeObj, long sqsum_nativeObj, long tilted_nativeObj, int sdepth, int sqdepth);
+    private static native void integral3_1(long src_nativeObj, long sum_nativeObj, long sqsum_nativeObj, long tilted_nativeObj, int sdepth);
+    private static native void integral3_2(long src_nativeObj, long sum_nativeObj, long sqsum_nativeObj, long tilted_nativeObj);
+
+    // C++:  void cv::integral(Mat src, Mat& sum, Mat& sqsum, int sdepth = -1, int sqdepth = -1)
+    private static native void integral2_0(long src_nativeObj, long sum_nativeObj, long sqsum_nativeObj, int sdepth, int sqdepth);
+    private static native void integral2_1(long src_nativeObj, long sum_nativeObj, long sqsum_nativeObj, int sdepth);
+    private static native void integral2_2(long src_nativeObj, long sum_nativeObj, long sqsum_nativeObj);
+
+    // C++:  void cv::integral(Mat src, Mat& sum, int sdepth = -1)
+    private static native void integral_0(long src_nativeObj, long sum_nativeObj, int sdepth);
+    private static native void integral_1(long src_nativeObj, long sum_nativeObj);
+
+    // C++:  void cv::invertAffineTransform(Mat M, Mat& iM)
+    private static native void invertAffineTransform_0(long M_nativeObj, long iM_nativeObj);
+
+    // C++:  void cv::line(Mat& img, Point pt1, Point pt2, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+    private static native void line_0(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType, int shift);
+    private static native void line_1(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType);
+    private static native void line_2(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3, int thickness);
+    private static native void line_3(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3);
+
+    // C++:  void cv::linearPolar(Mat src, Mat& dst, Point2f center, double maxRadius, int flags)
+    private static native void linearPolar_0(long src_nativeObj, long dst_nativeObj, double center_x, double center_y, double maxRadius, int flags);
+
+    // C++:  void cv::logPolar(Mat src, Mat& dst, Point2f center, double M, int flags)
+    private static native void logPolar_0(long src_nativeObj, long dst_nativeObj, double center_x, double center_y, double M, int flags);
+
+    // C++:  void cv::matchTemplate(Mat image, Mat templ, Mat& result, int method, Mat mask = Mat())
+    private static native void matchTemplate_0(long image_nativeObj, long templ_nativeObj, long result_nativeObj, int method, long mask_nativeObj);
+    private static native void matchTemplate_1(long image_nativeObj, long templ_nativeObj, long result_nativeObj, int method);
+
+    // C++:  void cv::medianBlur(Mat src, Mat& dst, int ksize)
+    private static native void medianBlur_0(long src_nativeObj, long dst_nativeObj, int ksize);
+
+    // C++:  void cv::minEnclosingCircle(vector_Point2f points, Point2f& center, float& radius)
+    private static native void minEnclosingCircle_0(long points_mat_nativeObj, double[] center_out, double[] radius_out);
+
+    // C++:  void cv::morphologyEx(Mat src, Mat& dst, int op, Mat kernel, Point anchor = Point(-1,-1), int iterations = 1, int borderType = BORDER_CONSTANT, Scalar borderValue = morphologyDefaultBorderValue())
+    private static native void morphologyEx_0(long src_nativeObj, long dst_nativeObj, int op, long kernel_nativeObj, double anchor_x, double anchor_y, int iterations, int borderType, double borderValue_val0, double borderValue_val1, double borderValue_val2, double borderValue_val3);
+    private static native void morphologyEx_1(long src_nativeObj, long dst_nativeObj, int op, long kernel_nativeObj, double anchor_x, double anchor_y, int iterations, int borderType);
+    private static native void morphologyEx_2(long src_nativeObj, long dst_nativeObj, int op, long kernel_nativeObj, double anchor_x, double anchor_y, int iterations);
+    private static native void morphologyEx_3(long src_nativeObj, long dst_nativeObj, int op, long kernel_nativeObj, double anchor_x, double anchor_y);
+    private static native void morphologyEx_4(long src_nativeObj, long dst_nativeObj, int op, long kernel_nativeObj);
+
+    // C++:  void cv::polylines(Mat& img, vector_vector_Point pts, bool isClosed, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+    private static native void polylines_0(long img_nativeObj, long pts_mat_nativeObj, boolean isClosed, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType, int shift);
+    private static native void polylines_1(long img_nativeObj, long pts_mat_nativeObj, boolean isClosed, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType);
+    private static native void polylines_2(long img_nativeObj, long pts_mat_nativeObj, boolean isClosed, double color_val0, double color_val1, double color_val2, double color_val3, int thickness);
+    private static native void polylines_3(long img_nativeObj, long pts_mat_nativeObj, boolean isClosed, double color_val0, double color_val1, double color_val2, double color_val3);
+
+    // C++:  void cv::preCornerDetect(Mat src, Mat& dst, int ksize, int borderType = BORDER_DEFAULT)
+    private static native void preCornerDetect_0(long src_nativeObj, long dst_nativeObj, int ksize, int borderType);
+    private static native void preCornerDetect_1(long src_nativeObj, long dst_nativeObj, int ksize);
+
+    // C++:  void cv::putText(Mat& img, String text, Point org, int fontFace, double fontScale, Scalar color, int thickness = 1, int lineType = LINE_8, bool bottomLeftOrigin = false)
+    private static native void putText_0(long img_nativeObj, String text, double org_x, double org_y, int fontFace, double fontScale, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType, boolean bottomLeftOrigin);
+    private static native void putText_1(long img_nativeObj, String text, double org_x, double org_y, int fontFace, double fontScale, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType);
+    private static native void putText_2(long img_nativeObj, String text, double org_x, double org_y, int fontFace, double fontScale, double color_val0, double color_val1, double color_val2, double color_val3, int thickness);
+    private static native void putText_3(long img_nativeObj, String text, double org_x, double org_y, int fontFace, double fontScale, double color_val0, double color_val1, double color_val2, double color_val3);
+
+    // C++:  void cv::pyrDown(Mat src, Mat& dst, Size dstsize = Size(), int borderType = BORDER_DEFAULT)
+    private static native void pyrDown_0(long src_nativeObj, long dst_nativeObj, double dstsize_width, double dstsize_height, int borderType);
+    private static native void pyrDown_1(long src_nativeObj, long dst_nativeObj, double dstsize_width, double dstsize_height);
+    private static native void pyrDown_2(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::pyrMeanShiftFiltering(Mat src, Mat& dst, double sp, double sr, int maxLevel = 1, TermCriteria termcrit = TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,1))
+    private static native void pyrMeanShiftFiltering_0(long src_nativeObj, long dst_nativeObj, double sp, double sr, int maxLevel, int termcrit_type, int termcrit_maxCount, double termcrit_epsilon);
+    private static native void pyrMeanShiftFiltering_1(long src_nativeObj, long dst_nativeObj, double sp, double sr, int maxLevel);
+    private static native void pyrMeanShiftFiltering_2(long src_nativeObj, long dst_nativeObj, double sp, double sr);
+
+    // C++:  void cv::pyrUp(Mat src, Mat& dst, Size dstsize = Size(), int borderType = BORDER_DEFAULT)
+    private static native void pyrUp_0(long src_nativeObj, long dst_nativeObj, double dstsize_width, double dstsize_height, int borderType);
+    private static native void pyrUp_1(long src_nativeObj, long dst_nativeObj, double dstsize_width, double dstsize_height);
+    private static native void pyrUp_2(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::rectangle(Mat& img, Point pt1, Point pt2, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+    private static native void rectangle_0(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType, int shift);
+    private static native void rectangle_1(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType);
+    private static native void rectangle_2(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3, int thickness);
+    private static native void rectangle_3(long img_nativeObj, double pt1_x, double pt1_y, double pt2_x, double pt2_y, double color_val0, double color_val1, double color_val2, double color_val3);
+
+    // C++:  void cv::rectangle(Mat& img, Rect rec, Scalar color, int thickness = 1, int lineType = LINE_8, int shift = 0)
+    private static native void rectangle_4(long img_nativeObj, int rec_x, int rec_y, int rec_width, int rec_height, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType, int shift);
+    private static native void rectangle_5(long img_nativeObj, int rec_x, int rec_y, int rec_width, int rec_height, double color_val0, double color_val1, double color_val2, double color_val3, int thickness, int lineType);
+    private static native void rectangle_6(long img_nativeObj, int rec_x, int rec_y, int rec_width, int rec_height, double color_val0, double color_val1, double color_val2, double color_val3, int thickness);
+    private static native void rectangle_7(long img_nativeObj, int rec_x, int rec_y, int rec_width, int rec_height, double color_val0, double color_val1, double color_val2, double color_val3);
+
+    // C++:  void cv::remap(Mat src, Mat& dst, Mat map1, Mat map2, int interpolation, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar())
+    private static native void remap_0(long src_nativeObj, long dst_nativeObj, long map1_nativeObj, long map2_nativeObj, int interpolation, int borderMode, double borderValue_val0, double borderValue_val1, double borderValue_val2, double borderValue_val3);
+    private static native void remap_1(long src_nativeObj, long dst_nativeObj, long map1_nativeObj, long map2_nativeObj, int interpolation, int borderMode);
+    private static native void remap_2(long src_nativeObj, long dst_nativeObj, long map1_nativeObj, long map2_nativeObj, int interpolation);
+
+    // C++:  void cv::resize(Mat src, Mat& dst, Size dsize, double fx = 0, double fy = 0, int interpolation = INTER_LINEAR)
+    private static native void resize_0(long src_nativeObj, long dst_nativeObj, double dsize_width, double dsize_height, double fx, double fy, int interpolation);
+    private static native void resize_1(long src_nativeObj, long dst_nativeObj, double dsize_width, double dsize_height, double fx, double fy);
+    private static native void resize_2(long src_nativeObj, long dst_nativeObj, double dsize_width, double dsize_height, double fx);
+    private static native void resize_3(long src_nativeObj, long dst_nativeObj, double dsize_width, double dsize_height);
+
+    // C++:  void cv::sepFilter2D(Mat src, Mat& dst, int ddepth, Mat kernelX, Mat kernelY, Point anchor = Point(-1,-1), double delta = 0, int borderType = BORDER_DEFAULT)
+    private static native void sepFilter2D_0(long src_nativeObj, long dst_nativeObj, int ddepth, long kernelX_nativeObj, long kernelY_nativeObj, double anchor_x, double anchor_y, double delta, int borderType);
+    private static native void sepFilter2D_1(long src_nativeObj, long dst_nativeObj, int ddepth, long kernelX_nativeObj, long kernelY_nativeObj, double anchor_x, double anchor_y, double delta);
+    private static native void sepFilter2D_2(long src_nativeObj, long dst_nativeObj, int ddepth, long kernelX_nativeObj, long kernelY_nativeObj, double anchor_x, double anchor_y);
+    private static native void sepFilter2D_3(long src_nativeObj, long dst_nativeObj, int ddepth, long kernelX_nativeObj, long kernelY_nativeObj);
+
+    // C++:  void cv::spatialGradient(Mat src, Mat& dx, Mat& dy, int ksize = 3, int borderType = BORDER_DEFAULT)
+    private static native void spatialGradient_0(long src_nativeObj, long dx_nativeObj, long dy_nativeObj, int ksize, int borderType);
+    private static native void spatialGradient_1(long src_nativeObj, long dx_nativeObj, long dy_nativeObj, int ksize);
+    private static native void spatialGradient_2(long src_nativeObj, long dx_nativeObj, long dy_nativeObj);
+
+    // C++:  void cv::sqrBoxFilter(Mat src, Mat& dst, int ddepth, Size ksize, Point anchor = Point(-1, -1), bool normalize = true, int borderType = BORDER_DEFAULT)
+    private static native void sqrBoxFilter_0(long src_nativeObj, long dst_nativeObj, int ddepth, double ksize_width, double ksize_height, double anchor_x, double anchor_y, boolean normalize, int borderType);
+    private static native void sqrBoxFilter_1(long src_nativeObj, long dst_nativeObj, int ddepth, double ksize_width, double ksize_height, double anchor_x, double anchor_y, boolean normalize);
+    private static native void sqrBoxFilter_2(long src_nativeObj, long dst_nativeObj, int ddepth, double ksize_width, double ksize_height, double anchor_x, double anchor_y);
+    private static native void sqrBoxFilter_3(long src_nativeObj, long dst_nativeObj, int ddepth, double ksize_width, double ksize_height);
+
+    // C++:  void cv::warpAffine(Mat src, Mat& dst, Mat M, Size dsize, int flags = INTER_LINEAR, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar())
+    private static native void warpAffine_0(long src_nativeObj, long dst_nativeObj, long M_nativeObj, double dsize_width, double dsize_height, int flags, int borderMode, double borderValue_val0, double borderValue_val1, double borderValue_val2, double borderValue_val3);
+    private static native void warpAffine_1(long src_nativeObj, long dst_nativeObj, long M_nativeObj, double dsize_width, double dsize_height, int flags, int borderMode);
+    private static native void warpAffine_2(long src_nativeObj, long dst_nativeObj, long M_nativeObj, double dsize_width, double dsize_height, int flags);
+    private static native void warpAffine_3(long src_nativeObj, long dst_nativeObj, long M_nativeObj, double dsize_width, double dsize_height);
+
+    // C++:  void cv::warpPerspective(Mat src, Mat& dst, Mat M, Size dsize, int flags = INTER_LINEAR, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar())
+    private static native void warpPerspective_0(long src_nativeObj, long dst_nativeObj, long M_nativeObj, double dsize_width, double dsize_height, int flags, int borderMode, double borderValue_val0, double borderValue_val1, double borderValue_val2, double borderValue_val3);
+    private static native void warpPerspective_1(long src_nativeObj, long dst_nativeObj, long M_nativeObj, double dsize_width, double dsize_height, int flags, int borderMode);
+    private static native void warpPerspective_2(long src_nativeObj, long dst_nativeObj, long M_nativeObj, double dsize_width, double dsize_height, int flags);
+    private static native void warpPerspective_3(long src_nativeObj, long dst_nativeObj, long M_nativeObj, double dsize_width, double dsize_height);
+
+    // C++:  void cv::warpPolar(Mat src, Mat& dst, Size dsize, Point2f center, double maxRadius, int flags)
+    private static native void warpPolar_0(long src_nativeObj, long dst_nativeObj, double dsize_width, double dsize_height, double center_x, double center_y, double maxRadius, int flags);
+
+    // C++:  void cv::watershed(Mat image, Mat& markers)
+    private static native void watershed_0(long image_nativeObj, long markers_nativeObj);
+private static native double[] n_getTextSize(String text, int fontFace, double fontScale, int thickness, int[] baseLine);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/imgproc/LineSegmentDetector.java b/opencv41/src/main/java/org/opencv/imgproc/LineSegmentDetector.java
new file mode 100644 (file)
index 0000000..b7bd36f
--- /dev/null
@@ -0,0 +1,121 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.imgproc;
+
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+import org.opencv.core.Size;
+
+// C++: class LineSegmentDetector
+//javadoc: LineSegmentDetector
+
+public class LineSegmentDetector extends Algorithm {
+
+    protected LineSegmentDetector(long addr) { super(addr); }
+
+    // internal usage only
+    public static LineSegmentDetector __fromPtr__(long addr) { return new LineSegmentDetector(addr); }
+
+    //
+    // C++:  int cv::LineSegmentDetector::compareSegments(Size size, Mat lines1, Mat lines2, Mat& _image = Mat())
+    //
+
+    //javadoc: LineSegmentDetector::compareSegments(size, lines1, lines2, _image)
+    public  int compareSegments(Size size, Mat lines1, Mat lines2, Mat _image)
+    {
+        
+        int retVal = compareSegments_0(nativeObj, size.width, size.height, lines1.nativeObj, lines2.nativeObj, _image.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: LineSegmentDetector::compareSegments(size, lines1, lines2)
+    public  int compareSegments(Size size, Mat lines1, Mat lines2)
+    {
+        
+        int retVal = compareSegments_1(nativeObj, size.width, size.height, lines1.nativeObj, lines2.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::LineSegmentDetector::detect(Mat _image, Mat& _lines, Mat& width = Mat(), Mat& prec = Mat(), Mat& nfa = Mat())
+    //
+
+    //javadoc: LineSegmentDetector::detect(_image, _lines, width, prec, nfa)
+    public  void detect(Mat _image, Mat _lines, Mat width, Mat prec, Mat nfa)
+    {
+        
+        detect_0(nativeObj, _image.nativeObj, _lines.nativeObj, width.nativeObj, prec.nativeObj, nfa.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: LineSegmentDetector::detect(_image, _lines, width, prec)
+    public  void detect(Mat _image, Mat _lines, Mat width, Mat prec)
+    {
+        
+        detect_1(nativeObj, _image.nativeObj, _lines.nativeObj, width.nativeObj, prec.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: LineSegmentDetector::detect(_image, _lines, width)
+    public  void detect(Mat _image, Mat _lines, Mat width)
+    {
+        
+        detect_2(nativeObj, _image.nativeObj, _lines.nativeObj, width.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: LineSegmentDetector::detect(_image, _lines)
+    public  void detect(Mat _image, Mat _lines)
+    {
+        
+        detect_3(nativeObj, _image.nativeObj, _lines.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::LineSegmentDetector::drawSegments(Mat& _image, Mat lines)
+    //
+
+    //javadoc: LineSegmentDetector::drawSegments(_image, lines)
+    public  void drawSegments(Mat _image, Mat lines)
+    {
+        
+        drawSegments_0(nativeObj, _image.nativeObj, lines.nativeObj);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  int cv::LineSegmentDetector::compareSegments(Size size, Mat lines1, Mat lines2, Mat& _image = Mat())
+    private static native int compareSegments_0(long nativeObj, double size_width, double size_height, long lines1_nativeObj, long lines2_nativeObj, long _image_nativeObj);
+    private static native int compareSegments_1(long nativeObj, double size_width, double size_height, long lines1_nativeObj, long lines2_nativeObj);
+
+    // C++:  void cv::LineSegmentDetector::detect(Mat _image, Mat& _lines, Mat& width = Mat(), Mat& prec = Mat(), Mat& nfa = Mat())
+    private static native void detect_0(long nativeObj, long _image_nativeObj, long _lines_nativeObj, long width_nativeObj, long prec_nativeObj, long nfa_nativeObj);
+    private static native void detect_1(long nativeObj, long _image_nativeObj, long _lines_nativeObj, long width_nativeObj, long prec_nativeObj);
+    private static native void detect_2(long nativeObj, long _image_nativeObj, long _lines_nativeObj, long width_nativeObj);
+    private static native void detect_3(long nativeObj, long _image_nativeObj, long _lines_nativeObj);
+
+    // C++:  void cv::LineSegmentDetector::drawSegments(Mat& _image, Mat lines)
+    private static native void drawSegments_0(long nativeObj, long _image_nativeObj, long lines_nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/imgproc/Moments.java b/opencv41/src/main/java/org/opencv/imgproc/Moments.java
new file mode 100644 (file)
index 0000000..2eeebc9
--- /dev/null
@@ -0,0 +1,244 @@
+package org.opencv.imgproc;
+
+import java.lang.Math;
+
+//javadoc:Moments
+public class Moments {
+
+    public double m00;
+    public double m10;
+    public double m01;
+    public double m20;
+    public double m11;
+    public double m02;
+    public double m30;
+    public double m21;
+    public double m12;
+    public double m03;
+
+    public double mu20;
+    public double mu11;
+    public double mu02;
+    public double mu30;
+    public double mu21;
+    public double mu12;
+    public double mu03;
+
+    public double nu20;
+    public double nu11;
+    public double nu02;
+    public double nu30;
+    public double nu21;
+    public double nu12;
+    public double nu03;
+
+    public Moments(
+        double m00,
+        double m10,
+        double m01,
+        double m20,
+        double m11,
+        double m02,
+        double m30,
+        double m21,
+        double m12,
+        double m03)
+    {
+        this.m00 = m00;
+        this.m10 = m10;
+        this.m01 = m01;
+        this.m20 = m20;
+        this.m11 = m11;
+        this.m02 = m02;
+        this.m30 = m30;
+        this.m21 = m21;
+        this.m12 = m12;
+        this.m03 = m03;
+        this.completeState();
+    }
+
+    public Moments() {
+        this(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+    }
+
+    public Moments(double[] vals) {
+        set(vals);
+    }
+
+    public void set(double[] vals) {
+        if (vals != null) {
+            m00 = vals.length > 0 ? vals[0] : 0;
+            m10 = vals.length > 1 ? vals[1] : 0;
+            m01 = vals.length > 2 ? vals[2] : 0;
+            m20 = vals.length > 3 ? vals[3] : 0;
+            m11 = vals.length > 4 ? vals[4] : 0;
+            m02 = vals.length > 5 ? vals[5] : 0;
+            m30 = vals.length > 6 ? vals[6] : 0;
+            m21 = vals.length > 7 ? vals[7] : 0;
+            m12 = vals.length > 8 ? vals[8] : 0;
+            m03 = vals.length > 9 ? vals[9] : 0;
+            this.completeState();
+        } else {
+            m00 = 0;
+            m10 = 0;
+            m01 = 0;
+            m20 = 0;
+            m11 = 0;
+            m02 = 0;
+            m30 = 0;
+            m21 = 0;
+            m12 = 0;
+            m03 = 0;
+            mu20 = 0;
+            mu11 = 0;
+            mu02 = 0;
+            mu30 = 0;
+            mu21 = 0;
+            mu12 = 0;
+            mu03 = 0;
+            nu20 = 0;
+            nu11 = 0;
+            nu02 = 0;
+            nu30 = 0;
+            nu21 = 0;
+            nu12 = 0;
+            nu03 = 0;
+        }
+    }
+
+    @Override
+    public String toString() {
+        return "Moments [ " +
+            "\n" +
+            "m00=" + m00 + ", " +
+            "\n" +
+            "m10=" + m10 + ", " +
+            "m01=" + m01 + ", " +
+            "\n" +
+            "m20=" + m20 + ", " +
+            "m11=" + m11 + ", " +
+            "m02=" + m02 + ", " +
+            "\n" +
+            "m30=" + m30 + ", " +
+            "m21=" + m21 + ", " +
+            "m12=" + m12 + ", " +
+            "m03=" + m03 + ", " +
+            "\n" +
+            "mu20=" + mu20 + ", " +
+            "mu11=" + mu11 + ", " +
+            "mu02=" + mu02 + ", " +
+            "\n" +
+            "mu30=" + mu30 + ", " +
+            "mu21=" + mu21 + ", " +
+            "mu12=" + mu12 + ", " +
+            "mu03=" + mu03 + ", " +
+            "\n" +
+            "nu20=" + nu20 + ", " +
+            "nu11=" + nu11 + ", " +
+            "nu02=" + nu02 + ", " +
+            "\n" +
+            "nu30=" + nu30 + ", " +
+            "nu21=" + nu21 + ", " +
+            "nu12=" + nu12 + ", " +
+            "nu03=" + nu03 + ", " +
+            "\n]";
+    }
+
+    protected void completeState()
+    {
+        double cx = 0, cy = 0;
+        double mu20, mu11, mu02;
+        double inv_m00 = 0.0;
+
+        if( Math.abs(this.m00) > 0.00000001 )
+        {
+            inv_m00 = 1. / this.m00;
+            cx = this.m10 * inv_m00;
+            cy = this.m01 * inv_m00;
+        }
+
+        // mu20 = m20 - m10*cx
+        mu20 = this.m20 - this.m10 * cx;
+        // mu11 = m11 - m10*cy
+        mu11 = this.m11 - this.m10 * cy;
+        // mu02 = m02 - m01*cy
+        mu02 = this.m02 - this.m01 * cy;
+
+        this.mu20 = mu20;
+        this.mu11 = mu11;
+        this.mu02 = mu02;
+
+        // mu30 = m30 - cx*(3*mu20 + cx*m10)
+        this.mu30 = this.m30 - cx * (3 * mu20 + cx * this.m10);
+        mu11 += mu11;
+        // mu21 = m21 - cx*(2*mu11 + cx*m01) - cy*mu20
+        this.mu21 = this.m21 - cx * (mu11 + cx * this.m01) - cy * mu20;
+        // mu12 = m12 - cy*(2*mu11 + cy*m10) - cx*mu02
+        this.mu12 = this.m12 - cy * (mu11 + cy * this.m10) - cx * mu02;
+        // mu03 = m03 - cy*(3*mu02 + cy*m01)
+        this.mu03 = this.m03 - cy * (3 * mu02 + cy * this.m01);
+
+
+        double inv_sqrt_m00 = Math.sqrt(Math.abs(inv_m00));
+        double s2 = inv_m00*inv_m00, s3 = s2*inv_sqrt_m00;
+
+        this.nu20 = this.mu20*s2;
+        this.nu11 = this.mu11*s2;
+        this.nu02 = this.mu02*s2;
+        this.nu30 = this.mu30*s3;
+        this.nu21 = this.mu21*s3;
+        this.nu12 = this.mu12*s3;
+        this.nu03 = this.mu03*s3;
+
+    }
+
+    public double get_m00() { return this.m00; }
+    public double get_m10() { return this.m10; }
+    public double get_m01() { return this.m01; }
+    public double get_m20() { return this.m20; }
+    public double get_m11() { return this.m11; }
+    public double get_m02() { return this.m02; }
+    public double get_m30() { return this.m30; }
+    public double get_m21() { return this.m21; }
+    public double get_m12() { return this.m12; }
+    public double get_m03() { return this.m03; }
+    public double get_mu20() { return this.mu20; }
+    public double get_mu11() { return this.mu11; }
+    public double get_mu02() { return this.mu02; }
+    public double get_mu30() { return this.mu30; }
+    public double get_mu21() { return this.mu21; }
+    public double get_mu12() { return this.mu12; }
+    public double get_mu03() { return this.mu03; }
+    public double get_nu20() { return this.nu20; }
+    public double get_nu11() { return this.nu11; }
+    public double get_nu02() { return this.nu02; }
+    public double get_nu30() { return this.nu30; }
+    public double get_nu21() { return this.nu21; }
+    public double get_nu12() { return this.nu12; }
+    public double get_nu03() { return this.nu03; }
+
+    public void set_m00(double m00) { this.m00 = m00; }
+    public void set_m10(double m10) { this.m10 = m10; }
+    public void set_m01(double m01) { this.m01 = m01; }
+    public void set_m20(double m20) { this.m20 = m20; }
+    public void set_m11(double m11) { this.m11 = m11; }
+    public void set_m02(double m02) { this.m02 = m02; }
+    public void set_m30(double m30) { this.m30 = m30; }
+    public void set_m21(double m21) { this.m21 = m21; }
+    public void set_m12(double m12) { this.m12 = m12; }
+    public void set_m03(double m03) { this.m03 = m03; }
+    public void set_mu20(double mu20) { this.mu20 = mu20; }
+    public void set_mu11(double mu11) { this.mu11 = mu11; }
+    public void set_mu02(double mu02) { this.mu02 = mu02; }
+    public void set_mu30(double mu30) { this.mu30 = mu30; }
+    public void set_mu21(double mu21) { this.mu21 = mu21; }
+    public void set_mu12(double mu12) { this.mu12 = mu12; }
+    public void set_mu03(double mu03) { this.mu03 = mu03; }
+    public void set_nu20(double nu20) { this.nu20 = nu20; }
+    public void set_nu11(double nu11) { this.nu11 = nu11; }
+    public void set_nu02(double nu02) { this.nu02 = nu02; }
+    public void set_nu30(double nu30) { this.nu30 = nu30; }
+    public void set_nu21(double nu21) { this.nu21 = nu21; }
+    public void set_nu12(double nu12) { this.nu12 = nu12; }
+    public void set_nu03(double nu03) { this.nu03 = nu03; }
+}
diff --git a/opencv41/src/main/java/org/opencv/imgproc/Subdiv2D.java b/opencv41/src/main/java/org/opencv/imgproc/Subdiv2D.java
new file mode 100644 (file)
index 0000000..2ae1d29
--- /dev/null
@@ -0,0 +1,408 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.imgproc;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfFloat4;
+import org.opencv.core.MatOfFloat6;
+import org.opencv.core.MatOfInt;
+import org.opencv.core.MatOfPoint2f;
+import org.opencv.core.Point;
+import org.opencv.core.Rect;
+import org.opencv.utils.Converters;
+
+// C++: class Subdiv2D
+//javadoc: Subdiv2D
+
+public class Subdiv2D {
+
+    protected final long nativeObj;
+    protected Subdiv2D(long addr) { nativeObj = addr; }
+
+    public long getNativeObjAddr() { return nativeObj; }
+
+    // internal usage only
+    public static Subdiv2D __fromPtr__(long addr) { return new Subdiv2D(addr); }
+
+    // C++: enum <unnamed>
+    public static final int
+            PTLOC_ERROR = -2,
+            PTLOC_OUTSIDE_RECT = -1,
+            PTLOC_INSIDE = 0,
+            PTLOC_VERTEX = 1,
+            PTLOC_ON_EDGE = 2,
+            NEXT_AROUND_ORG = 0x00,
+            NEXT_AROUND_DST = 0x22,
+            PREV_AROUND_ORG = 0x11,
+            PREV_AROUND_DST = 0x33,
+            NEXT_AROUND_LEFT = 0x13,
+            NEXT_AROUND_RIGHT = 0x31,
+            PREV_AROUND_LEFT = 0x20,
+            PREV_AROUND_RIGHT = 0x02;
+
+
+    //
+    // C++:   cv::Subdiv2D::Subdiv2D(Rect rect)
+    //
+
+    //javadoc: Subdiv2D::Subdiv2D(rect)
+    public   Subdiv2D(Rect rect)
+    {
+        
+        nativeObj = Subdiv2D_0(rect.x, rect.y, rect.width, rect.height);
+        
+        return;
+    }
+
+
+    //
+    // C++:   cv::Subdiv2D::Subdiv2D()
+    //
+
+    //javadoc: Subdiv2D::Subdiv2D()
+    public   Subdiv2D()
+    {
+        
+        nativeObj = Subdiv2D_1();
+        
+        return;
+    }
+
+
+    //
+    // C++:  Point2f cv::Subdiv2D::getVertex(int vertex, int* firstEdge = 0)
+    //
+
+    //javadoc: Subdiv2D::getVertex(vertex, firstEdge)
+    public  Point getVertex(int vertex, int[] firstEdge)
+    {
+        double[] firstEdge_out = new double[1];
+        Point retVal = new Point(getVertex_0(nativeObj, vertex, firstEdge_out));
+        if(firstEdge!=null) firstEdge[0] = (int)firstEdge_out[0];
+        return retVal;
+    }
+
+    //javadoc: Subdiv2D::getVertex(vertex)
+    public  Point getVertex(int vertex)
+    {
+        
+        Point retVal = new Point(getVertex_1(nativeObj, vertex));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::Subdiv2D::edgeDst(int edge, Point2f* dstpt = 0)
+    //
+
+    //javadoc: Subdiv2D::edgeDst(edge, dstpt)
+    public  int edgeDst(int edge, Point dstpt)
+    {
+        double[] dstpt_out = new double[2];
+        int retVal = edgeDst_0(nativeObj, edge, dstpt_out);
+        if(dstpt!=null){ dstpt.x = dstpt_out[0]; dstpt.y = dstpt_out[1]; } 
+        return retVal;
+    }
+
+    //javadoc: Subdiv2D::edgeDst(edge)
+    public  int edgeDst(int edge)
+    {
+        
+        int retVal = edgeDst_1(nativeObj, edge);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::Subdiv2D::edgeOrg(int edge, Point2f* orgpt = 0)
+    //
+
+    //javadoc: Subdiv2D::edgeOrg(edge, orgpt)
+    public  int edgeOrg(int edge, Point orgpt)
+    {
+        double[] orgpt_out = new double[2];
+        int retVal = edgeOrg_0(nativeObj, edge, orgpt_out);
+        if(orgpt!=null){ orgpt.x = orgpt_out[0]; orgpt.y = orgpt_out[1]; } 
+        return retVal;
+    }
+
+    //javadoc: Subdiv2D::edgeOrg(edge)
+    public  int edgeOrg(int edge)
+    {
+        
+        int retVal = edgeOrg_1(nativeObj, edge);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::Subdiv2D::findNearest(Point2f pt, Point2f* nearestPt = 0)
+    //
+
+    //javadoc: Subdiv2D::findNearest(pt, nearestPt)
+    public  int findNearest(Point pt, Point nearestPt)
+    {
+        double[] nearestPt_out = new double[2];
+        int retVal = findNearest_0(nativeObj, pt.x, pt.y, nearestPt_out);
+        if(nearestPt!=null){ nearestPt.x = nearestPt_out[0]; nearestPt.y = nearestPt_out[1]; } 
+        return retVal;
+    }
+
+    //javadoc: Subdiv2D::findNearest(pt)
+    public  int findNearest(Point pt)
+    {
+        
+        int retVal = findNearest_1(nativeObj, pt.x, pt.y);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::Subdiv2D::getEdge(int edge, int nextEdgeType)
+    //
+
+    //javadoc: Subdiv2D::getEdge(edge, nextEdgeType)
+    public  int getEdge(int edge, int nextEdgeType)
+    {
+        
+        int retVal = getEdge_0(nativeObj, edge, nextEdgeType);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::Subdiv2D::insert(Point2f pt)
+    //
+
+    //javadoc: Subdiv2D::insert(pt)
+    public  int insert(Point pt)
+    {
+        
+        int retVal = insert_0(nativeObj, pt.x, pt.y);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::Subdiv2D::locate(Point2f pt, int& edge, int& vertex)
+    //
+
+    //javadoc: Subdiv2D::locate(pt, edge, vertex)
+    public  int locate(Point pt, int[] edge, int[] vertex)
+    {
+        double[] edge_out = new double[1];
+        double[] vertex_out = new double[1];
+        int retVal = locate_0(nativeObj, pt.x, pt.y, edge_out, vertex_out);
+        if(edge!=null) edge[0] = (int)edge_out[0];
+        if(vertex!=null) vertex[0] = (int)vertex_out[0];
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::Subdiv2D::nextEdge(int edge)
+    //
+
+    //javadoc: Subdiv2D::nextEdge(edge)
+    public  int nextEdge(int edge)
+    {
+        
+        int retVal = nextEdge_0(nativeObj, edge);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::Subdiv2D::rotateEdge(int edge, int rotate)
+    //
+
+    //javadoc: Subdiv2D::rotateEdge(edge, rotate)
+    public  int rotateEdge(int edge, int rotate)
+    {
+        
+        int retVal = rotateEdge_0(nativeObj, edge, rotate);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::Subdiv2D::symEdge(int edge)
+    //
+
+    //javadoc: Subdiv2D::symEdge(edge)
+    public  int symEdge(int edge)
+    {
+        
+        int retVal = symEdge_0(nativeObj, edge);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::Subdiv2D::getEdgeList(vector_Vec4f& edgeList)
+    //
+
+    //javadoc: Subdiv2D::getEdgeList(edgeList)
+    public  void getEdgeList(MatOfFloat4 edgeList)
+    {
+        Mat edgeList_mat = edgeList;
+        getEdgeList_0(nativeObj, edgeList_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::Subdiv2D::getLeadingEdgeList(vector_int& leadingEdgeList)
+    //
+
+    //javadoc: Subdiv2D::getLeadingEdgeList(leadingEdgeList)
+    public  void getLeadingEdgeList(MatOfInt leadingEdgeList)
+    {
+        Mat leadingEdgeList_mat = leadingEdgeList;
+        getLeadingEdgeList_0(nativeObj, leadingEdgeList_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::Subdiv2D::getTriangleList(vector_Vec6f& triangleList)
+    //
+
+    //javadoc: Subdiv2D::getTriangleList(triangleList)
+    public  void getTriangleList(MatOfFloat6 triangleList)
+    {
+        Mat triangleList_mat = triangleList;
+        getTriangleList_0(nativeObj, triangleList_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::Subdiv2D::getVoronoiFacetList(vector_int idx, vector_vector_Point2f& facetList, vector_Point2f& facetCenters)
+    //
+
+    //javadoc: Subdiv2D::getVoronoiFacetList(idx, facetList, facetCenters)
+    public  void getVoronoiFacetList(MatOfInt idx, List<MatOfPoint2f> facetList, MatOfPoint2f facetCenters)
+    {
+        Mat idx_mat = idx;
+        Mat facetList_mat = new Mat();
+        Mat facetCenters_mat = facetCenters;
+        getVoronoiFacetList_0(nativeObj, idx_mat.nativeObj, facetList_mat.nativeObj, facetCenters_mat.nativeObj);
+        Converters.Mat_to_vector_vector_Point2f(facetList_mat, facetList);
+        facetList_mat.release();
+        return;
+    }
+
+
+    //
+    // C++:  void cv::Subdiv2D::initDelaunay(Rect rect)
+    //
+
+    //javadoc: Subdiv2D::initDelaunay(rect)
+    public  void initDelaunay(Rect rect)
+    {
+        
+        initDelaunay_0(nativeObj, rect.x, rect.y, rect.width, rect.height);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::Subdiv2D::insert(vector_Point2f ptvec)
+    //
+
+    //javadoc: Subdiv2D::insert(ptvec)
+    public  void insert(MatOfPoint2f ptvec)
+    {
+        Mat ptvec_mat = ptvec;
+        insert_1(nativeObj, ptvec_mat.nativeObj);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:   cv::Subdiv2D::Subdiv2D(Rect rect)
+    private static native long Subdiv2D_0(int rect_x, int rect_y, int rect_width, int rect_height);
+
+    // C++:   cv::Subdiv2D::Subdiv2D()
+    private static native long Subdiv2D_1();
+
+    // C++:  Point2f cv::Subdiv2D::getVertex(int vertex, int* firstEdge = 0)
+    private static native double[] getVertex_0(long nativeObj, int vertex, double[] firstEdge_out);
+    private static native double[] getVertex_1(long nativeObj, int vertex);
+
+    // C++:  int cv::Subdiv2D::edgeDst(int edge, Point2f* dstpt = 0)
+    private static native int edgeDst_0(long nativeObj, int edge, double[] dstpt_out);
+    private static native int edgeDst_1(long nativeObj, int edge);
+
+    // C++:  int cv::Subdiv2D::edgeOrg(int edge, Point2f* orgpt = 0)
+    private static native int edgeOrg_0(long nativeObj, int edge, double[] orgpt_out);
+    private static native int edgeOrg_1(long nativeObj, int edge);
+
+    // C++:  int cv::Subdiv2D::findNearest(Point2f pt, Point2f* nearestPt = 0)
+    private static native int findNearest_0(long nativeObj, double pt_x, double pt_y, double[] nearestPt_out);
+    private static native int findNearest_1(long nativeObj, double pt_x, double pt_y);
+
+    // C++:  int cv::Subdiv2D::getEdge(int edge, int nextEdgeType)
+    private static native int getEdge_0(long nativeObj, int edge, int nextEdgeType);
+
+    // C++:  int cv::Subdiv2D::insert(Point2f pt)
+    private static native int insert_0(long nativeObj, double pt_x, double pt_y);
+
+    // C++:  int cv::Subdiv2D::locate(Point2f pt, int& edge, int& vertex)
+    private static native int locate_0(long nativeObj, double pt_x, double pt_y, double[] edge_out, double[] vertex_out);
+
+    // C++:  int cv::Subdiv2D::nextEdge(int edge)
+    private static native int nextEdge_0(long nativeObj, int edge);
+
+    // C++:  int cv::Subdiv2D::rotateEdge(int edge, int rotate)
+    private static native int rotateEdge_0(long nativeObj, int edge, int rotate);
+
+    // C++:  int cv::Subdiv2D::symEdge(int edge)
+    private static native int symEdge_0(long nativeObj, int edge);
+
+    // C++:  void cv::Subdiv2D::getEdgeList(vector_Vec4f& edgeList)
+    private static native void getEdgeList_0(long nativeObj, long edgeList_mat_nativeObj);
+
+    // C++:  void cv::Subdiv2D::getLeadingEdgeList(vector_int& leadingEdgeList)
+    private static native void getLeadingEdgeList_0(long nativeObj, long leadingEdgeList_mat_nativeObj);
+
+    // C++:  void cv::Subdiv2D::getTriangleList(vector_Vec6f& triangleList)
+    private static native void getTriangleList_0(long nativeObj, long triangleList_mat_nativeObj);
+
+    // C++:  void cv::Subdiv2D::getVoronoiFacetList(vector_int idx, vector_vector_Point2f& facetList, vector_Point2f& facetCenters)
+    private static native void getVoronoiFacetList_0(long nativeObj, long idx_mat_nativeObj, long facetList_mat_nativeObj, long facetCenters_mat_nativeObj);
+
+    // C++:  void cv::Subdiv2D::initDelaunay(Rect rect)
+    private static native void initDelaunay_0(long nativeObj, int rect_x, int rect_y, int rect_width, int rect_height);
+
+    // C++:  void cv::Subdiv2D::insert(vector_Point2f ptvec)
+    private static native void insert_1(long nativeObj, long ptvec_mat_nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/ml/ANN_MLP.java b/opencv41/src/main/java/org/opencv/ml/ANN_MLP.java
new file mode 100644 (file)
index 0000000..ace0c65
--- /dev/null
@@ -0,0 +1,639 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import java.lang.String;
+import org.opencv.core.Mat;
+import org.opencv.core.TermCriteria;
+import org.opencv.ml.ANN_MLP;
+import org.opencv.ml.StatModel;
+
+// C++: class ANN_MLP
+//javadoc: ANN_MLP
+
+public class ANN_MLP extends StatModel {
+
+    protected ANN_MLP(long addr) { super(addr); }
+
+    // internal usage only
+    public static ANN_MLP __fromPtr__(long addr) { return new ANN_MLP(addr); }
+
+    // C++: enum TrainingMethods
+    public static final int
+            BACKPROP = 0,
+            RPROP = 1,
+            ANNEAL = 2;
+
+
+    // C++: enum TrainFlags
+    public static final int
+            UPDATE_WEIGHTS = 1,
+            NO_INPUT_SCALE = 2,
+            NO_OUTPUT_SCALE = 4;
+
+
+    // C++: enum ActivationFunctions
+    public static final int
+            IDENTITY = 0,
+            SIGMOID_SYM = 1,
+            GAUSSIAN = 2,
+            RELU = 3,
+            LEAKYRELU = 4;
+
+
+    //
+    // C++:  Mat cv::ml::ANN_MLP::getLayerSizes()
+    //
+
+    //javadoc: ANN_MLP::getLayerSizes()
+    public  Mat getLayerSizes()
+    {
+        
+        Mat retVal = new Mat(getLayerSizes_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::ANN_MLP::getWeights(int layerIdx)
+    //
+
+    //javadoc: ANN_MLP::getWeights(layerIdx)
+    public  Mat getWeights(int layerIdx)
+    {
+        
+        Mat retVal = new Mat(getWeights_0(nativeObj, layerIdx));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_ANN_MLP cv::ml::ANN_MLP::create()
+    //
+
+    //javadoc: ANN_MLP::create()
+    public static ANN_MLP create()
+    {
+        
+        ANN_MLP retVal = ANN_MLP.__fromPtr__(create_0());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_ANN_MLP cv::ml::ANN_MLP::load(String filepath)
+    //
+
+    //javadoc: ANN_MLP::load(filepath)
+    public static ANN_MLP load(String filepath)
+    {
+        
+        ANN_MLP retVal = ANN_MLP.__fromPtr__(load_0(filepath));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  TermCriteria cv::ml::ANN_MLP::getTermCriteria()
+    //
+
+    //javadoc: ANN_MLP::getTermCriteria()
+    public  TermCriteria getTermCriteria()
+    {
+        
+        TermCriteria retVal = new TermCriteria(getTermCriteria_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::ANN_MLP::getAnnealCoolingRatio()
+    //
+
+    //javadoc: ANN_MLP::getAnnealCoolingRatio()
+    public  double getAnnealCoolingRatio()
+    {
+        
+        double retVal = getAnnealCoolingRatio_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::ANN_MLP::getAnnealFinalT()
+    //
+
+    //javadoc: ANN_MLP::getAnnealFinalT()
+    public  double getAnnealFinalT()
+    {
+        
+        double retVal = getAnnealFinalT_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::ANN_MLP::getAnnealInitialT()
+    //
+
+    //javadoc: ANN_MLP::getAnnealInitialT()
+    public  double getAnnealInitialT()
+    {
+        
+        double retVal = getAnnealInitialT_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::ANN_MLP::getBackpropMomentumScale()
+    //
+
+    //javadoc: ANN_MLP::getBackpropMomentumScale()
+    public  double getBackpropMomentumScale()
+    {
+        
+        double retVal = getBackpropMomentumScale_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::ANN_MLP::getBackpropWeightScale()
+    //
+
+    //javadoc: ANN_MLP::getBackpropWeightScale()
+    public  double getBackpropWeightScale()
+    {
+        
+        double retVal = getBackpropWeightScale_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::ANN_MLP::getRpropDW0()
+    //
+
+    //javadoc: ANN_MLP::getRpropDW0()
+    public  double getRpropDW0()
+    {
+        
+        double retVal = getRpropDW0_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::ANN_MLP::getRpropDWMax()
+    //
+
+    //javadoc: ANN_MLP::getRpropDWMax()
+    public  double getRpropDWMax()
+    {
+        
+        double retVal = getRpropDWMax_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::ANN_MLP::getRpropDWMin()
+    //
+
+    //javadoc: ANN_MLP::getRpropDWMin()
+    public  double getRpropDWMin()
+    {
+        
+        double retVal = getRpropDWMin_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::ANN_MLP::getRpropDWMinus()
+    //
+
+    //javadoc: ANN_MLP::getRpropDWMinus()
+    public  double getRpropDWMinus()
+    {
+        
+        double retVal = getRpropDWMinus_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::ANN_MLP::getRpropDWPlus()
+    //
+
+    //javadoc: ANN_MLP::getRpropDWPlus()
+    public  double getRpropDWPlus()
+    {
+        
+        double retVal = getRpropDWPlus_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::ANN_MLP::getAnnealItePerStep()
+    //
+
+    //javadoc: ANN_MLP::getAnnealItePerStep()
+    public  int getAnnealItePerStep()
+    {
+        
+        int retVal = getAnnealItePerStep_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::ANN_MLP::getTrainMethod()
+    //
+
+    //javadoc: ANN_MLP::getTrainMethod()
+    public  int getTrainMethod()
+    {
+        
+        int retVal = getTrainMethod_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::ml::ANN_MLP::setActivationFunction(int type, double param1 = 0, double param2 = 0)
+    //
+
+    //javadoc: ANN_MLP::setActivationFunction(type, param1, param2)
+    public  void setActivationFunction(int type, double param1, double param2)
+    {
+        
+        setActivationFunction_0(nativeObj, type, param1, param2);
+        
+        return;
+    }
+
+    //javadoc: ANN_MLP::setActivationFunction(type, param1)
+    public  void setActivationFunction(int type, double param1)
+    {
+        
+        setActivationFunction_1(nativeObj, type, param1);
+        
+        return;
+    }
+
+    //javadoc: ANN_MLP::setActivationFunction(type)
+    public  void setActivationFunction(int type)
+    {
+        
+        setActivationFunction_2(nativeObj, type);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::ANN_MLP::setAnnealCoolingRatio(double val)
+    //
+
+    //javadoc: ANN_MLP::setAnnealCoolingRatio(val)
+    public  void setAnnealCoolingRatio(double val)
+    {
+        
+        setAnnealCoolingRatio_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::ANN_MLP::setAnnealFinalT(double val)
+    //
+
+    //javadoc: ANN_MLP::setAnnealFinalT(val)
+    public  void setAnnealFinalT(double val)
+    {
+        
+        setAnnealFinalT_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::ANN_MLP::setAnnealInitialT(double val)
+    //
+
+    //javadoc: ANN_MLP::setAnnealInitialT(val)
+    public  void setAnnealInitialT(double val)
+    {
+        
+        setAnnealInitialT_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::ANN_MLP::setAnnealItePerStep(int val)
+    //
+
+    //javadoc: ANN_MLP::setAnnealItePerStep(val)
+    public  void setAnnealItePerStep(int val)
+    {
+        
+        setAnnealItePerStep_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::ANN_MLP::setBackpropMomentumScale(double val)
+    //
+
+    //javadoc: ANN_MLP::setBackpropMomentumScale(val)
+    public  void setBackpropMomentumScale(double val)
+    {
+        
+        setBackpropMomentumScale_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::ANN_MLP::setBackpropWeightScale(double val)
+    //
+
+    //javadoc: ANN_MLP::setBackpropWeightScale(val)
+    public  void setBackpropWeightScale(double val)
+    {
+        
+        setBackpropWeightScale_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::ANN_MLP::setLayerSizes(Mat _layer_sizes)
+    //
+
+    //javadoc: ANN_MLP::setLayerSizes(_layer_sizes)
+    public  void setLayerSizes(Mat _layer_sizes)
+    {
+        
+        setLayerSizes_0(nativeObj, _layer_sizes.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::ANN_MLP::setRpropDW0(double val)
+    //
+
+    //javadoc: ANN_MLP::setRpropDW0(val)
+    public  void setRpropDW0(double val)
+    {
+        
+        setRpropDW0_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::ANN_MLP::setRpropDWMax(double val)
+    //
+
+    //javadoc: ANN_MLP::setRpropDWMax(val)
+    public  void setRpropDWMax(double val)
+    {
+        
+        setRpropDWMax_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::ANN_MLP::setRpropDWMin(double val)
+    //
+
+    //javadoc: ANN_MLP::setRpropDWMin(val)
+    public  void setRpropDWMin(double val)
+    {
+        
+        setRpropDWMin_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::ANN_MLP::setRpropDWMinus(double val)
+    //
+
+    //javadoc: ANN_MLP::setRpropDWMinus(val)
+    public  void setRpropDWMinus(double val)
+    {
+        
+        setRpropDWMinus_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::ANN_MLP::setRpropDWPlus(double val)
+    //
+
+    //javadoc: ANN_MLP::setRpropDWPlus(val)
+    public  void setRpropDWPlus(double val)
+    {
+        
+        setRpropDWPlus_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::ANN_MLP::setTermCriteria(TermCriteria val)
+    //
+
+    //javadoc: ANN_MLP::setTermCriteria(val)
+    public  void setTermCriteria(TermCriteria val)
+    {
+        
+        setTermCriteria_0(nativeObj, val.type, val.maxCount, val.epsilon);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::ANN_MLP::setTrainMethod(int method, double param1 = 0, double param2 = 0)
+    //
+
+    //javadoc: ANN_MLP::setTrainMethod(method, param1, param2)
+    public  void setTrainMethod(int method, double param1, double param2)
+    {
+        
+        setTrainMethod_0(nativeObj, method, param1, param2);
+        
+        return;
+    }
+
+    //javadoc: ANN_MLP::setTrainMethod(method, param1)
+    public  void setTrainMethod(int method, double param1)
+    {
+        
+        setTrainMethod_1(nativeObj, method, param1);
+        
+        return;
+    }
+
+    //javadoc: ANN_MLP::setTrainMethod(method)
+    public  void setTrainMethod(int method)
+    {
+        
+        setTrainMethod_2(nativeObj, method);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  Mat cv::ml::ANN_MLP::getLayerSizes()
+    private static native long getLayerSizes_0(long nativeObj);
+
+    // C++:  Mat cv::ml::ANN_MLP::getWeights(int layerIdx)
+    private static native long getWeights_0(long nativeObj, int layerIdx);
+
+    // C++: static Ptr_ANN_MLP cv::ml::ANN_MLP::create()
+    private static native long create_0();
+
+    // C++: static Ptr_ANN_MLP cv::ml::ANN_MLP::load(String filepath)
+    private static native long load_0(String filepath);
+
+    // C++:  TermCriteria cv::ml::ANN_MLP::getTermCriteria()
+    private static native double[] getTermCriteria_0(long nativeObj);
+
+    // C++:  double cv::ml::ANN_MLP::getAnnealCoolingRatio()
+    private static native double getAnnealCoolingRatio_0(long nativeObj);
+
+    // C++:  double cv::ml::ANN_MLP::getAnnealFinalT()
+    private static native double getAnnealFinalT_0(long nativeObj);
+
+    // C++:  double cv::ml::ANN_MLP::getAnnealInitialT()
+    private static native double getAnnealInitialT_0(long nativeObj);
+
+    // C++:  double cv::ml::ANN_MLP::getBackpropMomentumScale()
+    private static native double getBackpropMomentumScale_0(long nativeObj);
+
+    // C++:  double cv::ml::ANN_MLP::getBackpropWeightScale()
+    private static native double getBackpropWeightScale_0(long nativeObj);
+
+    // C++:  double cv::ml::ANN_MLP::getRpropDW0()
+    private static native double getRpropDW0_0(long nativeObj);
+
+    // C++:  double cv::ml::ANN_MLP::getRpropDWMax()
+    private static native double getRpropDWMax_0(long nativeObj);
+
+    // C++:  double cv::ml::ANN_MLP::getRpropDWMin()
+    private static native double getRpropDWMin_0(long nativeObj);
+
+    // C++:  double cv::ml::ANN_MLP::getRpropDWMinus()
+    private static native double getRpropDWMinus_0(long nativeObj);
+
+    // C++:  double cv::ml::ANN_MLP::getRpropDWPlus()
+    private static native double getRpropDWPlus_0(long nativeObj);
+
+    // C++:  int cv::ml::ANN_MLP::getAnnealItePerStep()
+    private static native int getAnnealItePerStep_0(long nativeObj);
+
+    // C++:  int cv::ml::ANN_MLP::getTrainMethod()
+    private static native int getTrainMethod_0(long nativeObj);
+
+    // C++:  void cv::ml::ANN_MLP::setActivationFunction(int type, double param1 = 0, double param2 = 0)
+    private static native void setActivationFunction_0(long nativeObj, int type, double param1, double param2);
+    private static native void setActivationFunction_1(long nativeObj, int type, double param1);
+    private static native void setActivationFunction_2(long nativeObj, int type);
+
+    // C++:  void cv::ml::ANN_MLP::setAnnealCoolingRatio(double val)
+    private static native void setAnnealCoolingRatio_0(long nativeObj, double val);
+
+    // C++:  void cv::ml::ANN_MLP::setAnnealFinalT(double val)
+    private static native void setAnnealFinalT_0(long nativeObj, double val);
+
+    // C++:  void cv::ml::ANN_MLP::setAnnealInitialT(double val)
+    private static native void setAnnealInitialT_0(long nativeObj, double val);
+
+    // C++:  void cv::ml::ANN_MLP::setAnnealItePerStep(int val)
+    private static native void setAnnealItePerStep_0(long nativeObj, int val);
+
+    // C++:  void cv::ml::ANN_MLP::setBackpropMomentumScale(double val)
+    private static native void setBackpropMomentumScale_0(long nativeObj, double val);
+
+    // C++:  void cv::ml::ANN_MLP::setBackpropWeightScale(double val)
+    private static native void setBackpropWeightScale_0(long nativeObj, double val);
+
+    // C++:  void cv::ml::ANN_MLP::setLayerSizes(Mat _layer_sizes)
+    private static native void setLayerSizes_0(long nativeObj, long _layer_sizes_nativeObj);
+
+    // C++:  void cv::ml::ANN_MLP::setRpropDW0(double val)
+    private static native void setRpropDW0_0(long nativeObj, double val);
+
+    // C++:  void cv::ml::ANN_MLP::setRpropDWMax(double val)
+    private static native void setRpropDWMax_0(long nativeObj, double val);
+
+    // C++:  void cv::ml::ANN_MLP::setRpropDWMin(double val)
+    private static native void setRpropDWMin_0(long nativeObj, double val);
+
+    // C++:  void cv::ml::ANN_MLP::setRpropDWMinus(double val)
+    private static native void setRpropDWMinus_0(long nativeObj, double val);
+
+    // C++:  void cv::ml::ANN_MLP::setRpropDWPlus(double val)
+    private static native void setRpropDWPlus_0(long nativeObj, double val);
+
+    // C++:  void cv::ml::ANN_MLP::setTermCriteria(TermCriteria val)
+    private static native void setTermCriteria_0(long nativeObj, int val_type, int val_maxCount, double val_epsilon);
+
+    // C++:  void cv::ml::ANN_MLP::setTrainMethod(int method, double param1 = 0, double param2 = 0)
+    private static native void setTrainMethod_0(long nativeObj, int method, double param1, double param2);
+    private static native void setTrainMethod_1(long nativeObj, int method, double param1);
+    private static native void setTrainMethod_2(long nativeObj, int method);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/ml/Boost.java b/opencv41/src/main/java/org/opencv/ml/Boost.java
new file mode 100644 (file)
index 0000000..441ef05
--- /dev/null
@@ -0,0 +1,184 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import java.lang.String;
+import org.opencv.ml.Boost;
+import org.opencv.ml.DTrees;
+
+// C++: class Boost
+//javadoc: Boost
+
+public class Boost extends DTrees {
+
+    protected Boost(long addr) { super(addr); }
+
+    // internal usage only
+    public static Boost __fromPtr__(long addr) { return new Boost(addr); }
+
+    // C++: enum Types
+    public static final int
+            DISCRETE = 0,
+            REAL = 1,
+            LOGIT = 2,
+            GENTLE = 3;
+
+
+    //
+    // C++: static Ptr_Boost cv::ml::Boost::create()
+    //
+
+    //javadoc: Boost::create()
+    public static Boost create()
+    {
+        
+        Boost retVal = Boost.__fromPtr__(create_0());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_Boost cv::ml::Boost::load(String filepath, String nodeName = String())
+    //
+
+    //javadoc: Boost::load(filepath, nodeName)
+    public static Boost load(String filepath, String nodeName)
+    {
+        
+        Boost retVal = Boost.__fromPtr__(load_0(filepath, nodeName));
+        
+        return retVal;
+    }
+
+    //javadoc: Boost::load(filepath)
+    public static Boost load(String filepath)
+    {
+        
+        Boost retVal = Boost.__fromPtr__(load_1(filepath));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::Boost::getWeightTrimRate()
+    //
+
+    //javadoc: Boost::getWeightTrimRate()
+    public  double getWeightTrimRate()
+    {
+        
+        double retVal = getWeightTrimRate_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::Boost::getBoostType()
+    //
+
+    //javadoc: Boost::getBoostType()
+    public  int getBoostType()
+    {
+        
+        int retVal = getBoostType_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::Boost::getWeakCount()
+    //
+
+    //javadoc: Boost::getWeakCount()
+    public  int getWeakCount()
+    {
+        
+        int retVal = getWeakCount_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::ml::Boost::setBoostType(int val)
+    //
+
+    //javadoc: Boost::setBoostType(val)
+    public  void setBoostType(int val)
+    {
+        
+        setBoostType_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::Boost::setWeakCount(int val)
+    //
+
+    //javadoc: Boost::setWeakCount(val)
+    public  void setWeakCount(int val)
+    {
+        
+        setWeakCount_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::Boost::setWeightTrimRate(double val)
+    //
+
+    //javadoc: Boost::setWeightTrimRate(val)
+    public  void setWeightTrimRate(double val)
+    {
+        
+        setWeightTrimRate_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++: static Ptr_Boost cv::ml::Boost::create()
+    private static native long create_0();
+
+    // C++: static Ptr_Boost cv::ml::Boost::load(String filepath, String nodeName = String())
+    private static native long load_0(String filepath, String nodeName);
+    private static native long load_1(String filepath);
+
+    // C++:  double cv::ml::Boost::getWeightTrimRate()
+    private static native double getWeightTrimRate_0(long nativeObj);
+
+    // C++:  int cv::ml::Boost::getBoostType()
+    private static native int getBoostType_0(long nativeObj);
+
+    // C++:  int cv::ml::Boost::getWeakCount()
+    private static native int getWeakCount_0(long nativeObj);
+
+    // C++:  void cv::ml::Boost::setBoostType(int val)
+    private static native void setBoostType_0(long nativeObj, int val);
+
+    // C++:  void cv::ml::Boost::setWeakCount(int val)
+    private static native void setWeakCount_0(long nativeObj, int val);
+
+    // C++:  void cv::ml::Boost::setWeightTrimRate(double val)
+    private static native void setWeightTrimRate_0(long nativeObj, double val);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/ml/DTrees.java b/opencv41/src/main/java/org/opencv/ml/DTrees.java
new file mode 100644 (file)
index 0000000..ed95a38
--- /dev/null
@@ -0,0 +1,389 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import java.lang.String;
+import org.opencv.core.Mat;
+import org.opencv.ml.DTrees;
+import org.opencv.ml.StatModel;
+
+// C++: class DTrees
+//javadoc: DTrees
+
+public class DTrees extends StatModel {
+
+    protected DTrees(long addr) { super(addr); }
+
+    // internal usage only
+    public static DTrees __fromPtr__(long addr) { return new DTrees(addr); }
+
+    // C++: enum Flags
+    public static final int
+            PREDICT_AUTO = 0,
+            PREDICT_SUM = (1<<8),
+            PREDICT_MAX_VOTE = (2<<8),
+            PREDICT_MASK = (3<<8);
+
+
+    //
+    // C++:  Mat cv::ml::DTrees::getPriors()
+    //
+
+    //javadoc: DTrees::getPriors()
+    public  Mat getPriors()
+    {
+        
+        Mat retVal = new Mat(getPriors_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_DTrees cv::ml::DTrees::create()
+    //
+
+    //javadoc: DTrees::create()
+    public static DTrees create()
+    {
+        
+        DTrees retVal = DTrees.__fromPtr__(create_0());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_DTrees cv::ml::DTrees::load(String filepath, String nodeName = String())
+    //
+
+    //javadoc: DTrees::load(filepath, nodeName)
+    public static DTrees load(String filepath, String nodeName)
+    {
+        
+        DTrees retVal = DTrees.__fromPtr__(load_0(filepath, nodeName));
+        
+        return retVal;
+    }
+
+    //javadoc: DTrees::load(filepath)
+    public static DTrees load(String filepath)
+    {
+        
+        DTrees retVal = DTrees.__fromPtr__(load_1(filepath));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::ml::DTrees::getTruncatePrunedTree()
+    //
+
+    //javadoc: DTrees::getTruncatePrunedTree()
+    public  boolean getTruncatePrunedTree()
+    {
+        
+        boolean retVal = getTruncatePrunedTree_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::ml::DTrees::getUse1SERule()
+    //
+
+    //javadoc: DTrees::getUse1SERule()
+    public  boolean getUse1SERule()
+    {
+        
+        boolean retVal = getUse1SERule_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::ml::DTrees::getUseSurrogates()
+    //
+
+    //javadoc: DTrees::getUseSurrogates()
+    public  boolean getUseSurrogates()
+    {
+        
+        boolean retVal = getUseSurrogates_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::ml::DTrees::getRegressionAccuracy()
+    //
+
+    //javadoc: DTrees::getRegressionAccuracy()
+    public  float getRegressionAccuracy()
+    {
+        
+        float retVal = getRegressionAccuracy_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::DTrees::getCVFolds()
+    //
+
+    //javadoc: DTrees::getCVFolds()
+    public  int getCVFolds()
+    {
+        
+        int retVal = getCVFolds_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::DTrees::getMaxCategories()
+    //
+
+    //javadoc: DTrees::getMaxCategories()
+    public  int getMaxCategories()
+    {
+        
+        int retVal = getMaxCategories_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::DTrees::getMaxDepth()
+    //
+
+    //javadoc: DTrees::getMaxDepth()
+    public  int getMaxDepth()
+    {
+        
+        int retVal = getMaxDepth_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::DTrees::getMinSampleCount()
+    //
+
+    //javadoc: DTrees::getMinSampleCount()
+    public  int getMinSampleCount()
+    {
+        
+        int retVal = getMinSampleCount_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::ml::DTrees::setCVFolds(int val)
+    //
+
+    //javadoc: DTrees::setCVFolds(val)
+    public  void setCVFolds(int val)
+    {
+        
+        setCVFolds_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::DTrees::setMaxCategories(int val)
+    //
+
+    //javadoc: DTrees::setMaxCategories(val)
+    public  void setMaxCategories(int val)
+    {
+        
+        setMaxCategories_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::DTrees::setMaxDepth(int val)
+    //
+
+    //javadoc: DTrees::setMaxDepth(val)
+    public  void setMaxDepth(int val)
+    {
+        
+        setMaxDepth_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::DTrees::setMinSampleCount(int val)
+    //
+
+    //javadoc: DTrees::setMinSampleCount(val)
+    public  void setMinSampleCount(int val)
+    {
+        
+        setMinSampleCount_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::DTrees::setPriors(Mat val)
+    //
+
+    //javadoc: DTrees::setPriors(val)
+    public  void setPriors(Mat val)
+    {
+        
+        setPriors_0(nativeObj, val.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::DTrees::setRegressionAccuracy(float val)
+    //
+
+    //javadoc: DTrees::setRegressionAccuracy(val)
+    public  void setRegressionAccuracy(float val)
+    {
+        
+        setRegressionAccuracy_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::DTrees::setTruncatePrunedTree(bool val)
+    //
+
+    //javadoc: DTrees::setTruncatePrunedTree(val)
+    public  void setTruncatePrunedTree(boolean val)
+    {
+        
+        setTruncatePrunedTree_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::DTrees::setUse1SERule(bool val)
+    //
+
+    //javadoc: DTrees::setUse1SERule(val)
+    public  void setUse1SERule(boolean val)
+    {
+        
+        setUse1SERule_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::DTrees::setUseSurrogates(bool val)
+    //
+
+    //javadoc: DTrees::setUseSurrogates(val)
+    public  void setUseSurrogates(boolean val)
+    {
+        
+        setUseSurrogates_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  Mat cv::ml::DTrees::getPriors()
+    private static native long getPriors_0(long nativeObj);
+
+    // C++: static Ptr_DTrees cv::ml::DTrees::create()
+    private static native long create_0();
+
+    // C++: static Ptr_DTrees cv::ml::DTrees::load(String filepath, String nodeName = String())
+    private static native long load_0(String filepath, String nodeName);
+    private static native long load_1(String filepath);
+
+    // C++:  bool cv::ml::DTrees::getTruncatePrunedTree()
+    private static native boolean getTruncatePrunedTree_0(long nativeObj);
+
+    // C++:  bool cv::ml::DTrees::getUse1SERule()
+    private static native boolean getUse1SERule_0(long nativeObj);
+
+    // C++:  bool cv::ml::DTrees::getUseSurrogates()
+    private static native boolean getUseSurrogates_0(long nativeObj);
+
+    // C++:  float cv::ml::DTrees::getRegressionAccuracy()
+    private static native float getRegressionAccuracy_0(long nativeObj);
+
+    // C++:  int cv::ml::DTrees::getCVFolds()
+    private static native int getCVFolds_0(long nativeObj);
+
+    // C++:  int cv::ml::DTrees::getMaxCategories()
+    private static native int getMaxCategories_0(long nativeObj);
+
+    // C++:  int cv::ml::DTrees::getMaxDepth()
+    private static native int getMaxDepth_0(long nativeObj);
+
+    // C++:  int cv::ml::DTrees::getMinSampleCount()
+    private static native int getMinSampleCount_0(long nativeObj);
+
+    // C++:  void cv::ml::DTrees::setCVFolds(int val)
+    private static native void setCVFolds_0(long nativeObj, int val);
+
+    // C++:  void cv::ml::DTrees::setMaxCategories(int val)
+    private static native void setMaxCategories_0(long nativeObj, int val);
+
+    // C++:  void cv::ml::DTrees::setMaxDepth(int val)
+    private static native void setMaxDepth_0(long nativeObj, int val);
+
+    // C++:  void cv::ml::DTrees::setMinSampleCount(int val)
+    private static native void setMinSampleCount_0(long nativeObj, int val);
+
+    // C++:  void cv::ml::DTrees::setPriors(Mat val)
+    private static native void setPriors_0(long nativeObj, long val_nativeObj);
+
+    // C++:  void cv::ml::DTrees::setRegressionAccuracy(float val)
+    private static native void setRegressionAccuracy_0(long nativeObj, float val);
+
+    // C++:  void cv::ml::DTrees::setTruncatePrunedTree(bool val)
+    private static native void setTruncatePrunedTree_0(long nativeObj, boolean val);
+
+    // C++:  void cv::ml::DTrees::setUse1SERule(bool val)
+    private static native void setUse1SERule_0(long nativeObj, boolean val);
+
+    // C++:  void cv::ml::DTrees::setUseSurrogates(bool val)
+    private static native void setUseSurrogates_0(long nativeObj, boolean val);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/ml/EM.java b/opencv41/src/main/java/org/opencv/ml/EM.java
new file mode 100644 (file)
index 0000000..80092da
--- /dev/null
@@ -0,0 +1,465 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import java.lang.String;
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.TermCriteria;
+import org.opencv.ml.EM;
+import org.opencv.ml.StatModel;
+import org.opencv.utils.Converters;
+
+// C++: class EM
+//javadoc: EM
+
+public class EM extends StatModel {
+
+    protected EM(long addr) { super(addr); }
+
+    // internal usage only
+    public static EM __fromPtr__(long addr) { return new EM(addr); }
+
+    // C++: enum <unnamed>
+    public static final int
+            DEFAULT_NCLUSTERS = 5,
+            DEFAULT_MAX_ITERS = 100,
+            START_E_STEP = 1,
+            START_M_STEP = 2,
+            START_AUTO_STEP = 0;
+
+
+    // C++: enum Types
+    public static final int
+            COV_MAT_SPHERICAL = 0,
+            COV_MAT_DIAGONAL = 1,
+            COV_MAT_GENERIC = 2,
+            COV_MAT_DEFAULT = COV_MAT_DIAGONAL;
+
+
+    //
+    // C++:  Mat cv::ml::EM::getMeans()
+    //
+
+    //javadoc: EM::getMeans()
+    public  Mat getMeans()
+    {
+        
+        Mat retVal = new Mat(getMeans_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::EM::getWeights()
+    //
+
+    //javadoc: EM::getWeights()
+    public  Mat getWeights()
+    {
+        
+        Mat retVal = new Mat(getWeights_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_EM cv::ml::EM::create()
+    //
+
+    //javadoc: EM::create()
+    public static EM create()
+    {
+        
+        EM retVal = EM.__fromPtr__(create_0());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_EM cv::ml::EM::load(String filepath, String nodeName = String())
+    //
+
+    //javadoc: EM::load(filepath, nodeName)
+    public static EM load(String filepath, String nodeName)
+    {
+        
+        EM retVal = EM.__fromPtr__(load_0(filepath, nodeName));
+        
+        return retVal;
+    }
+
+    //javadoc: EM::load(filepath)
+    public static EM load(String filepath)
+    {
+        
+        EM retVal = EM.__fromPtr__(load_1(filepath));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  TermCriteria cv::ml::EM::getTermCriteria()
+    //
+
+    //javadoc: EM::getTermCriteria()
+    public  TermCriteria getTermCriteria()
+    {
+        
+        TermCriteria retVal = new TermCriteria(getTermCriteria_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Vec2d cv::ml::EM::predict2(Mat sample, Mat& probs)
+    //
+
+    //javadoc: EM::predict2(sample, probs)
+    public  double[] predict2(Mat sample, Mat probs)
+    {
+        
+        double[] retVal = predict2_0(nativeObj, sample.nativeObj, probs.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::ml::EM::trainE(Mat samples, Mat means0, Mat covs0 = Mat(), Mat weights0 = Mat(), Mat& logLikelihoods = Mat(), Mat& labels = Mat(), Mat& probs = Mat())
+    //
+
+    //javadoc: EM::trainE(samples, means0, covs0, weights0, logLikelihoods, labels, probs)
+    public  boolean trainE(Mat samples, Mat means0, Mat covs0, Mat weights0, Mat logLikelihoods, Mat labels, Mat probs)
+    {
+        
+        boolean retVal = trainE_0(nativeObj, samples.nativeObj, means0.nativeObj, covs0.nativeObj, weights0.nativeObj, logLikelihoods.nativeObj, labels.nativeObj, probs.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: EM::trainE(samples, means0, covs0, weights0, logLikelihoods, labels)
+    public  boolean trainE(Mat samples, Mat means0, Mat covs0, Mat weights0, Mat logLikelihoods, Mat labels)
+    {
+        
+        boolean retVal = trainE_1(nativeObj, samples.nativeObj, means0.nativeObj, covs0.nativeObj, weights0.nativeObj, logLikelihoods.nativeObj, labels.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: EM::trainE(samples, means0, covs0, weights0, logLikelihoods)
+    public  boolean trainE(Mat samples, Mat means0, Mat covs0, Mat weights0, Mat logLikelihoods)
+    {
+        
+        boolean retVal = trainE_2(nativeObj, samples.nativeObj, means0.nativeObj, covs0.nativeObj, weights0.nativeObj, logLikelihoods.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: EM::trainE(samples, means0, covs0, weights0)
+    public  boolean trainE(Mat samples, Mat means0, Mat covs0, Mat weights0)
+    {
+        
+        boolean retVal = trainE_3(nativeObj, samples.nativeObj, means0.nativeObj, covs0.nativeObj, weights0.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: EM::trainE(samples, means0, covs0)
+    public  boolean trainE(Mat samples, Mat means0, Mat covs0)
+    {
+        
+        boolean retVal = trainE_4(nativeObj, samples.nativeObj, means0.nativeObj, covs0.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: EM::trainE(samples, means0)
+    public  boolean trainE(Mat samples, Mat means0)
+    {
+        
+        boolean retVal = trainE_5(nativeObj, samples.nativeObj, means0.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::ml::EM::trainEM(Mat samples, Mat& logLikelihoods = Mat(), Mat& labels = Mat(), Mat& probs = Mat())
+    //
+
+    //javadoc: EM::trainEM(samples, logLikelihoods, labels, probs)
+    public  boolean trainEM(Mat samples, Mat logLikelihoods, Mat labels, Mat probs)
+    {
+        
+        boolean retVal = trainEM_0(nativeObj, samples.nativeObj, logLikelihoods.nativeObj, labels.nativeObj, probs.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: EM::trainEM(samples, logLikelihoods, labels)
+    public  boolean trainEM(Mat samples, Mat logLikelihoods, Mat labels)
+    {
+        
+        boolean retVal = trainEM_1(nativeObj, samples.nativeObj, logLikelihoods.nativeObj, labels.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: EM::trainEM(samples, logLikelihoods)
+    public  boolean trainEM(Mat samples, Mat logLikelihoods)
+    {
+        
+        boolean retVal = trainEM_2(nativeObj, samples.nativeObj, logLikelihoods.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: EM::trainEM(samples)
+    public  boolean trainEM(Mat samples)
+    {
+        
+        boolean retVal = trainEM_3(nativeObj, samples.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::ml::EM::trainM(Mat samples, Mat probs0, Mat& logLikelihoods = Mat(), Mat& labels = Mat(), Mat& probs = Mat())
+    //
+
+    //javadoc: EM::trainM(samples, probs0, logLikelihoods, labels, probs)
+    public  boolean trainM(Mat samples, Mat probs0, Mat logLikelihoods, Mat labels, Mat probs)
+    {
+        
+        boolean retVal = trainM_0(nativeObj, samples.nativeObj, probs0.nativeObj, logLikelihoods.nativeObj, labels.nativeObj, probs.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: EM::trainM(samples, probs0, logLikelihoods, labels)
+    public  boolean trainM(Mat samples, Mat probs0, Mat logLikelihoods, Mat labels)
+    {
+        
+        boolean retVal = trainM_1(nativeObj, samples.nativeObj, probs0.nativeObj, logLikelihoods.nativeObj, labels.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: EM::trainM(samples, probs0, logLikelihoods)
+    public  boolean trainM(Mat samples, Mat probs0, Mat logLikelihoods)
+    {
+        
+        boolean retVal = trainM_2(nativeObj, samples.nativeObj, probs0.nativeObj, logLikelihoods.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: EM::trainM(samples, probs0)
+    public  boolean trainM(Mat samples, Mat probs0)
+    {
+        
+        boolean retVal = trainM_3(nativeObj, samples.nativeObj, probs0.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::ml::EM::predict(Mat samples, Mat& results = Mat(), int flags = 0)
+    //
+
+    //javadoc: EM::predict(samples, results, flags)
+    public  float predict(Mat samples, Mat results, int flags)
+    {
+        
+        float retVal = predict_0(nativeObj, samples.nativeObj, results.nativeObj, flags);
+        
+        return retVal;
+    }
+
+    //javadoc: EM::predict(samples, results)
+    public  float predict(Mat samples, Mat results)
+    {
+        
+        float retVal = predict_1(nativeObj, samples.nativeObj, results.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: EM::predict(samples)
+    public  float predict(Mat samples)
+    {
+        
+        float retVal = predict_2(nativeObj, samples.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::EM::getClustersNumber()
+    //
+
+    //javadoc: EM::getClustersNumber()
+    public  int getClustersNumber()
+    {
+        
+        int retVal = getClustersNumber_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::EM::getCovarianceMatrixType()
+    //
+
+    //javadoc: EM::getCovarianceMatrixType()
+    public  int getCovarianceMatrixType()
+    {
+        
+        int retVal = getCovarianceMatrixType_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::ml::EM::getCovs(vector_Mat& covs)
+    //
+
+    //javadoc: EM::getCovs(covs)
+    public  void getCovs(List<Mat> covs)
+    {
+        Mat covs_mat = new Mat();
+        getCovs_0(nativeObj, covs_mat.nativeObj);
+        Converters.Mat_to_vector_Mat(covs_mat, covs);
+        covs_mat.release();
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::EM::setClustersNumber(int val)
+    //
+
+    //javadoc: EM::setClustersNumber(val)
+    public  void setClustersNumber(int val)
+    {
+        
+        setClustersNumber_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::EM::setCovarianceMatrixType(int val)
+    //
+
+    //javadoc: EM::setCovarianceMatrixType(val)
+    public  void setCovarianceMatrixType(int val)
+    {
+        
+        setCovarianceMatrixType_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::EM::setTermCriteria(TermCriteria val)
+    //
+
+    //javadoc: EM::setTermCriteria(val)
+    public  void setTermCriteria(TermCriteria val)
+    {
+        
+        setTermCriteria_0(nativeObj, val.type, val.maxCount, val.epsilon);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  Mat cv::ml::EM::getMeans()
+    private static native long getMeans_0(long nativeObj);
+
+    // C++:  Mat cv::ml::EM::getWeights()
+    private static native long getWeights_0(long nativeObj);
+
+    // C++: static Ptr_EM cv::ml::EM::create()
+    private static native long create_0();
+
+    // C++: static Ptr_EM cv::ml::EM::load(String filepath, String nodeName = String())
+    private static native long load_0(String filepath, String nodeName);
+    private static native long load_1(String filepath);
+
+    // C++:  TermCriteria cv::ml::EM::getTermCriteria()
+    private static native double[] getTermCriteria_0(long nativeObj);
+
+    // C++:  Vec2d cv::ml::EM::predict2(Mat sample, Mat& probs)
+    private static native double[] predict2_0(long nativeObj, long sample_nativeObj, long probs_nativeObj);
+
+    // C++:  bool cv::ml::EM::trainE(Mat samples, Mat means0, Mat covs0 = Mat(), Mat weights0 = Mat(), Mat& logLikelihoods = Mat(), Mat& labels = Mat(), Mat& probs = Mat())
+    private static native boolean trainE_0(long nativeObj, long samples_nativeObj, long means0_nativeObj, long covs0_nativeObj, long weights0_nativeObj, long logLikelihoods_nativeObj, long labels_nativeObj, long probs_nativeObj);
+    private static native boolean trainE_1(long nativeObj, long samples_nativeObj, long means0_nativeObj, long covs0_nativeObj, long weights0_nativeObj, long logLikelihoods_nativeObj, long labels_nativeObj);
+    private static native boolean trainE_2(long nativeObj, long samples_nativeObj, long means0_nativeObj, long covs0_nativeObj, long weights0_nativeObj, long logLikelihoods_nativeObj);
+    private static native boolean trainE_3(long nativeObj, long samples_nativeObj, long means0_nativeObj, long covs0_nativeObj, long weights0_nativeObj);
+    private static native boolean trainE_4(long nativeObj, long samples_nativeObj, long means0_nativeObj, long covs0_nativeObj);
+    private static native boolean trainE_5(long nativeObj, long samples_nativeObj, long means0_nativeObj);
+
+    // C++:  bool cv::ml::EM::trainEM(Mat samples, Mat& logLikelihoods = Mat(), Mat& labels = Mat(), Mat& probs = Mat())
+    private static native boolean trainEM_0(long nativeObj, long samples_nativeObj, long logLikelihoods_nativeObj, long labels_nativeObj, long probs_nativeObj);
+    private static native boolean trainEM_1(long nativeObj, long samples_nativeObj, long logLikelihoods_nativeObj, long labels_nativeObj);
+    private static native boolean trainEM_2(long nativeObj, long samples_nativeObj, long logLikelihoods_nativeObj);
+    private static native boolean trainEM_3(long nativeObj, long samples_nativeObj);
+
+    // C++:  bool cv::ml::EM::trainM(Mat samples, Mat probs0, Mat& logLikelihoods = Mat(), Mat& labels = Mat(), Mat& probs = Mat())
+    private static native boolean trainM_0(long nativeObj, long samples_nativeObj, long probs0_nativeObj, long logLikelihoods_nativeObj, long labels_nativeObj, long probs_nativeObj);
+    private static native boolean trainM_1(long nativeObj, long samples_nativeObj, long probs0_nativeObj, long logLikelihoods_nativeObj, long labels_nativeObj);
+    private static native boolean trainM_2(long nativeObj, long samples_nativeObj, long probs0_nativeObj, long logLikelihoods_nativeObj);
+    private static native boolean trainM_3(long nativeObj, long samples_nativeObj, long probs0_nativeObj);
+
+    // C++:  float cv::ml::EM::predict(Mat samples, Mat& results = Mat(), int flags = 0)
+    private static native float predict_0(long nativeObj, long samples_nativeObj, long results_nativeObj, int flags);
+    private static native float predict_1(long nativeObj, long samples_nativeObj, long results_nativeObj);
+    private static native float predict_2(long nativeObj, long samples_nativeObj);
+
+    // C++:  int cv::ml::EM::getClustersNumber()
+    private static native int getClustersNumber_0(long nativeObj);
+
+    // C++:  int cv::ml::EM::getCovarianceMatrixType()
+    private static native int getCovarianceMatrixType_0(long nativeObj);
+
+    // C++:  void cv::ml::EM::getCovs(vector_Mat& covs)
+    private static native void getCovs_0(long nativeObj, long covs_mat_nativeObj);
+
+    // C++:  void cv::ml::EM::setClustersNumber(int val)
+    private static native void setClustersNumber_0(long nativeObj, int val);
+
+    // C++:  void cv::ml::EM::setCovarianceMatrixType(int val)
+    private static native void setCovarianceMatrixType_0(long nativeObj, int val);
+
+    // C++:  void cv::ml::EM::setTermCriteria(TermCriteria val)
+    private static native void setTermCriteria_0(long nativeObj, int val_type, int val_maxCount, double val_epsilon);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/ml/KNearest.java b/opencv41/src/main/java/org/opencv/ml/KNearest.java
new file mode 100644 (file)
index 0000000..18da203
--- /dev/null
@@ -0,0 +1,226 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import org.opencv.core.Mat;
+import org.opencv.ml.KNearest;
+import org.opencv.ml.StatModel;
+
+// C++: class KNearest
+//javadoc: KNearest
+
+public class KNearest extends StatModel {
+
+    protected KNearest(long addr) { super(addr); }
+
+    // internal usage only
+    public static KNearest __fromPtr__(long addr) { return new KNearest(addr); }
+
+    // C++: enum Types
+    public static final int
+            BRUTE_FORCE = 1,
+            KDTREE = 2;
+
+
+    //
+    // C++: static Ptr_KNearest cv::ml::KNearest::create()
+    //
+
+    //javadoc: KNearest::create()
+    public static KNearest create()
+    {
+        
+        KNearest retVal = KNearest.__fromPtr__(create_0());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::ml::KNearest::getIsClassifier()
+    //
+
+    //javadoc: KNearest::getIsClassifier()
+    public  boolean getIsClassifier()
+    {
+        
+        boolean retVal = getIsClassifier_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::ml::KNearest::findNearest(Mat samples, int k, Mat& results, Mat& neighborResponses = Mat(), Mat& dist = Mat())
+    //
+
+    //javadoc: KNearest::findNearest(samples, k, results, neighborResponses, dist)
+    public  float findNearest(Mat samples, int k, Mat results, Mat neighborResponses, Mat dist)
+    {
+        
+        float retVal = findNearest_0(nativeObj, samples.nativeObj, k, results.nativeObj, neighborResponses.nativeObj, dist.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: KNearest::findNearest(samples, k, results, neighborResponses)
+    public  float findNearest(Mat samples, int k, Mat results, Mat neighborResponses)
+    {
+        
+        float retVal = findNearest_1(nativeObj, samples.nativeObj, k, results.nativeObj, neighborResponses.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: KNearest::findNearest(samples, k, results)
+    public  float findNearest(Mat samples, int k, Mat results)
+    {
+        
+        float retVal = findNearest_2(nativeObj, samples.nativeObj, k, results.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::KNearest::getAlgorithmType()
+    //
+
+    //javadoc: KNearest::getAlgorithmType()
+    public  int getAlgorithmType()
+    {
+        
+        int retVal = getAlgorithmType_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::KNearest::getDefaultK()
+    //
+
+    //javadoc: KNearest::getDefaultK()
+    public  int getDefaultK()
+    {
+        
+        int retVal = getDefaultK_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::KNearest::getEmax()
+    //
+
+    //javadoc: KNearest::getEmax()
+    public  int getEmax()
+    {
+        
+        int retVal = getEmax_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::ml::KNearest::setAlgorithmType(int val)
+    //
+
+    //javadoc: KNearest::setAlgorithmType(val)
+    public  void setAlgorithmType(int val)
+    {
+        
+        setAlgorithmType_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::KNearest::setDefaultK(int val)
+    //
+
+    //javadoc: KNearest::setDefaultK(val)
+    public  void setDefaultK(int val)
+    {
+        
+        setDefaultK_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::KNearest::setEmax(int val)
+    //
+
+    //javadoc: KNearest::setEmax(val)
+    public  void setEmax(int val)
+    {
+        
+        setEmax_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::KNearest::setIsClassifier(bool val)
+    //
+
+    //javadoc: KNearest::setIsClassifier(val)
+    public  void setIsClassifier(boolean val)
+    {
+        
+        setIsClassifier_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++: static Ptr_KNearest cv::ml::KNearest::create()
+    private static native long create_0();
+
+    // C++:  bool cv::ml::KNearest::getIsClassifier()
+    private static native boolean getIsClassifier_0(long nativeObj);
+
+    // C++:  float cv::ml::KNearest::findNearest(Mat samples, int k, Mat& results, Mat& neighborResponses = Mat(), Mat& dist = Mat())
+    private static native float findNearest_0(long nativeObj, long samples_nativeObj, int k, long results_nativeObj, long neighborResponses_nativeObj, long dist_nativeObj);
+    private static native float findNearest_1(long nativeObj, long samples_nativeObj, int k, long results_nativeObj, long neighborResponses_nativeObj);
+    private static native float findNearest_2(long nativeObj, long samples_nativeObj, int k, long results_nativeObj);
+
+    // C++:  int cv::ml::KNearest::getAlgorithmType()
+    private static native int getAlgorithmType_0(long nativeObj);
+
+    // C++:  int cv::ml::KNearest::getDefaultK()
+    private static native int getDefaultK_0(long nativeObj);
+
+    // C++:  int cv::ml::KNearest::getEmax()
+    private static native int getEmax_0(long nativeObj);
+
+    // C++:  void cv::ml::KNearest::setAlgorithmType(int val)
+    private static native void setAlgorithmType_0(long nativeObj, int val);
+
+    // C++:  void cv::ml::KNearest::setDefaultK(int val)
+    private static native void setDefaultK_0(long nativeObj, int val);
+
+    // C++:  void cv::ml::KNearest::setEmax(int val)
+    private static native void setEmax_0(long nativeObj, int val);
+
+    // C++:  void cv::ml::KNearest::setIsClassifier(bool val)
+    private static native void setIsClassifier_0(long nativeObj, boolean val);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/ml/LogisticRegression.java b/opencv41/src/main/java/org/opencv/ml/LogisticRegression.java
new file mode 100644 (file)
index 0000000..c34a673
--- /dev/null
@@ -0,0 +1,347 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import java.lang.String;
+import org.opencv.core.Mat;
+import org.opencv.core.TermCriteria;
+import org.opencv.ml.LogisticRegression;
+import org.opencv.ml.StatModel;
+
+// C++: class LogisticRegression
+//javadoc: LogisticRegression
+
+public class LogisticRegression extends StatModel {
+
+    protected LogisticRegression(long addr) { super(addr); }
+
+    // internal usage only
+    public static LogisticRegression __fromPtr__(long addr) { return new LogisticRegression(addr); }
+
+    // C++: enum RegKinds
+    public static final int
+            REG_DISABLE = -1,
+            REG_L1 = 0,
+            REG_L2 = 1;
+
+
+    // C++: enum Methods
+    public static final int
+            BATCH = 0,
+            MINI_BATCH = 1;
+
+
+    //
+    // C++:  Mat cv::ml::LogisticRegression::get_learnt_thetas()
+    //
+
+    //javadoc: LogisticRegression::get_learnt_thetas()
+    public  Mat get_learnt_thetas()
+    {
+        
+        Mat retVal = new Mat(get_learnt_thetas_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_LogisticRegression cv::ml::LogisticRegression::create()
+    //
+
+    //javadoc: LogisticRegression::create()
+    public static LogisticRegression create()
+    {
+        
+        LogisticRegression retVal = LogisticRegression.__fromPtr__(create_0());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_LogisticRegression cv::ml::LogisticRegression::load(String filepath, String nodeName = String())
+    //
+
+    //javadoc: LogisticRegression::load(filepath, nodeName)
+    public static LogisticRegression load(String filepath, String nodeName)
+    {
+        
+        LogisticRegression retVal = LogisticRegression.__fromPtr__(load_0(filepath, nodeName));
+        
+        return retVal;
+    }
+
+    //javadoc: LogisticRegression::load(filepath)
+    public static LogisticRegression load(String filepath)
+    {
+        
+        LogisticRegression retVal = LogisticRegression.__fromPtr__(load_1(filepath));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  TermCriteria cv::ml::LogisticRegression::getTermCriteria()
+    //
+
+    //javadoc: LogisticRegression::getTermCriteria()
+    public  TermCriteria getTermCriteria()
+    {
+        
+        TermCriteria retVal = new TermCriteria(getTermCriteria_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::LogisticRegression::getLearningRate()
+    //
+
+    //javadoc: LogisticRegression::getLearningRate()
+    public  double getLearningRate()
+    {
+        
+        double retVal = getLearningRate_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::ml::LogisticRegression::predict(Mat samples, Mat& results = Mat(), int flags = 0)
+    //
+
+    //javadoc: LogisticRegression::predict(samples, results, flags)
+    public  float predict(Mat samples, Mat results, int flags)
+    {
+        
+        float retVal = predict_0(nativeObj, samples.nativeObj, results.nativeObj, flags);
+        
+        return retVal;
+    }
+
+    //javadoc: LogisticRegression::predict(samples, results)
+    public  float predict(Mat samples, Mat results)
+    {
+        
+        float retVal = predict_1(nativeObj, samples.nativeObj, results.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: LogisticRegression::predict(samples)
+    public  float predict(Mat samples)
+    {
+        
+        float retVal = predict_2(nativeObj, samples.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::LogisticRegression::getIterations()
+    //
+
+    //javadoc: LogisticRegression::getIterations()
+    public  int getIterations()
+    {
+        
+        int retVal = getIterations_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::LogisticRegression::getMiniBatchSize()
+    //
+
+    //javadoc: LogisticRegression::getMiniBatchSize()
+    public  int getMiniBatchSize()
+    {
+        
+        int retVal = getMiniBatchSize_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::LogisticRegression::getRegularization()
+    //
+
+    //javadoc: LogisticRegression::getRegularization()
+    public  int getRegularization()
+    {
+        
+        int retVal = getRegularization_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::LogisticRegression::getTrainMethod()
+    //
+
+    //javadoc: LogisticRegression::getTrainMethod()
+    public  int getTrainMethod()
+    {
+        
+        int retVal = getTrainMethod_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::ml::LogisticRegression::setIterations(int val)
+    //
+
+    //javadoc: LogisticRegression::setIterations(val)
+    public  void setIterations(int val)
+    {
+        
+        setIterations_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::LogisticRegression::setLearningRate(double val)
+    //
+
+    //javadoc: LogisticRegression::setLearningRate(val)
+    public  void setLearningRate(double val)
+    {
+        
+        setLearningRate_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::LogisticRegression::setMiniBatchSize(int val)
+    //
+
+    //javadoc: LogisticRegression::setMiniBatchSize(val)
+    public  void setMiniBatchSize(int val)
+    {
+        
+        setMiniBatchSize_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::LogisticRegression::setRegularization(int val)
+    //
+
+    //javadoc: LogisticRegression::setRegularization(val)
+    public  void setRegularization(int val)
+    {
+        
+        setRegularization_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::LogisticRegression::setTermCriteria(TermCriteria val)
+    //
+
+    //javadoc: LogisticRegression::setTermCriteria(val)
+    public  void setTermCriteria(TermCriteria val)
+    {
+        
+        setTermCriteria_0(nativeObj, val.type, val.maxCount, val.epsilon);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::LogisticRegression::setTrainMethod(int val)
+    //
+
+    //javadoc: LogisticRegression::setTrainMethod(val)
+    public  void setTrainMethod(int val)
+    {
+        
+        setTrainMethod_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  Mat cv::ml::LogisticRegression::get_learnt_thetas()
+    private static native long get_learnt_thetas_0(long nativeObj);
+
+    // C++: static Ptr_LogisticRegression cv::ml::LogisticRegression::create()
+    private static native long create_0();
+
+    // C++: static Ptr_LogisticRegression cv::ml::LogisticRegression::load(String filepath, String nodeName = String())
+    private static native long load_0(String filepath, String nodeName);
+    private static native long load_1(String filepath);
+
+    // C++:  TermCriteria cv::ml::LogisticRegression::getTermCriteria()
+    private static native double[] getTermCriteria_0(long nativeObj);
+
+    // C++:  double cv::ml::LogisticRegression::getLearningRate()
+    private static native double getLearningRate_0(long nativeObj);
+
+    // C++:  float cv::ml::LogisticRegression::predict(Mat samples, Mat& results = Mat(), int flags = 0)
+    private static native float predict_0(long nativeObj, long samples_nativeObj, long results_nativeObj, int flags);
+    private static native float predict_1(long nativeObj, long samples_nativeObj, long results_nativeObj);
+    private static native float predict_2(long nativeObj, long samples_nativeObj);
+
+    // C++:  int cv::ml::LogisticRegression::getIterations()
+    private static native int getIterations_0(long nativeObj);
+
+    // C++:  int cv::ml::LogisticRegression::getMiniBatchSize()
+    private static native int getMiniBatchSize_0(long nativeObj);
+
+    // C++:  int cv::ml::LogisticRegression::getRegularization()
+    private static native int getRegularization_0(long nativeObj);
+
+    // C++:  int cv::ml::LogisticRegression::getTrainMethod()
+    private static native int getTrainMethod_0(long nativeObj);
+
+    // C++:  void cv::ml::LogisticRegression::setIterations(int val)
+    private static native void setIterations_0(long nativeObj, int val);
+
+    // C++:  void cv::ml::LogisticRegression::setLearningRate(double val)
+    private static native void setLearningRate_0(long nativeObj, double val);
+
+    // C++:  void cv::ml::LogisticRegression::setMiniBatchSize(int val)
+    private static native void setMiniBatchSize_0(long nativeObj, int val);
+
+    // C++:  void cv::ml::LogisticRegression::setRegularization(int val)
+    private static native void setRegularization_0(long nativeObj, int val);
+
+    // C++:  void cv::ml::LogisticRegression::setTermCriteria(TermCriteria val)
+    private static native void setTermCriteria_0(long nativeObj, int val_type, int val_maxCount, double val_epsilon);
+
+    // C++:  void cv::ml::LogisticRegression::setTrainMethod(int val)
+    private static native void setTrainMethod_0(long nativeObj, int val);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/ml/Ml.java b/opencv41/src/main/java/org/opencv/ml/Ml.java
new file mode 100644 (file)
index 0000000..a7f4679
--- /dev/null
@@ -0,0 +1,34 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+
+
+// C++: class Ml
+//javadoc: Ml
+
+public class Ml {
+
+    // C++: enum SampleTypes
+    public static final int
+            ROW_SAMPLE = 0,
+            COL_SAMPLE = 1;
+
+
+    // C++: enum VariableTypes
+    public static final int
+            VAR_NUMERICAL = 0,
+            VAR_ORDERED = 0,
+            VAR_CATEGORICAL = 1;
+
+
+    // C++: enum ErrorTypes
+    public static final int
+            TEST_ERROR = 0,
+            TRAIN_ERROR = 1;
+
+
+
+
+}
diff --git a/opencv41/src/main/java/org/opencv/ml/NormalBayesClassifier.java b/opencv41/src/main/java/org/opencv/ml/NormalBayesClassifier.java
new file mode 100644 (file)
index 0000000..b803931
--- /dev/null
@@ -0,0 +1,102 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import java.lang.String;
+import org.opencv.core.Mat;
+import org.opencv.ml.NormalBayesClassifier;
+import org.opencv.ml.StatModel;
+
+// C++: class NormalBayesClassifier
+//javadoc: NormalBayesClassifier
+
+public class NormalBayesClassifier extends StatModel {
+
+    protected NormalBayesClassifier(long addr) { super(addr); }
+
+    // internal usage only
+    public static NormalBayesClassifier __fromPtr__(long addr) { return new NormalBayesClassifier(addr); }
+
+    //
+    // C++: static Ptr_NormalBayesClassifier cv::ml::NormalBayesClassifier::create()
+    //
+
+    //javadoc: NormalBayesClassifier::create()
+    public static NormalBayesClassifier create()
+    {
+        
+        NormalBayesClassifier retVal = NormalBayesClassifier.__fromPtr__(create_0());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_NormalBayesClassifier cv::ml::NormalBayesClassifier::load(String filepath, String nodeName = String())
+    //
+
+    //javadoc: NormalBayesClassifier::load(filepath, nodeName)
+    public static NormalBayesClassifier load(String filepath, String nodeName)
+    {
+        
+        NormalBayesClassifier retVal = NormalBayesClassifier.__fromPtr__(load_0(filepath, nodeName));
+        
+        return retVal;
+    }
+
+    //javadoc: NormalBayesClassifier::load(filepath)
+    public static NormalBayesClassifier load(String filepath)
+    {
+        
+        NormalBayesClassifier retVal = NormalBayesClassifier.__fromPtr__(load_1(filepath));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::ml::NormalBayesClassifier::predictProb(Mat inputs, Mat& outputs, Mat& outputProbs, int flags = 0)
+    //
+
+    //javadoc: NormalBayesClassifier::predictProb(inputs, outputs, outputProbs, flags)
+    public  float predictProb(Mat inputs, Mat outputs, Mat outputProbs, int flags)
+    {
+        
+        float retVal = predictProb_0(nativeObj, inputs.nativeObj, outputs.nativeObj, outputProbs.nativeObj, flags);
+        
+        return retVal;
+    }
+
+    //javadoc: NormalBayesClassifier::predictProb(inputs, outputs, outputProbs)
+    public  float predictProb(Mat inputs, Mat outputs, Mat outputProbs)
+    {
+        
+        float retVal = predictProb_1(nativeObj, inputs.nativeObj, outputs.nativeObj, outputProbs.nativeObj);
+        
+        return retVal;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++: static Ptr_NormalBayesClassifier cv::ml::NormalBayesClassifier::create()
+    private static native long create_0();
+
+    // C++: static Ptr_NormalBayesClassifier cv::ml::NormalBayesClassifier::load(String filepath, String nodeName = String())
+    private static native long load_0(String filepath, String nodeName);
+    private static native long load_1(String filepath);
+
+    // C++:  float cv::ml::NormalBayesClassifier::predictProb(Mat inputs, Mat& outputs, Mat& outputProbs, int flags = 0)
+    private static native float predictProb_0(long nativeObj, long inputs_nativeObj, long outputs_nativeObj, long outputProbs_nativeObj, int flags);
+    private static native float predictProb_1(long nativeObj, long inputs_nativeObj, long outputs_nativeObj, long outputProbs_nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/ml/ParamGrid.java b/opencv41/src/main/java/org/opencv/ml/ParamGrid.java
new file mode 100644 (file)
index 0000000..fa6dc19
--- /dev/null
@@ -0,0 +1,180 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import org.opencv.ml.ParamGrid;
+
+// C++: class ParamGrid
+//javadoc: ParamGrid
+
+public class ParamGrid {
+
+    protected final long nativeObj;
+    protected ParamGrid(long addr) { nativeObj = addr; }
+
+    public long getNativeObjAddr() { return nativeObj; }
+
+    // internal usage only
+    public static ParamGrid __fromPtr__(long addr) { return new ParamGrid(addr); }
+
+    //
+    // C++: static Ptr_ParamGrid cv::ml::ParamGrid::create(double minVal = 0., double maxVal = 0., double logstep = 1.)
+    //
+
+    //javadoc: ParamGrid::create(minVal, maxVal, logstep)
+    public static ParamGrid create(double minVal, double maxVal, double logstep)
+    {
+        
+        ParamGrid retVal = ParamGrid.__fromPtr__(create_0(minVal, maxVal, logstep));
+        
+        return retVal;
+    }
+
+    //javadoc: ParamGrid::create(minVal, maxVal)
+    public static ParamGrid create(double minVal, double maxVal)
+    {
+        
+        ParamGrid retVal = ParamGrid.__fromPtr__(create_1(minVal, maxVal));
+        
+        return retVal;
+    }
+
+    //javadoc: ParamGrid::create(minVal)
+    public static ParamGrid create(double minVal)
+    {
+        
+        ParamGrid retVal = ParamGrid.__fromPtr__(create_2(minVal));
+        
+        return retVal;
+    }
+
+    //javadoc: ParamGrid::create()
+    public static ParamGrid create()
+    {
+        
+        ParamGrid retVal = ParamGrid.__fromPtr__(create_3());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: double ParamGrid::minVal
+    //
+
+    //javadoc: ParamGrid::get_minVal()
+    public  double get_minVal()
+    {
+        
+        double retVal = get_minVal_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: void ParamGrid::minVal
+    //
+
+    //javadoc: ParamGrid::set_minVal(minVal)
+    public  void set_minVal(double minVal)
+    {
+        
+        set_minVal_0(nativeObj, minVal);
+        
+        return;
+    }
+
+
+    //
+    // C++: double ParamGrid::maxVal
+    //
+
+    //javadoc: ParamGrid::get_maxVal()
+    public  double get_maxVal()
+    {
+        
+        double retVal = get_maxVal_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: void ParamGrid::maxVal
+    //
+
+    //javadoc: ParamGrid::set_maxVal(maxVal)
+    public  void set_maxVal(double maxVal)
+    {
+        
+        set_maxVal_0(nativeObj, maxVal);
+        
+        return;
+    }
+
+
+    //
+    // C++: double ParamGrid::logStep
+    //
+
+    //javadoc: ParamGrid::get_logStep()
+    public  double get_logStep()
+    {
+        
+        double retVal = get_logStep_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: void ParamGrid::logStep
+    //
+
+    //javadoc: ParamGrid::set_logStep(logStep)
+    public  void set_logStep(double logStep)
+    {
+        
+        set_logStep_0(nativeObj, logStep);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++: static Ptr_ParamGrid cv::ml::ParamGrid::create(double minVal = 0., double maxVal = 0., double logstep = 1.)
+    private static native long create_0(double minVal, double maxVal, double logstep);
+    private static native long create_1(double minVal, double maxVal);
+    private static native long create_2(double minVal);
+    private static native long create_3();
+
+    // C++: double ParamGrid::minVal
+    private static native double get_minVal_0(long nativeObj);
+
+    // C++: void ParamGrid::minVal
+    private static native void set_minVal_0(long nativeObj, double minVal);
+
+    // C++: double ParamGrid::maxVal
+    private static native double get_maxVal_0(long nativeObj);
+
+    // C++: void ParamGrid::maxVal
+    private static native void set_maxVal_0(long nativeObj, double maxVal);
+
+    // C++: double ParamGrid::logStep
+    private static native double get_logStep_0(long nativeObj);
+
+    // C++: void ParamGrid::logStep
+    private static native void set_logStep_0(long nativeObj, double logStep);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/ml/RTrees.java b/opencv41/src/main/java/org/opencv/ml/RTrees.java
new file mode 100644 (file)
index 0000000..80297ed
--- /dev/null
@@ -0,0 +1,212 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import java.lang.String;
+import org.opencv.core.Mat;
+import org.opencv.core.TermCriteria;
+import org.opencv.ml.DTrees;
+import org.opencv.ml.RTrees;
+
+// C++: class RTrees
+//javadoc: RTrees
+
+public class RTrees extends DTrees {
+
+    protected RTrees(long addr) { super(addr); }
+
+    // internal usage only
+    public static RTrees __fromPtr__(long addr) { return new RTrees(addr); }
+
+    //
+    // C++:  Mat cv::ml::RTrees::getVarImportance()
+    //
+
+    //javadoc: RTrees::getVarImportance()
+    public  Mat getVarImportance()
+    {
+        
+        Mat retVal = new Mat(getVarImportance_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_RTrees cv::ml::RTrees::create()
+    //
+
+    //javadoc: RTrees::create()
+    public static RTrees create()
+    {
+        
+        RTrees retVal = RTrees.__fromPtr__(create_0());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_RTrees cv::ml::RTrees::load(String filepath, String nodeName = String())
+    //
+
+    //javadoc: RTrees::load(filepath, nodeName)
+    public static RTrees load(String filepath, String nodeName)
+    {
+        
+        RTrees retVal = RTrees.__fromPtr__(load_0(filepath, nodeName));
+        
+        return retVal;
+    }
+
+    //javadoc: RTrees::load(filepath)
+    public static RTrees load(String filepath)
+    {
+        
+        RTrees retVal = RTrees.__fromPtr__(load_1(filepath));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  TermCriteria cv::ml::RTrees::getTermCriteria()
+    //
+
+    //javadoc: RTrees::getTermCriteria()
+    public  TermCriteria getTermCriteria()
+    {
+        
+        TermCriteria retVal = new TermCriteria(getTermCriteria_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::ml::RTrees::getCalculateVarImportance()
+    //
+
+    //javadoc: RTrees::getCalculateVarImportance()
+    public  boolean getCalculateVarImportance()
+    {
+        
+        boolean retVal = getCalculateVarImportance_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::RTrees::getActiveVarCount()
+    //
+
+    //javadoc: RTrees::getActiveVarCount()
+    public  int getActiveVarCount()
+    {
+        
+        int retVal = getActiveVarCount_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::ml::RTrees::getVotes(Mat samples, Mat& results, int flags)
+    //
+
+    //javadoc: RTrees::getVotes(samples, results, flags)
+    public  void getVotes(Mat samples, Mat results, int flags)
+    {
+        
+        getVotes_0(nativeObj, samples.nativeObj, results.nativeObj, flags);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::RTrees::setActiveVarCount(int val)
+    //
+
+    //javadoc: RTrees::setActiveVarCount(val)
+    public  void setActiveVarCount(int val)
+    {
+        
+        setActiveVarCount_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::RTrees::setCalculateVarImportance(bool val)
+    //
+
+    //javadoc: RTrees::setCalculateVarImportance(val)
+    public  void setCalculateVarImportance(boolean val)
+    {
+        
+        setCalculateVarImportance_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::RTrees::setTermCriteria(TermCriteria val)
+    //
+
+    //javadoc: RTrees::setTermCriteria(val)
+    public  void setTermCriteria(TermCriteria val)
+    {
+        
+        setTermCriteria_0(nativeObj, val.type, val.maxCount, val.epsilon);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  Mat cv::ml::RTrees::getVarImportance()
+    private static native long getVarImportance_0(long nativeObj);
+
+    // C++: static Ptr_RTrees cv::ml::RTrees::create()
+    private static native long create_0();
+
+    // C++: static Ptr_RTrees cv::ml::RTrees::load(String filepath, String nodeName = String())
+    private static native long load_0(String filepath, String nodeName);
+    private static native long load_1(String filepath);
+
+    // C++:  TermCriteria cv::ml::RTrees::getTermCriteria()
+    private static native double[] getTermCriteria_0(long nativeObj);
+
+    // C++:  bool cv::ml::RTrees::getCalculateVarImportance()
+    private static native boolean getCalculateVarImportance_0(long nativeObj);
+
+    // C++:  int cv::ml::RTrees::getActiveVarCount()
+    private static native int getActiveVarCount_0(long nativeObj);
+
+    // C++:  void cv::ml::RTrees::getVotes(Mat samples, Mat& results, int flags)
+    private static native void getVotes_0(long nativeObj, long samples_nativeObj, long results_nativeObj, int flags);
+
+    // C++:  void cv::ml::RTrees::setActiveVarCount(int val)
+    private static native void setActiveVarCount_0(long nativeObj, int val);
+
+    // C++:  void cv::ml::RTrees::setCalculateVarImportance(bool val)
+    private static native void setCalculateVarImportance_0(long nativeObj, boolean val);
+
+    // C++:  void cv::ml::RTrees::setTermCriteria(TermCriteria val)
+    private static native void setTermCriteria_0(long nativeObj, int val_type, int val_maxCount, double val_epsilon);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/ml/SVM.java b/opencv41/src/main/java/org/opencv/ml/SVM.java
new file mode 100644 (file)
index 0000000..5100d68
--- /dev/null
@@ -0,0 +1,602 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import java.lang.String;
+import org.opencv.core.Mat;
+import org.opencv.core.TermCriteria;
+import org.opencv.ml.ParamGrid;
+import org.opencv.ml.SVM;
+import org.opencv.ml.StatModel;
+
+// C++: class SVM
+//javadoc: SVM
+
+public class SVM extends StatModel {
+
+    protected SVM(long addr) { super(addr); }
+
+    // internal usage only
+    public static SVM __fromPtr__(long addr) { return new SVM(addr); }
+
+    // C++: enum KernelTypes
+    public static final int
+            CUSTOM = -1,
+            LINEAR = 0,
+            POLY = 1,
+            RBF = 2,
+            SIGMOID = 3,
+            CHI2 = 4,
+            INTER = 5;
+
+
+    // C++: enum Types
+    public static final int
+            C_SVC = 100,
+            NU_SVC = 101,
+            ONE_CLASS = 102,
+            EPS_SVR = 103,
+            NU_SVR = 104;
+
+
+    // C++: enum ParamTypes
+    public static final int
+            C = 0,
+            GAMMA = 1,
+            P = 2,
+            NU = 3,
+            COEF = 4,
+            DEGREE = 5;
+
+
+    //
+    // C++:  Mat cv::ml::SVM::getClassWeights()
+    //
+
+    //javadoc: SVM::getClassWeights()
+    public  Mat getClassWeights()
+    {
+        
+        Mat retVal = new Mat(getClassWeights_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::SVM::getSupportVectors()
+    //
+
+    //javadoc: SVM::getSupportVectors()
+    public  Mat getSupportVectors()
+    {
+        
+        Mat retVal = new Mat(getSupportVectors_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::SVM::getUncompressedSupportVectors()
+    //
+
+    //javadoc: SVM::getUncompressedSupportVectors()
+    public  Mat getUncompressedSupportVectors()
+    {
+        
+        Mat retVal = new Mat(getUncompressedSupportVectors_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_ParamGrid cv::ml::SVM::getDefaultGridPtr(int param_id)
+    //
+
+    //javadoc: SVM::getDefaultGridPtr(param_id)
+    public static ParamGrid getDefaultGridPtr(int param_id)
+    {
+        
+        ParamGrid retVal = ParamGrid.__fromPtr__(getDefaultGridPtr_0(param_id));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_SVM cv::ml::SVM::create()
+    //
+
+    //javadoc: SVM::create()
+    public static SVM create()
+    {
+        
+        SVM retVal = SVM.__fromPtr__(create_0());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_SVM cv::ml::SVM::load(String filepath)
+    //
+
+    //javadoc: SVM::load(filepath)
+    public static SVM load(String filepath)
+    {
+        
+        SVM retVal = SVM.__fromPtr__(load_0(filepath));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  TermCriteria cv::ml::SVM::getTermCriteria()
+    //
+
+    //javadoc: SVM::getTermCriteria()
+    public  TermCriteria getTermCriteria()
+    {
+        
+        TermCriteria retVal = new TermCriteria(getTermCriteria_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::ml::SVM::trainAuto(Mat samples, int layout, Mat responses, int kFold = 10, Ptr_ParamGrid Cgrid = SVM::getDefaultGridPtr(SVM::C), Ptr_ParamGrid gammaGrid = SVM::getDefaultGridPtr(SVM::GAMMA), Ptr_ParamGrid pGrid = SVM::getDefaultGridPtr(SVM::P), Ptr_ParamGrid nuGrid = SVM::getDefaultGridPtr(SVM::NU), Ptr_ParamGrid coeffGrid = SVM::getDefaultGridPtr(SVM::COEF), Ptr_ParamGrid degreeGrid = SVM::getDefaultGridPtr(SVM::DEGREE), bool balanced = false)
+    //
+
+    //javadoc: SVM::trainAuto(samples, layout, responses, kFold, Cgrid, gammaGrid, pGrid, nuGrid, coeffGrid, degreeGrid, balanced)
+    public  boolean trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid, ParamGrid coeffGrid, ParamGrid degreeGrid, boolean balanced)
+    {
+        
+        boolean retVal = trainAuto_0(nativeObj, samples.nativeObj, layout, responses.nativeObj, kFold, Cgrid.getNativeObjAddr(), gammaGrid.getNativeObjAddr(), pGrid.getNativeObjAddr(), nuGrid.getNativeObjAddr(), coeffGrid.getNativeObjAddr(), degreeGrid.getNativeObjAddr(), balanced);
+        
+        return retVal;
+    }
+
+    //javadoc: SVM::trainAuto(samples, layout, responses, kFold, Cgrid, gammaGrid, pGrid, nuGrid, coeffGrid, degreeGrid)
+    public  boolean trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid, ParamGrid coeffGrid, ParamGrid degreeGrid)
+    {
+        
+        boolean retVal = trainAuto_1(nativeObj, samples.nativeObj, layout, responses.nativeObj, kFold, Cgrid.getNativeObjAddr(), gammaGrid.getNativeObjAddr(), pGrid.getNativeObjAddr(), nuGrid.getNativeObjAddr(), coeffGrid.getNativeObjAddr(), degreeGrid.getNativeObjAddr());
+        
+        return retVal;
+    }
+
+    //javadoc: SVM::trainAuto(samples, layout, responses, kFold, Cgrid, gammaGrid, pGrid, nuGrid, coeffGrid)
+    public  boolean trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid, ParamGrid coeffGrid)
+    {
+        
+        boolean retVal = trainAuto_2(nativeObj, samples.nativeObj, layout, responses.nativeObj, kFold, Cgrid.getNativeObjAddr(), gammaGrid.getNativeObjAddr(), pGrid.getNativeObjAddr(), nuGrid.getNativeObjAddr(), coeffGrid.getNativeObjAddr());
+        
+        return retVal;
+    }
+
+    //javadoc: SVM::trainAuto(samples, layout, responses, kFold, Cgrid, gammaGrid, pGrid, nuGrid)
+    public  boolean trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid)
+    {
+        
+        boolean retVal = trainAuto_3(nativeObj, samples.nativeObj, layout, responses.nativeObj, kFold, Cgrid.getNativeObjAddr(), gammaGrid.getNativeObjAddr(), pGrid.getNativeObjAddr(), nuGrid.getNativeObjAddr());
+        
+        return retVal;
+    }
+
+    //javadoc: SVM::trainAuto(samples, layout, responses, kFold, Cgrid, gammaGrid, pGrid)
+    public  boolean trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid)
+    {
+        
+        boolean retVal = trainAuto_4(nativeObj, samples.nativeObj, layout, responses.nativeObj, kFold, Cgrid.getNativeObjAddr(), gammaGrid.getNativeObjAddr(), pGrid.getNativeObjAddr());
+        
+        return retVal;
+    }
+
+    //javadoc: SVM::trainAuto(samples, layout, responses, kFold, Cgrid, gammaGrid)
+    public  boolean trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid)
+    {
+        
+        boolean retVal = trainAuto_5(nativeObj, samples.nativeObj, layout, responses.nativeObj, kFold, Cgrid.getNativeObjAddr(), gammaGrid.getNativeObjAddr());
+        
+        return retVal;
+    }
+
+    //javadoc: SVM::trainAuto(samples, layout, responses, kFold, Cgrid)
+    public  boolean trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid)
+    {
+        
+        boolean retVal = trainAuto_6(nativeObj, samples.nativeObj, layout, responses.nativeObj, kFold, Cgrid.getNativeObjAddr());
+        
+        return retVal;
+    }
+
+    //javadoc: SVM::trainAuto(samples, layout, responses, kFold)
+    public  boolean trainAuto(Mat samples, int layout, Mat responses, int kFold)
+    {
+        
+        boolean retVal = trainAuto_7(nativeObj, samples.nativeObj, layout, responses.nativeObj, kFold);
+        
+        return retVal;
+    }
+
+    //javadoc: SVM::trainAuto(samples, layout, responses)
+    public  boolean trainAuto(Mat samples, int layout, Mat responses)
+    {
+        
+        boolean retVal = trainAuto_8(nativeObj, samples.nativeObj, layout, responses.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::SVM::getC()
+    //
+
+    //javadoc: SVM::getC()
+    public  double getC()
+    {
+        
+        double retVal = getC_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::SVM::getCoef0()
+    //
+
+    //javadoc: SVM::getCoef0()
+    public  double getCoef0()
+    {
+        
+        double retVal = getCoef0_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::SVM::getDecisionFunction(int i, Mat& alpha, Mat& svidx)
+    //
+
+    //javadoc: SVM::getDecisionFunction(i, alpha, svidx)
+    public  double getDecisionFunction(int i, Mat alpha, Mat svidx)
+    {
+        
+        double retVal = getDecisionFunction_0(nativeObj, i, alpha.nativeObj, svidx.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::SVM::getDegree()
+    //
+
+    //javadoc: SVM::getDegree()
+    public  double getDegree()
+    {
+        
+        double retVal = getDegree_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::SVM::getGamma()
+    //
+
+    //javadoc: SVM::getGamma()
+    public  double getGamma()
+    {
+        
+        double retVal = getGamma_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::SVM::getNu()
+    //
+
+    //javadoc: SVM::getNu()
+    public  double getNu()
+    {
+        
+        double retVal = getNu_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::ml::SVM::getP()
+    //
+
+    //javadoc: SVM::getP()
+    public  double getP()
+    {
+        
+        double retVal = getP_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::SVM::getKernelType()
+    //
+
+    //javadoc: SVM::getKernelType()
+    public  int getKernelType()
+    {
+        
+        int retVal = getKernelType_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::SVM::getType()
+    //
+
+    //javadoc: SVM::getType()
+    public  int getType()
+    {
+        
+        int retVal = getType_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::ml::SVM::setC(double val)
+    //
+
+    //javadoc: SVM::setC(val)
+    public  void setC(double val)
+    {
+        
+        setC_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::SVM::setClassWeights(Mat val)
+    //
+
+    //javadoc: SVM::setClassWeights(val)
+    public  void setClassWeights(Mat val)
+    {
+        
+        setClassWeights_0(nativeObj, val.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::SVM::setCoef0(double val)
+    //
+
+    //javadoc: SVM::setCoef0(val)
+    public  void setCoef0(double val)
+    {
+        
+        setCoef0_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::SVM::setDegree(double val)
+    //
+
+    //javadoc: SVM::setDegree(val)
+    public  void setDegree(double val)
+    {
+        
+        setDegree_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::SVM::setGamma(double val)
+    //
+
+    //javadoc: SVM::setGamma(val)
+    public  void setGamma(double val)
+    {
+        
+        setGamma_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::SVM::setKernel(int kernelType)
+    //
+
+    //javadoc: SVM::setKernel(kernelType)
+    public  void setKernel(int kernelType)
+    {
+        
+        setKernel_0(nativeObj, kernelType);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::SVM::setNu(double val)
+    //
+
+    //javadoc: SVM::setNu(val)
+    public  void setNu(double val)
+    {
+        
+        setNu_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::SVM::setP(double val)
+    //
+
+    //javadoc: SVM::setP(val)
+    public  void setP(double val)
+    {
+        
+        setP_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::SVM::setTermCriteria(TermCriteria val)
+    //
+
+    //javadoc: SVM::setTermCriteria(val)
+    public  void setTermCriteria(TermCriteria val)
+    {
+        
+        setTermCriteria_0(nativeObj, val.type, val.maxCount, val.epsilon);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::SVM::setType(int val)
+    //
+
+    //javadoc: SVM::setType(val)
+    public  void setType(int val)
+    {
+        
+        setType_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  Mat cv::ml::SVM::getClassWeights()
+    private static native long getClassWeights_0(long nativeObj);
+
+    // C++:  Mat cv::ml::SVM::getSupportVectors()
+    private static native long getSupportVectors_0(long nativeObj);
+
+    // C++:  Mat cv::ml::SVM::getUncompressedSupportVectors()
+    private static native long getUncompressedSupportVectors_0(long nativeObj);
+
+    // C++: static Ptr_ParamGrid cv::ml::SVM::getDefaultGridPtr(int param_id)
+    private static native long getDefaultGridPtr_0(int param_id);
+
+    // C++: static Ptr_SVM cv::ml::SVM::create()
+    private static native long create_0();
+
+    // C++: static Ptr_SVM cv::ml::SVM::load(String filepath)
+    private static native long load_0(String filepath);
+
+    // C++:  TermCriteria cv::ml::SVM::getTermCriteria()
+    private static native double[] getTermCriteria_0(long nativeObj);
+
+    // C++:  bool cv::ml::SVM::trainAuto(Mat samples, int layout, Mat responses, int kFold = 10, Ptr_ParamGrid Cgrid = SVM::getDefaultGridPtr(SVM::C), Ptr_ParamGrid gammaGrid = SVM::getDefaultGridPtr(SVM::GAMMA), Ptr_ParamGrid pGrid = SVM::getDefaultGridPtr(SVM::P), Ptr_ParamGrid nuGrid = SVM::getDefaultGridPtr(SVM::NU), Ptr_ParamGrid coeffGrid = SVM::getDefaultGridPtr(SVM::COEF), Ptr_ParamGrid degreeGrid = SVM::getDefaultGridPtr(SVM::DEGREE), bool balanced = false)
+    private static native boolean trainAuto_0(long nativeObj, long samples_nativeObj, int layout, long responses_nativeObj, int kFold, long Cgrid_nativeObj, long gammaGrid_nativeObj, long pGrid_nativeObj, long nuGrid_nativeObj, long coeffGrid_nativeObj, long degreeGrid_nativeObj, boolean balanced);
+    private static native boolean trainAuto_1(long nativeObj, long samples_nativeObj, int layout, long responses_nativeObj, int kFold, long Cgrid_nativeObj, long gammaGrid_nativeObj, long pGrid_nativeObj, long nuGrid_nativeObj, long coeffGrid_nativeObj, long degreeGrid_nativeObj);
+    private static native boolean trainAuto_2(long nativeObj, long samples_nativeObj, int layout, long responses_nativeObj, int kFold, long Cgrid_nativeObj, long gammaGrid_nativeObj, long pGrid_nativeObj, long nuGrid_nativeObj, long coeffGrid_nativeObj);
+    private static native boolean trainAuto_3(long nativeObj, long samples_nativeObj, int layout, long responses_nativeObj, int kFold, long Cgrid_nativeObj, long gammaGrid_nativeObj, long pGrid_nativeObj, long nuGrid_nativeObj);
+    private static native boolean trainAuto_4(long nativeObj, long samples_nativeObj, int layout, long responses_nativeObj, int kFold, long Cgrid_nativeObj, long gammaGrid_nativeObj, long pGrid_nativeObj);
+    private static native boolean trainAuto_5(long nativeObj, long samples_nativeObj, int layout, long responses_nativeObj, int kFold, long Cgrid_nativeObj, long gammaGrid_nativeObj);
+    private static native boolean trainAuto_6(long nativeObj, long samples_nativeObj, int layout, long responses_nativeObj, int kFold, long Cgrid_nativeObj);
+    private static native boolean trainAuto_7(long nativeObj, long samples_nativeObj, int layout, long responses_nativeObj, int kFold);
+    private static native boolean trainAuto_8(long nativeObj, long samples_nativeObj, int layout, long responses_nativeObj);
+
+    // C++:  double cv::ml::SVM::getC()
+    private static native double getC_0(long nativeObj);
+
+    // C++:  double cv::ml::SVM::getCoef0()
+    private static native double getCoef0_0(long nativeObj);
+
+    // C++:  double cv::ml::SVM::getDecisionFunction(int i, Mat& alpha, Mat& svidx)
+    private static native double getDecisionFunction_0(long nativeObj, int i, long alpha_nativeObj, long svidx_nativeObj);
+
+    // C++:  double cv::ml::SVM::getDegree()
+    private static native double getDegree_0(long nativeObj);
+
+    // C++:  double cv::ml::SVM::getGamma()
+    private static native double getGamma_0(long nativeObj);
+
+    // C++:  double cv::ml::SVM::getNu()
+    private static native double getNu_0(long nativeObj);
+
+    // C++:  double cv::ml::SVM::getP()
+    private static native double getP_0(long nativeObj);
+
+    // C++:  int cv::ml::SVM::getKernelType()
+    private static native int getKernelType_0(long nativeObj);
+
+    // C++:  int cv::ml::SVM::getType()
+    private static native int getType_0(long nativeObj);
+
+    // C++:  void cv::ml::SVM::setC(double val)
+    private static native void setC_0(long nativeObj, double val);
+
+    // C++:  void cv::ml::SVM::setClassWeights(Mat val)
+    private static native void setClassWeights_0(long nativeObj, long val_nativeObj);
+
+    // C++:  void cv::ml::SVM::setCoef0(double val)
+    private static native void setCoef0_0(long nativeObj, double val);
+
+    // C++:  void cv::ml::SVM::setDegree(double val)
+    private static native void setDegree_0(long nativeObj, double val);
+
+    // C++:  void cv::ml::SVM::setGamma(double val)
+    private static native void setGamma_0(long nativeObj, double val);
+
+    // C++:  void cv::ml::SVM::setKernel(int kernelType)
+    private static native void setKernel_0(long nativeObj, int kernelType);
+
+    // C++:  void cv::ml::SVM::setNu(double val)
+    private static native void setNu_0(long nativeObj, double val);
+
+    // C++:  void cv::ml::SVM::setP(double val)
+    private static native void setP_0(long nativeObj, double val);
+
+    // C++:  void cv::ml::SVM::setTermCriteria(TermCriteria val)
+    private static native void setTermCriteria_0(long nativeObj, int val_type, int val_maxCount, double val_epsilon);
+
+    // C++:  void cv::ml::SVM::setType(int val)
+    private static native void setType_0(long nativeObj, int val);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/ml/SVMSGD.java b/opencv41/src/main/java/org/opencv/ml/SVMSGD.java
new file mode 100644 (file)
index 0000000..539e527
--- /dev/null
@@ -0,0 +1,363 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import java.lang.String;
+import org.opencv.core.Mat;
+import org.opencv.core.TermCriteria;
+import org.opencv.ml.SVMSGD;
+import org.opencv.ml.StatModel;
+
+// C++: class SVMSGD
+//javadoc: SVMSGD
+
+public class SVMSGD extends StatModel {
+
+    protected SVMSGD(long addr) { super(addr); }
+
+    // internal usage only
+    public static SVMSGD __fromPtr__(long addr) { return new SVMSGD(addr); }
+
+    // C++: enum SvmsgdType
+    public static final int
+            SGD = 0,
+            ASGD = 1;
+
+
+    // C++: enum MarginType
+    public static final int
+            SOFT_MARGIN = 0,
+            HARD_MARGIN = 1;
+
+
+    //
+    // C++:  Mat cv::ml::SVMSGD::getWeights()
+    //
+
+    //javadoc: SVMSGD::getWeights()
+    public  Mat getWeights()
+    {
+        
+        Mat retVal = new Mat(getWeights_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_SVMSGD cv::ml::SVMSGD::create()
+    //
+
+    //javadoc: SVMSGD::create()
+    public static SVMSGD create()
+    {
+        
+        SVMSGD retVal = SVMSGD.__fromPtr__(create_0());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_SVMSGD cv::ml::SVMSGD::load(String filepath, String nodeName = String())
+    //
+
+    //javadoc: SVMSGD::load(filepath, nodeName)
+    public static SVMSGD load(String filepath, String nodeName)
+    {
+        
+        SVMSGD retVal = SVMSGD.__fromPtr__(load_0(filepath, nodeName));
+        
+        return retVal;
+    }
+
+    //javadoc: SVMSGD::load(filepath)
+    public static SVMSGD load(String filepath)
+    {
+        
+        SVMSGD retVal = SVMSGD.__fromPtr__(load_1(filepath));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  TermCriteria cv::ml::SVMSGD::getTermCriteria()
+    //
+
+    //javadoc: SVMSGD::getTermCriteria()
+    public  TermCriteria getTermCriteria()
+    {
+        
+        TermCriteria retVal = new TermCriteria(getTermCriteria_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::ml::SVMSGD::getInitialStepSize()
+    //
+
+    //javadoc: SVMSGD::getInitialStepSize()
+    public  float getInitialStepSize()
+    {
+        
+        float retVal = getInitialStepSize_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::ml::SVMSGD::getMarginRegularization()
+    //
+
+    //javadoc: SVMSGD::getMarginRegularization()
+    public  float getMarginRegularization()
+    {
+        
+        float retVal = getMarginRegularization_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::ml::SVMSGD::getShift()
+    //
+
+    //javadoc: SVMSGD::getShift()
+    public  float getShift()
+    {
+        
+        float retVal = getShift_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::ml::SVMSGD::getStepDecreasingPower()
+    //
+
+    //javadoc: SVMSGD::getStepDecreasingPower()
+    public  float getStepDecreasingPower()
+    {
+        
+        float retVal = getStepDecreasingPower_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::SVMSGD::getMarginType()
+    //
+
+    //javadoc: SVMSGD::getMarginType()
+    public  int getMarginType()
+    {
+        
+        int retVal = getMarginType_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::SVMSGD::getSvmsgdType()
+    //
+
+    //javadoc: SVMSGD::getSvmsgdType()
+    public  int getSvmsgdType()
+    {
+        
+        int retVal = getSvmsgdType_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::ml::SVMSGD::setInitialStepSize(float InitialStepSize)
+    //
+
+    //javadoc: SVMSGD::setInitialStepSize(InitialStepSize)
+    public  void setInitialStepSize(float InitialStepSize)
+    {
+        
+        setInitialStepSize_0(nativeObj, InitialStepSize);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::SVMSGD::setMarginRegularization(float marginRegularization)
+    //
+
+    //javadoc: SVMSGD::setMarginRegularization(marginRegularization)
+    public  void setMarginRegularization(float marginRegularization)
+    {
+        
+        setMarginRegularization_0(nativeObj, marginRegularization);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::SVMSGD::setMarginType(int marginType)
+    //
+
+    //javadoc: SVMSGD::setMarginType(marginType)
+    public  void setMarginType(int marginType)
+    {
+        
+        setMarginType_0(nativeObj, marginType);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::SVMSGD::setOptimalParameters(int svmsgdType = SVMSGD::ASGD, int marginType = SVMSGD::SOFT_MARGIN)
+    //
+
+    //javadoc: SVMSGD::setOptimalParameters(svmsgdType, marginType)
+    public  void setOptimalParameters(int svmsgdType, int marginType)
+    {
+        
+        setOptimalParameters_0(nativeObj, svmsgdType, marginType);
+        
+        return;
+    }
+
+    //javadoc: SVMSGD::setOptimalParameters(svmsgdType)
+    public  void setOptimalParameters(int svmsgdType)
+    {
+        
+        setOptimalParameters_1(nativeObj, svmsgdType);
+        
+        return;
+    }
+
+    //javadoc: SVMSGD::setOptimalParameters()
+    public  void setOptimalParameters()
+    {
+        
+        setOptimalParameters_2(nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::SVMSGD::setStepDecreasingPower(float stepDecreasingPower)
+    //
+
+    //javadoc: SVMSGD::setStepDecreasingPower(stepDecreasingPower)
+    public  void setStepDecreasingPower(float stepDecreasingPower)
+    {
+        
+        setStepDecreasingPower_0(nativeObj, stepDecreasingPower);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::SVMSGD::setSvmsgdType(int svmsgdType)
+    //
+
+    //javadoc: SVMSGD::setSvmsgdType(svmsgdType)
+    public  void setSvmsgdType(int svmsgdType)
+    {
+        
+        setSvmsgdType_0(nativeObj, svmsgdType);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::SVMSGD::setTermCriteria(TermCriteria val)
+    //
+
+    //javadoc: SVMSGD::setTermCriteria(val)
+    public  void setTermCriteria(TermCriteria val)
+    {
+        
+        setTermCriteria_0(nativeObj, val.type, val.maxCount, val.epsilon);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  Mat cv::ml::SVMSGD::getWeights()
+    private static native long getWeights_0(long nativeObj);
+
+    // C++: static Ptr_SVMSGD cv::ml::SVMSGD::create()
+    private static native long create_0();
+
+    // C++: static Ptr_SVMSGD cv::ml::SVMSGD::load(String filepath, String nodeName = String())
+    private static native long load_0(String filepath, String nodeName);
+    private static native long load_1(String filepath);
+
+    // C++:  TermCriteria cv::ml::SVMSGD::getTermCriteria()
+    private static native double[] getTermCriteria_0(long nativeObj);
+
+    // C++:  float cv::ml::SVMSGD::getInitialStepSize()
+    private static native float getInitialStepSize_0(long nativeObj);
+
+    // C++:  float cv::ml::SVMSGD::getMarginRegularization()
+    private static native float getMarginRegularization_0(long nativeObj);
+
+    // C++:  float cv::ml::SVMSGD::getShift()
+    private static native float getShift_0(long nativeObj);
+
+    // C++:  float cv::ml::SVMSGD::getStepDecreasingPower()
+    private static native float getStepDecreasingPower_0(long nativeObj);
+
+    // C++:  int cv::ml::SVMSGD::getMarginType()
+    private static native int getMarginType_0(long nativeObj);
+
+    // C++:  int cv::ml::SVMSGD::getSvmsgdType()
+    private static native int getSvmsgdType_0(long nativeObj);
+
+    // C++:  void cv::ml::SVMSGD::setInitialStepSize(float InitialStepSize)
+    private static native void setInitialStepSize_0(long nativeObj, float InitialStepSize);
+
+    // C++:  void cv::ml::SVMSGD::setMarginRegularization(float marginRegularization)
+    private static native void setMarginRegularization_0(long nativeObj, float marginRegularization);
+
+    // C++:  void cv::ml::SVMSGD::setMarginType(int marginType)
+    private static native void setMarginType_0(long nativeObj, int marginType);
+
+    // C++:  void cv::ml::SVMSGD::setOptimalParameters(int svmsgdType = SVMSGD::ASGD, int marginType = SVMSGD::SOFT_MARGIN)
+    private static native void setOptimalParameters_0(long nativeObj, int svmsgdType, int marginType);
+    private static native void setOptimalParameters_1(long nativeObj, int svmsgdType);
+    private static native void setOptimalParameters_2(long nativeObj);
+
+    // C++:  void cv::ml::SVMSGD::setStepDecreasingPower(float stepDecreasingPower)
+    private static native void setStepDecreasingPower_0(long nativeObj, float stepDecreasingPower);
+
+    // C++:  void cv::ml::SVMSGD::setSvmsgdType(int svmsgdType)
+    private static native void setSvmsgdType_0(long nativeObj, int svmsgdType);
+
+    // C++:  void cv::ml::SVMSGD::setTermCriteria(TermCriteria val)
+    private static native void setTermCriteria_0(long nativeObj, int val_type, int val_maxCount, double val_epsilon);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/ml/StatModel.java b/opencv41/src/main/java/org/opencv/ml/StatModel.java
new file mode 100644 (file)
index 0000000..cf84e51
--- /dev/null
@@ -0,0 +1,204 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+import org.opencv.ml.TrainData;
+
+// C++: class StatModel
+//javadoc: StatModel
+
+public class StatModel extends Algorithm {
+
+    protected StatModel(long addr) { super(addr); }
+
+    // internal usage only
+    public static StatModel __fromPtr__(long addr) { return new StatModel(addr); }
+
+    // C++: enum Flags
+    public static final int
+            UPDATE_MODEL = 1,
+            RAW_OUTPUT = 1,
+            COMPRESSED_INPUT = 2,
+            PREPROCESSED_INPUT = 4;
+
+
+    //
+    // C++:  bool cv::ml::StatModel::empty()
+    //
+
+    //javadoc: StatModel::empty()
+    public  boolean empty()
+    {
+        
+        boolean retVal = empty_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::ml::StatModel::isClassifier()
+    //
+
+    //javadoc: StatModel::isClassifier()
+    public  boolean isClassifier()
+    {
+        
+        boolean retVal = isClassifier_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::ml::StatModel::isTrained()
+    //
+
+    //javadoc: StatModel::isTrained()
+    public  boolean isTrained()
+    {
+        
+        boolean retVal = isTrained_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::ml::StatModel::train(Mat samples, int layout, Mat responses)
+    //
+
+    //javadoc: StatModel::train(samples, layout, responses)
+    public  boolean train(Mat samples, int layout, Mat responses)
+    {
+        
+        boolean retVal = train_0(nativeObj, samples.nativeObj, layout, responses.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::ml::StatModel::train(Ptr_TrainData trainData, int flags = 0)
+    //
+
+    //javadoc: StatModel::train(trainData, flags)
+    public  boolean train(TrainData trainData, int flags)
+    {
+        
+        boolean retVal = train_1(nativeObj, trainData.getNativeObjAddr(), flags);
+        
+        return retVal;
+    }
+
+    //javadoc: StatModel::train(trainData)
+    public  boolean train(TrainData trainData)
+    {
+        
+        boolean retVal = train_2(nativeObj, trainData.getNativeObjAddr());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::ml::StatModel::calcError(Ptr_TrainData data, bool test, Mat& resp)
+    //
+
+    //javadoc: StatModel::calcError(data, test, resp)
+    public  float calcError(TrainData data, boolean test, Mat resp)
+    {
+        
+        float retVal = calcError_0(nativeObj, data.getNativeObjAddr(), test, resp.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::ml::StatModel::predict(Mat samples, Mat& results = Mat(), int flags = 0)
+    //
+
+    //javadoc: StatModel::predict(samples, results, flags)
+    public  float predict(Mat samples, Mat results, int flags)
+    {
+        
+        float retVal = predict_0(nativeObj, samples.nativeObj, results.nativeObj, flags);
+        
+        return retVal;
+    }
+
+    //javadoc: StatModel::predict(samples, results)
+    public  float predict(Mat samples, Mat results)
+    {
+        
+        float retVal = predict_1(nativeObj, samples.nativeObj, results.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: StatModel::predict(samples)
+    public  float predict(Mat samples)
+    {
+        
+        float retVal = predict_2(nativeObj, samples.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::StatModel::getVarCount()
+    //
+
+    //javadoc: StatModel::getVarCount()
+    public  int getVarCount()
+    {
+        
+        int retVal = getVarCount_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  bool cv::ml::StatModel::empty()
+    private static native boolean empty_0(long nativeObj);
+
+    // C++:  bool cv::ml::StatModel::isClassifier()
+    private static native boolean isClassifier_0(long nativeObj);
+
+    // C++:  bool cv::ml::StatModel::isTrained()
+    private static native boolean isTrained_0(long nativeObj);
+
+    // C++:  bool cv::ml::StatModel::train(Mat samples, int layout, Mat responses)
+    private static native boolean train_0(long nativeObj, long samples_nativeObj, int layout, long responses_nativeObj);
+
+    // C++:  bool cv::ml::StatModel::train(Ptr_TrainData trainData, int flags = 0)
+    private static native boolean train_1(long nativeObj, long trainData_nativeObj, int flags);
+    private static native boolean train_2(long nativeObj, long trainData_nativeObj);
+
+    // C++:  float cv::ml::StatModel::calcError(Ptr_TrainData data, bool test, Mat& resp)
+    private static native float calcError_0(long nativeObj, long data_nativeObj, boolean test, long resp_nativeObj);
+
+    // C++:  float cv::ml::StatModel::predict(Mat samples, Mat& results = Mat(), int flags = 0)
+    private static native float predict_0(long nativeObj, long samples_nativeObj, long results_nativeObj, int flags);
+    private static native float predict_1(long nativeObj, long samples_nativeObj, long results_nativeObj);
+    private static native float predict_2(long nativeObj, long samples_nativeObj);
+
+    // C++:  int cv::ml::StatModel::getVarCount()
+    private static native int getVarCount_0(long nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/ml/TrainData.java b/opencv41/src/main/java/org/opencv/ml/TrainData.java
new file mode 100644 (file)
index 0000000..174a496
--- /dev/null
@@ -0,0 +1,789 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.ml;
+
+import java.lang.String;
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.ml.TrainData;
+import org.opencv.utils.Converters;
+
+// C++: class TrainData
+//javadoc: TrainData
+
+public class TrainData {
+
+    protected final long nativeObj;
+    protected TrainData(long addr) { nativeObj = addr; }
+
+    public long getNativeObjAddr() { return nativeObj; }
+
+    // internal usage only
+    public static TrainData __fromPtr__(long addr) { return new TrainData(addr); }
+
+    //
+    // C++:  Mat cv::ml::TrainData::getCatMap()
+    //
+
+    //javadoc: TrainData::getCatMap()
+    public  Mat getCatMap()
+    {
+        
+        Mat retVal = new Mat(getCatMap_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getCatOfs()
+    //
+
+    //javadoc: TrainData::getCatOfs()
+    public  Mat getCatOfs()
+    {
+        
+        Mat retVal = new Mat(getCatOfs_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getClassLabels()
+    //
+
+    //javadoc: TrainData::getClassLabels()
+    public  Mat getClassLabels()
+    {
+        
+        Mat retVal = new Mat(getClassLabels_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getDefaultSubstValues()
+    //
+
+    //javadoc: TrainData::getDefaultSubstValues()
+    public  Mat getDefaultSubstValues()
+    {
+        
+        Mat retVal = new Mat(getDefaultSubstValues_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getMissing()
+    //
+
+    //javadoc: TrainData::getMissing()
+    public  Mat getMissing()
+    {
+        
+        Mat retVal = new Mat(getMissing_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getNormCatResponses()
+    //
+
+    //javadoc: TrainData::getNormCatResponses()
+    public  Mat getNormCatResponses()
+    {
+        
+        Mat retVal = new Mat(getNormCatResponses_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getResponses()
+    //
+
+    //javadoc: TrainData::getResponses()
+    public  Mat getResponses()
+    {
+        
+        Mat retVal = new Mat(getResponses_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getSampleWeights()
+    //
+
+    //javadoc: TrainData::getSampleWeights()
+    public  Mat getSampleWeights()
+    {
+        
+        Mat retVal = new Mat(getSampleWeights_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getSamples()
+    //
+
+    //javadoc: TrainData::getSamples()
+    public  Mat getSamples()
+    {
+        
+        Mat retVal = new Mat(getSamples_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Mat cv::ml::TrainData::getSubMatrix(Mat matrix, Mat idx, int layout)
+    //
+
+    //javadoc: TrainData::getSubMatrix(matrix, idx, layout)
+    public static Mat getSubMatrix(Mat matrix, Mat idx, int layout)
+    {
+        
+        Mat retVal = new Mat(getSubMatrix_0(matrix.nativeObj, idx.nativeObj, layout));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Mat cv::ml::TrainData::getSubVector(Mat vec, Mat idx)
+    //
+
+    //javadoc: TrainData::getSubVector(vec, idx)
+    public static Mat getSubVector(Mat vec, Mat idx)
+    {
+        
+        Mat retVal = new Mat(getSubVector_0(vec.nativeObj, idx.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getTestNormCatResponses()
+    //
+
+    //javadoc: TrainData::getTestNormCatResponses()
+    public  Mat getTestNormCatResponses()
+    {
+        
+        Mat retVal = new Mat(getTestNormCatResponses_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getTestResponses()
+    //
+
+    //javadoc: TrainData::getTestResponses()
+    public  Mat getTestResponses()
+    {
+        
+        Mat retVal = new Mat(getTestResponses_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getTestSampleIdx()
+    //
+
+    //javadoc: TrainData::getTestSampleIdx()
+    public  Mat getTestSampleIdx()
+    {
+        
+        Mat retVal = new Mat(getTestSampleIdx_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getTestSampleWeights()
+    //
+
+    //javadoc: TrainData::getTestSampleWeights()
+    public  Mat getTestSampleWeights()
+    {
+        
+        Mat retVal = new Mat(getTestSampleWeights_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getTestSamples()
+    //
+
+    //javadoc: TrainData::getTestSamples()
+    public  Mat getTestSamples()
+    {
+        
+        Mat retVal = new Mat(getTestSamples_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getTrainNormCatResponses()
+    //
+
+    //javadoc: TrainData::getTrainNormCatResponses()
+    public  Mat getTrainNormCatResponses()
+    {
+        
+        Mat retVal = new Mat(getTrainNormCatResponses_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getTrainResponses()
+    //
+
+    //javadoc: TrainData::getTrainResponses()
+    public  Mat getTrainResponses()
+    {
+        
+        Mat retVal = new Mat(getTrainResponses_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getTrainSampleIdx()
+    //
+
+    //javadoc: TrainData::getTrainSampleIdx()
+    public  Mat getTrainSampleIdx()
+    {
+        
+        Mat retVal = new Mat(getTrainSampleIdx_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getTrainSampleWeights()
+    //
+
+    //javadoc: TrainData::getTrainSampleWeights()
+    public  Mat getTrainSampleWeights()
+    {
+        
+        Mat retVal = new Mat(getTrainSampleWeights_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getTrainSamples(int layout = ROW_SAMPLE, bool compressSamples = true, bool compressVars = true)
+    //
+
+    //javadoc: TrainData::getTrainSamples(layout, compressSamples, compressVars)
+    public  Mat getTrainSamples(int layout, boolean compressSamples, boolean compressVars)
+    {
+        
+        Mat retVal = new Mat(getTrainSamples_0(nativeObj, layout, compressSamples, compressVars));
+        
+        return retVal;
+    }
+
+    //javadoc: TrainData::getTrainSamples(layout, compressSamples)
+    public  Mat getTrainSamples(int layout, boolean compressSamples)
+    {
+        
+        Mat retVal = new Mat(getTrainSamples_1(nativeObj, layout, compressSamples));
+        
+        return retVal;
+    }
+
+    //javadoc: TrainData::getTrainSamples(layout)
+    public  Mat getTrainSamples(int layout)
+    {
+        
+        Mat retVal = new Mat(getTrainSamples_2(nativeObj, layout));
+        
+        return retVal;
+    }
+
+    //javadoc: TrainData::getTrainSamples()
+    public  Mat getTrainSamples()
+    {
+        
+        Mat retVal = new Mat(getTrainSamples_3(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getVarIdx()
+    //
+
+    //javadoc: TrainData::getVarIdx()
+    public  Mat getVarIdx()
+    {
+        
+        Mat retVal = new Mat(getVarIdx_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getVarSymbolFlags()
+    //
+
+    //javadoc: TrainData::getVarSymbolFlags()
+    public  Mat getVarSymbolFlags()
+    {
+        
+        Mat retVal = new Mat(getVarSymbolFlags_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::ml::TrainData::getVarType()
+    //
+
+    //javadoc: TrainData::getVarType()
+    public  Mat getVarType()
+    {
+        
+        Mat retVal = new Mat(getVarType_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static Ptr_TrainData cv::ml::TrainData::create(Mat samples, int layout, Mat responses, Mat varIdx = Mat(), Mat sampleIdx = Mat(), Mat sampleWeights = Mat(), Mat varType = Mat())
+    //
+
+    //javadoc: TrainData::create(samples, layout, responses, varIdx, sampleIdx, sampleWeights, varType)
+    public static TrainData create(Mat samples, int layout, Mat responses, Mat varIdx, Mat sampleIdx, Mat sampleWeights, Mat varType)
+    {
+        
+        TrainData retVal = TrainData.__fromPtr__(create_0(samples.nativeObj, layout, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, sampleWeights.nativeObj, varType.nativeObj));
+        
+        return retVal;
+    }
+
+    //javadoc: TrainData::create(samples, layout, responses, varIdx, sampleIdx, sampleWeights)
+    public static TrainData create(Mat samples, int layout, Mat responses, Mat varIdx, Mat sampleIdx, Mat sampleWeights)
+    {
+        
+        TrainData retVal = TrainData.__fromPtr__(create_1(samples.nativeObj, layout, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, sampleWeights.nativeObj));
+        
+        return retVal;
+    }
+
+    //javadoc: TrainData::create(samples, layout, responses, varIdx, sampleIdx)
+    public static TrainData create(Mat samples, int layout, Mat responses, Mat varIdx, Mat sampleIdx)
+    {
+        
+        TrainData retVal = TrainData.__fromPtr__(create_2(samples.nativeObj, layout, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj));
+        
+        return retVal;
+    }
+
+    //javadoc: TrainData::create(samples, layout, responses, varIdx)
+    public static TrainData create(Mat samples, int layout, Mat responses, Mat varIdx)
+    {
+        
+        TrainData retVal = TrainData.__fromPtr__(create_3(samples.nativeObj, layout, responses.nativeObj, varIdx.nativeObj));
+        
+        return retVal;
+    }
+
+    //javadoc: TrainData::create(samples, layout, responses)
+    public static TrainData create(Mat samples, int layout, Mat responses)
+    {
+        
+        TrainData retVal = TrainData.__fromPtr__(create_4(samples.nativeObj, layout, responses.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::TrainData::getCatCount(int vi)
+    //
+
+    //javadoc: TrainData::getCatCount(vi)
+    public  int getCatCount(int vi)
+    {
+        
+        int retVal = getCatCount_0(nativeObj, vi);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::TrainData::getLayout()
+    //
+
+    //javadoc: TrainData::getLayout()
+    public  int getLayout()
+    {
+        
+        int retVal = getLayout_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::TrainData::getNAllVars()
+    //
+
+    //javadoc: TrainData::getNAllVars()
+    public  int getNAllVars()
+    {
+        
+        int retVal = getNAllVars_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::TrainData::getNSamples()
+    //
+
+    //javadoc: TrainData::getNSamples()
+    public  int getNSamples()
+    {
+        
+        int retVal = getNSamples_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::TrainData::getNTestSamples()
+    //
+
+    //javadoc: TrainData::getNTestSamples()
+    public  int getNTestSamples()
+    {
+        
+        int retVal = getNTestSamples_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::TrainData::getNTrainSamples()
+    //
+
+    //javadoc: TrainData::getNTrainSamples()
+    public  int getNTrainSamples()
+    {
+        
+        int retVal = getNTrainSamples_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::TrainData::getNVars()
+    //
+
+    //javadoc: TrainData::getNVars()
+    public  int getNVars()
+    {
+        
+        int retVal = getNVars_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::ml::TrainData::getResponseType()
+    //
+
+    //javadoc: TrainData::getResponseType()
+    public  int getResponseType()
+    {
+        
+        int retVal = getResponseType_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::ml::TrainData::getNames(vector_String names)
+    //
+
+    //javadoc: TrainData::getNames(names)
+    public  void getNames(List<String> names)
+    {
+        
+        getNames_0(nativeObj, names);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::TrainData::getSample(Mat varIdx, int sidx, float* buf)
+    //
+
+    //javadoc: TrainData::getSample(varIdx, sidx, buf)
+    public  void getSample(Mat varIdx, int sidx, float buf)
+    {
+        
+        getSample_0(nativeObj, varIdx.nativeObj, sidx, buf);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::TrainData::getValues(int vi, Mat sidx, float* values)
+    //
+
+    //javadoc: TrainData::getValues(vi, sidx, values)
+    public  void getValues(int vi, Mat sidx, float values)
+    {
+        
+        getValues_0(nativeObj, vi, sidx.nativeObj, values);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::TrainData::setTrainTestSplit(int count, bool shuffle = true)
+    //
+
+    //javadoc: TrainData::setTrainTestSplit(count, shuffle)
+    public  void setTrainTestSplit(int count, boolean shuffle)
+    {
+        
+        setTrainTestSplit_0(nativeObj, count, shuffle);
+        
+        return;
+    }
+
+    //javadoc: TrainData::setTrainTestSplit(count)
+    public  void setTrainTestSplit(int count)
+    {
+        
+        setTrainTestSplit_1(nativeObj, count);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::TrainData::setTrainTestSplitRatio(double ratio, bool shuffle = true)
+    //
+
+    //javadoc: TrainData::setTrainTestSplitRatio(ratio, shuffle)
+    public  void setTrainTestSplitRatio(double ratio, boolean shuffle)
+    {
+        
+        setTrainTestSplitRatio_0(nativeObj, ratio, shuffle);
+        
+        return;
+    }
+
+    //javadoc: TrainData::setTrainTestSplitRatio(ratio)
+    public  void setTrainTestSplitRatio(double ratio)
+    {
+        
+        setTrainTestSplitRatio_1(nativeObj, ratio);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::ml::TrainData::shuffleTrainTest()
+    //
+
+    //javadoc: TrainData::shuffleTrainTest()
+    public  void shuffleTrainTest()
+    {
+        
+        shuffleTrainTest_0(nativeObj);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  Mat cv::ml::TrainData::getCatMap()
+    private static native long getCatMap_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getCatOfs()
+    private static native long getCatOfs_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getClassLabels()
+    private static native long getClassLabels_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getDefaultSubstValues()
+    private static native long getDefaultSubstValues_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getMissing()
+    private static native long getMissing_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getNormCatResponses()
+    private static native long getNormCatResponses_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getResponses()
+    private static native long getResponses_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getSampleWeights()
+    private static native long getSampleWeights_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getSamples()
+    private static native long getSamples_0(long nativeObj);
+
+    // C++: static Mat cv::ml::TrainData::getSubMatrix(Mat matrix, Mat idx, int layout)
+    private static native long getSubMatrix_0(long matrix_nativeObj, long idx_nativeObj, int layout);
+
+    // C++: static Mat cv::ml::TrainData::getSubVector(Mat vec, Mat idx)
+    private static native long getSubVector_0(long vec_nativeObj, long idx_nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getTestNormCatResponses()
+    private static native long getTestNormCatResponses_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getTestResponses()
+    private static native long getTestResponses_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getTestSampleIdx()
+    private static native long getTestSampleIdx_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getTestSampleWeights()
+    private static native long getTestSampleWeights_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getTestSamples()
+    private static native long getTestSamples_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getTrainNormCatResponses()
+    private static native long getTrainNormCatResponses_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getTrainResponses()
+    private static native long getTrainResponses_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getTrainSampleIdx()
+    private static native long getTrainSampleIdx_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getTrainSampleWeights()
+    private static native long getTrainSampleWeights_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getTrainSamples(int layout = ROW_SAMPLE, bool compressSamples = true, bool compressVars = true)
+    private static native long getTrainSamples_0(long nativeObj, int layout, boolean compressSamples, boolean compressVars);
+    private static native long getTrainSamples_1(long nativeObj, int layout, boolean compressSamples);
+    private static native long getTrainSamples_2(long nativeObj, int layout);
+    private static native long getTrainSamples_3(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getVarIdx()
+    private static native long getVarIdx_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getVarSymbolFlags()
+    private static native long getVarSymbolFlags_0(long nativeObj);
+
+    // C++:  Mat cv::ml::TrainData::getVarType()
+    private static native long getVarType_0(long nativeObj);
+
+    // C++: static Ptr_TrainData cv::ml::TrainData::create(Mat samples, int layout, Mat responses, Mat varIdx = Mat(), Mat sampleIdx = Mat(), Mat sampleWeights = Mat(), Mat varType = Mat())
+    private static native long create_0(long samples_nativeObj, int layout, long responses_nativeObj, long varIdx_nativeObj, long sampleIdx_nativeObj, long sampleWeights_nativeObj, long varType_nativeObj);
+    private static native long create_1(long samples_nativeObj, int layout, long responses_nativeObj, long varIdx_nativeObj, long sampleIdx_nativeObj, long sampleWeights_nativeObj);
+    private static native long create_2(long samples_nativeObj, int layout, long responses_nativeObj, long varIdx_nativeObj, long sampleIdx_nativeObj);
+    private static native long create_3(long samples_nativeObj, int layout, long responses_nativeObj, long varIdx_nativeObj);
+    private static native long create_4(long samples_nativeObj, int layout, long responses_nativeObj);
+
+    // C++:  int cv::ml::TrainData::getCatCount(int vi)
+    private static native int getCatCount_0(long nativeObj, int vi);
+
+    // C++:  int cv::ml::TrainData::getLayout()
+    private static native int getLayout_0(long nativeObj);
+
+    // C++:  int cv::ml::TrainData::getNAllVars()
+    private static native int getNAllVars_0(long nativeObj);
+
+    // C++:  int cv::ml::TrainData::getNSamples()
+    private static native int getNSamples_0(long nativeObj);
+
+    // C++:  int cv::ml::TrainData::getNTestSamples()
+    private static native int getNTestSamples_0(long nativeObj);
+
+    // C++:  int cv::ml::TrainData::getNTrainSamples()
+    private static native int getNTrainSamples_0(long nativeObj);
+
+    // C++:  int cv::ml::TrainData::getNVars()
+    private static native int getNVars_0(long nativeObj);
+
+    // C++:  int cv::ml::TrainData::getResponseType()
+    private static native int getResponseType_0(long nativeObj);
+
+    // C++:  void cv::ml::TrainData::getNames(vector_String names)
+    private static native void getNames_0(long nativeObj, List<String> names);
+
+    // C++:  void cv::ml::TrainData::getSample(Mat varIdx, int sidx, float* buf)
+    private static native void getSample_0(long nativeObj, long varIdx_nativeObj, int sidx, float buf);
+
+    // C++:  void cv::ml::TrainData::getValues(int vi, Mat sidx, float* values)
+    private static native void getValues_0(long nativeObj, int vi, long sidx_nativeObj, float values);
+
+    // C++:  void cv::ml::TrainData::setTrainTestSplit(int count, bool shuffle = true)
+    private static native void setTrainTestSplit_0(long nativeObj, int count, boolean shuffle);
+    private static native void setTrainTestSplit_1(long nativeObj, int count);
+
+    // C++:  void cv::ml::TrainData::setTrainTestSplitRatio(double ratio, bool shuffle = true)
+    private static native void setTrainTestSplitRatio_0(long nativeObj, double ratio, boolean shuffle);
+    private static native void setTrainTestSplitRatio_1(long nativeObj, double ratio);
+
+    // C++:  void cv::ml::TrainData::shuffleTrainTest()
+    private static native void shuffleTrainTest_0(long nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/objdetect/BaseCascadeClassifier.java b/opencv41/src/main/java/org/opencv/objdetect/BaseCascadeClassifier.java
new file mode 100644 (file)
index 0000000..8e9afa0
--- /dev/null
@@ -0,0 +1,28 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.objdetect;
+
+import org.opencv.core.Algorithm;
+
+// C++: class BaseCascadeClassifier
+//javadoc: BaseCascadeClassifier
+
+public class BaseCascadeClassifier extends Algorithm {
+
+    protected BaseCascadeClassifier(long addr) { super(addr); }
+
+    // internal usage only
+    public static BaseCascadeClassifier __fromPtr__(long addr) { return new BaseCascadeClassifier(addr); }
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/objdetect/CascadeClassifier.java b/opencv41/src/main/java/org/opencv/objdetect/CascadeClassifier.java
new file mode 100644 (file)
index 0000000..462dc92
--- /dev/null
@@ -0,0 +1,413 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.objdetect;
+
+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.MatOfRect;
+import org.opencv.core.Size;
+import org.opencv.utils.Converters;
+
+// C++: class CascadeClassifier
+//javadoc: CascadeClassifier
+
+public class CascadeClassifier {
+
+    protected final long nativeObj;
+    protected CascadeClassifier(long addr) { nativeObj = addr; }
+
+    public long getNativeObjAddr() { return nativeObj; }
+
+    // internal usage only
+    public static CascadeClassifier __fromPtr__(long addr) { return new CascadeClassifier(addr); }
+
+    //
+    // C++:   cv::CascadeClassifier::CascadeClassifier(String filename)
+    //
+
+    //javadoc: CascadeClassifier::CascadeClassifier(filename)
+    public   CascadeClassifier(String filename)
+    {
+        
+        nativeObj = CascadeClassifier_0(filename);
+        
+        return;
+    }
+
+
+    //
+    // C++:   cv::CascadeClassifier::CascadeClassifier()
+    //
+
+    //javadoc: CascadeClassifier::CascadeClassifier()
+    public   CascadeClassifier()
+    {
+        
+        nativeObj = CascadeClassifier_1();
+        
+        return;
+    }
+
+
+    //
+    // C++:  Size cv::CascadeClassifier::getOriginalWindowSize()
+    //
+
+    //javadoc: CascadeClassifier::getOriginalWindowSize()
+    public  Size getOriginalWindowSize()
+    {
+        
+        Size retVal = new Size(getOriginalWindowSize_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static bool cv::CascadeClassifier::convert(String oldcascade, String newcascade)
+    //
+
+    //javadoc: CascadeClassifier::convert(oldcascade, newcascade)
+    public static boolean convert(String oldcascade, String newcascade)
+    {
+        
+        boolean retVal = convert_0(oldcascade, newcascade);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::CascadeClassifier::empty()
+    //
+
+    //javadoc: CascadeClassifier::empty()
+    public  boolean empty()
+    {
+        
+        boolean retVal = empty_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::CascadeClassifier::isOldFormatCascade()
+    //
+
+    //javadoc: CascadeClassifier::isOldFormatCascade()
+    public  boolean isOldFormatCascade()
+    {
+        
+        boolean retVal = isOldFormatCascade_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::CascadeClassifier::load(String filename)
+    //
+
+    //javadoc: CascadeClassifier::load(filename)
+    public  boolean load(String filename)
+    {
+        
+        boolean retVal = load_0(nativeObj, filename);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::CascadeClassifier::read(FileNode node)
+    //
+
+    // Unknown type 'FileNode' (I), skipping the function
+
+
+    //
+    // C++:  int cv::CascadeClassifier::getFeatureType()
+    //
+
+    //javadoc: CascadeClassifier::getFeatureType()
+    public  int getFeatureType()
+    {
+        
+        int retVal = getFeatureType_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::CascadeClassifier::detectMultiScale(Mat image, vector_Rect& objects, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size())
+    //
+
+    //javadoc: CascadeClassifier::detectMultiScale(image, objects, scaleFactor, minNeighbors, flags, minSize, maxSize)
+    public  void detectMultiScale(Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
+    {
+        Mat objects_mat = objects;
+        detectMultiScale_0(nativeObj, image.nativeObj, objects_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
+        
+        return;
+    }
+
+    //javadoc: CascadeClassifier::detectMultiScale(image, objects, scaleFactor, minNeighbors, flags, minSize)
+    public  void detectMultiScale(Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags, Size minSize)
+    {
+        Mat objects_mat = objects;
+        detectMultiScale_1(nativeObj, image.nativeObj, objects_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height);
+        
+        return;
+    }
+
+    //javadoc: CascadeClassifier::detectMultiScale(image, objects, scaleFactor, minNeighbors, flags)
+    public  void detectMultiScale(Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags)
+    {
+        Mat objects_mat = objects;
+        detectMultiScale_2(nativeObj, image.nativeObj, objects_mat.nativeObj, scaleFactor, minNeighbors, flags);
+        
+        return;
+    }
+
+    //javadoc: CascadeClassifier::detectMultiScale(image, objects, scaleFactor, minNeighbors)
+    public  void detectMultiScale(Mat image, MatOfRect objects, double scaleFactor, int minNeighbors)
+    {
+        Mat objects_mat = objects;
+        detectMultiScale_3(nativeObj, image.nativeObj, objects_mat.nativeObj, scaleFactor, minNeighbors);
+        
+        return;
+    }
+
+    //javadoc: CascadeClassifier::detectMultiScale(image, objects, scaleFactor)
+    public  void detectMultiScale(Mat image, MatOfRect objects, double scaleFactor)
+    {
+        Mat objects_mat = objects;
+        detectMultiScale_4(nativeObj, image.nativeObj, objects_mat.nativeObj, scaleFactor);
+        
+        return;
+    }
+
+    //javadoc: CascadeClassifier::detectMultiScale(image, objects)
+    public  void detectMultiScale(Mat image, MatOfRect objects)
+    {
+        Mat objects_mat = objects;
+        detectMultiScale_5(nativeObj, image.nativeObj, objects_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::CascadeClassifier::detectMultiScale(Mat image, vector_Rect& objects, vector_int& numDetections, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size())
+    //
+
+    //javadoc: CascadeClassifier::detectMultiScale2(image, objects, numDetections, scaleFactor, minNeighbors, flags, minSize, maxSize)
+    public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
+    {
+        Mat objects_mat = objects;
+        Mat numDetections_mat = numDetections;
+        detectMultiScale2_0(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
+        
+        return;
+    }
+
+    //javadoc: CascadeClassifier::detectMultiScale2(image, objects, numDetections, scaleFactor, minNeighbors, flags, minSize)
+    public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, Size minSize)
+    {
+        Mat objects_mat = objects;
+        Mat numDetections_mat = numDetections;
+        detectMultiScale2_1(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height);
+        
+        return;
+    }
+
+    //javadoc: CascadeClassifier::detectMultiScale2(image, objects, numDetections, scaleFactor, minNeighbors, flags)
+    public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags)
+    {
+        Mat objects_mat = objects;
+        Mat numDetections_mat = numDetections;
+        detectMultiScale2_2(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors, flags);
+        
+        return;
+    }
+
+    //javadoc: CascadeClassifier::detectMultiScale2(image, objects, numDetections, scaleFactor, minNeighbors)
+    public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors)
+    {
+        Mat objects_mat = objects;
+        Mat numDetections_mat = numDetections;
+        detectMultiScale2_3(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors);
+        
+        return;
+    }
+
+    //javadoc: CascadeClassifier::detectMultiScale2(image, objects, numDetections, scaleFactor)
+    public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor)
+    {
+        Mat objects_mat = objects;
+        Mat numDetections_mat = numDetections;
+        detectMultiScale2_4(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor);
+        
+        return;
+    }
+
+    //javadoc: CascadeClassifier::detectMultiScale2(image, objects, numDetections)
+    public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections)
+    {
+        Mat objects_mat = objects;
+        Mat numDetections_mat = numDetections;
+        detectMultiScale2_5(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::CascadeClassifier::detectMultiScale(Mat image, vector_Rect& objects, vector_int& rejectLevels, vector_double& levelWeights, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size(), bool outputRejectLevels = false)
+    //
+
+    //javadoc: CascadeClassifier::detectMultiScale3(image, objects, rejectLevels, levelWeights, scaleFactor, minNeighbors, flags, minSize, maxSize, outputRejectLevels)
+    public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize, boolean outputRejectLevels)
+    {
+        Mat objects_mat = objects;
+        Mat rejectLevels_mat = rejectLevels;
+        Mat levelWeights_mat = levelWeights;
+        detectMultiScale3_0(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height, outputRejectLevels);
+        
+        return;
+    }
+
+    //javadoc: CascadeClassifier::detectMultiScale3(image, objects, rejectLevels, levelWeights, scaleFactor, minNeighbors, flags, minSize, maxSize)
+    public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
+    {
+        Mat objects_mat = objects;
+        Mat rejectLevels_mat = rejectLevels;
+        Mat levelWeights_mat = levelWeights;
+        detectMultiScale3_1(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
+        
+        return;
+    }
+
+    //javadoc: CascadeClassifier::detectMultiScale3(image, objects, rejectLevels, levelWeights, scaleFactor, minNeighbors, flags, minSize)
+    public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize)
+    {
+        Mat objects_mat = objects;
+        Mat rejectLevels_mat = rejectLevels;
+        Mat levelWeights_mat = levelWeights;
+        detectMultiScale3_2(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height);
+        
+        return;
+    }
+
+    //javadoc: CascadeClassifier::detectMultiScale3(image, objects, rejectLevels, levelWeights, scaleFactor, minNeighbors, flags)
+    public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags)
+    {
+        Mat objects_mat = objects;
+        Mat rejectLevels_mat = rejectLevels;
+        Mat levelWeights_mat = levelWeights;
+        detectMultiScale3_3(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor, minNeighbors, flags);
+        
+        return;
+    }
+
+    //javadoc: CascadeClassifier::detectMultiScale3(image, objects, rejectLevels, levelWeights, scaleFactor, minNeighbors)
+    public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors)
+    {
+        Mat objects_mat = objects;
+        Mat rejectLevels_mat = rejectLevels;
+        Mat levelWeights_mat = levelWeights;
+        detectMultiScale3_4(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor, minNeighbors);
+        
+        return;
+    }
+
+    //javadoc: CascadeClassifier::detectMultiScale3(image, objects, rejectLevels, levelWeights, scaleFactor)
+    public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor)
+    {
+        Mat objects_mat = objects;
+        Mat rejectLevels_mat = rejectLevels;
+        Mat levelWeights_mat = levelWeights;
+        detectMultiScale3_5(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor);
+        
+        return;
+    }
+
+    //javadoc: CascadeClassifier::detectMultiScale3(image, objects, rejectLevels, levelWeights)
+    public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights)
+    {
+        Mat objects_mat = objects;
+        Mat rejectLevels_mat = rejectLevels;
+        Mat levelWeights_mat = levelWeights;
+        detectMultiScale3_6(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:   cv::CascadeClassifier::CascadeClassifier(String filename)
+    private static native long CascadeClassifier_0(String filename);
+
+    // C++:   cv::CascadeClassifier::CascadeClassifier()
+    private static native long CascadeClassifier_1();
+
+    // C++:  Size cv::CascadeClassifier::getOriginalWindowSize()
+    private static native double[] getOriginalWindowSize_0(long nativeObj);
+
+    // C++: static bool cv::CascadeClassifier::convert(String oldcascade, String newcascade)
+    private static native boolean convert_0(String oldcascade, String newcascade);
+
+    // C++:  bool cv::CascadeClassifier::empty()
+    private static native boolean empty_0(long nativeObj);
+
+    // C++:  bool cv::CascadeClassifier::isOldFormatCascade()
+    private static native boolean isOldFormatCascade_0(long nativeObj);
+
+    // C++:  bool cv::CascadeClassifier::load(String filename)
+    private static native boolean load_0(long nativeObj, String filename);
+
+    // C++:  int cv::CascadeClassifier::getFeatureType()
+    private static native int getFeatureType_0(long nativeObj);
+
+    // C++:  void cv::CascadeClassifier::detectMultiScale(Mat image, vector_Rect& objects, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size())
+    private static native void detectMultiScale_0(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, double scaleFactor, int minNeighbors, int flags, double minSize_width, double minSize_height, double maxSize_width, double maxSize_height);
+    private static native void detectMultiScale_1(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, double scaleFactor, int minNeighbors, int flags, double minSize_width, double minSize_height);
+    private static native void detectMultiScale_2(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, double scaleFactor, int minNeighbors, int flags);
+    private static native void detectMultiScale_3(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, double scaleFactor, int minNeighbors);
+    private static native void detectMultiScale_4(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, double scaleFactor);
+    private static native void detectMultiScale_5(long nativeObj, long image_nativeObj, long objects_mat_nativeObj);
+
+    // C++:  void cv::CascadeClassifier::detectMultiScale(Mat image, vector_Rect& objects, vector_int& numDetections, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size())
+    private static native void detectMultiScale2_0(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, long numDetections_mat_nativeObj, double scaleFactor, int minNeighbors, int flags, double minSize_width, double minSize_height, double maxSize_width, double maxSize_height);
+    private static native void detectMultiScale2_1(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, long numDetections_mat_nativeObj, double scaleFactor, int minNeighbors, int flags, double minSize_width, double minSize_height);
+    private static native void detectMultiScale2_2(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, long numDetections_mat_nativeObj, double scaleFactor, int minNeighbors, int flags);
+    private static native void detectMultiScale2_3(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, long numDetections_mat_nativeObj, double scaleFactor, int minNeighbors);
+    private static native void detectMultiScale2_4(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, long numDetections_mat_nativeObj, double scaleFactor);
+    private static native void detectMultiScale2_5(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, long numDetections_mat_nativeObj);
+
+    // C++:  void cv::CascadeClassifier::detectMultiScale(Mat image, vector_Rect& objects, vector_int& rejectLevels, vector_double& levelWeights, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size(), bool outputRejectLevels = false)
+    private static native void detectMultiScale3_0(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, long rejectLevels_mat_nativeObj, long levelWeights_mat_nativeObj, double scaleFactor, int minNeighbors, int flags, double minSize_width, double minSize_height, double maxSize_width, double maxSize_height, boolean outputRejectLevels);
+    private static native void detectMultiScale3_1(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, long rejectLevels_mat_nativeObj, long levelWeights_mat_nativeObj, double scaleFactor, int minNeighbors, int flags, double minSize_width, double minSize_height, double maxSize_width, double maxSize_height);
+    private static native void detectMultiScale3_2(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, long rejectLevels_mat_nativeObj, long levelWeights_mat_nativeObj, double scaleFactor, int minNeighbors, int flags, double minSize_width, double minSize_height);
+    private static native void detectMultiScale3_3(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, long rejectLevels_mat_nativeObj, long levelWeights_mat_nativeObj, double scaleFactor, int minNeighbors, int flags);
+    private static native void detectMultiScale3_4(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, long rejectLevels_mat_nativeObj, long levelWeights_mat_nativeObj, double scaleFactor, int minNeighbors);
+    private static native void detectMultiScale3_5(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, long rejectLevels_mat_nativeObj, long levelWeights_mat_nativeObj, double scaleFactor);
+    private static native void detectMultiScale3_6(long nativeObj, long image_nativeObj, long objects_mat_nativeObj, long rejectLevels_mat_nativeObj, long levelWeights_mat_nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/objdetect/HOGDescriptor.java b/opencv41/src/main/java/org/opencv/objdetect/HOGDescriptor.java
new file mode 100644 (file)
index 0000000..b507eeb
--- /dev/null
@@ -0,0 +1,786 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.objdetect;
+
+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.MatOfFloat;
+import org.opencv.core.MatOfPoint;
+import org.opencv.core.MatOfRect;
+import org.opencv.core.Size;
+import org.opencv.utils.Converters;
+
+// C++: class HOGDescriptor
+//javadoc: HOGDescriptor
+
+public class HOGDescriptor {
+
+    protected final long nativeObj;
+    protected HOGDescriptor(long addr) { nativeObj = addr; }
+
+    public long getNativeObjAddr() { return nativeObj; }
+
+    // internal usage only
+    public static HOGDescriptor __fromPtr__(long addr) { return new HOGDescriptor(addr); }
+
+    // C++: enum DescriptorStorageFormat
+    public static final int
+            DESCR_FORMAT_COL_BY_COL = 0,
+            DESCR_FORMAT_ROW_BY_ROW = 1;
+
+
+    // C++: enum <unnamed>
+    public static final int
+            DEFAULT_NLEVELS = 64;
+
+
+    // C++: enum HistogramNormType
+    public static final int
+            L2Hys = 0;
+
+
+    //
+    // C++:   cv::HOGDescriptor::HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture = 1, double _winSigma = -1, HOGDescriptor_HistogramNormType _histogramNormType = HOGDescriptor::L2Hys, double _L2HysThreshold = 0.2, bool _gammaCorrection = false, int _nlevels = HOGDescriptor::DEFAULT_NLEVELS, bool _signedGradient = false)
+    //
+
+    //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold, _gammaCorrection, _nlevels, _signedGradient)
+    public   HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, boolean _gammaCorrection, int _nlevels, boolean _signedGradient)
+    {
+        
+        nativeObj = HOGDescriptor_0(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold, _gammaCorrection, _nlevels, _signedGradient);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold, _gammaCorrection, _nlevels)
+    public   HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, boolean _gammaCorrection, int _nlevels)
+    {
+        
+        nativeObj = HOGDescriptor_1(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold, _gammaCorrection, _nlevels);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold, _gammaCorrection)
+    public   HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, boolean _gammaCorrection)
+    {
+        
+        nativeObj = HOGDescriptor_2(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold, _gammaCorrection);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold)
+    public   HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold)
+    {
+        
+        nativeObj = HOGDescriptor_3(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins, _derivAperture, _winSigma, _histogramNormType)
+    public   HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType)
+    {
+        
+        nativeObj = HOGDescriptor_4(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins, _derivAperture, _winSigma, _histogramNormType);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins, _derivAperture, _winSigma)
+    public   HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma)
+    {
+        
+        nativeObj = HOGDescriptor_5(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins, _derivAperture, _winSigma);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins, _derivAperture)
+    public   HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture)
+    {
+        
+        nativeObj = HOGDescriptor_6(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins, _derivAperture);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins)
+    public   HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins)
+    {
+        
+        nativeObj = HOGDescriptor_7(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins);
+        
+        return;
+    }
+
+
+    //
+    // C++:   cv::HOGDescriptor::HOGDescriptor(String filename)
+    //
+
+    //javadoc: HOGDescriptor::HOGDescriptor(filename)
+    public   HOGDescriptor(String filename)
+    {
+        
+        nativeObj = HOGDescriptor_8(filename);
+        
+        return;
+    }
+
+
+    //
+    // C++:   cv::HOGDescriptor::HOGDescriptor()
+    //
+
+    //javadoc: HOGDescriptor::HOGDescriptor()
+    public   HOGDescriptor()
+    {
+        
+        nativeObj = HOGDescriptor_9();
+        
+        return;
+    }
+
+
+    //
+    // C++:  bool cv::HOGDescriptor::checkDetectorSize()
+    //
+
+    //javadoc: HOGDescriptor::checkDetectorSize()
+    public  boolean checkDetectorSize()
+    {
+        
+        boolean retVal = checkDetectorSize_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::HOGDescriptor::load(String filename, String objname = String())
+    //
+
+    //javadoc: HOGDescriptor::load(filename, objname)
+    public  boolean load(String filename, String objname)
+    {
+        
+        boolean retVal = load_0(nativeObj, filename, objname);
+        
+        return retVal;
+    }
+
+    //javadoc: HOGDescriptor::load(filename)
+    public  boolean load(String filename)
+    {
+        
+        boolean retVal = load_1(nativeObj, filename);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::HOGDescriptor::getWinSigma()
+    //
+
+    //javadoc: HOGDescriptor::getWinSigma()
+    public  double getWinSigma()
+    {
+        
+        double retVal = getWinSigma_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  size_t cv::HOGDescriptor::getDescriptorSize()
+    //
+
+    //javadoc: HOGDescriptor::getDescriptorSize()
+    public  long getDescriptorSize()
+    {
+        
+        long retVal = getDescriptorSize_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static vector_float cv::HOGDescriptor::getDaimlerPeopleDetector()
+    //
+
+    //javadoc: HOGDescriptor::getDaimlerPeopleDetector()
+    public static MatOfFloat getDaimlerPeopleDetector()
+    {
+        
+        MatOfFloat retVal = MatOfFloat.fromNativeAddr(getDaimlerPeopleDetector_0());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static vector_float cv::HOGDescriptor::getDefaultPeopleDetector()
+    //
+
+    //javadoc: HOGDescriptor::getDefaultPeopleDetector()
+    public static MatOfFloat getDefaultPeopleDetector()
+    {
+        
+        MatOfFloat retVal = MatOfFloat.fromNativeAddr(getDefaultPeopleDetector_0());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::HOGDescriptor::compute(Mat img, vector_float& descriptors, Size winStride = Size(), Size padding = Size(), vector_Point locations = std::vector<Point>())
+    //
+
+    //javadoc: HOGDescriptor::compute(img, descriptors, winStride, padding, locations)
+    public  void compute(Mat img, MatOfFloat descriptors, Size winStride, Size padding, MatOfPoint locations)
+    {
+        Mat descriptors_mat = descriptors;
+        Mat locations_mat = locations;
+        compute_0(nativeObj, img.nativeObj, descriptors_mat.nativeObj, winStride.width, winStride.height, padding.width, padding.height, locations_mat.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::compute(img, descriptors, winStride, padding)
+    public  void compute(Mat img, MatOfFloat descriptors, Size winStride, Size padding)
+    {
+        Mat descriptors_mat = descriptors;
+        compute_1(nativeObj, img.nativeObj, descriptors_mat.nativeObj, winStride.width, winStride.height, padding.width, padding.height);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::compute(img, descriptors, winStride)
+    public  void compute(Mat img, MatOfFloat descriptors, Size winStride)
+    {
+        Mat descriptors_mat = descriptors;
+        compute_2(nativeObj, img.nativeObj, descriptors_mat.nativeObj, winStride.width, winStride.height);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::compute(img, descriptors)
+    public  void compute(Mat img, MatOfFloat descriptors)
+    {
+        Mat descriptors_mat = descriptors;
+        compute_3(nativeObj, img.nativeObj, descriptors_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::HOGDescriptor::computeGradient(Mat img, Mat& grad, Mat& angleOfs, Size paddingTL = Size(), Size paddingBR = Size())
+    //
+
+    //javadoc: HOGDescriptor::computeGradient(img, grad, angleOfs, paddingTL, paddingBR)
+    public  void computeGradient(Mat img, Mat grad, Mat angleOfs, Size paddingTL, Size paddingBR)
+    {
+        
+        computeGradient_0(nativeObj, img.nativeObj, grad.nativeObj, angleOfs.nativeObj, paddingTL.width, paddingTL.height, paddingBR.width, paddingBR.height);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::computeGradient(img, grad, angleOfs, paddingTL)
+    public  void computeGradient(Mat img, Mat grad, Mat angleOfs, Size paddingTL)
+    {
+        
+        computeGradient_1(nativeObj, img.nativeObj, grad.nativeObj, angleOfs.nativeObj, paddingTL.width, paddingTL.height);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::computeGradient(img, grad, angleOfs)
+    public  void computeGradient(Mat img, Mat grad, Mat angleOfs)
+    {
+        
+        computeGradient_2(nativeObj, img.nativeObj, grad.nativeObj, angleOfs.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::HOGDescriptor::detect(Mat img, vector_Point& foundLocations, vector_double& weights, double hitThreshold = 0, Size winStride = Size(), Size padding = Size(), vector_Point searchLocations = std::vector<Point>())
+    //
+
+    //javadoc: HOGDescriptor::detect(img, foundLocations, weights, hitThreshold, winStride, padding, searchLocations)
+    public  void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride, Size padding, MatOfPoint searchLocations)
+    {
+        Mat foundLocations_mat = foundLocations;
+        Mat weights_mat = weights;
+        Mat searchLocations_mat = searchLocations;
+        detect_0(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, searchLocations_mat.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::detect(img, foundLocations, weights, hitThreshold, winStride, padding)
+    public  void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride, Size padding)
+    {
+        Mat foundLocations_mat = foundLocations;
+        Mat weights_mat = weights;
+        detect_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::detect(img, foundLocations, weights, hitThreshold, winStride)
+    public  void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride)
+    {
+        Mat foundLocations_mat = foundLocations;
+        Mat weights_mat = weights;
+        detect_2(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj, hitThreshold, winStride.width, winStride.height);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::detect(img, foundLocations, weights, hitThreshold)
+    public  void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold)
+    {
+        Mat foundLocations_mat = foundLocations;
+        Mat weights_mat = weights;
+        detect_3(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj, hitThreshold);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::detect(img, foundLocations, weights)
+    public  void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights)
+    {
+        Mat foundLocations_mat = foundLocations;
+        Mat weights_mat = weights;
+        detect_4(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::HOGDescriptor::detectMultiScale(Mat img, vector_Rect& foundLocations, vector_double& foundWeights, double hitThreshold = 0, Size winStride = Size(), Size padding = Size(), double scale = 1.05, double finalThreshold = 2.0, bool useMeanshiftGrouping = false)
+    //
+
+    //javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights, hitThreshold, winStride, padding, scale, finalThreshold, useMeanshiftGrouping)
+    public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold, boolean useMeanshiftGrouping)
+    {
+        Mat foundLocations_mat = foundLocations;
+        Mat foundWeights_mat = foundWeights;
+        detectMultiScale_0(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, scale, finalThreshold, useMeanshiftGrouping);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights, hitThreshold, winStride, padding, scale, finalThreshold)
+    public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold)
+    {
+        Mat foundLocations_mat = foundLocations;
+        Mat foundWeights_mat = foundWeights;
+        detectMultiScale_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, scale, finalThreshold);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights, hitThreshold, winStride, padding, scale)
+    public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale)
+    {
+        Mat foundLocations_mat = foundLocations;
+        Mat foundWeights_mat = foundWeights;
+        detectMultiScale_2(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, scale);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights, hitThreshold, winStride, padding)
+    public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding)
+    {
+        Mat foundLocations_mat = foundLocations;
+        Mat foundWeights_mat = foundWeights;
+        detectMultiScale_3(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights, hitThreshold, winStride)
+    public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride)
+    {
+        Mat foundLocations_mat = foundLocations;
+        Mat foundWeights_mat = foundWeights;
+        detectMultiScale_4(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights, hitThreshold)
+    public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold)
+    {
+        Mat foundLocations_mat = foundLocations;
+        Mat foundWeights_mat = foundWeights;
+        detectMultiScale_5(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights)
+    public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights)
+    {
+        Mat foundLocations_mat = foundLocations;
+        Mat foundWeights_mat = foundWeights;
+        detectMultiScale_6(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::HOGDescriptor::save(String filename, String objname = String())
+    //
+
+    //javadoc: HOGDescriptor::save(filename, objname)
+    public  void save(String filename, String objname)
+    {
+        
+        save_0(nativeObj, filename, objname);
+        
+        return;
+    }
+
+    //javadoc: HOGDescriptor::save(filename)
+    public  void save(String filename)
+    {
+        
+        save_1(nativeObj, filename);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::HOGDescriptor::setSVMDetector(Mat svmdetector)
+    //
+
+    //javadoc: HOGDescriptor::setSVMDetector(svmdetector)
+    public  void setSVMDetector(Mat svmdetector)
+    {
+        
+        setSVMDetector_0(nativeObj, svmdetector.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++: Size HOGDescriptor::winSize
+    //
+
+    //javadoc: HOGDescriptor::get_winSize()
+    public  Size get_winSize()
+    {
+        
+        Size retVal = new Size(get_winSize_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: Size HOGDescriptor::blockSize
+    //
+
+    //javadoc: HOGDescriptor::get_blockSize()
+    public  Size get_blockSize()
+    {
+        
+        Size retVal = new Size(get_blockSize_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: Size HOGDescriptor::blockStride
+    //
+
+    //javadoc: HOGDescriptor::get_blockStride()
+    public  Size get_blockStride()
+    {
+        
+        Size retVal = new Size(get_blockStride_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: Size HOGDescriptor::cellSize
+    //
+
+    //javadoc: HOGDescriptor::get_cellSize()
+    public  Size get_cellSize()
+    {
+        
+        Size retVal = new Size(get_cellSize_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: int HOGDescriptor::nbins
+    //
+
+    //javadoc: HOGDescriptor::get_nbins()
+    public  int get_nbins()
+    {
+        
+        int retVal = get_nbins_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: int HOGDescriptor::derivAperture
+    //
+
+    //javadoc: HOGDescriptor::get_derivAperture()
+    public  int get_derivAperture()
+    {
+        
+        int retVal = get_derivAperture_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: double HOGDescriptor::winSigma
+    //
+
+    //javadoc: HOGDescriptor::get_winSigma()
+    public  double get_winSigma()
+    {
+        
+        double retVal = get_winSigma_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: HOGDescriptor_HistogramNormType HOGDescriptor::histogramNormType
+    //
+
+    //javadoc: HOGDescriptor::get_histogramNormType()
+    public  int get_histogramNormType()
+    {
+        
+        int retVal = get_histogramNormType_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: double HOGDescriptor::L2HysThreshold
+    //
+
+    //javadoc: HOGDescriptor::get_L2HysThreshold()
+    public  double get_L2HysThreshold()
+    {
+        
+        double retVal = get_L2HysThreshold_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: bool HOGDescriptor::gammaCorrection
+    //
+
+    //javadoc: HOGDescriptor::get_gammaCorrection()
+    public  boolean get_gammaCorrection()
+    {
+        
+        boolean retVal = get_gammaCorrection_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: vector_float HOGDescriptor::svmDetector
+    //
+
+    //javadoc: HOGDescriptor::get_svmDetector()
+    public  MatOfFloat get_svmDetector()
+    {
+        
+        MatOfFloat retVal = MatOfFloat.fromNativeAddr(get_svmDetector_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: int HOGDescriptor::nlevels
+    //
+
+    //javadoc: HOGDescriptor::get_nlevels()
+    public  int get_nlevels()
+    {
+        
+        int retVal = get_nlevels_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: bool HOGDescriptor::signedGradient
+    //
+
+    //javadoc: HOGDescriptor::get_signedGradient()
+    public  boolean get_signedGradient()
+    {
+        
+        boolean retVal = get_signedGradient_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:   cv::HOGDescriptor::HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture = 1, double _winSigma = -1, HOGDescriptor_HistogramNormType _histogramNormType = HOGDescriptor::L2Hys, double _L2HysThreshold = 0.2, bool _gammaCorrection = false, int _nlevels = HOGDescriptor::DEFAULT_NLEVELS, bool _signedGradient = false)
+    private static native long HOGDescriptor_0(double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, boolean _gammaCorrection, int _nlevels, boolean _signedGradient);
+    private static native long HOGDescriptor_1(double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, boolean _gammaCorrection, int _nlevels);
+    private static native long HOGDescriptor_2(double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, boolean _gammaCorrection);
+    private static native long HOGDescriptor_3(double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold);
+    private static native long HOGDescriptor_4(double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType);
+    private static native long HOGDescriptor_5(double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins, int _derivAperture, double _winSigma);
+    private static native long HOGDescriptor_6(double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins, int _derivAperture);
+    private static native long HOGDescriptor_7(double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins);
+
+    // C++:   cv::HOGDescriptor::HOGDescriptor(String filename)
+    private static native long HOGDescriptor_8(String filename);
+
+    // C++:   cv::HOGDescriptor::HOGDescriptor()
+    private static native long HOGDescriptor_9();
+
+    // C++:  bool cv::HOGDescriptor::checkDetectorSize()
+    private static native boolean checkDetectorSize_0(long nativeObj);
+
+    // C++:  bool cv::HOGDescriptor::load(String filename, String objname = String())
+    private static native boolean load_0(long nativeObj, String filename, String objname);
+    private static native boolean load_1(long nativeObj, String filename);
+
+    // C++:  double cv::HOGDescriptor::getWinSigma()
+    private static native double getWinSigma_0(long nativeObj);
+
+    // C++:  size_t cv::HOGDescriptor::getDescriptorSize()
+    private static native long getDescriptorSize_0(long nativeObj);
+
+    // C++: static vector_float cv::HOGDescriptor::getDaimlerPeopleDetector()
+    private static native long getDaimlerPeopleDetector_0();
+
+    // C++: static vector_float cv::HOGDescriptor::getDefaultPeopleDetector()
+    private static native long getDefaultPeopleDetector_0();
+
+    // C++:  void cv::HOGDescriptor::compute(Mat img, vector_float& descriptors, Size winStride = Size(), Size padding = Size(), vector_Point locations = std::vector<Point>())
+    private static native void compute_0(long nativeObj, long img_nativeObj, long descriptors_mat_nativeObj, double winStride_width, double winStride_height, double padding_width, double padding_height, long locations_mat_nativeObj);
+    private static native void compute_1(long nativeObj, long img_nativeObj, long descriptors_mat_nativeObj, double winStride_width, double winStride_height, double padding_width, double padding_height);
+    private static native void compute_2(long nativeObj, long img_nativeObj, long descriptors_mat_nativeObj, double winStride_width, double winStride_height);
+    private static native void compute_3(long nativeObj, long img_nativeObj, long descriptors_mat_nativeObj);
+
+    // C++:  void cv::HOGDescriptor::computeGradient(Mat img, Mat& grad, Mat& angleOfs, Size paddingTL = Size(), Size paddingBR = Size())
+    private static native void computeGradient_0(long nativeObj, long img_nativeObj, long grad_nativeObj, long angleOfs_nativeObj, double paddingTL_width, double paddingTL_height, double paddingBR_width, double paddingBR_height);
+    private static native void computeGradient_1(long nativeObj, long img_nativeObj, long grad_nativeObj, long angleOfs_nativeObj, double paddingTL_width, double paddingTL_height);
+    private static native void computeGradient_2(long nativeObj, long img_nativeObj, long grad_nativeObj, long angleOfs_nativeObj);
+
+    // C++:  void cv::HOGDescriptor::detect(Mat img, vector_Point& foundLocations, vector_double& weights, double hitThreshold = 0, Size winStride = Size(), Size padding = Size(), vector_Point searchLocations = std::vector<Point>())
+    private static native void detect_0(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long weights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height, double padding_width, double padding_height, long searchLocations_mat_nativeObj);
+    private static native void detect_1(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long weights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height, double padding_width, double padding_height);
+    private static native void detect_2(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long weights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height);
+    private static native void detect_3(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long weights_mat_nativeObj, double hitThreshold);
+    private static native void detect_4(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long weights_mat_nativeObj);
+
+    // C++:  void cv::HOGDescriptor::detectMultiScale(Mat img, vector_Rect& foundLocations, vector_double& foundWeights, double hitThreshold = 0, Size winStride = Size(), Size padding = Size(), double scale = 1.05, double finalThreshold = 2.0, bool useMeanshiftGrouping = false)
+    private static native void detectMultiScale_0(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long foundWeights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height, double padding_width, double padding_height, double scale, double finalThreshold, boolean useMeanshiftGrouping);
+    private static native void detectMultiScale_1(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long foundWeights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height, double padding_width, double padding_height, double scale, double finalThreshold);
+    private static native void detectMultiScale_2(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long foundWeights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height, double padding_width, double padding_height, double scale);
+    private static native void detectMultiScale_3(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long foundWeights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height, double padding_width, double padding_height);
+    private static native void detectMultiScale_4(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long foundWeights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height);
+    private static native void detectMultiScale_5(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long foundWeights_mat_nativeObj, double hitThreshold);
+    private static native void detectMultiScale_6(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long foundWeights_mat_nativeObj);
+
+    // C++:  void cv::HOGDescriptor::save(String filename, String objname = String())
+    private static native void save_0(long nativeObj, String filename, String objname);
+    private static native void save_1(long nativeObj, String filename);
+
+    // C++:  void cv::HOGDescriptor::setSVMDetector(Mat svmdetector)
+    private static native void setSVMDetector_0(long nativeObj, long svmdetector_nativeObj);
+
+    // C++: Size HOGDescriptor::winSize
+    private static native double[] get_winSize_0(long nativeObj);
+
+    // C++: Size HOGDescriptor::blockSize
+    private static native double[] get_blockSize_0(long nativeObj);
+
+    // C++: Size HOGDescriptor::blockStride
+    private static native double[] get_blockStride_0(long nativeObj);
+
+    // C++: Size HOGDescriptor::cellSize
+    private static native double[] get_cellSize_0(long nativeObj);
+
+    // C++: int HOGDescriptor::nbins
+    private static native int get_nbins_0(long nativeObj);
+
+    // C++: int HOGDescriptor::derivAperture
+    private static native int get_derivAperture_0(long nativeObj);
+
+    // C++: double HOGDescriptor::winSigma
+    private static native double get_winSigma_0(long nativeObj);
+
+    // C++: HOGDescriptor_HistogramNormType HOGDescriptor::histogramNormType
+    private static native int get_histogramNormType_0(long nativeObj);
+
+    // C++: double HOGDescriptor::L2HysThreshold
+    private static native double get_L2HysThreshold_0(long nativeObj);
+
+    // C++: bool HOGDescriptor::gammaCorrection
+    private static native boolean get_gammaCorrection_0(long nativeObj);
+
+    // C++: vector_float HOGDescriptor::svmDetector
+    private static native long get_svmDetector_0(long nativeObj);
+
+    // C++: int HOGDescriptor::nlevels
+    private static native int get_nlevels_0(long nativeObj);
+
+    // C++: bool HOGDescriptor::signedGradient
+    private static native boolean get_signedGradient_0(long nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/objdetect/Objdetect.java b/opencv41/src/main/java/org/opencv/objdetect/Objdetect.java
new file mode 100644 (file)
index 0000000..97a8f79
--- /dev/null
@@ -0,0 +1,65 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.objdetect;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfInt;
+import org.opencv.core.MatOfRect;
+import org.opencv.utils.Converters;
+
+// C++: class Objdetect
+//javadoc: Objdetect
+
+public class Objdetect {
+
+    // C++: enum <unnamed>
+    public static final int
+            CASCADE_DO_CANNY_PRUNING = 1,
+            CASCADE_SCALE_IMAGE = 2,
+            CASCADE_FIND_BIGGEST_OBJECT = 4,
+            CASCADE_DO_ROUGH_SEARCH = 8;
+
+
+    // C++: enum ObjectStatus
+    public static final int
+            DetectionBasedTracker_DETECTED_NOT_SHOWN_YET = 0,
+            DetectionBasedTracker_DETECTED = 1,
+            DetectionBasedTracker_DETECTED_TEMPORARY_LOST = 2,
+            DetectionBasedTracker_WRONG_OBJECT = 3;
+
+
+    //
+    // C++:  void cv::groupRectangles(vector_Rect& rectList, vector_int& weights, int groupThreshold, double eps = 0.2)
+    //
+
+    //javadoc: groupRectangles(rectList, weights, groupThreshold, eps)
+    public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold, double eps)
+    {
+        Mat rectList_mat = rectList;
+        Mat weights_mat = weights;
+        groupRectangles_0(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold, eps);
+        
+        return;
+    }
+
+    //javadoc: groupRectangles(rectList, weights, groupThreshold)
+    public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold)
+    {
+        Mat rectList_mat = rectList;
+        Mat weights_mat = weights;
+        groupRectangles_1(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold);
+        
+        return;
+    }
+
+
+
+
+    // C++:  void cv::groupRectangles(vector_Rect& rectList, vector_int& weights, int groupThreshold, double eps = 0.2)
+    private static native void groupRectangles_0(long rectList_mat_nativeObj, long weights_mat_nativeObj, int groupThreshold, double eps);
+    private static native void groupRectangles_1(long rectList_mat_nativeObj, long weights_mat_nativeObj, int groupThreshold);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/objdetect/QRCodeDetector.java b/opencv41/src/main/java/org/opencv/objdetect/QRCodeDetector.java
new file mode 100644 (file)
index 0000000..67c2a6a
--- /dev/null
@@ -0,0 +1,164 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.objdetect;
+
+import java.lang.String;
+import org.opencv.core.Mat;
+
+// C++: class QRCodeDetector
+//javadoc: QRCodeDetector
+
+public class QRCodeDetector {
+
+    protected final long nativeObj;
+    protected QRCodeDetector(long addr) { nativeObj = addr; }
+
+    public long getNativeObjAddr() { return nativeObj; }
+
+    // internal usage only
+    public static QRCodeDetector __fromPtr__(long addr) { return new QRCodeDetector(addr); }
+
+    //
+    // C++:   cv::QRCodeDetector::QRCodeDetector()
+    //
+
+    //javadoc: QRCodeDetector::QRCodeDetector()
+    public   QRCodeDetector()
+    {
+        
+        nativeObj = QRCodeDetector_0();
+        
+        return;
+    }
+
+
+    //
+    // C++:  bool cv::QRCodeDetector::detect(Mat img, Mat& points)
+    //
+
+    //javadoc: QRCodeDetector::detect(img, points)
+    public  boolean detect(Mat img, Mat points)
+    {
+        
+        boolean retVal = detect_0(nativeObj, img.nativeObj, points.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  string cv::QRCodeDetector::decode(Mat img, Mat points, Mat& straight_qrcode = Mat())
+    //
+
+    //javadoc: QRCodeDetector::decode(img, points, straight_qrcode)
+    public  String decode(Mat img, Mat points, Mat straight_qrcode)
+    {
+        
+        String retVal = decode_0(nativeObj, img.nativeObj, points.nativeObj, straight_qrcode.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: QRCodeDetector::decode(img, points)
+    public  String decode(Mat img, Mat points)
+    {
+        
+        String retVal = decode_1(nativeObj, img.nativeObj, points.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  string cv::QRCodeDetector::detectAndDecode(Mat img, Mat& points = Mat(), Mat& straight_qrcode = Mat())
+    //
+
+    //javadoc: QRCodeDetector::detectAndDecode(img, points, straight_qrcode)
+    public  String detectAndDecode(Mat img, Mat points, Mat straight_qrcode)
+    {
+        
+        String retVal = detectAndDecode_0(nativeObj, img.nativeObj, points.nativeObj, straight_qrcode.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: QRCodeDetector::detectAndDecode(img, points)
+    public  String detectAndDecode(Mat img, Mat points)
+    {
+        
+        String retVal = detectAndDecode_1(nativeObj, img.nativeObj, points.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: QRCodeDetector::detectAndDecode(img)
+    public  String detectAndDecode(Mat img)
+    {
+        
+        String retVal = detectAndDecode_2(nativeObj, img.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::QRCodeDetector::setEpsX(double epsX)
+    //
+
+    //javadoc: QRCodeDetector::setEpsX(epsX)
+    public  void setEpsX(double epsX)
+    {
+        
+        setEpsX_0(nativeObj, epsX);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::QRCodeDetector::setEpsY(double epsY)
+    //
+
+    //javadoc: QRCodeDetector::setEpsY(epsY)
+    public  void setEpsY(double epsY)
+    {
+        
+        setEpsY_0(nativeObj, epsY);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:   cv::QRCodeDetector::QRCodeDetector()
+    private static native long QRCodeDetector_0();
+
+    // C++:  bool cv::QRCodeDetector::detect(Mat img, Mat& points)
+    private static native boolean detect_0(long nativeObj, long img_nativeObj, long points_nativeObj);
+
+    // C++:  string cv::QRCodeDetector::decode(Mat img, Mat points, Mat& straight_qrcode = Mat())
+    private static native String decode_0(long nativeObj, long img_nativeObj, long points_nativeObj, long straight_qrcode_nativeObj);
+    private static native String decode_1(long nativeObj, long img_nativeObj, long points_nativeObj);
+
+    // C++:  string cv::QRCodeDetector::detectAndDecode(Mat img, Mat& points = Mat(), Mat& straight_qrcode = Mat())
+    private static native String detectAndDecode_0(long nativeObj, long img_nativeObj, long points_nativeObj, long straight_qrcode_nativeObj);
+    private static native String detectAndDecode_1(long nativeObj, long img_nativeObj, long points_nativeObj);
+    private static native String detectAndDecode_2(long nativeObj, long img_nativeObj);
+
+    // C++:  void cv::QRCodeDetector::setEpsX(double epsX)
+    private static native void setEpsX_0(long nativeObj, double epsX);
+
+    // C++:  void cv::QRCodeDetector::setEpsY(double epsY)
+    private static native void setEpsY_0(long nativeObj, double epsY);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/osgi/OpenCVInterface.java b/opencv41/src/main/java/org/opencv/osgi/OpenCVInterface.java
new file mode 100644 (file)
index 0000000..83ffee1
--- /dev/null
@@ -0,0 +1,8 @@
+package org.opencv.osgi;
+
+/**
+ * Dummy interface to allow some integration testing within OSGi implementation.
+ */
+public interface OpenCVInterface
+{
+}
diff --git a/opencv41/src/main/java/org/opencv/osgi/OpenCVNativeLoader.java b/opencv41/src/main/java/org/opencv/osgi/OpenCVNativeLoader.java
new file mode 100644 (file)
index 0000000..bffc2ad
--- /dev/null
@@ -0,0 +1,18 @@
+package org.opencv.osgi;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * This class is intended to provide a convenient way to load OpenCV's native
+ * library from the Java bundle. If Blueprint is enabled in the OSGi container
+ * this class will be instantiated automatically and the init() method called
+ * loading the native library.
+ */
+public class OpenCVNativeLoader implements OpenCVInterface {
+
+    public void init() {
+        System.loadLibrary("opencv_java4");
+        Logger.getLogger("org.opencv.osgi").log(Level.INFO, "Successfully loaded OpenCV native library.");
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/photo/AlignExposures.java b/opencv41/src/main/java/org/opencv/photo/AlignExposures.java
new file mode 100644 (file)
index 0000000..a50870a
--- /dev/null
@@ -0,0 +1,50 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+import org.opencv.utils.Converters;
+
+// C++: class AlignExposures
+//javadoc: AlignExposures
+
+public class AlignExposures extends Algorithm {
+
+    protected AlignExposures(long addr) { super(addr); }
+
+    // internal usage only
+    public static AlignExposures __fromPtr__(long addr) { return new AlignExposures(addr); }
+
+    //
+    // C++:  void cv::AlignExposures::process(vector_Mat src, vector_Mat dst, Mat times, Mat response)
+    //
+
+    //javadoc: AlignExposures::process(src, dst, times, response)
+    public  void process(List<Mat> src, List<Mat> dst, Mat times, Mat response)
+    {
+        Mat src_mat = Converters.vector_Mat_to_Mat(src);
+        Mat dst_mat = Converters.vector_Mat_to_Mat(dst);
+        process_0(nativeObj, src_mat.nativeObj, dst_mat.nativeObj, times.nativeObj, response.nativeObj);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  void cv::AlignExposures::process(vector_Mat src, vector_Mat dst, Mat times, Mat response)
+    private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_mat_nativeObj, long times_nativeObj, long response_nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/photo/AlignMTB.java b/opencv41/src/main/java/org/opencv/photo/AlignMTB.java
new file mode 100644 (file)
index 0000000..69e8de5
--- /dev/null
@@ -0,0 +1,222 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.Point;
+import org.opencv.photo.AlignExposures;
+import org.opencv.utils.Converters;
+
+// C++: class AlignMTB
+//javadoc: AlignMTB
+
+public class AlignMTB extends AlignExposures {
+
+    protected AlignMTB(long addr) { super(addr); }
+
+    // internal usage only
+    public static AlignMTB __fromPtr__(long addr) { return new AlignMTB(addr); }
+
+    //
+    // C++:  Point cv::AlignMTB::calculateShift(Mat img0, Mat img1)
+    //
+
+    //javadoc: AlignMTB::calculateShift(img0, img1)
+    public  Point calculateShift(Mat img0, Mat img1)
+    {
+        
+        Point retVal = new Point(calculateShift_0(nativeObj, img0.nativeObj, img1.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::AlignMTB::getCut()
+    //
+
+    //javadoc: AlignMTB::getCut()
+    public  boolean getCut()
+    {
+        
+        boolean retVal = getCut_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::AlignMTB::getExcludeRange()
+    //
+
+    //javadoc: AlignMTB::getExcludeRange()
+    public  int getExcludeRange()
+    {
+        
+        int retVal = getExcludeRange_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::AlignMTB::getMaxBits()
+    //
+
+    //javadoc: AlignMTB::getMaxBits()
+    public  int getMaxBits()
+    {
+        
+        int retVal = getMaxBits_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::AlignMTB::computeBitmaps(Mat img, Mat& tb, Mat& eb)
+    //
+
+    //javadoc: AlignMTB::computeBitmaps(img, tb, eb)
+    public  void computeBitmaps(Mat img, Mat tb, Mat eb)
+    {
+        
+        computeBitmaps_0(nativeObj, img.nativeObj, tb.nativeObj, eb.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::AlignMTB::process(vector_Mat src, vector_Mat dst, Mat times, Mat response)
+    //
+
+    //javadoc: AlignMTB::process(src, dst, times, response)
+    public  void process(List<Mat> src, List<Mat> dst, Mat times, Mat response)
+    {
+        Mat src_mat = Converters.vector_Mat_to_Mat(src);
+        Mat dst_mat = Converters.vector_Mat_to_Mat(dst);
+        process_0(nativeObj, src_mat.nativeObj, dst_mat.nativeObj, times.nativeObj, response.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::AlignMTB::process(vector_Mat src, vector_Mat dst)
+    //
+
+    //javadoc: AlignMTB::process(src, dst)
+    public  void process(List<Mat> src, List<Mat> dst)
+    {
+        Mat src_mat = Converters.vector_Mat_to_Mat(src);
+        Mat dst_mat = Converters.vector_Mat_to_Mat(dst);
+        process_1(nativeObj, src_mat.nativeObj, dst_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::AlignMTB::setCut(bool value)
+    //
+
+    //javadoc: AlignMTB::setCut(value)
+    public  void setCut(boolean value)
+    {
+        
+        setCut_0(nativeObj, value);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::AlignMTB::setExcludeRange(int exclude_range)
+    //
+
+    //javadoc: AlignMTB::setExcludeRange(exclude_range)
+    public  void setExcludeRange(int exclude_range)
+    {
+        
+        setExcludeRange_0(nativeObj, exclude_range);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::AlignMTB::setMaxBits(int max_bits)
+    //
+
+    //javadoc: AlignMTB::setMaxBits(max_bits)
+    public  void setMaxBits(int max_bits)
+    {
+        
+        setMaxBits_0(nativeObj, max_bits);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::AlignMTB::shiftMat(Mat src, Mat& dst, Point shift)
+    //
+
+    //javadoc: AlignMTB::shiftMat(src, dst, shift)
+    public  void shiftMat(Mat src, Mat dst, Point shift)
+    {
+        
+        shiftMat_0(nativeObj, src.nativeObj, dst.nativeObj, shift.x, shift.y);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  Point cv::AlignMTB::calculateShift(Mat img0, Mat img1)
+    private static native double[] calculateShift_0(long nativeObj, long img0_nativeObj, long img1_nativeObj);
+
+    // C++:  bool cv::AlignMTB::getCut()
+    private static native boolean getCut_0(long nativeObj);
+
+    // C++:  int cv::AlignMTB::getExcludeRange()
+    private static native int getExcludeRange_0(long nativeObj);
+
+    // C++:  int cv::AlignMTB::getMaxBits()
+    private static native int getMaxBits_0(long nativeObj);
+
+    // C++:  void cv::AlignMTB::computeBitmaps(Mat img, Mat& tb, Mat& eb)
+    private static native void computeBitmaps_0(long nativeObj, long img_nativeObj, long tb_nativeObj, long eb_nativeObj);
+
+    // C++:  void cv::AlignMTB::process(vector_Mat src, vector_Mat dst, Mat times, Mat response)
+    private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_mat_nativeObj, long times_nativeObj, long response_nativeObj);
+
+    // C++:  void cv::AlignMTB::process(vector_Mat src, vector_Mat dst)
+    private static native void process_1(long nativeObj, long src_mat_nativeObj, long dst_mat_nativeObj);
+
+    // C++:  void cv::AlignMTB::setCut(bool value)
+    private static native void setCut_0(long nativeObj, boolean value);
+
+    // C++:  void cv::AlignMTB::setExcludeRange(int exclude_range)
+    private static native void setExcludeRange_0(long nativeObj, int exclude_range);
+
+    // C++:  void cv::AlignMTB::setMaxBits(int max_bits)
+    private static native void setMaxBits_0(long nativeObj, int max_bits);
+
+    // C++:  void cv::AlignMTB::shiftMat(Mat src, Mat& dst, Point shift)
+    private static native void shiftMat_0(long nativeObj, long src_nativeObj, long dst_nativeObj, double shift_x, double shift_y);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/photo/CalibrateCRF.java b/opencv41/src/main/java/org/opencv/photo/CalibrateCRF.java
new file mode 100644 (file)
index 0000000..53d7501
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+import org.opencv.utils.Converters;
+
+// C++: class CalibrateCRF
+//javadoc: CalibrateCRF
+
+public class CalibrateCRF extends Algorithm {
+
+    protected CalibrateCRF(long addr) { super(addr); }
+
+    // internal usage only
+    public static CalibrateCRF __fromPtr__(long addr) { return new CalibrateCRF(addr); }
+
+    //
+    // C++:  void cv::CalibrateCRF::process(vector_Mat src, Mat& dst, Mat times)
+    //
+
+    //javadoc: CalibrateCRF::process(src, dst, times)
+    public  void process(List<Mat> src, Mat dst, Mat times)
+    {
+        Mat src_mat = Converters.vector_Mat_to_Mat(src);
+        process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  void cv::CalibrateCRF::process(vector_Mat src, Mat& dst, Mat times)
+    private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/photo/CalibrateDebevec.java b/opencv41/src/main/java/org/opencv/photo/CalibrateDebevec.java
new file mode 100644 (file)
index 0000000..4411d00
--- /dev/null
@@ -0,0 +1,130 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import org.opencv.photo.CalibrateCRF;
+
+// C++: class CalibrateDebevec
+//javadoc: CalibrateDebevec
+
+public class CalibrateDebevec extends CalibrateCRF {
+
+    protected CalibrateDebevec(long addr) { super(addr); }
+
+    // internal usage only
+    public static CalibrateDebevec __fromPtr__(long addr) { return new CalibrateDebevec(addr); }
+
+    //
+    // C++:  bool cv::CalibrateDebevec::getRandom()
+    //
+
+    //javadoc: CalibrateDebevec::getRandom()
+    public  boolean getRandom()
+    {
+        
+        boolean retVal = getRandom_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::CalibrateDebevec::getLambda()
+    //
+
+    //javadoc: CalibrateDebevec::getLambda()
+    public  float getLambda()
+    {
+        
+        float retVal = getLambda_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::CalibrateDebevec::getSamples()
+    //
+
+    //javadoc: CalibrateDebevec::getSamples()
+    public  int getSamples()
+    {
+        
+        int retVal = getSamples_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::CalibrateDebevec::setLambda(float lambda)
+    //
+
+    //javadoc: CalibrateDebevec::setLambda(lambda)
+    public  void setLambda(float lambda)
+    {
+        
+        setLambda_0(nativeObj, lambda);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::CalibrateDebevec::setRandom(bool random)
+    //
+
+    //javadoc: CalibrateDebevec::setRandom(random)
+    public  void setRandom(boolean random)
+    {
+        
+        setRandom_0(nativeObj, random);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::CalibrateDebevec::setSamples(int samples)
+    //
+
+    //javadoc: CalibrateDebevec::setSamples(samples)
+    public  void setSamples(int samples)
+    {
+        
+        setSamples_0(nativeObj, samples);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  bool cv::CalibrateDebevec::getRandom()
+    private static native boolean getRandom_0(long nativeObj);
+
+    // C++:  float cv::CalibrateDebevec::getLambda()
+    private static native float getLambda_0(long nativeObj);
+
+    // C++:  int cv::CalibrateDebevec::getSamples()
+    private static native int getSamples_0(long nativeObj);
+
+    // C++:  void cv::CalibrateDebevec::setLambda(float lambda)
+    private static native void setLambda_0(long nativeObj, float lambda);
+
+    // C++:  void cv::CalibrateDebevec::setRandom(bool random)
+    private static native void setRandom_0(long nativeObj, boolean random);
+
+    // C++:  void cv::CalibrateDebevec::setSamples(int samples)
+    private static native void setSamples_0(long nativeObj, int samples);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/photo/CalibrateRobertson.java b/opencv41/src/main/java/org/opencv/photo/CalibrateRobertson.java
new file mode 100644 (file)
index 0000000..5cd0d9a
--- /dev/null
@@ -0,0 +1,114 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import org.opencv.core.Mat;
+import org.opencv.photo.CalibrateCRF;
+
+// C++: class CalibrateRobertson
+//javadoc: CalibrateRobertson
+
+public class CalibrateRobertson extends CalibrateCRF {
+
+    protected CalibrateRobertson(long addr) { super(addr); }
+
+    // internal usage only
+    public static CalibrateRobertson __fromPtr__(long addr) { return new CalibrateRobertson(addr); }
+
+    //
+    // C++:  Mat cv::CalibrateRobertson::getRadiance()
+    //
+
+    //javadoc: CalibrateRobertson::getRadiance()
+    public  Mat getRadiance()
+    {
+        
+        Mat retVal = new Mat(getRadiance_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::CalibrateRobertson::getThreshold()
+    //
+
+    //javadoc: CalibrateRobertson::getThreshold()
+    public  float getThreshold()
+    {
+        
+        float retVal = getThreshold_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::CalibrateRobertson::getMaxIter()
+    //
+
+    //javadoc: CalibrateRobertson::getMaxIter()
+    public  int getMaxIter()
+    {
+        
+        int retVal = getMaxIter_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::CalibrateRobertson::setMaxIter(int max_iter)
+    //
+
+    //javadoc: CalibrateRobertson::setMaxIter(max_iter)
+    public  void setMaxIter(int max_iter)
+    {
+        
+        setMaxIter_0(nativeObj, max_iter);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::CalibrateRobertson::setThreshold(float threshold)
+    //
+
+    //javadoc: CalibrateRobertson::setThreshold(threshold)
+    public  void setThreshold(float threshold)
+    {
+        
+        setThreshold_0(nativeObj, threshold);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  Mat cv::CalibrateRobertson::getRadiance()
+    private static native long getRadiance_0(long nativeObj);
+
+    // C++:  float cv::CalibrateRobertson::getThreshold()
+    private static native float getThreshold_0(long nativeObj);
+
+    // C++:  int cv::CalibrateRobertson::getMaxIter()
+    private static native int getMaxIter_0(long nativeObj);
+
+    // C++:  void cv::CalibrateRobertson::setMaxIter(int max_iter)
+    private static native void setMaxIter_0(long nativeObj, int max_iter);
+
+    // C++:  void cv::CalibrateRobertson::setThreshold(float threshold)
+    private static native void setThreshold_0(long nativeObj, float threshold);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/photo/MergeDebevec.java b/opencv41/src/main/java/org/opencv/photo/MergeDebevec.java
new file mode 100644 (file)
index 0000000..8ac00d1
--- /dev/null
@@ -0,0 +1,66 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.photo.MergeExposures;
+import org.opencv.utils.Converters;
+
+// C++: class MergeDebevec
+//javadoc: MergeDebevec
+
+public class MergeDebevec extends MergeExposures {
+
+    protected MergeDebevec(long addr) { super(addr); }
+
+    // internal usage only
+    public static MergeDebevec __fromPtr__(long addr) { return new MergeDebevec(addr); }
+
+    //
+    // C++:  void cv::MergeDebevec::process(vector_Mat src, Mat& dst, Mat times, Mat response)
+    //
+
+    //javadoc: MergeDebevec::process(src, dst, times, response)
+    public  void process(List<Mat> src, Mat dst, Mat times, Mat response)
+    {
+        Mat src_mat = Converters.vector_Mat_to_Mat(src);
+        process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::MergeDebevec::process(vector_Mat src, Mat& dst, Mat times)
+    //
+
+    //javadoc: MergeDebevec::process(src, dst, times)
+    public  void process(List<Mat> src, Mat dst, Mat times)
+    {
+        Mat src_mat = Converters.vector_Mat_to_Mat(src);
+        process_1(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  void cv::MergeDebevec::process(vector_Mat src, Mat& dst, Mat times, Mat response)
+    private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj, long response_nativeObj);
+
+    // C++:  void cv::MergeDebevec::process(vector_Mat src, Mat& dst, Mat times)
+    private static native void process_1(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/photo/MergeExposures.java b/opencv41/src/main/java/org/opencv/photo/MergeExposures.java
new file mode 100644 (file)
index 0000000..68ba61f
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+import org.opencv.utils.Converters;
+
+// C++: class MergeExposures
+//javadoc: MergeExposures
+
+public class MergeExposures extends Algorithm {
+
+    protected MergeExposures(long addr) { super(addr); }
+
+    // internal usage only
+    public static MergeExposures __fromPtr__(long addr) { return new MergeExposures(addr); }
+
+    //
+    // C++:  void cv::MergeExposures::process(vector_Mat src, Mat& dst, Mat times, Mat response)
+    //
+
+    //javadoc: MergeExposures::process(src, dst, times, response)
+    public  void process(List<Mat> src, Mat dst, Mat times, Mat response)
+    {
+        Mat src_mat = Converters.vector_Mat_to_Mat(src);
+        process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  void cv::MergeExposures::process(vector_Mat src, Mat& dst, Mat times, Mat response)
+    private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj, long response_nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/photo/MergeMertens.java b/opencv41/src/main/java/org/opencv/photo/MergeMertens.java
new file mode 100644 (file)
index 0000000..fd9e85b
--- /dev/null
@@ -0,0 +1,168 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.photo.MergeExposures;
+import org.opencv.utils.Converters;
+
+// C++: class MergeMertens
+//javadoc: MergeMertens
+
+public class MergeMertens extends MergeExposures {
+
+    protected MergeMertens(long addr) { super(addr); }
+
+    // internal usage only
+    public static MergeMertens __fromPtr__(long addr) { return new MergeMertens(addr); }
+
+    //
+    // C++:  float cv::MergeMertens::getContrastWeight()
+    //
+
+    //javadoc: MergeMertens::getContrastWeight()
+    public  float getContrastWeight()
+    {
+        
+        float retVal = getContrastWeight_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::MergeMertens::getExposureWeight()
+    //
+
+    //javadoc: MergeMertens::getExposureWeight()
+    public  float getExposureWeight()
+    {
+        
+        float retVal = getExposureWeight_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::MergeMertens::getSaturationWeight()
+    //
+
+    //javadoc: MergeMertens::getSaturationWeight()
+    public  float getSaturationWeight()
+    {
+        
+        float retVal = getSaturationWeight_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::MergeMertens::process(vector_Mat src, Mat& dst, Mat times, Mat response)
+    //
+
+    //javadoc: MergeMertens::process(src, dst, times, response)
+    public  void process(List<Mat> src, Mat dst, Mat times, Mat response)
+    {
+        Mat src_mat = Converters.vector_Mat_to_Mat(src);
+        process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::MergeMertens::process(vector_Mat src, Mat& dst)
+    //
+
+    //javadoc: MergeMertens::process(src, dst)
+    public  void process(List<Mat> src, Mat dst)
+    {
+        Mat src_mat = Converters.vector_Mat_to_Mat(src);
+        process_1(nativeObj, src_mat.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::MergeMertens::setContrastWeight(float contrast_weiht)
+    //
+
+    //javadoc: MergeMertens::setContrastWeight(contrast_weiht)
+    public  void setContrastWeight(float contrast_weiht)
+    {
+        
+        setContrastWeight_0(nativeObj, contrast_weiht);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::MergeMertens::setExposureWeight(float exposure_weight)
+    //
+
+    //javadoc: MergeMertens::setExposureWeight(exposure_weight)
+    public  void setExposureWeight(float exposure_weight)
+    {
+        
+        setExposureWeight_0(nativeObj, exposure_weight);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::MergeMertens::setSaturationWeight(float saturation_weight)
+    //
+
+    //javadoc: MergeMertens::setSaturationWeight(saturation_weight)
+    public  void setSaturationWeight(float saturation_weight)
+    {
+        
+        setSaturationWeight_0(nativeObj, saturation_weight);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  float cv::MergeMertens::getContrastWeight()
+    private static native float getContrastWeight_0(long nativeObj);
+
+    // C++:  float cv::MergeMertens::getExposureWeight()
+    private static native float getExposureWeight_0(long nativeObj);
+
+    // C++:  float cv::MergeMertens::getSaturationWeight()
+    private static native float getSaturationWeight_0(long nativeObj);
+
+    // C++:  void cv::MergeMertens::process(vector_Mat src, Mat& dst, Mat times, Mat response)
+    private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj, long response_nativeObj);
+
+    // C++:  void cv::MergeMertens::process(vector_Mat src, Mat& dst)
+    private static native void process_1(long nativeObj, long src_mat_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::MergeMertens::setContrastWeight(float contrast_weiht)
+    private static native void setContrastWeight_0(long nativeObj, float contrast_weiht);
+
+    // C++:  void cv::MergeMertens::setExposureWeight(float exposure_weight)
+    private static native void setExposureWeight_0(long nativeObj, float exposure_weight);
+
+    // C++:  void cv::MergeMertens::setSaturationWeight(float saturation_weight)
+    private static native void setSaturationWeight_0(long nativeObj, float saturation_weight);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/photo/MergeRobertson.java b/opencv41/src/main/java/org/opencv/photo/MergeRobertson.java
new file mode 100644 (file)
index 0000000..536907d
--- /dev/null
@@ -0,0 +1,66 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.photo.MergeExposures;
+import org.opencv.utils.Converters;
+
+// C++: class MergeRobertson
+//javadoc: MergeRobertson
+
+public class MergeRobertson extends MergeExposures {
+
+    protected MergeRobertson(long addr) { super(addr); }
+
+    // internal usage only
+    public static MergeRobertson __fromPtr__(long addr) { return new MergeRobertson(addr); }
+
+    //
+    // C++:  void cv::MergeRobertson::process(vector_Mat src, Mat& dst, Mat times, Mat response)
+    //
+
+    //javadoc: MergeRobertson::process(src, dst, times, response)
+    public  void process(List<Mat> src, Mat dst, Mat times, Mat response)
+    {
+        Mat src_mat = Converters.vector_Mat_to_Mat(src);
+        process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::MergeRobertson::process(vector_Mat src, Mat& dst, Mat times)
+    //
+
+    //javadoc: MergeRobertson::process(src, dst, times)
+    public  void process(List<Mat> src, Mat dst, Mat times)
+    {
+        Mat src_mat = Converters.vector_Mat_to_Mat(src);
+        process_1(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  void cv::MergeRobertson::process(vector_Mat src, Mat& dst, Mat times, Mat response)
+    private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj, long response_nativeObj);
+
+    // C++:  void cv::MergeRobertson::process(vector_Mat src, Mat& dst, Mat times)
+    private static native void process_1(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/photo/Photo.java b/opencv41/src/main/java/org/opencv/photo/Photo.java
new file mode 100644 (file)
index 0000000..94832c0
--- /dev/null
@@ -0,0 +1,1125 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfFloat;
+import org.opencv.core.Point;
+import org.opencv.photo.AlignMTB;
+import org.opencv.photo.CalibrateDebevec;
+import org.opencv.photo.CalibrateRobertson;
+import org.opencv.photo.MergeDebevec;
+import org.opencv.photo.MergeMertens;
+import org.opencv.photo.MergeRobertson;
+import org.opencv.photo.Tonemap;
+import org.opencv.photo.TonemapDrago;
+import org.opencv.photo.TonemapMantiuk;
+import org.opencv.photo.TonemapReinhard;
+import org.opencv.utils.Converters;
+
+// C++: class Photo
+//javadoc: Photo
+
+public class Photo {
+
+    // C++: enum <unnamed>
+    public static final int
+            INPAINT_NS = 0,
+            INPAINT_TELEA = 1,
+            LDR_SIZE = 256,
+            NORMAL_CLONE = 1,
+            MIXED_CLONE = 2,
+            MONOCHROME_TRANSFER = 3,
+            RECURS_FILTER = 1,
+            NORMCONV_FILTER = 2;
+
+
+    //
+    // C++:  Ptr_AlignMTB cv::createAlignMTB(int max_bits = 6, int exclude_range = 4, bool cut = true)
+    //
+
+    //javadoc: createAlignMTB(max_bits, exclude_range, cut)
+    public static AlignMTB createAlignMTB(int max_bits, int exclude_range, boolean cut)
+    {
+        
+        AlignMTB retVal = AlignMTB.__fromPtr__(createAlignMTB_0(max_bits, exclude_range, cut));
+        
+        return retVal;
+    }
+
+    //javadoc: createAlignMTB(max_bits, exclude_range)
+    public static AlignMTB createAlignMTB(int max_bits, int exclude_range)
+    {
+        
+        AlignMTB retVal = AlignMTB.__fromPtr__(createAlignMTB_1(max_bits, exclude_range));
+        
+        return retVal;
+    }
+
+    //javadoc: createAlignMTB(max_bits)
+    public static AlignMTB createAlignMTB(int max_bits)
+    {
+        
+        AlignMTB retVal = AlignMTB.__fromPtr__(createAlignMTB_2(max_bits));
+        
+        return retVal;
+    }
+
+    //javadoc: createAlignMTB()
+    public static AlignMTB createAlignMTB()
+    {
+        
+        AlignMTB retVal = AlignMTB.__fromPtr__(createAlignMTB_3());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Ptr_CalibrateDebevec cv::createCalibrateDebevec(int samples = 70, float lambda = 10.0f, bool random = false)
+    //
+
+    //javadoc: createCalibrateDebevec(samples, lambda, random)
+    public static CalibrateDebevec createCalibrateDebevec(int samples, float lambda, boolean random)
+    {
+        
+        CalibrateDebevec retVal = CalibrateDebevec.__fromPtr__(createCalibrateDebevec_0(samples, lambda, random));
+        
+        return retVal;
+    }
+
+    //javadoc: createCalibrateDebevec(samples, lambda)
+    public static CalibrateDebevec createCalibrateDebevec(int samples, float lambda)
+    {
+        
+        CalibrateDebevec retVal = CalibrateDebevec.__fromPtr__(createCalibrateDebevec_1(samples, lambda));
+        
+        return retVal;
+    }
+
+    //javadoc: createCalibrateDebevec(samples)
+    public static CalibrateDebevec createCalibrateDebevec(int samples)
+    {
+        
+        CalibrateDebevec retVal = CalibrateDebevec.__fromPtr__(createCalibrateDebevec_2(samples));
+        
+        return retVal;
+    }
+
+    //javadoc: createCalibrateDebevec()
+    public static CalibrateDebevec createCalibrateDebevec()
+    {
+        
+        CalibrateDebevec retVal = CalibrateDebevec.__fromPtr__(createCalibrateDebevec_3());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Ptr_CalibrateRobertson cv::createCalibrateRobertson(int max_iter = 30, float threshold = 0.01f)
+    //
+
+    //javadoc: createCalibrateRobertson(max_iter, threshold)
+    public static CalibrateRobertson createCalibrateRobertson(int max_iter, float threshold)
+    {
+        
+        CalibrateRobertson retVal = CalibrateRobertson.__fromPtr__(createCalibrateRobertson_0(max_iter, threshold));
+        
+        return retVal;
+    }
+
+    //javadoc: createCalibrateRobertson(max_iter)
+    public static CalibrateRobertson createCalibrateRobertson(int max_iter)
+    {
+        
+        CalibrateRobertson retVal = CalibrateRobertson.__fromPtr__(createCalibrateRobertson_1(max_iter));
+        
+        return retVal;
+    }
+
+    //javadoc: createCalibrateRobertson()
+    public static CalibrateRobertson createCalibrateRobertson()
+    {
+        
+        CalibrateRobertson retVal = CalibrateRobertson.__fromPtr__(createCalibrateRobertson_2());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Ptr_MergeDebevec cv::createMergeDebevec()
+    //
+
+    //javadoc: createMergeDebevec()
+    public static MergeDebevec createMergeDebevec()
+    {
+        
+        MergeDebevec retVal = MergeDebevec.__fromPtr__(createMergeDebevec_0());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Ptr_MergeMertens cv::createMergeMertens(float contrast_weight = 1.0f, float saturation_weight = 1.0f, float exposure_weight = 0.0f)
+    //
+
+    //javadoc: createMergeMertens(contrast_weight, saturation_weight, exposure_weight)
+    public static MergeMertens createMergeMertens(float contrast_weight, float saturation_weight, float exposure_weight)
+    {
+        
+        MergeMertens retVal = MergeMertens.__fromPtr__(createMergeMertens_0(contrast_weight, saturation_weight, exposure_weight));
+        
+        return retVal;
+    }
+
+    //javadoc: createMergeMertens(contrast_weight, saturation_weight)
+    public static MergeMertens createMergeMertens(float contrast_weight, float saturation_weight)
+    {
+        
+        MergeMertens retVal = MergeMertens.__fromPtr__(createMergeMertens_1(contrast_weight, saturation_weight));
+        
+        return retVal;
+    }
+
+    //javadoc: createMergeMertens(contrast_weight)
+    public static MergeMertens createMergeMertens(float contrast_weight)
+    {
+        
+        MergeMertens retVal = MergeMertens.__fromPtr__(createMergeMertens_2(contrast_weight));
+        
+        return retVal;
+    }
+
+    //javadoc: createMergeMertens()
+    public static MergeMertens createMergeMertens()
+    {
+        
+        MergeMertens retVal = MergeMertens.__fromPtr__(createMergeMertens_3());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Ptr_MergeRobertson cv::createMergeRobertson()
+    //
+
+    //javadoc: createMergeRobertson()
+    public static MergeRobertson createMergeRobertson()
+    {
+        
+        MergeRobertson retVal = MergeRobertson.__fromPtr__(createMergeRobertson_0());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Ptr_Tonemap cv::createTonemap(float gamma = 1.0f)
+    //
+
+    //javadoc: createTonemap(gamma)
+    public static Tonemap createTonemap(float gamma)
+    {
+        
+        Tonemap retVal = Tonemap.__fromPtr__(createTonemap_0(gamma));
+        
+        return retVal;
+    }
+
+    //javadoc: createTonemap()
+    public static Tonemap createTonemap()
+    {
+        
+        Tonemap retVal = Tonemap.__fromPtr__(createTonemap_1());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Ptr_TonemapDrago cv::createTonemapDrago(float gamma = 1.0f, float saturation = 1.0f, float bias = 0.85f)
+    //
+
+    //javadoc: createTonemapDrago(gamma, saturation, bias)
+    public static TonemapDrago createTonemapDrago(float gamma, float saturation, float bias)
+    {
+        
+        TonemapDrago retVal = TonemapDrago.__fromPtr__(createTonemapDrago_0(gamma, saturation, bias));
+        
+        return retVal;
+    }
+
+    //javadoc: createTonemapDrago(gamma, saturation)
+    public static TonemapDrago createTonemapDrago(float gamma, float saturation)
+    {
+        
+        TonemapDrago retVal = TonemapDrago.__fromPtr__(createTonemapDrago_1(gamma, saturation));
+        
+        return retVal;
+    }
+
+    //javadoc: createTonemapDrago(gamma)
+    public static TonemapDrago createTonemapDrago(float gamma)
+    {
+        
+        TonemapDrago retVal = TonemapDrago.__fromPtr__(createTonemapDrago_2(gamma));
+        
+        return retVal;
+    }
+
+    //javadoc: createTonemapDrago()
+    public static TonemapDrago createTonemapDrago()
+    {
+        
+        TonemapDrago retVal = TonemapDrago.__fromPtr__(createTonemapDrago_3());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Ptr_TonemapMantiuk cv::createTonemapMantiuk(float gamma = 1.0f, float scale = 0.7f, float saturation = 1.0f)
+    //
+
+    //javadoc: createTonemapMantiuk(gamma, scale, saturation)
+    public static TonemapMantiuk createTonemapMantiuk(float gamma, float scale, float saturation)
+    {
+        
+        TonemapMantiuk retVal = TonemapMantiuk.__fromPtr__(createTonemapMantiuk_0(gamma, scale, saturation));
+        
+        return retVal;
+    }
+
+    //javadoc: createTonemapMantiuk(gamma, scale)
+    public static TonemapMantiuk createTonemapMantiuk(float gamma, float scale)
+    {
+        
+        TonemapMantiuk retVal = TonemapMantiuk.__fromPtr__(createTonemapMantiuk_1(gamma, scale));
+        
+        return retVal;
+    }
+
+    //javadoc: createTonemapMantiuk(gamma)
+    public static TonemapMantiuk createTonemapMantiuk(float gamma)
+    {
+        
+        TonemapMantiuk retVal = TonemapMantiuk.__fromPtr__(createTonemapMantiuk_2(gamma));
+        
+        return retVal;
+    }
+
+    //javadoc: createTonemapMantiuk()
+    public static TonemapMantiuk createTonemapMantiuk()
+    {
+        
+        TonemapMantiuk retVal = TonemapMantiuk.__fromPtr__(createTonemapMantiuk_3());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Ptr_TonemapReinhard cv::createTonemapReinhard(float gamma = 1.0f, float intensity = 0.0f, float light_adapt = 1.0f, float color_adapt = 0.0f)
+    //
+
+    //javadoc: createTonemapReinhard(gamma, intensity, light_adapt, color_adapt)
+    public static TonemapReinhard createTonemapReinhard(float gamma, float intensity, float light_adapt, float color_adapt)
+    {
+        
+        TonemapReinhard retVal = TonemapReinhard.__fromPtr__(createTonemapReinhard_0(gamma, intensity, light_adapt, color_adapt));
+        
+        return retVal;
+    }
+
+    //javadoc: createTonemapReinhard(gamma, intensity, light_adapt)
+    public static TonemapReinhard createTonemapReinhard(float gamma, float intensity, float light_adapt)
+    {
+        
+        TonemapReinhard retVal = TonemapReinhard.__fromPtr__(createTonemapReinhard_1(gamma, intensity, light_adapt));
+        
+        return retVal;
+    }
+
+    //javadoc: createTonemapReinhard(gamma, intensity)
+    public static TonemapReinhard createTonemapReinhard(float gamma, float intensity)
+    {
+        
+        TonemapReinhard retVal = TonemapReinhard.__fromPtr__(createTonemapReinhard_2(gamma, intensity));
+        
+        return retVal;
+    }
+
+    //javadoc: createTonemapReinhard(gamma)
+    public static TonemapReinhard createTonemapReinhard(float gamma)
+    {
+        
+        TonemapReinhard retVal = TonemapReinhard.__fromPtr__(createTonemapReinhard_3(gamma));
+        
+        return retVal;
+    }
+
+    //javadoc: createTonemapReinhard()
+    public static TonemapReinhard createTonemapReinhard()
+    {
+        
+        TonemapReinhard retVal = TonemapReinhard.__fromPtr__(createTonemapReinhard_4());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::colorChange(Mat src, Mat mask, Mat& dst, float red_mul = 1.0f, float green_mul = 1.0f, float blue_mul = 1.0f)
+    //
+
+    //javadoc: colorChange(src, mask, dst, red_mul, green_mul, blue_mul)
+    public static void colorChange(Mat src, Mat mask, Mat dst, float red_mul, float green_mul, float blue_mul)
+    {
+        
+        colorChange_0(src.nativeObj, mask.nativeObj, dst.nativeObj, red_mul, green_mul, blue_mul);
+        
+        return;
+    }
+
+    //javadoc: colorChange(src, mask, dst, red_mul, green_mul)
+    public static void colorChange(Mat src, Mat mask, Mat dst, float red_mul, float green_mul)
+    {
+        
+        colorChange_1(src.nativeObj, mask.nativeObj, dst.nativeObj, red_mul, green_mul);
+        
+        return;
+    }
+
+    //javadoc: colorChange(src, mask, dst, red_mul)
+    public static void colorChange(Mat src, Mat mask, Mat dst, float red_mul)
+    {
+        
+        colorChange_2(src.nativeObj, mask.nativeObj, dst.nativeObj, red_mul);
+        
+        return;
+    }
+
+    //javadoc: colorChange(src, mask, dst)
+    public static void colorChange(Mat src, Mat mask, Mat dst)
+    {
+        
+        colorChange_3(src.nativeObj, mask.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::decolor(Mat src, Mat& grayscale, Mat& color_boost)
+    //
+
+    //javadoc: decolor(src, grayscale, color_boost)
+    public static void decolor(Mat src, Mat grayscale, Mat color_boost)
+    {
+        
+        decolor_0(src.nativeObj, grayscale.nativeObj, color_boost.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::denoise_TVL1(vector_Mat observations, Mat result, double lambda = 1.0, int niters = 30)
+    //
+
+    //javadoc: denoise_TVL1(observations, result, lambda, niters)
+    public static void denoise_TVL1(List<Mat> observations, Mat result, double lambda, int niters)
+    {
+        Mat observations_mat = Converters.vector_Mat_to_Mat(observations);
+        denoise_TVL1_0(observations_mat.nativeObj, result.nativeObj, lambda, niters);
+        
+        return;
+    }
+
+    //javadoc: denoise_TVL1(observations, result, lambda)
+    public static void denoise_TVL1(List<Mat> observations, Mat result, double lambda)
+    {
+        Mat observations_mat = Converters.vector_Mat_to_Mat(observations);
+        denoise_TVL1_1(observations_mat.nativeObj, result.nativeObj, lambda);
+        
+        return;
+    }
+
+    //javadoc: denoise_TVL1(observations, result)
+    public static void denoise_TVL1(List<Mat> observations, Mat result)
+    {
+        Mat observations_mat = Converters.vector_Mat_to_Mat(observations);
+        denoise_TVL1_2(observations_mat.nativeObj, result.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::detailEnhance(Mat src, Mat& dst, float sigma_s = 10, float sigma_r = 0.15f)
+    //
+
+    //javadoc: detailEnhance(src, dst, sigma_s, sigma_r)
+    public static void detailEnhance(Mat src, Mat dst, float sigma_s, float sigma_r)
+    {
+        
+        detailEnhance_0(src.nativeObj, dst.nativeObj, sigma_s, sigma_r);
+        
+        return;
+    }
+
+    //javadoc: detailEnhance(src, dst, sigma_s)
+    public static void detailEnhance(Mat src, Mat dst, float sigma_s)
+    {
+        
+        detailEnhance_1(src.nativeObj, dst.nativeObj, sigma_s);
+        
+        return;
+    }
+
+    //javadoc: detailEnhance(src, dst)
+    public static void detailEnhance(Mat src, Mat dst)
+    {
+        
+        detailEnhance_2(src.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::edgePreservingFilter(Mat src, Mat& dst, int flags = 1, float sigma_s = 60, float sigma_r = 0.4f)
+    //
+
+    //javadoc: edgePreservingFilter(src, dst, flags, sigma_s, sigma_r)
+    public static void edgePreservingFilter(Mat src, Mat dst, int flags, float sigma_s, float sigma_r)
+    {
+        
+        edgePreservingFilter_0(src.nativeObj, dst.nativeObj, flags, sigma_s, sigma_r);
+        
+        return;
+    }
+
+    //javadoc: edgePreservingFilter(src, dst, flags, sigma_s)
+    public static void edgePreservingFilter(Mat src, Mat dst, int flags, float sigma_s)
+    {
+        
+        edgePreservingFilter_1(src.nativeObj, dst.nativeObj, flags, sigma_s);
+        
+        return;
+    }
+
+    //javadoc: edgePreservingFilter(src, dst, flags)
+    public static void edgePreservingFilter(Mat src, Mat dst, int flags)
+    {
+        
+        edgePreservingFilter_2(src.nativeObj, dst.nativeObj, flags);
+        
+        return;
+    }
+
+    //javadoc: edgePreservingFilter(src, dst)
+    public static void edgePreservingFilter(Mat src, Mat dst)
+    {
+        
+        edgePreservingFilter_3(src.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::fastNlMeansDenoising(Mat src, Mat& dst, float h = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+    //
+
+    //javadoc: fastNlMeansDenoising(src, dst, h, templateWindowSize, searchWindowSize)
+    public static void fastNlMeansDenoising(Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize)
+    {
+        
+        fastNlMeansDenoising_0(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoising(src, dst, h, templateWindowSize)
+    public static void fastNlMeansDenoising(Mat src, Mat dst, float h, int templateWindowSize)
+    {
+        
+        fastNlMeansDenoising_1(src.nativeObj, dst.nativeObj, h, templateWindowSize);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoising(src, dst, h)
+    public static void fastNlMeansDenoising(Mat src, Mat dst, float h)
+    {
+        
+        fastNlMeansDenoising_2(src.nativeObj, dst.nativeObj, h);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoising(src, dst)
+    public static void fastNlMeansDenoising(Mat src, Mat dst)
+    {
+        
+        fastNlMeansDenoising_3(src.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::fastNlMeansDenoising(Mat src, Mat& dst, vector_float h, int templateWindowSize = 7, int searchWindowSize = 21, int normType = NORM_L2)
+    //
+
+    //javadoc: fastNlMeansDenoising(src, dst, h, templateWindowSize, searchWindowSize, normType)
+    public static void fastNlMeansDenoising(Mat src, Mat dst, MatOfFloat h, int templateWindowSize, int searchWindowSize, int normType)
+    {
+        Mat h_mat = h;
+        fastNlMeansDenoising_4(src.nativeObj, dst.nativeObj, h_mat.nativeObj, templateWindowSize, searchWindowSize, normType);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoising(src, dst, h, templateWindowSize, searchWindowSize)
+    public static void fastNlMeansDenoising(Mat src, Mat dst, MatOfFloat h, int templateWindowSize, int searchWindowSize)
+    {
+        Mat h_mat = h;
+        fastNlMeansDenoising_5(src.nativeObj, dst.nativeObj, h_mat.nativeObj, templateWindowSize, searchWindowSize);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoising(src, dst, h, templateWindowSize)
+    public static void fastNlMeansDenoising(Mat src, Mat dst, MatOfFloat h, int templateWindowSize)
+    {
+        Mat h_mat = h;
+        fastNlMeansDenoising_6(src.nativeObj, dst.nativeObj, h_mat.nativeObj, templateWindowSize);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoising(src, dst, h)
+    public static void fastNlMeansDenoising(Mat src, Mat dst, MatOfFloat h)
+    {
+        Mat h_mat = h;
+        fastNlMeansDenoising_7(src.nativeObj, dst.nativeObj, h_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::fastNlMeansDenoisingColored(Mat src, Mat& dst, float h = 3, float hColor = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+    //
+
+    //javadoc: fastNlMeansDenoisingColored(src, dst, h, hColor, templateWindowSize, searchWindowSize)
+    public static void fastNlMeansDenoisingColored(Mat src, Mat dst, float h, float hColor, int templateWindowSize, int searchWindowSize)
+    {
+        
+        fastNlMeansDenoisingColored_0(src.nativeObj, dst.nativeObj, h, hColor, templateWindowSize, searchWindowSize);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoisingColored(src, dst, h, hColor, templateWindowSize)
+    public static void fastNlMeansDenoisingColored(Mat src, Mat dst, float h, float hColor, int templateWindowSize)
+    {
+        
+        fastNlMeansDenoisingColored_1(src.nativeObj, dst.nativeObj, h, hColor, templateWindowSize);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoisingColored(src, dst, h, hColor)
+    public static void fastNlMeansDenoisingColored(Mat src, Mat dst, float h, float hColor)
+    {
+        
+        fastNlMeansDenoisingColored_2(src.nativeObj, dst.nativeObj, h, hColor);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoisingColored(src, dst, h)
+    public static void fastNlMeansDenoisingColored(Mat src, Mat dst, float h)
+    {
+        
+        fastNlMeansDenoisingColored_3(src.nativeObj, dst.nativeObj, h);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoisingColored(src, dst)
+    public static void fastNlMeansDenoisingColored(Mat src, Mat dst)
+    {
+        
+        fastNlMeansDenoisingColored_4(src.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::fastNlMeansDenoisingColoredMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, float h = 3, float hColor = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+    //
+
+    //javadoc: fastNlMeansDenoisingColoredMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize, h, hColor, templateWindowSize, searchWindowSize)
+    public static void fastNlMeansDenoisingColoredMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, float h, float hColor, int templateWindowSize, int searchWindowSize)
+    {
+        Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+        fastNlMeansDenoisingColoredMulti_0(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize, h, hColor, templateWindowSize, searchWindowSize);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoisingColoredMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize, h, hColor, templateWindowSize)
+    public static void fastNlMeansDenoisingColoredMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, float h, float hColor, int templateWindowSize)
+    {
+        Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+        fastNlMeansDenoisingColoredMulti_1(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize, h, hColor, templateWindowSize);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoisingColoredMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize, h, hColor)
+    public static void fastNlMeansDenoisingColoredMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, float h, float hColor)
+    {
+        Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+        fastNlMeansDenoisingColoredMulti_2(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize, h, hColor);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoisingColoredMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize, h)
+    public static void fastNlMeansDenoisingColoredMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, float h)
+    {
+        Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+        fastNlMeansDenoisingColoredMulti_3(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize, h);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoisingColoredMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize)
+    public static void fastNlMeansDenoisingColoredMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize)
+    {
+        Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+        fastNlMeansDenoisingColoredMulti_4(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::fastNlMeansDenoisingMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, float h = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+    //
+
+    //javadoc: fastNlMeansDenoisingMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize, h, templateWindowSize, searchWindowSize)
+    public static void fastNlMeansDenoisingMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, float h, int templateWindowSize, int searchWindowSize)
+    {
+        Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+        fastNlMeansDenoisingMulti_0(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize, h, templateWindowSize, searchWindowSize);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoisingMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize, h, templateWindowSize)
+    public static void fastNlMeansDenoisingMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, float h, int templateWindowSize)
+    {
+        Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+        fastNlMeansDenoisingMulti_1(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize, h, templateWindowSize);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoisingMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize, h)
+    public static void fastNlMeansDenoisingMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, float h)
+    {
+        Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+        fastNlMeansDenoisingMulti_2(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize, h);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoisingMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize)
+    public static void fastNlMeansDenoisingMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize)
+    {
+        Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+        fastNlMeansDenoisingMulti_3(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::fastNlMeansDenoisingMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, vector_float h, int templateWindowSize = 7, int searchWindowSize = 21, int normType = NORM_L2)
+    //
+
+    //javadoc: fastNlMeansDenoisingMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize, h, templateWindowSize, searchWindowSize, normType)
+    public static void fastNlMeansDenoisingMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, MatOfFloat h, int templateWindowSize, int searchWindowSize, int normType)
+    {
+        Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+        Mat h_mat = h;
+        fastNlMeansDenoisingMulti_4(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize, h_mat.nativeObj, templateWindowSize, searchWindowSize, normType);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoisingMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize, h, templateWindowSize, searchWindowSize)
+    public static void fastNlMeansDenoisingMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, MatOfFloat h, int templateWindowSize, int searchWindowSize)
+    {
+        Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+        Mat h_mat = h;
+        fastNlMeansDenoisingMulti_5(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize, h_mat.nativeObj, templateWindowSize, searchWindowSize);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoisingMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize, h, templateWindowSize)
+    public static void fastNlMeansDenoisingMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, MatOfFloat h, int templateWindowSize)
+    {
+        Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+        Mat h_mat = h;
+        fastNlMeansDenoisingMulti_6(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize, h_mat.nativeObj, templateWindowSize);
+        
+        return;
+    }
+
+    //javadoc: fastNlMeansDenoisingMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize, h)
+    public static void fastNlMeansDenoisingMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, MatOfFloat h)
+    {
+        Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
+        Mat h_mat = h;
+        fastNlMeansDenoisingMulti_7(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize, h_mat.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::illuminationChange(Mat src, Mat mask, Mat& dst, float alpha = 0.2f, float beta = 0.4f)
+    //
+
+    //javadoc: illuminationChange(src, mask, dst, alpha, beta)
+    public static void illuminationChange(Mat src, Mat mask, Mat dst, float alpha, float beta)
+    {
+        
+        illuminationChange_0(src.nativeObj, mask.nativeObj, dst.nativeObj, alpha, beta);
+        
+        return;
+    }
+
+    //javadoc: illuminationChange(src, mask, dst, alpha)
+    public static void illuminationChange(Mat src, Mat mask, Mat dst, float alpha)
+    {
+        
+        illuminationChange_1(src.nativeObj, mask.nativeObj, dst.nativeObj, alpha);
+        
+        return;
+    }
+
+    //javadoc: illuminationChange(src, mask, dst)
+    public static void illuminationChange(Mat src, Mat mask, Mat dst)
+    {
+        
+        illuminationChange_2(src.nativeObj, mask.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::inpaint(Mat src, Mat inpaintMask, Mat& dst, double inpaintRadius, int flags)
+    //
+
+    //javadoc: inpaint(src, inpaintMask, dst, inpaintRadius, flags)
+    public static void inpaint(Mat src, Mat inpaintMask, Mat dst, double inpaintRadius, int flags)
+    {
+        
+        inpaint_0(src.nativeObj, inpaintMask.nativeObj, dst.nativeObj, inpaintRadius, flags);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::pencilSketch(Mat src, Mat& dst1, Mat& dst2, float sigma_s = 60, float sigma_r = 0.07f, float shade_factor = 0.02f)
+    //
+
+    //javadoc: pencilSketch(src, dst1, dst2, sigma_s, sigma_r, shade_factor)
+    public static void pencilSketch(Mat src, Mat dst1, Mat dst2, float sigma_s, float sigma_r, float shade_factor)
+    {
+        
+        pencilSketch_0(src.nativeObj, dst1.nativeObj, dst2.nativeObj, sigma_s, sigma_r, shade_factor);
+        
+        return;
+    }
+
+    //javadoc: pencilSketch(src, dst1, dst2, sigma_s, sigma_r)
+    public static void pencilSketch(Mat src, Mat dst1, Mat dst2, float sigma_s, float sigma_r)
+    {
+        
+        pencilSketch_1(src.nativeObj, dst1.nativeObj, dst2.nativeObj, sigma_s, sigma_r);
+        
+        return;
+    }
+
+    //javadoc: pencilSketch(src, dst1, dst2, sigma_s)
+    public static void pencilSketch(Mat src, Mat dst1, Mat dst2, float sigma_s)
+    {
+        
+        pencilSketch_2(src.nativeObj, dst1.nativeObj, dst2.nativeObj, sigma_s);
+        
+        return;
+    }
+
+    //javadoc: pencilSketch(src, dst1, dst2)
+    public static void pencilSketch(Mat src, Mat dst1, Mat dst2)
+    {
+        
+        pencilSketch_3(src.nativeObj, dst1.nativeObj, dst2.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::seamlessClone(Mat src, Mat dst, Mat mask, Point p, Mat& blend, int flags)
+    //
+
+    //javadoc: seamlessClone(src, dst, mask, p, blend, flags)
+    public static void seamlessClone(Mat src, Mat dst, Mat mask, Point p, Mat blend, int flags)
+    {
+        
+        seamlessClone_0(src.nativeObj, dst.nativeObj, mask.nativeObj, p.x, p.y, blend.nativeObj, flags);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::stylization(Mat src, Mat& dst, float sigma_s = 60, float sigma_r = 0.45f)
+    //
+
+    //javadoc: stylization(src, dst, sigma_s, sigma_r)
+    public static void stylization(Mat src, Mat dst, float sigma_s, float sigma_r)
+    {
+        
+        stylization_0(src.nativeObj, dst.nativeObj, sigma_s, sigma_r);
+        
+        return;
+    }
+
+    //javadoc: stylization(src, dst, sigma_s)
+    public static void stylization(Mat src, Mat dst, float sigma_s)
+    {
+        
+        stylization_1(src.nativeObj, dst.nativeObj, sigma_s);
+        
+        return;
+    }
+
+    //javadoc: stylization(src, dst)
+    public static void stylization(Mat src, Mat dst)
+    {
+        
+        stylization_2(src.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::textureFlattening(Mat src, Mat mask, Mat& dst, float low_threshold = 30, float high_threshold = 45, int kernel_size = 3)
+    //
+
+    //javadoc: textureFlattening(src, mask, dst, low_threshold, high_threshold, kernel_size)
+    public static void textureFlattening(Mat src, Mat mask, Mat dst, float low_threshold, float high_threshold, int kernel_size)
+    {
+        
+        textureFlattening_0(src.nativeObj, mask.nativeObj, dst.nativeObj, low_threshold, high_threshold, kernel_size);
+        
+        return;
+    }
+
+    //javadoc: textureFlattening(src, mask, dst, low_threshold, high_threshold)
+    public static void textureFlattening(Mat src, Mat mask, Mat dst, float low_threshold, float high_threshold)
+    {
+        
+        textureFlattening_1(src.nativeObj, mask.nativeObj, dst.nativeObj, low_threshold, high_threshold);
+        
+        return;
+    }
+
+    //javadoc: textureFlattening(src, mask, dst, low_threshold)
+    public static void textureFlattening(Mat src, Mat mask, Mat dst, float low_threshold)
+    {
+        
+        textureFlattening_2(src.nativeObj, mask.nativeObj, dst.nativeObj, low_threshold);
+        
+        return;
+    }
+
+    //javadoc: textureFlattening(src, mask, dst)
+    public static void textureFlattening(Mat src, Mat mask, Mat dst)
+    {
+        
+        textureFlattening_3(src.nativeObj, mask.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+
+
+    // C++:  Ptr_AlignMTB cv::createAlignMTB(int max_bits = 6, int exclude_range = 4, bool cut = true)
+    private static native long createAlignMTB_0(int max_bits, int exclude_range, boolean cut);
+    private static native long createAlignMTB_1(int max_bits, int exclude_range);
+    private static native long createAlignMTB_2(int max_bits);
+    private static native long createAlignMTB_3();
+
+    // C++:  Ptr_CalibrateDebevec cv::createCalibrateDebevec(int samples = 70, float lambda = 10.0f, bool random = false)
+    private static native long createCalibrateDebevec_0(int samples, float lambda, boolean random);
+    private static native long createCalibrateDebevec_1(int samples, float lambda);
+    private static native long createCalibrateDebevec_2(int samples);
+    private static native long createCalibrateDebevec_3();
+
+    // C++:  Ptr_CalibrateRobertson cv::createCalibrateRobertson(int max_iter = 30, float threshold = 0.01f)
+    private static native long createCalibrateRobertson_0(int max_iter, float threshold);
+    private static native long createCalibrateRobertson_1(int max_iter);
+    private static native long createCalibrateRobertson_2();
+
+    // C++:  Ptr_MergeDebevec cv::createMergeDebevec()
+    private static native long createMergeDebevec_0();
+
+    // C++:  Ptr_MergeMertens cv::createMergeMertens(float contrast_weight = 1.0f, float saturation_weight = 1.0f, float exposure_weight = 0.0f)
+    private static native long createMergeMertens_0(float contrast_weight, float saturation_weight, float exposure_weight);
+    private static native long createMergeMertens_1(float contrast_weight, float saturation_weight);
+    private static native long createMergeMertens_2(float contrast_weight);
+    private static native long createMergeMertens_3();
+
+    // C++:  Ptr_MergeRobertson cv::createMergeRobertson()
+    private static native long createMergeRobertson_0();
+
+    // C++:  Ptr_Tonemap cv::createTonemap(float gamma = 1.0f)
+    private static native long createTonemap_0(float gamma);
+    private static native long createTonemap_1();
+
+    // C++:  Ptr_TonemapDrago cv::createTonemapDrago(float gamma = 1.0f, float saturation = 1.0f, float bias = 0.85f)
+    private static native long createTonemapDrago_0(float gamma, float saturation, float bias);
+    private static native long createTonemapDrago_1(float gamma, float saturation);
+    private static native long createTonemapDrago_2(float gamma);
+    private static native long createTonemapDrago_3();
+
+    // C++:  Ptr_TonemapMantiuk cv::createTonemapMantiuk(float gamma = 1.0f, float scale = 0.7f, float saturation = 1.0f)
+    private static native long createTonemapMantiuk_0(float gamma, float scale, float saturation);
+    private static native long createTonemapMantiuk_1(float gamma, float scale);
+    private static native long createTonemapMantiuk_2(float gamma);
+    private static native long createTonemapMantiuk_3();
+
+    // C++:  Ptr_TonemapReinhard cv::createTonemapReinhard(float gamma = 1.0f, float intensity = 0.0f, float light_adapt = 1.0f, float color_adapt = 0.0f)
+    private static native long createTonemapReinhard_0(float gamma, float intensity, float light_adapt, float color_adapt);
+    private static native long createTonemapReinhard_1(float gamma, float intensity, float light_adapt);
+    private static native long createTonemapReinhard_2(float gamma, float intensity);
+    private static native long createTonemapReinhard_3(float gamma);
+    private static native long createTonemapReinhard_4();
+
+    // C++:  void cv::colorChange(Mat src, Mat mask, Mat& dst, float red_mul = 1.0f, float green_mul = 1.0f, float blue_mul = 1.0f)
+    private static native void colorChange_0(long src_nativeObj, long mask_nativeObj, long dst_nativeObj, float red_mul, float green_mul, float blue_mul);
+    private static native void colorChange_1(long src_nativeObj, long mask_nativeObj, long dst_nativeObj, float red_mul, float green_mul);
+    private static native void colorChange_2(long src_nativeObj, long mask_nativeObj, long dst_nativeObj, float red_mul);
+    private static native void colorChange_3(long src_nativeObj, long mask_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::decolor(Mat src, Mat& grayscale, Mat& color_boost)
+    private static native void decolor_0(long src_nativeObj, long grayscale_nativeObj, long color_boost_nativeObj);
+
+    // C++:  void cv::denoise_TVL1(vector_Mat observations, Mat result, double lambda = 1.0, int niters = 30)
+    private static native void denoise_TVL1_0(long observations_mat_nativeObj, long result_nativeObj, double lambda, int niters);
+    private static native void denoise_TVL1_1(long observations_mat_nativeObj, long result_nativeObj, double lambda);
+    private static native void denoise_TVL1_2(long observations_mat_nativeObj, long result_nativeObj);
+
+    // C++:  void cv::detailEnhance(Mat src, Mat& dst, float sigma_s = 10, float sigma_r = 0.15f)
+    private static native void detailEnhance_0(long src_nativeObj, long dst_nativeObj, float sigma_s, float sigma_r);
+    private static native void detailEnhance_1(long src_nativeObj, long dst_nativeObj, float sigma_s);
+    private static native void detailEnhance_2(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::edgePreservingFilter(Mat src, Mat& dst, int flags = 1, float sigma_s = 60, float sigma_r = 0.4f)
+    private static native void edgePreservingFilter_0(long src_nativeObj, long dst_nativeObj, int flags, float sigma_s, float sigma_r);
+    private static native void edgePreservingFilter_1(long src_nativeObj, long dst_nativeObj, int flags, float sigma_s);
+    private static native void edgePreservingFilter_2(long src_nativeObj, long dst_nativeObj, int flags);
+    private static native void edgePreservingFilter_3(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::fastNlMeansDenoising(Mat src, Mat& dst, float h = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+    private static native void fastNlMeansDenoising_0(long src_nativeObj, long dst_nativeObj, float h, int templateWindowSize, int searchWindowSize);
+    private static native void fastNlMeansDenoising_1(long src_nativeObj, long dst_nativeObj, float h, int templateWindowSize);
+    private static native void fastNlMeansDenoising_2(long src_nativeObj, long dst_nativeObj, float h);
+    private static native void fastNlMeansDenoising_3(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::fastNlMeansDenoising(Mat src, Mat& dst, vector_float h, int templateWindowSize = 7, int searchWindowSize = 21, int normType = NORM_L2)
+    private static native void fastNlMeansDenoising_4(long src_nativeObj, long dst_nativeObj, long h_mat_nativeObj, int templateWindowSize, int searchWindowSize, int normType);
+    private static native void fastNlMeansDenoising_5(long src_nativeObj, long dst_nativeObj, long h_mat_nativeObj, int templateWindowSize, int searchWindowSize);
+    private static native void fastNlMeansDenoising_6(long src_nativeObj, long dst_nativeObj, long h_mat_nativeObj, int templateWindowSize);
+    private static native void fastNlMeansDenoising_7(long src_nativeObj, long dst_nativeObj, long h_mat_nativeObj);
+
+    // C++:  void cv::fastNlMeansDenoisingColored(Mat src, Mat& dst, float h = 3, float hColor = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+    private static native void fastNlMeansDenoisingColored_0(long src_nativeObj, long dst_nativeObj, float h, float hColor, int templateWindowSize, int searchWindowSize);
+    private static native void fastNlMeansDenoisingColored_1(long src_nativeObj, long dst_nativeObj, float h, float hColor, int templateWindowSize);
+    private static native void fastNlMeansDenoisingColored_2(long src_nativeObj, long dst_nativeObj, float h, float hColor);
+    private static native void fastNlMeansDenoisingColored_3(long src_nativeObj, long dst_nativeObj, float h);
+    private static native void fastNlMeansDenoisingColored_4(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::fastNlMeansDenoisingColoredMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, float h = 3, float hColor = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+    private static native void fastNlMeansDenoisingColoredMulti_0(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize, float h, float hColor, int templateWindowSize, int searchWindowSize);
+    private static native void fastNlMeansDenoisingColoredMulti_1(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize, float h, float hColor, int templateWindowSize);
+    private static native void fastNlMeansDenoisingColoredMulti_2(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize, float h, float hColor);
+    private static native void fastNlMeansDenoisingColoredMulti_3(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize, float h);
+    private static native void fastNlMeansDenoisingColoredMulti_4(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize);
+
+    // C++:  void cv::fastNlMeansDenoisingMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, float h = 3, int templateWindowSize = 7, int searchWindowSize = 21)
+    private static native void fastNlMeansDenoisingMulti_0(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize, float h, int templateWindowSize, int searchWindowSize);
+    private static native void fastNlMeansDenoisingMulti_1(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize, float h, int templateWindowSize);
+    private static native void fastNlMeansDenoisingMulti_2(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize, float h);
+    private static native void fastNlMeansDenoisingMulti_3(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize);
+
+    // C++:  void cv::fastNlMeansDenoisingMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, vector_float h, int templateWindowSize = 7, int searchWindowSize = 21, int normType = NORM_L2)
+    private static native void fastNlMeansDenoisingMulti_4(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize, long h_mat_nativeObj, int templateWindowSize, int searchWindowSize, int normType);
+    private static native void fastNlMeansDenoisingMulti_5(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize, long h_mat_nativeObj, int templateWindowSize, int searchWindowSize);
+    private static native void fastNlMeansDenoisingMulti_6(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize, long h_mat_nativeObj, int templateWindowSize);
+    private static native void fastNlMeansDenoisingMulti_7(long srcImgs_mat_nativeObj, long dst_nativeObj, int imgToDenoiseIndex, int temporalWindowSize, long h_mat_nativeObj);
+
+    // C++:  void cv::illuminationChange(Mat src, Mat mask, Mat& dst, float alpha = 0.2f, float beta = 0.4f)
+    private static native void illuminationChange_0(long src_nativeObj, long mask_nativeObj, long dst_nativeObj, float alpha, float beta);
+    private static native void illuminationChange_1(long src_nativeObj, long mask_nativeObj, long dst_nativeObj, float alpha);
+    private static native void illuminationChange_2(long src_nativeObj, long mask_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::inpaint(Mat src, Mat inpaintMask, Mat& dst, double inpaintRadius, int flags)
+    private static native void inpaint_0(long src_nativeObj, long inpaintMask_nativeObj, long dst_nativeObj, double inpaintRadius, int flags);
+
+    // C++:  void cv::pencilSketch(Mat src, Mat& dst1, Mat& dst2, float sigma_s = 60, float sigma_r = 0.07f, float shade_factor = 0.02f)
+    private static native void pencilSketch_0(long src_nativeObj, long dst1_nativeObj, long dst2_nativeObj, float sigma_s, float sigma_r, float shade_factor);
+    private static native void pencilSketch_1(long src_nativeObj, long dst1_nativeObj, long dst2_nativeObj, float sigma_s, float sigma_r);
+    private static native void pencilSketch_2(long src_nativeObj, long dst1_nativeObj, long dst2_nativeObj, float sigma_s);
+    private static native void pencilSketch_3(long src_nativeObj, long dst1_nativeObj, long dst2_nativeObj);
+
+    // C++:  void cv::seamlessClone(Mat src, Mat dst, Mat mask, Point p, Mat& blend, int flags)
+    private static native void seamlessClone_0(long src_nativeObj, long dst_nativeObj, long mask_nativeObj, double p_x, double p_y, long blend_nativeObj, int flags);
+
+    // C++:  void cv::stylization(Mat src, Mat& dst, float sigma_s = 60, float sigma_r = 0.45f)
+    private static native void stylization_0(long src_nativeObj, long dst_nativeObj, float sigma_s, float sigma_r);
+    private static native void stylization_1(long src_nativeObj, long dst_nativeObj, float sigma_s);
+    private static native void stylization_2(long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::textureFlattening(Mat src, Mat mask, Mat& dst, float low_threshold = 30, float high_threshold = 45, int kernel_size = 3)
+    private static native void textureFlattening_0(long src_nativeObj, long mask_nativeObj, long dst_nativeObj, float low_threshold, float high_threshold, int kernel_size);
+    private static native void textureFlattening_1(long src_nativeObj, long mask_nativeObj, long dst_nativeObj, float low_threshold, float high_threshold);
+    private static native void textureFlattening_2(long src_nativeObj, long mask_nativeObj, long dst_nativeObj, float low_threshold);
+    private static native void textureFlattening_3(long src_nativeObj, long mask_nativeObj, long dst_nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/photo/Tonemap.java b/opencv41/src/main/java/org/opencv/photo/Tonemap.java
new file mode 100644 (file)
index 0000000..e816a03
--- /dev/null
@@ -0,0 +1,80 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+
+// C++: class Tonemap
+//javadoc: Tonemap
+
+public class Tonemap extends Algorithm {
+
+    protected Tonemap(long addr) { super(addr); }
+
+    // internal usage only
+    public static Tonemap __fromPtr__(long addr) { return new Tonemap(addr); }
+
+    //
+    // C++:  float cv::Tonemap::getGamma()
+    //
+
+    //javadoc: Tonemap::getGamma()
+    public  float getGamma()
+    {
+        
+        float retVal = getGamma_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::Tonemap::process(Mat src, Mat& dst)
+    //
+
+    //javadoc: Tonemap::process(src, dst)
+    public  void process(Mat src, Mat dst)
+    {
+        
+        process_0(nativeObj, src.nativeObj, dst.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::Tonemap::setGamma(float gamma)
+    //
+
+    //javadoc: Tonemap::setGamma(gamma)
+    public  void setGamma(float gamma)
+    {
+        
+        setGamma_0(nativeObj, gamma);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  float cv::Tonemap::getGamma()
+    private static native float getGamma_0(long nativeObj);
+
+    // C++:  void cv::Tonemap::process(Mat src, Mat& dst)
+    private static native void process_0(long nativeObj, long src_nativeObj, long dst_nativeObj);
+
+    // C++:  void cv::Tonemap::setGamma(float gamma)
+    private static native void setGamma_0(long nativeObj, float gamma);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/photo/TonemapDrago.java b/opencv41/src/main/java/org/opencv/photo/TonemapDrago.java
new file mode 100644 (file)
index 0000000..15d2ef2
--- /dev/null
@@ -0,0 +1,96 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import org.opencv.photo.Tonemap;
+
+// C++: class TonemapDrago
+//javadoc: TonemapDrago
+
+public class TonemapDrago extends Tonemap {
+
+    protected TonemapDrago(long addr) { super(addr); }
+
+    // internal usage only
+    public static TonemapDrago __fromPtr__(long addr) { return new TonemapDrago(addr); }
+
+    //
+    // C++:  float cv::TonemapDrago::getBias()
+    //
+
+    //javadoc: TonemapDrago::getBias()
+    public  float getBias()
+    {
+        
+        float retVal = getBias_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::TonemapDrago::getSaturation()
+    //
+
+    //javadoc: TonemapDrago::getSaturation()
+    public  float getSaturation()
+    {
+        
+        float retVal = getSaturation_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::TonemapDrago::setBias(float bias)
+    //
+
+    //javadoc: TonemapDrago::setBias(bias)
+    public  void setBias(float bias)
+    {
+        
+        setBias_0(nativeObj, bias);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::TonemapDrago::setSaturation(float saturation)
+    //
+
+    //javadoc: TonemapDrago::setSaturation(saturation)
+    public  void setSaturation(float saturation)
+    {
+        
+        setSaturation_0(nativeObj, saturation);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  float cv::TonemapDrago::getBias()
+    private static native float getBias_0(long nativeObj);
+
+    // C++:  float cv::TonemapDrago::getSaturation()
+    private static native float getSaturation_0(long nativeObj);
+
+    // C++:  void cv::TonemapDrago::setBias(float bias)
+    private static native void setBias_0(long nativeObj, float bias);
+
+    // C++:  void cv::TonemapDrago::setSaturation(float saturation)
+    private static native void setSaturation_0(long nativeObj, float saturation);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/photo/TonemapMantiuk.java b/opencv41/src/main/java/org/opencv/photo/TonemapMantiuk.java
new file mode 100644 (file)
index 0000000..49f24a7
--- /dev/null
@@ -0,0 +1,96 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import org.opencv.photo.Tonemap;
+
+// C++: class TonemapMantiuk
+//javadoc: TonemapMantiuk
+
+public class TonemapMantiuk extends Tonemap {
+
+    protected TonemapMantiuk(long addr) { super(addr); }
+
+    // internal usage only
+    public static TonemapMantiuk __fromPtr__(long addr) { return new TonemapMantiuk(addr); }
+
+    //
+    // C++:  float cv::TonemapMantiuk::getSaturation()
+    //
+
+    //javadoc: TonemapMantiuk::getSaturation()
+    public  float getSaturation()
+    {
+        
+        float retVal = getSaturation_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::TonemapMantiuk::getScale()
+    //
+
+    //javadoc: TonemapMantiuk::getScale()
+    public  float getScale()
+    {
+        
+        float retVal = getScale_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::TonemapMantiuk::setSaturation(float saturation)
+    //
+
+    //javadoc: TonemapMantiuk::setSaturation(saturation)
+    public  void setSaturation(float saturation)
+    {
+        
+        setSaturation_0(nativeObj, saturation);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::TonemapMantiuk::setScale(float scale)
+    //
+
+    //javadoc: TonemapMantiuk::setScale(scale)
+    public  void setScale(float scale)
+    {
+        
+        setScale_0(nativeObj, scale);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  float cv::TonemapMantiuk::getSaturation()
+    private static native float getSaturation_0(long nativeObj);
+
+    // C++:  float cv::TonemapMantiuk::getScale()
+    private static native float getScale_0(long nativeObj);
+
+    // C++:  void cv::TonemapMantiuk::setSaturation(float saturation)
+    private static native void setSaturation_0(long nativeObj, float saturation);
+
+    // C++:  void cv::TonemapMantiuk::setScale(float scale)
+    private static native void setScale_0(long nativeObj, float scale);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/photo/TonemapReinhard.java b/opencv41/src/main/java/org/opencv/photo/TonemapReinhard.java
new file mode 100644 (file)
index 0000000..354e233
--- /dev/null
@@ -0,0 +1,130 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.photo;
+
+import org.opencv.photo.Tonemap;
+
+// C++: class TonemapReinhard
+//javadoc: TonemapReinhard
+
+public class TonemapReinhard extends Tonemap {
+
+    protected TonemapReinhard(long addr) { super(addr); }
+
+    // internal usage only
+    public static TonemapReinhard __fromPtr__(long addr) { return new TonemapReinhard(addr); }
+
+    //
+    // C++:  float cv::TonemapReinhard::getColorAdaptation()
+    //
+
+    //javadoc: TonemapReinhard::getColorAdaptation()
+    public  float getColorAdaptation()
+    {
+        
+        float retVal = getColorAdaptation_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::TonemapReinhard::getIntensity()
+    //
+
+    //javadoc: TonemapReinhard::getIntensity()
+    public  float getIntensity()
+    {
+        
+        float retVal = getIntensity_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::TonemapReinhard::getLightAdaptation()
+    //
+
+    //javadoc: TonemapReinhard::getLightAdaptation()
+    public  float getLightAdaptation()
+    {
+        
+        float retVal = getLightAdaptation_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::TonemapReinhard::setColorAdaptation(float color_adapt)
+    //
+
+    //javadoc: TonemapReinhard::setColorAdaptation(color_adapt)
+    public  void setColorAdaptation(float color_adapt)
+    {
+        
+        setColorAdaptation_0(nativeObj, color_adapt);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::TonemapReinhard::setIntensity(float intensity)
+    //
+
+    //javadoc: TonemapReinhard::setIntensity(intensity)
+    public  void setIntensity(float intensity)
+    {
+        
+        setIntensity_0(nativeObj, intensity);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::TonemapReinhard::setLightAdaptation(float light_adapt)
+    //
+
+    //javadoc: TonemapReinhard::setLightAdaptation(light_adapt)
+    public  void setLightAdaptation(float light_adapt)
+    {
+        
+        setLightAdaptation_0(nativeObj, light_adapt);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  float cv::TonemapReinhard::getColorAdaptation()
+    private static native float getColorAdaptation_0(long nativeObj);
+
+    // C++:  float cv::TonemapReinhard::getIntensity()
+    private static native float getIntensity_0(long nativeObj);
+
+    // C++:  float cv::TonemapReinhard::getLightAdaptation()
+    private static native float getLightAdaptation_0(long nativeObj);
+
+    // C++:  void cv::TonemapReinhard::setColorAdaptation(float color_adapt)
+    private static native void setColorAdaptation_0(long nativeObj, float color_adapt);
+
+    // C++:  void cv::TonemapReinhard::setIntensity(float intensity)
+    private static native void setIntensity_0(long nativeObj, float intensity);
+
+    // C++:  void cv::TonemapReinhard::setLightAdaptation(float light_adapt)
+    private static native void setLightAdaptation_0(long nativeObj, float light_adapt);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/utils/Converters.java b/opencv41/src/main/java/org/opencv/utils/Converters.java
new file mode 100644 (file)
index 0000000..9faf2ec
--- /dev/null
@@ -0,0 +1,812 @@
+package org.opencv.utils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.opencv.core.CvType;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfByte;
+import org.opencv.core.MatOfDMatch;
+import org.opencv.core.MatOfKeyPoint;
+import org.opencv.core.MatOfPoint;
+import org.opencv.core.MatOfPoint2f;
+import org.opencv.core.MatOfPoint3f;
+import org.opencv.core.Point;
+import org.opencv.core.Point3;
+import org.opencv.core.Size;
+import org.opencv.core.Rect;
+import org.opencv.core.RotatedRect;
+import org.opencv.core.Rect2d;
+import org.opencv.core.DMatch;
+import org.opencv.core.KeyPoint;
+
+public class Converters {
+
+    public static Mat vector_Point_to_Mat(List<Point> pts) {
+        return vector_Point_to_Mat(pts, CvType.CV_32S);
+    }
+
+    public static Mat vector_Point2f_to_Mat(List<Point> pts) {
+        return vector_Point_to_Mat(pts, CvType.CV_32F);
+    }
+
+    public static Mat vector_Point2d_to_Mat(List<Point> pts) {
+        return vector_Point_to_Mat(pts, CvType.CV_64F);
+    }
+
+    public static Mat vector_Point_to_Mat(List<Point> pts, int typeDepth) {
+        Mat res;
+        int count = (pts != null) ? pts.size() : 0;
+        if (count > 0) {
+            switch (typeDepth) {
+            case CvType.CV_32S: {
+                res = new Mat(count, 1, CvType.CV_32SC2);
+                int[] buff = new int[count * 2];
+                for (int i = 0; i < count; i++) {
+                    Point p = pts.get(i);
+                    buff[i * 2] = (int) p.x;
+                    buff[i * 2 + 1] = (int) p.y;
+                }
+                res.put(0, 0, buff);
+            }
+                break;
+
+            case CvType.CV_32F: {
+                res = new Mat(count, 1, CvType.CV_32FC2);
+                float[] buff = new float[count * 2];
+                for (int i = 0; i < count; i++) {
+                    Point p = pts.get(i);
+                    buff[i * 2] = (float) p.x;
+                    buff[i * 2 + 1] = (float) p.y;
+                }
+                res.put(0, 0, buff);
+            }
+                break;
+
+            case CvType.CV_64F: {
+                res = new Mat(count, 1, CvType.CV_64FC2);
+                double[] buff = new double[count * 2];
+                for (int i = 0; i < count; i++) {
+                    Point p = pts.get(i);
+                    buff[i * 2] = p.x;
+                    buff[i * 2 + 1] = p.y;
+                }
+                res.put(0, 0, buff);
+            }
+                break;
+
+            default:
+                throw new IllegalArgumentException("'typeDepth' can be CV_32S, CV_32F or CV_64F");
+            }
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    public static Mat vector_Point3i_to_Mat(List<Point3> pts) {
+        return vector_Point3_to_Mat(pts, CvType.CV_32S);
+    }
+
+    public static Mat vector_Point3f_to_Mat(List<Point3> pts) {
+        return vector_Point3_to_Mat(pts, CvType.CV_32F);
+    }
+
+    public static Mat vector_Point3d_to_Mat(List<Point3> pts) {
+        return vector_Point3_to_Mat(pts, CvType.CV_64F);
+    }
+
+    public static Mat vector_Point3_to_Mat(List<Point3> pts, int typeDepth) {
+        Mat res;
+        int count = (pts != null) ? pts.size() : 0;
+        if (count > 0) {
+            switch (typeDepth) {
+            case CvType.CV_32S: {
+                res = new Mat(count, 1, CvType.CV_32SC3);
+                int[] buff = new int[count * 3];
+                for (int i = 0; i < count; i++) {
+                    Point3 p = pts.get(i);
+                    buff[i * 3] = (int) p.x;
+                    buff[i * 3 + 1] = (int) p.y;
+                    buff[i * 3 + 2] = (int) p.z;
+                }
+                res.put(0, 0, buff);
+            }
+                break;
+
+            case CvType.CV_32F: {
+                res = new Mat(count, 1, CvType.CV_32FC3);
+                float[] buff = new float[count * 3];
+                for (int i = 0; i < count; i++) {
+                    Point3 p = pts.get(i);
+                    buff[i * 3] = (float) p.x;
+                    buff[i * 3 + 1] = (float) p.y;
+                    buff[i * 3 + 2] = (float) p.z;
+                }
+                res.put(0, 0, buff);
+            }
+                break;
+
+            case CvType.CV_64F: {
+                res = new Mat(count, 1, CvType.CV_64FC3);
+                double[] buff = new double[count * 3];
+                for (int i = 0; i < count; i++) {
+                    Point3 p = pts.get(i);
+                    buff[i * 3] = p.x;
+                    buff[i * 3 + 1] = p.y;
+                    buff[i * 3 + 2] = p.z;
+                }
+                res.put(0, 0, buff);
+            }
+                break;
+
+            default:
+                throw new IllegalArgumentException("'typeDepth' can be CV_32S, CV_32F or CV_64F");
+            }
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    public static void Mat_to_vector_Point2f(Mat m, List<Point> pts) {
+        Mat_to_vector_Point(m, pts);
+    }
+
+    public static void Mat_to_vector_Point2d(Mat m, List<Point> pts) {
+        Mat_to_vector_Point(m, pts);
+    }
+
+    public static void Mat_to_vector_Point(Mat m, List<Point> pts) {
+        if (pts == null)
+            throw new java.lang.IllegalArgumentException("Output List can't be null");
+        int count = m.rows();
+        int type = m.type();
+        if (m.cols() != 1)
+            throw new java.lang.IllegalArgumentException("Input Mat should have one column\n" + m);
+
+        pts.clear();
+        if (type == CvType.CV_32SC2) {
+            int[] buff = new int[2 * count];
+            m.get(0, 0, buff);
+            for (int i = 0; i < count; i++) {
+                pts.add(new Point(buff[i * 2], buff[i * 2 + 1]));
+            }
+        } else if (type == CvType.CV_32FC2) {
+            float[] buff = new float[2 * count];
+            m.get(0, 0, buff);
+            for (int i = 0; i < count; i++) {
+                pts.add(new Point(buff[i * 2], buff[i * 2 + 1]));
+            }
+        } else if (type == CvType.CV_64FC2) {
+            double[] buff = new double[2 * count];
+            m.get(0, 0, buff);
+            for (int i = 0; i < count; i++) {
+                pts.add(new Point(buff[i * 2], buff[i * 2 + 1]));
+            }
+        } else {
+            throw new java.lang.IllegalArgumentException(
+                    "Input Mat should be of CV_32SC2, CV_32FC2 or CV_64FC2 type\n" + m);
+        }
+    }
+
+    public static void Mat_to_vector_Point3i(Mat m, List<Point3> pts) {
+        Mat_to_vector_Point3(m, pts);
+    }
+
+    public static void Mat_to_vector_Point3f(Mat m, List<Point3> pts) {
+        Mat_to_vector_Point3(m, pts);
+    }
+
+    public static void Mat_to_vector_Point3d(Mat m, List<Point3> pts) {
+        Mat_to_vector_Point3(m, pts);
+    }
+
+    public static void Mat_to_vector_Point3(Mat m, List<Point3> pts) {
+        if (pts == null)
+            throw new java.lang.IllegalArgumentException("Output List can't be null");
+        int count = m.rows();
+        int type = m.type();
+        if (m.cols() != 1)
+            throw new java.lang.IllegalArgumentException("Input Mat should have one column\n" + m);
+
+        pts.clear();
+        if (type == CvType.CV_32SC3) {
+            int[] buff = new int[3 * count];
+            m.get(0, 0, buff);
+            for (int i = 0; i < count; i++) {
+                pts.add(new Point3(buff[i * 3], buff[i * 3 + 1], buff[i * 3 + 2]));
+            }
+        } else if (type == CvType.CV_32FC3) {
+            float[] buff = new float[3 * count];
+            m.get(0, 0, buff);
+            for (int i = 0; i < count; i++) {
+                pts.add(new Point3(buff[i * 3], buff[i * 3 + 1], buff[i * 3 + 2]));
+            }
+        } else if (type == CvType.CV_64FC3) {
+            double[] buff = new double[3 * count];
+            m.get(0, 0, buff);
+            for (int i = 0; i < count; i++) {
+                pts.add(new Point3(buff[i * 3], buff[i * 3 + 1], buff[i * 3 + 2]));
+            }
+        } else {
+            throw new java.lang.IllegalArgumentException(
+                    "Input Mat should be of CV_32SC3, CV_32FC3 or CV_64FC3 type\n" + m);
+        }
+    }
+
+    public static Mat vector_Mat_to_Mat(List<Mat> mats) {
+        Mat res;
+        int count = (mats != null) ? mats.size() : 0;
+        if (count > 0) {
+            res = new Mat(count, 1, CvType.CV_32SC2);
+            int[] buff = new int[count * 2];
+            for (int i = 0; i < count; i++) {
+                long addr = mats.get(i).nativeObj;
+                buff[i * 2] = (int) (addr >> 32);
+                buff[i * 2 + 1] = (int) (addr & 0xffffffff);
+            }
+            res.put(0, 0, buff);
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    public static void Mat_to_vector_Mat(Mat m, List<Mat> mats) {
+        if (mats == null)
+            throw new java.lang.IllegalArgumentException("mats == null");
+        int count = m.rows();
+        if (CvType.CV_32SC2 != m.type() || m.cols() != 1)
+            throw new java.lang.IllegalArgumentException(
+                    "CvType.CV_32SC2 != m.type() ||  m.cols()!=1\n" + m);
+
+        mats.clear();
+        int[] buff = new int[count * 2];
+        m.get(0, 0, buff);
+        for (int i = 0; i < count; i++) {
+            long addr = (((long) buff[i * 2]) << 32) | (((long) buff[i * 2 + 1]) & 0xffffffffL);
+            mats.add(new Mat(addr));
+        }
+    }
+
+    public static Mat vector_float_to_Mat(List<Float> fs) {
+        Mat res;
+        int count = (fs != null) ? fs.size() : 0;
+        if (count > 0) {
+            res = new Mat(count, 1, CvType.CV_32FC1);
+            float[] buff = new float[count];
+            for (int i = 0; i < count; i++) {
+                float f = fs.get(i);
+                buff[i] = f;
+            }
+            res.put(0, 0, buff);
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    public static void Mat_to_vector_float(Mat m, List<Float> fs) {
+        if (fs == null)
+            throw new java.lang.IllegalArgumentException("fs == null");
+        int count = m.rows();
+        if (CvType.CV_32FC1 != m.type() || m.cols() != 1)
+            throw new java.lang.IllegalArgumentException(
+                    "CvType.CV_32FC1 != m.type() ||  m.cols()!=1\n" + m);
+
+        fs.clear();
+        float[] buff = new float[count];
+        m.get(0, 0, buff);
+        for (int i = 0; i < count; i++) {
+            fs.add(buff[i]);
+        }
+    }
+
+    public static Mat vector_uchar_to_Mat(List<Byte> bs) {
+        Mat res;
+        int count = (bs != null) ? bs.size() : 0;
+        if (count > 0) {
+            res = new Mat(count, 1, CvType.CV_8UC1);
+            byte[] buff = new byte[count];
+            for (int i = 0; i < count; i++) {
+                byte b = bs.get(i);
+                buff[i] = b;
+            }
+            res.put(0, 0, buff);
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    public static void Mat_to_vector_uchar(Mat m, List<Byte> us) {
+        if (us == null)
+            throw new java.lang.IllegalArgumentException("Output List can't be null");
+        int count = m.rows();
+        if (CvType.CV_8UC1 != m.type() || m.cols() != 1)
+            throw new java.lang.IllegalArgumentException(
+                    "CvType.CV_8UC1 != m.type() ||  m.cols()!=1\n" + m);
+
+        us.clear();
+        byte[] buff = new byte[count];
+        m.get(0, 0, buff);
+        for (int i = 0; i < count; i++) {
+            us.add(buff[i]);
+        }
+    }
+
+    public static Mat vector_char_to_Mat(List<Byte> bs) {
+        Mat res;
+        int count = (bs != null) ? bs.size() : 0;
+        if (count > 0) {
+            res = new Mat(count, 1, CvType.CV_8SC1);
+            byte[] buff = new byte[count];
+            for (int i = 0; i < count; i++) {
+                byte b = bs.get(i);
+                buff[i] = b;
+            }
+            res.put(0, 0, buff);
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    public static Mat vector_int_to_Mat(List<Integer> is) {
+        Mat res;
+        int count = (is != null) ? is.size() : 0;
+        if (count > 0) {
+            res = new Mat(count, 1, CvType.CV_32SC1);
+            int[] buff = new int[count];
+            for (int i = 0; i < count; i++) {
+                int v = is.get(i);
+                buff[i] = v;
+            }
+            res.put(0, 0, buff);
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    public static void Mat_to_vector_int(Mat m, List<Integer> is) {
+        if (is == null)
+            throw new java.lang.IllegalArgumentException("is == null");
+        int count = m.rows();
+        if (CvType.CV_32SC1 != m.type() || m.cols() != 1)
+            throw new java.lang.IllegalArgumentException(
+                    "CvType.CV_32SC1 != m.type() ||  m.cols()!=1\n" + m);
+
+        is.clear();
+        int[] buff = new int[count];
+        m.get(0, 0, buff);
+        for (int i = 0; i < count; i++) {
+            is.add(buff[i]);
+        }
+    }
+
+    public static void Mat_to_vector_char(Mat m, List<Byte> bs) {
+        if (bs == null)
+            throw new java.lang.IllegalArgumentException("Output List can't be null");
+        int count = m.rows();
+        if (CvType.CV_8SC1 != m.type() || m.cols() != 1)
+            throw new java.lang.IllegalArgumentException(
+                    "CvType.CV_8SC1 != m.type() ||  m.cols()!=1\n" + m);
+
+        bs.clear();
+        byte[] buff = new byte[count];
+        m.get(0, 0, buff);
+        for (int i = 0; i < count; i++) {
+            bs.add(buff[i]);
+        }
+    }
+
+    public static Mat vector_Rect_to_Mat(List<Rect> rs) {
+        Mat res;
+        int count = (rs != null) ? rs.size() : 0;
+        if (count > 0) {
+            res = new Mat(count, 1, CvType.CV_32SC4);
+            int[] buff = new int[4 * count];
+            for (int i = 0; i < count; i++) {
+                Rect r = rs.get(i);
+                buff[4 * i] = r.x;
+                buff[4 * i + 1] = r.y;
+                buff[4 * i + 2] = r.width;
+                buff[4 * i + 3] = r.height;
+            }
+            res.put(0, 0, buff);
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    public static void Mat_to_vector_Rect(Mat m, List<Rect> rs) {
+        if (rs == null)
+            throw new java.lang.IllegalArgumentException("rs == null");
+        int count = m.rows();
+        if (CvType.CV_32SC4 != m.type() || m.cols() != 1)
+            throw new java.lang.IllegalArgumentException(
+                    "CvType.CV_32SC4 != m.type() ||  m.rows()!=1\n" + m);
+
+        rs.clear();
+        int[] buff = new int[4 * count];
+        m.get(0, 0, buff);
+        for (int i = 0; i < count; i++) {
+            rs.add(new Rect(buff[4 * i], buff[4 * i + 1], buff[4 * i + 2], buff[4 * i + 3]));
+        }
+    }
+
+    public static Mat vector_Rect2d_to_Mat(List<Rect2d> rs) {
+        Mat res;
+        int count = (rs != null) ? rs.size() : 0;
+        if (count > 0) {
+            res = new Mat(count, 1, CvType.CV_64FC4);
+            double[] buff = new double[4 * count];
+            for (int i = 0; i < count; i++) {
+                Rect2d r = rs.get(i);
+                buff[4 * i] = r.x;
+                buff[4 * i + 1] = r.y;
+                buff[4 * i + 2] = r.width;
+                buff[4 * i + 3] = r.height;
+            }
+            res.put(0, 0, buff);
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    public static void Mat_to_vector_Rect2d(Mat m, List<Rect2d> rs) {
+        if (rs == null)
+            throw new java.lang.IllegalArgumentException("rs == null");
+        int count = m.rows();
+        if (CvType.CV_64FC4 != m.type() || m.cols() != 1)
+            throw new java.lang.IllegalArgumentException(
+                                                         "CvType.CV_64FC4 != m.type() ||  m.rows()!=1\n" + m);
+
+        rs.clear();
+        double[] buff = new double[4 * count];
+        m.get(0, 0, buff);
+        for (int i = 0; i < count; i++) {
+            rs.add(new Rect2d(buff[4 * i], buff[4 * i + 1], buff[4 * i + 2], buff[4 * i + 3]));
+        }
+    }
+
+    public static Mat vector_KeyPoint_to_Mat(List<KeyPoint> kps) {
+        Mat res;
+        int count = (kps != null) ? kps.size() : 0;
+        if (count > 0) {
+            res = new Mat(count, 1, CvType.CV_64FC(7));
+            double[] buff = new double[count * 7];
+            for (int i = 0; i < count; i++) {
+                KeyPoint kp = kps.get(i);
+                buff[7 * i] = kp.pt.x;
+                buff[7 * i + 1] = kp.pt.y;
+                buff[7 * i + 2] = kp.size;
+                buff[7 * i + 3] = kp.angle;
+                buff[7 * i + 4] = kp.response;
+                buff[7 * i + 5] = kp.octave;
+                buff[7 * i + 6] = kp.class_id;
+            }
+            res.put(0, 0, buff);
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    public static void Mat_to_vector_KeyPoint(Mat m, List<KeyPoint> kps) {
+        if (kps == null)
+            throw new java.lang.IllegalArgumentException("Output List can't be null");
+        int count = m.rows();
+        if (CvType.CV_64FC(7) != m.type() || m.cols() != 1)
+            throw new java.lang.IllegalArgumentException(
+                    "CvType.CV_64FC(7) != m.type() ||  m.cols()!=1\n" + m);
+
+        kps.clear();
+        double[] buff = new double[7 * count];
+        m.get(0, 0, buff);
+        for (int i = 0; i < count; i++) {
+            kps.add(new KeyPoint((float) buff[7 * i], (float) buff[7 * i + 1], (float) buff[7 * i + 2], (float) buff[7 * i + 3],
+                    (float) buff[7 * i + 4], (int) buff[7 * i + 5], (int) buff[7 * i + 6]));
+        }
+    }
+
+    // vector_vector_Point
+    public static Mat vector_vector_Point_to_Mat(List<MatOfPoint> pts, List<Mat> mats) {
+        Mat res;
+        int lCount = (pts != null) ? pts.size() : 0;
+        if (lCount > 0) {
+            for (MatOfPoint vpt : pts)
+                mats.add(vpt);
+            res = vector_Mat_to_Mat(mats);
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    public static void Mat_to_vector_vector_Point(Mat m, List<MatOfPoint> pts) {
+        if (pts == null)
+            throw new java.lang.IllegalArgumentException("Output List can't be null");
+
+        if (m == null)
+            throw new java.lang.IllegalArgumentException("Input Mat can't be null");
+
+        List<Mat> mats = new ArrayList<Mat>(m.rows());
+        Mat_to_vector_Mat(m, mats);
+        for (Mat mi : mats) {
+            MatOfPoint pt = new MatOfPoint(mi);
+            pts.add(pt);
+            mi.release();
+        }
+        mats.clear();
+    }
+
+    // vector_vector_Point2f
+    public static void Mat_to_vector_vector_Point2f(Mat m, List<MatOfPoint2f> pts) {
+        if (pts == null)
+            throw new java.lang.IllegalArgumentException("Output List can't be null");
+
+        if (m == null)
+            throw new java.lang.IllegalArgumentException("Input Mat can't be null");
+
+        List<Mat> mats = new ArrayList<Mat>(m.rows());
+        Mat_to_vector_Mat(m, mats);
+        for (Mat mi : mats) {
+            MatOfPoint2f pt = new MatOfPoint2f(mi);
+            pts.add(pt);
+            mi.release();
+        }
+        mats.clear();
+    }
+
+    // vector_vector_Point2f
+    public static Mat vector_vector_Point2f_to_Mat(List<MatOfPoint2f> pts, List<Mat> mats) {
+        Mat res;
+        int lCount = (pts != null) ? pts.size() : 0;
+        if (lCount > 0) {
+            for (MatOfPoint2f vpt : pts)
+                mats.add(vpt);
+            res = vector_Mat_to_Mat(mats);
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    // vector_vector_Point3f
+    public static void Mat_to_vector_vector_Point3f(Mat m, List<MatOfPoint3f> pts) {
+        if (pts == null)
+            throw new java.lang.IllegalArgumentException("Output List can't be null");
+
+        if (m == null)
+            throw new java.lang.IllegalArgumentException("Input Mat can't be null");
+
+        List<Mat> mats = new ArrayList<Mat>(m.rows());
+        Mat_to_vector_Mat(m, mats);
+        for (Mat mi : mats) {
+            MatOfPoint3f pt = new MatOfPoint3f(mi);
+            pts.add(pt);
+            mi.release();
+        }
+        mats.clear();
+    }
+
+    // vector_vector_Point3f
+    public static Mat vector_vector_Point3f_to_Mat(List<MatOfPoint3f> pts, List<Mat> mats) {
+        Mat res;
+        int lCount = (pts != null) ? pts.size() : 0;
+        if (lCount > 0) {
+            for (MatOfPoint3f vpt : pts)
+                mats.add(vpt);
+            res = vector_Mat_to_Mat(mats);
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    // vector_vector_KeyPoint
+    public static Mat vector_vector_KeyPoint_to_Mat(List<MatOfKeyPoint> kps, List<Mat> mats) {
+        Mat res;
+        int lCount = (kps != null) ? kps.size() : 0;
+        if (lCount > 0) {
+            for (MatOfKeyPoint vkp : kps)
+                mats.add(vkp);
+            res = vector_Mat_to_Mat(mats);
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    public static void Mat_to_vector_vector_KeyPoint(Mat m, List<MatOfKeyPoint> kps) {
+        if (kps == null)
+            throw new java.lang.IllegalArgumentException("Output List can't be null");
+
+        if (m == null)
+            throw new java.lang.IllegalArgumentException("Input Mat can't be null");
+
+        List<Mat> mats = new ArrayList<Mat>(m.rows());
+        Mat_to_vector_Mat(m, mats);
+        for (Mat mi : mats) {
+            MatOfKeyPoint vkp = new MatOfKeyPoint(mi);
+            kps.add(vkp);
+            mi.release();
+        }
+        mats.clear();
+    }
+
+    public static Mat vector_double_to_Mat(List<Double> ds) {
+        Mat res;
+        int count = (ds != null) ? ds.size() : 0;
+        if (count > 0) {
+            res = new Mat(count, 1, CvType.CV_64FC1);
+            double[] buff = new double[count];
+            for (int i = 0; i < count; i++) {
+                double v = ds.get(i);
+                buff[i] = v;
+            }
+            res.put(0, 0, buff);
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    public static void Mat_to_vector_double(Mat m, List<Double> ds) {
+        if (ds == null)
+            throw new java.lang.IllegalArgumentException("ds == null");
+        int count = m.rows();
+        if (CvType.CV_64FC1 != m.type() || m.cols() != 1)
+            throw new java.lang.IllegalArgumentException(
+                    "CvType.CV_64FC1 != m.type() ||  m.cols()!=1\n" + m);
+
+        ds.clear();
+        double[] buff = new double[count];
+        m.get(0, 0, buff);
+        for (int i = 0; i < count; i++) {
+            ds.add(buff[i]);
+        }
+    }
+
+    public static Mat vector_DMatch_to_Mat(List<DMatch> matches) {
+        Mat res;
+        int count = (matches != null) ? matches.size() : 0;
+        if (count > 0) {
+            res = new Mat(count, 1, CvType.CV_64FC4);
+            double[] buff = new double[count * 4];
+            for (int i = 0; i < count; i++) {
+                DMatch m = matches.get(i);
+                buff[4 * i] = m.queryIdx;
+                buff[4 * i + 1] = m.trainIdx;
+                buff[4 * i + 2] = m.imgIdx;
+                buff[4 * i + 3] = m.distance;
+            }
+            res.put(0, 0, buff);
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    public static void Mat_to_vector_DMatch(Mat m, List<DMatch> matches) {
+        if (matches == null)
+            throw new java.lang.IllegalArgumentException("Output List can't be null");
+        int count = m.rows();
+        if (CvType.CV_64FC4 != m.type() || m.cols() != 1)
+            throw new java.lang.IllegalArgumentException(
+                    "CvType.CV_64FC4 != m.type() ||  m.cols()!=1\n" + m);
+
+        matches.clear();
+        double[] buff = new double[4 * count];
+        m.get(0, 0, buff);
+        for (int i = 0; i < count; i++) {
+            matches.add(new DMatch((int) buff[4 * i], (int) buff[4 * i + 1], (int) buff[4 * i + 2], (float) buff[4 * i + 3]));
+        }
+    }
+
+    // vector_vector_DMatch
+    public static Mat vector_vector_DMatch_to_Mat(List<MatOfDMatch> lvdm, List<Mat> mats) {
+        Mat res;
+        int lCount = (lvdm != null) ? lvdm.size() : 0;
+        if (lCount > 0) {
+            for (MatOfDMatch vdm : lvdm)
+                mats.add(vdm);
+            res = vector_Mat_to_Mat(mats);
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    public static void Mat_to_vector_vector_DMatch(Mat m, List<MatOfDMatch> lvdm) {
+        if (lvdm == null)
+            throw new java.lang.IllegalArgumentException("Output List can't be null");
+
+        if (m == null)
+            throw new java.lang.IllegalArgumentException("Input Mat can't be null");
+
+        List<Mat> mats = new ArrayList<Mat>(m.rows());
+        Mat_to_vector_Mat(m, mats);
+        lvdm.clear();
+        for (Mat mi : mats) {
+            MatOfDMatch vdm = new MatOfDMatch(mi);
+            lvdm.add(vdm);
+            mi.release();
+        }
+        mats.clear();
+    }
+
+    // vector_vector_char
+    public static Mat vector_vector_char_to_Mat(List<MatOfByte> lvb, List<Mat> mats) {
+        Mat res;
+        int lCount = (lvb != null) ? lvb.size() : 0;
+        if (lCount > 0) {
+            for (MatOfByte vb : lvb)
+                mats.add(vb);
+            res = vector_Mat_to_Mat(mats);
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    public static void Mat_to_vector_vector_char(Mat m, List<List<Byte>> llb) {
+        if (llb == null)
+            throw new java.lang.IllegalArgumentException("Output List can't be null");
+
+        if (m == null)
+            throw new java.lang.IllegalArgumentException("Input Mat can't be null");
+
+        List<Mat> mats = new ArrayList<Mat>(m.rows());
+        Mat_to_vector_Mat(m, mats);
+        for (Mat mi : mats) {
+            List<Byte> lb = new ArrayList<Byte>();
+            Mat_to_vector_char(mi, lb);
+            llb.add(lb);
+            mi.release();
+        }
+        mats.clear();
+    }
+
+    public static Mat vector_RotatedRect_to_Mat(List<RotatedRect> rs) {
+        Mat res;
+        int count = (rs != null) ? rs.size() : 0;
+        if (count > 0) {
+            res = new Mat(count, 1, CvType.CV_32FC(5));
+            float[] buff = new float[5 * count];
+            for (int i = 0; i < count; i++) {
+                RotatedRect r = rs.get(i);
+                buff[5 * i] = (float)r.center.x;
+                buff[5 * i + 1] = (float)r.center.y;
+                buff[5 * i + 2] = (float)r.size.width;
+                buff[5 * i + 3] = (float)r.size.height;
+                buff[5 * i + 4] = (float)r.angle;
+            }
+            res.put(0, 0, buff);
+        } else {
+            res = new Mat();
+        }
+        return res;
+    }
+
+    public static void Mat_to_vector_RotatedRect(Mat m, List<RotatedRect> rs) {
+        if (rs == null)
+            throw new java.lang.IllegalArgumentException("rs == null");
+        int count = m.rows();
+        if (CvType.CV_32FC(5) != m.type() || m.cols() != 1)
+            throw new java.lang.IllegalArgumentException(
+                    "CvType.CV_32FC5 != m.type() ||  m.rows()!=1\n" + m);
+
+        rs.clear();
+        float[] buff = new float[5 * count];
+        m.get(0, 0, buff);
+        for (int i = 0; i < count; i++) {
+            rs.add(new RotatedRect(new Point(buff[5 * i], buff[5 * i + 1]), new Size(buff[5 * i + 2], buff[5 * i + 3]), buff[5 * i + 4]));
+        }
+    }
+}
diff --git a/opencv41/src/main/java/org/opencv/video/BackgroundSubtractor.java b/opencv41/src/main/java/org/opencv/video/BackgroundSubtractor.java
new file mode 100644 (file)
index 0000000..88b6724
--- /dev/null
@@ -0,0 +1,73 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.video;
+
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+
+// C++: class BackgroundSubtractor
+//javadoc: BackgroundSubtractor
+
+public class BackgroundSubtractor extends Algorithm {
+
+    protected BackgroundSubtractor(long addr) { super(addr); }
+
+    // internal usage only
+    public static BackgroundSubtractor __fromPtr__(long addr) { return new BackgroundSubtractor(addr); }
+
+    //
+    // C++:  void cv::BackgroundSubtractor::apply(Mat image, Mat& fgmask, double learningRate = -1)
+    //
+
+    //javadoc: BackgroundSubtractor::apply(image, fgmask, learningRate)
+    public  void apply(Mat image, Mat fgmask, double learningRate)
+    {
+        
+        apply_0(nativeObj, image.nativeObj, fgmask.nativeObj, learningRate);
+        
+        return;
+    }
+
+    //javadoc: BackgroundSubtractor::apply(image, fgmask)
+    public  void apply(Mat image, Mat fgmask)
+    {
+        
+        apply_1(nativeObj, image.nativeObj, fgmask.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractor::getBackgroundImage(Mat& backgroundImage)
+    //
+
+    //javadoc: BackgroundSubtractor::getBackgroundImage(backgroundImage)
+    public  void getBackgroundImage(Mat backgroundImage)
+    {
+        
+        getBackgroundImage_0(nativeObj, backgroundImage.nativeObj);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  void cv::BackgroundSubtractor::apply(Mat image, Mat& fgmask, double learningRate = -1)
+    private static native void apply_0(long nativeObj, long image_nativeObj, long fgmask_nativeObj, double learningRate);
+    private static native void apply_1(long nativeObj, long image_nativeObj, long fgmask_nativeObj);
+
+    // C++:  void cv::BackgroundSubtractor::getBackgroundImage(Mat& backgroundImage)
+    private static native void getBackgroundImage_0(long nativeObj, long backgroundImage_nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/video/BackgroundSubtractorKNN.java b/opencv41/src/main/java/org/opencv/video/BackgroundSubtractorKNN.java
new file mode 100644 (file)
index 0000000..fa6028b
--- /dev/null
@@ -0,0 +1,266 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.video;
+
+import org.opencv.video.BackgroundSubtractor;
+
+// C++: class BackgroundSubtractorKNN
+//javadoc: BackgroundSubtractorKNN
+
+public class BackgroundSubtractorKNN extends BackgroundSubtractor {
+
+    protected BackgroundSubtractorKNN(long addr) { super(addr); }
+
+    // internal usage only
+    public static BackgroundSubtractorKNN __fromPtr__(long addr) { return new BackgroundSubtractorKNN(addr); }
+
+    //
+    // C++:  bool cv::BackgroundSubtractorKNN::getDetectShadows()
+    //
+
+    //javadoc: BackgroundSubtractorKNN::getDetectShadows()
+    public  boolean getDetectShadows()
+    {
+        
+        boolean retVal = getDetectShadows_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::BackgroundSubtractorKNN::getDist2Threshold()
+    //
+
+    //javadoc: BackgroundSubtractorKNN::getDist2Threshold()
+    public  double getDist2Threshold()
+    {
+        
+        double retVal = getDist2Threshold_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::BackgroundSubtractorKNN::getShadowThreshold()
+    //
+
+    //javadoc: BackgroundSubtractorKNN::getShadowThreshold()
+    public  double getShadowThreshold()
+    {
+        
+        double retVal = getShadowThreshold_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::BackgroundSubtractorKNN::getHistory()
+    //
+
+    //javadoc: BackgroundSubtractorKNN::getHistory()
+    public  int getHistory()
+    {
+        
+        int retVal = getHistory_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::BackgroundSubtractorKNN::getNSamples()
+    //
+
+    //javadoc: BackgroundSubtractorKNN::getNSamples()
+    public  int getNSamples()
+    {
+        
+        int retVal = getNSamples_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::BackgroundSubtractorKNN::getShadowValue()
+    //
+
+    //javadoc: BackgroundSubtractorKNN::getShadowValue()
+    public  int getShadowValue()
+    {
+        
+        int retVal = getShadowValue_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::BackgroundSubtractorKNN::getkNNSamples()
+    //
+
+    //javadoc: BackgroundSubtractorKNN::getkNNSamples()
+    public  int getkNNSamples()
+    {
+        
+        int retVal = getkNNSamples_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorKNN::setDetectShadows(bool detectShadows)
+    //
+
+    //javadoc: BackgroundSubtractorKNN::setDetectShadows(detectShadows)
+    public  void setDetectShadows(boolean detectShadows)
+    {
+        
+        setDetectShadows_0(nativeObj, detectShadows);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorKNN::setDist2Threshold(double _dist2Threshold)
+    //
+
+    //javadoc: BackgroundSubtractorKNN::setDist2Threshold(_dist2Threshold)
+    public  void setDist2Threshold(double _dist2Threshold)
+    {
+        
+        setDist2Threshold_0(nativeObj, _dist2Threshold);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorKNN::setHistory(int history)
+    //
+
+    //javadoc: BackgroundSubtractorKNN::setHistory(history)
+    public  void setHistory(int history)
+    {
+        
+        setHistory_0(nativeObj, history);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorKNN::setNSamples(int _nN)
+    //
+
+    //javadoc: BackgroundSubtractorKNN::setNSamples(_nN)
+    public  void setNSamples(int _nN)
+    {
+        
+        setNSamples_0(nativeObj, _nN);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorKNN::setShadowThreshold(double threshold)
+    //
+
+    //javadoc: BackgroundSubtractorKNN::setShadowThreshold(threshold)
+    public  void setShadowThreshold(double threshold)
+    {
+        
+        setShadowThreshold_0(nativeObj, threshold);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorKNN::setShadowValue(int value)
+    //
+
+    //javadoc: BackgroundSubtractorKNN::setShadowValue(value)
+    public  void setShadowValue(int value)
+    {
+        
+        setShadowValue_0(nativeObj, value);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorKNN::setkNNSamples(int _nkNN)
+    //
+
+    //javadoc: BackgroundSubtractorKNN::setkNNSamples(_nkNN)
+    public  void setkNNSamples(int _nkNN)
+    {
+        
+        setkNNSamples_0(nativeObj, _nkNN);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  bool cv::BackgroundSubtractorKNN::getDetectShadows()
+    private static native boolean getDetectShadows_0(long nativeObj);
+
+    // C++:  double cv::BackgroundSubtractorKNN::getDist2Threshold()
+    private static native double getDist2Threshold_0(long nativeObj);
+
+    // C++:  double cv::BackgroundSubtractorKNN::getShadowThreshold()
+    private static native double getShadowThreshold_0(long nativeObj);
+
+    // C++:  int cv::BackgroundSubtractorKNN::getHistory()
+    private static native int getHistory_0(long nativeObj);
+
+    // C++:  int cv::BackgroundSubtractorKNN::getNSamples()
+    private static native int getNSamples_0(long nativeObj);
+
+    // C++:  int cv::BackgroundSubtractorKNN::getShadowValue()
+    private static native int getShadowValue_0(long nativeObj);
+
+    // C++:  int cv::BackgroundSubtractorKNN::getkNNSamples()
+    private static native int getkNNSamples_0(long nativeObj);
+
+    // C++:  void cv::BackgroundSubtractorKNN::setDetectShadows(bool detectShadows)
+    private static native void setDetectShadows_0(long nativeObj, boolean detectShadows);
+
+    // C++:  void cv::BackgroundSubtractorKNN::setDist2Threshold(double _dist2Threshold)
+    private static native void setDist2Threshold_0(long nativeObj, double _dist2Threshold);
+
+    // C++:  void cv::BackgroundSubtractorKNN::setHistory(int history)
+    private static native void setHistory_0(long nativeObj, int history);
+
+    // C++:  void cv::BackgroundSubtractorKNN::setNSamples(int _nN)
+    private static native void setNSamples_0(long nativeObj, int _nN);
+
+    // C++:  void cv::BackgroundSubtractorKNN::setShadowThreshold(double threshold)
+    private static native void setShadowThreshold_0(long nativeObj, double threshold);
+
+    // C++:  void cv::BackgroundSubtractorKNN::setShadowValue(int value)
+    private static native void setShadowValue_0(long nativeObj, int value);
+
+    // C++:  void cv::BackgroundSubtractorKNN::setkNNSamples(int _nkNN)
+    private static native void setkNNSamples_0(long nativeObj, int _nkNN);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/video/BackgroundSubtractorMOG2.java b/opencv41/src/main/java/org/opencv/video/BackgroundSubtractorMOG2.java
new file mode 100644 (file)
index 0000000..4717040
--- /dev/null
@@ -0,0 +1,464 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.video;
+
+import org.opencv.core.Mat;
+import org.opencv.video.BackgroundSubtractor;
+
+// C++: class BackgroundSubtractorMOG2
+//javadoc: BackgroundSubtractorMOG2
+
+public class BackgroundSubtractorMOG2 extends BackgroundSubtractor {
+
+    protected BackgroundSubtractorMOG2(long addr) { super(addr); }
+
+    // internal usage only
+    public static BackgroundSubtractorMOG2 __fromPtr__(long addr) { return new BackgroundSubtractorMOG2(addr); }
+
+    //
+    // C++:  bool cv::BackgroundSubtractorMOG2::getDetectShadows()
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::getDetectShadows()
+    public  boolean getDetectShadows()
+    {
+        
+        boolean retVal = getDetectShadows_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::BackgroundSubtractorMOG2::getBackgroundRatio()
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::getBackgroundRatio()
+    public  double getBackgroundRatio()
+    {
+        
+        double retVal = getBackgroundRatio_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::BackgroundSubtractorMOG2::getComplexityReductionThreshold()
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::getComplexityReductionThreshold()
+    public  double getComplexityReductionThreshold()
+    {
+        
+        double retVal = getComplexityReductionThreshold_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::BackgroundSubtractorMOG2::getShadowThreshold()
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::getShadowThreshold()
+    public  double getShadowThreshold()
+    {
+        
+        double retVal = getShadowThreshold_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::BackgroundSubtractorMOG2::getVarInit()
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::getVarInit()
+    public  double getVarInit()
+    {
+        
+        double retVal = getVarInit_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::BackgroundSubtractorMOG2::getVarMax()
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::getVarMax()
+    public  double getVarMax()
+    {
+        
+        double retVal = getVarMax_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::BackgroundSubtractorMOG2::getVarMin()
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::getVarMin()
+    public  double getVarMin()
+    {
+        
+        double retVal = getVarMin_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::BackgroundSubtractorMOG2::getVarThreshold()
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::getVarThreshold()
+    public  double getVarThreshold()
+    {
+        
+        double retVal = getVarThreshold_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::BackgroundSubtractorMOG2::getVarThresholdGen()
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::getVarThresholdGen()
+    public  double getVarThresholdGen()
+    {
+        
+        double retVal = getVarThresholdGen_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::BackgroundSubtractorMOG2::getHistory()
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::getHistory()
+    public  int getHistory()
+    {
+        
+        int retVal = getHistory_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::BackgroundSubtractorMOG2::getNMixtures()
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::getNMixtures()
+    public  int getNMixtures()
+    {
+        
+        int retVal = getNMixtures_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::BackgroundSubtractorMOG2::getShadowValue()
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::getShadowValue()
+    public  int getShadowValue()
+    {
+        
+        int retVal = getShadowValue_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorMOG2::apply(Mat image, Mat& fgmask, double learningRate = -1)
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::apply(image, fgmask, learningRate)
+    public  void apply(Mat image, Mat fgmask, double learningRate)
+    {
+        
+        apply_0(nativeObj, image.nativeObj, fgmask.nativeObj, learningRate);
+        
+        return;
+    }
+
+    //javadoc: BackgroundSubtractorMOG2::apply(image, fgmask)
+    public  void apply(Mat image, Mat fgmask)
+    {
+        
+        apply_1(nativeObj, image.nativeObj, fgmask.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorMOG2::setBackgroundRatio(double ratio)
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::setBackgroundRatio(ratio)
+    public  void setBackgroundRatio(double ratio)
+    {
+        
+        setBackgroundRatio_0(nativeObj, ratio);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorMOG2::setComplexityReductionThreshold(double ct)
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::setComplexityReductionThreshold(ct)
+    public  void setComplexityReductionThreshold(double ct)
+    {
+        
+        setComplexityReductionThreshold_0(nativeObj, ct);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorMOG2::setDetectShadows(bool detectShadows)
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::setDetectShadows(detectShadows)
+    public  void setDetectShadows(boolean detectShadows)
+    {
+        
+        setDetectShadows_0(nativeObj, detectShadows);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorMOG2::setHistory(int history)
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::setHistory(history)
+    public  void setHistory(int history)
+    {
+        
+        setHistory_0(nativeObj, history);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorMOG2::setNMixtures(int nmixtures)
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::setNMixtures(nmixtures)
+    public  void setNMixtures(int nmixtures)
+    {
+        
+        setNMixtures_0(nativeObj, nmixtures);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorMOG2::setShadowThreshold(double threshold)
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::setShadowThreshold(threshold)
+    public  void setShadowThreshold(double threshold)
+    {
+        
+        setShadowThreshold_0(nativeObj, threshold);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorMOG2::setShadowValue(int value)
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::setShadowValue(value)
+    public  void setShadowValue(int value)
+    {
+        
+        setShadowValue_0(nativeObj, value);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorMOG2::setVarInit(double varInit)
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::setVarInit(varInit)
+    public  void setVarInit(double varInit)
+    {
+        
+        setVarInit_0(nativeObj, varInit);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorMOG2::setVarMax(double varMax)
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::setVarMax(varMax)
+    public  void setVarMax(double varMax)
+    {
+        
+        setVarMax_0(nativeObj, varMax);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorMOG2::setVarMin(double varMin)
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::setVarMin(varMin)
+    public  void setVarMin(double varMin)
+    {
+        
+        setVarMin_0(nativeObj, varMin);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorMOG2::setVarThreshold(double varThreshold)
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::setVarThreshold(varThreshold)
+    public  void setVarThreshold(double varThreshold)
+    {
+        
+        setVarThreshold_0(nativeObj, varThreshold);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::BackgroundSubtractorMOG2::setVarThresholdGen(double varThresholdGen)
+    //
+
+    //javadoc: BackgroundSubtractorMOG2::setVarThresholdGen(varThresholdGen)
+    public  void setVarThresholdGen(double varThresholdGen)
+    {
+        
+        setVarThresholdGen_0(nativeObj, varThresholdGen);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  bool cv::BackgroundSubtractorMOG2::getDetectShadows()
+    private static native boolean getDetectShadows_0(long nativeObj);
+
+    // C++:  double cv::BackgroundSubtractorMOG2::getBackgroundRatio()
+    private static native double getBackgroundRatio_0(long nativeObj);
+
+    // C++:  double cv::BackgroundSubtractorMOG2::getComplexityReductionThreshold()
+    private static native double getComplexityReductionThreshold_0(long nativeObj);
+
+    // C++:  double cv::BackgroundSubtractorMOG2::getShadowThreshold()
+    private static native double getShadowThreshold_0(long nativeObj);
+
+    // C++:  double cv::BackgroundSubtractorMOG2::getVarInit()
+    private static native double getVarInit_0(long nativeObj);
+
+    // C++:  double cv::BackgroundSubtractorMOG2::getVarMax()
+    private static native double getVarMax_0(long nativeObj);
+
+    // C++:  double cv::BackgroundSubtractorMOG2::getVarMin()
+    private static native double getVarMin_0(long nativeObj);
+
+    // C++:  double cv::BackgroundSubtractorMOG2::getVarThreshold()
+    private static native double getVarThreshold_0(long nativeObj);
+
+    // C++:  double cv::BackgroundSubtractorMOG2::getVarThresholdGen()
+    private static native double getVarThresholdGen_0(long nativeObj);
+
+    // C++:  int cv::BackgroundSubtractorMOG2::getHistory()
+    private static native int getHistory_0(long nativeObj);
+
+    // C++:  int cv::BackgroundSubtractorMOG2::getNMixtures()
+    private static native int getNMixtures_0(long nativeObj);
+
+    // C++:  int cv::BackgroundSubtractorMOG2::getShadowValue()
+    private static native int getShadowValue_0(long nativeObj);
+
+    // C++:  void cv::BackgroundSubtractorMOG2::apply(Mat image, Mat& fgmask, double learningRate = -1)
+    private static native void apply_0(long nativeObj, long image_nativeObj, long fgmask_nativeObj, double learningRate);
+    private static native void apply_1(long nativeObj, long image_nativeObj, long fgmask_nativeObj);
+
+    // C++:  void cv::BackgroundSubtractorMOG2::setBackgroundRatio(double ratio)
+    private static native void setBackgroundRatio_0(long nativeObj, double ratio);
+
+    // C++:  void cv::BackgroundSubtractorMOG2::setComplexityReductionThreshold(double ct)
+    private static native void setComplexityReductionThreshold_0(long nativeObj, double ct);
+
+    // C++:  void cv::BackgroundSubtractorMOG2::setDetectShadows(bool detectShadows)
+    private static native void setDetectShadows_0(long nativeObj, boolean detectShadows);
+
+    // C++:  void cv::BackgroundSubtractorMOG2::setHistory(int history)
+    private static native void setHistory_0(long nativeObj, int history);
+
+    // C++:  void cv::BackgroundSubtractorMOG2::setNMixtures(int nmixtures)
+    private static native void setNMixtures_0(long nativeObj, int nmixtures);
+
+    // C++:  void cv::BackgroundSubtractorMOG2::setShadowThreshold(double threshold)
+    private static native void setShadowThreshold_0(long nativeObj, double threshold);
+
+    // C++:  void cv::BackgroundSubtractorMOG2::setShadowValue(int value)
+    private static native void setShadowValue_0(long nativeObj, int value);
+
+    // C++:  void cv::BackgroundSubtractorMOG2::setVarInit(double varInit)
+    private static native void setVarInit_0(long nativeObj, double varInit);
+
+    // C++:  void cv::BackgroundSubtractorMOG2::setVarMax(double varMax)
+    private static native void setVarMax_0(long nativeObj, double varMax);
+
+    // C++:  void cv::BackgroundSubtractorMOG2::setVarMin(double varMin)
+    private static native void setVarMin_0(long nativeObj, double varMin);
+
+    // C++:  void cv::BackgroundSubtractorMOG2::setVarThreshold(double varThreshold)
+    private static native void setVarThreshold_0(long nativeObj, double varThreshold);
+
+    // C++:  void cv::BackgroundSubtractorMOG2::setVarThresholdGen(double varThresholdGen)
+    private static native void setVarThresholdGen_0(long nativeObj, double varThresholdGen);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/video/DISOpticalFlow.java b/opencv41/src/main/java/org/opencv/video/DISOpticalFlow.java
new file mode 100644 (file)
index 0000000..88baa8d
--- /dev/null
@@ -0,0 +1,403 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.video;
+
+import org.opencv.video.DISOpticalFlow;
+import org.opencv.video.DenseOpticalFlow;
+
+// C++: class DISOpticalFlow
+//javadoc: DISOpticalFlow
+
+public class DISOpticalFlow extends DenseOpticalFlow {
+
+    protected DISOpticalFlow(long addr) { super(addr); }
+
+    // internal usage only
+    public static DISOpticalFlow __fromPtr__(long addr) { return new DISOpticalFlow(addr); }
+
+    // C++: enum <unnamed>
+    public static final int
+            PRESET_ULTRAFAST = 0,
+            PRESET_FAST = 1,
+            PRESET_MEDIUM = 2;
+
+
+    //
+    // C++: static Ptr_DISOpticalFlow cv::DISOpticalFlow::create(int preset = DISOpticalFlow::PRESET_FAST)
+    //
+
+    //javadoc: DISOpticalFlow::create(preset)
+    public static DISOpticalFlow create(int preset)
+    {
+        
+        DISOpticalFlow retVal = DISOpticalFlow.__fromPtr__(create_0(preset));
+        
+        return retVal;
+    }
+
+    //javadoc: DISOpticalFlow::create()
+    public static DISOpticalFlow create()
+    {
+        
+        DISOpticalFlow retVal = DISOpticalFlow.__fromPtr__(create_1());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::DISOpticalFlow::getUseMeanNormalization()
+    //
+
+    //javadoc: DISOpticalFlow::getUseMeanNormalization()
+    public  boolean getUseMeanNormalization()
+    {
+        
+        boolean retVal = getUseMeanNormalization_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::DISOpticalFlow::getUseSpatialPropagation()
+    //
+
+    //javadoc: DISOpticalFlow::getUseSpatialPropagation()
+    public  boolean getUseSpatialPropagation()
+    {
+        
+        boolean retVal = getUseSpatialPropagation_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::DISOpticalFlow::getVariationalRefinementAlpha()
+    //
+
+    //javadoc: DISOpticalFlow::getVariationalRefinementAlpha()
+    public  float getVariationalRefinementAlpha()
+    {
+        
+        float retVal = getVariationalRefinementAlpha_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::DISOpticalFlow::getVariationalRefinementDelta()
+    //
+
+    //javadoc: DISOpticalFlow::getVariationalRefinementDelta()
+    public  float getVariationalRefinementDelta()
+    {
+        
+        float retVal = getVariationalRefinementDelta_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::DISOpticalFlow::getVariationalRefinementGamma()
+    //
+
+    //javadoc: DISOpticalFlow::getVariationalRefinementGamma()
+    public  float getVariationalRefinementGamma()
+    {
+        
+        float retVal = getVariationalRefinementGamma_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::DISOpticalFlow::getFinestScale()
+    //
+
+    //javadoc: DISOpticalFlow::getFinestScale()
+    public  int getFinestScale()
+    {
+        
+        int retVal = getFinestScale_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::DISOpticalFlow::getGradientDescentIterations()
+    //
+
+    //javadoc: DISOpticalFlow::getGradientDescentIterations()
+    public  int getGradientDescentIterations()
+    {
+        
+        int retVal = getGradientDescentIterations_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::DISOpticalFlow::getPatchSize()
+    //
+
+    //javadoc: DISOpticalFlow::getPatchSize()
+    public  int getPatchSize()
+    {
+        
+        int retVal = getPatchSize_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::DISOpticalFlow::getPatchStride()
+    //
+
+    //javadoc: DISOpticalFlow::getPatchStride()
+    public  int getPatchStride()
+    {
+        
+        int retVal = getPatchStride_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::DISOpticalFlow::getVariationalRefinementIterations()
+    //
+
+    //javadoc: DISOpticalFlow::getVariationalRefinementIterations()
+    public  int getVariationalRefinementIterations()
+    {
+        
+        int retVal = getVariationalRefinementIterations_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::DISOpticalFlow::setFinestScale(int val)
+    //
+
+    //javadoc: DISOpticalFlow::setFinestScale(val)
+    public  void setFinestScale(int val)
+    {
+        
+        setFinestScale_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::DISOpticalFlow::setGradientDescentIterations(int val)
+    //
+
+    //javadoc: DISOpticalFlow::setGradientDescentIterations(val)
+    public  void setGradientDescentIterations(int val)
+    {
+        
+        setGradientDescentIterations_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::DISOpticalFlow::setPatchSize(int val)
+    //
+
+    //javadoc: DISOpticalFlow::setPatchSize(val)
+    public  void setPatchSize(int val)
+    {
+        
+        setPatchSize_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::DISOpticalFlow::setPatchStride(int val)
+    //
+
+    //javadoc: DISOpticalFlow::setPatchStride(val)
+    public  void setPatchStride(int val)
+    {
+        
+        setPatchStride_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::DISOpticalFlow::setUseMeanNormalization(bool val)
+    //
+
+    //javadoc: DISOpticalFlow::setUseMeanNormalization(val)
+    public  void setUseMeanNormalization(boolean val)
+    {
+        
+        setUseMeanNormalization_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::DISOpticalFlow::setUseSpatialPropagation(bool val)
+    //
+
+    //javadoc: DISOpticalFlow::setUseSpatialPropagation(val)
+    public  void setUseSpatialPropagation(boolean val)
+    {
+        
+        setUseSpatialPropagation_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::DISOpticalFlow::setVariationalRefinementAlpha(float val)
+    //
+
+    //javadoc: DISOpticalFlow::setVariationalRefinementAlpha(val)
+    public  void setVariationalRefinementAlpha(float val)
+    {
+        
+        setVariationalRefinementAlpha_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::DISOpticalFlow::setVariationalRefinementDelta(float val)
+    //
+
+    //javadoc: DISOpticalFlow::setVariationalRefinementDelta(val)
+    public  void setVariationalRefinementDelta(float val)
+    {
+        
+        setVariationalRefinementDelta_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::DISOpticalFlow::setVariationalRefinementGamma(float val)
+    //
+
+    //javadoc: DISOpticalFlow::setVariationalRefinementGamma(val)
+    public  void setVariationalRefinementGamma(float val)
+    {
+        
+        setVariationalRefinementGamma_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::DISOpticalFlow::setVariationalRefinementIterations(int val)
+    //
+
+    //javadoc: DISOpticalFlow::setVariationalRefinementIterations(val)
+    public  void setVariationalRefinementIterations(int val)
+    {
+        
+        setVariationalRefinementIterations_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++: static Ptr_DISOpticalFlow cv::DISOpticalFlow::create(int preset = DISOpticalFlow::PRESET_FAST)
+    private static native long create_0(int preset);
+    private static native long create_1();
+
+    // C++:  bool cv::DISOpticalFlow::getUseMeanNormalization()
+    private static native boolean getUseMeanNormalization_0(long nativeObj);
+
+    // C++:  bool cv::DISOpticalFlow::getUseSpatialPropagation()
+    private static native boolean getUseSpatialPropagation_0(long nativeObj);
+
+    // C++:  float cv::DISOpticalFlow::getVariationalRefinementAlpha()
+    private static native float getVariationalRefinementAlpha_0(long nativeObj);
+
+    // C++:  float cv::DISOpticalFlow::getVariationalRefinementDelta()
+    private static native float getVariationalRefinementDelta_0(long nativeObj);
+
+    // C++:  float cv::DISOpticalFlow::getVariationalRefinementGamma()
+    private static native float getVariationalRefinementGamma_0(long nativeObj);
+
+    // C++:  int cv::DISOpticalFlow::getFinestScale()
+    private static native int getFinestScale_0(long nativeObj);
+
+    // C++:  int cv::DISOpticalFlow::getGradientDescentIterations()
+    private static native int getGradientDescentIterations_0(long nativeObj);
+
+    // C++:  int cv::DISOpticalFlow::getPatchSize()
+    private static native int getPatchSize_0(long nativeObj);
+
+    // C++:  int cv::DISOpticalFlow::getPatchStride()
+    private static native int getPatchStride_0(long nativeObj);
+
+    // C++:  int cv::DISOpticalFlow::getVariationalRefinementIterations()
+    private static native int getVariationalRefinementIterations_0(long nativeObj);
+
+    // C++:  void cv::DISOpticalFlow::setFinestScale(int val)
+    private static native void setFinestScale_0(long nativeObj, int val);
+
+    // C++:  void cv::DISOpticalFlow::setGradientDescentIterations(int val)
+    private static native void setGradientDescentIterations_0(long nativeObj, int val);
+
+    // C++:  void cv::DISOpticalFlow::setPatchSize(int val)
+    private static native void setPatchSize_0(long nativeObj, int val);
+
+    // C++:  void cv::DISOpticalFlow::setPatchStride(int val)
+    private static native void setPatchStride_0(long nativeObj, int val);
+
+    // C++:  void cv::DISOpticalFlow::setUseMeanNormalization(bool val)
+    private static native void setUseMeanNormalization_0(long nativeObj, boolean val);
+
+    // C++:  void cv::DISOpticalFlow::setUseSpatialPropagation(bool val)
+    private static native void setUseSpatialPropagation_0(long nativeObj, boolean val);
+
+    // C++:  void cv::DISOpticalFlow::setVariationalRefinementAlpha(float val)
+    private static native void setVariationalRefinementAlpha_0(long nativeObj, float val);
+
+    // C++:  void cv::DISOpticalFlow::setVariationalRefinementDelta(float val)
+    private static native void setVariationalRefinementDelta_0(long nativeObj, float val);
+
+    // C++:  void cv::DISOpticalFlow::setVariationalRefinementGamma(float val)
+    private static native void setVariationalRefinementGamma_0(long nativeObj, float val);
+
+    // C++:  void cv::DISOpticalFlow::setVariationalRefinementIterations(int val)
+    private static native void setVariationalRefinementIterations_0(long nativeObj, int val);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/video/DenseOpticalFlow.java b/opencv41/src/main/java/org/opencv/video/DenseOpticalFlow.java
new file mode 100644 (file)
index 0000000..760534c
--- /dev/null
@@ -0,0 +1,63 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.video;
+
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+
+// C++: class DenseOpticalFlow
+//javadoc: DenseOpticalFlow
+
+public class DenseOpticalFlow extends Algorithm {
+
+    protected DenseOpticalFlow(long addr) { super(addr); }
+
+    // internal usage only
+    public static DenseOpticalFlow __fromPtr__(long addr) { return new DenseOpticalFlow(addr); }
+
+    //
+    // C++:  void cv::DenseOpticalFlow::calc(Mat I0, Mat I1, Mat& flow)
+    //
+
+    //javadoc: DenseOpticalFlow::calc(I0, I1, flow)
+    public  void calc(Mat I0, Mat I1, Mat flow)
+    {
+        
+        calc_0(nativeObj, I0.nativeObj, I1.nativeObj, flow.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::DenseOpticalFlow::collectGarbage()
+    //
+
+    //javadoc: DenseOpticalFlow::collectGarbage()
+    public  void collectGarbage()
+    {
+        
+        collectGarbage_0(nativeObj);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  void cv::DenseOpticalFlow::calc(Mat I0, Mat I1, Mat& flow)
+    private static native void calc_0(long nativeObj, long I0_nativeObj, long I1_nativeObj, long flow_nativeObj);
+
+    // C++:  void cv::DenseOpticalFlow::collectGarbage()
+    private static native void collectGarbage_0(long nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/video/FarnebackOpticalFlow.java b/opencv41/src/main/java/org/opencv/video/FarnebackOpticalFlow.java
new file mode 100644 (file)
index 0000000..e1c9a4b
--- /dev/null
@@ -0,0 +1,398 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.video;
+
+import org.opencv.video.DenseOpticalFlow;
+import org.opencv.video.FarnebackOpticalFlow;
+
+// C++: class FarnebackOpticalFlow
+//javadoc: FarnebackOpticalFlow
+
+public class FarnebackOpticalFlow extends DenseOpticalFlow {
+
+    protected FarnebackOpticalFlow(long addr) { super(addr); }
+
+    // internal usage only
+    public static FarnebackOpticalFlow __fromPtr__(long addr) { return new FarnebackOpticalFlow(addr); }
+
+    //
+    // C++: static Ptr_FarnebackOpticalFlow cv::FarnebackOpticalFlow::create(int numLevels = 5, double pyrScale = 0.5, bool fastPyramids = false, int winSize = 13, int numIters = 10, int polyN = 5, double polySigma = 1.1, int flags = 0)
+    //
+
+    //javadoc: FarnebackOpticalFlow::create(numLevels, pyrScale, fastPyramids, winSize, numIters, polyN, polySigma, flags)
+    public static FarnebackOpticalFlow create(int numLevels, double pyrScale, boolean fastPyramids, int winSize, int numIters, int polyN, double polySigma, int flags)
+    {
+        
+        FarnebackOpticalFlow retVal = FarnebackOpticalFlow.__fromPtr__(create_0(numLevels, pyrScale, fastPyramids, winSize, numIters, polyN, polySigma, flags));
+        
+        return retVal;
+    }
+
+    //javadoc: FarnebackOpticalFlow::create(numLevels, pyrScale, fastPyramids, winSize, numIters, polyN, polySigma)
+    public static FarnebackOpticalFlow create(int numLevels, double pyrScale, boolean fastPyramids, int winSize, int numIters, int polyN, double polySigma)
+    {
+        
+        FarnebackOpticalFlow retVal = FarnebackOpticalFlow.__fromPtr__(create_1(numLevels, pyrScale, fastPyramids, winSize, numIters, polyN, polySigma));
+        
+        return retVal;
+    }
+
+    //javadoc: FarnebackOpticalFlow::create(numLevels, pyrScale, fastPyramids, winSize, numIters, polyN)
+    public static FarnebackOpticalFlow create(int numLevels, double pyrScale, boolean fastPyramids, int winSize, int numIters, int polyN)
+    {
+        
+        FarnebackOpticalFlow retVal = FarnebackOpticalFlow.__fromPtr__(create_2(numLevels, pyrScale, fastPyramids, winSize, numIters, polyN));
+        
+        return retVal;
+    }
+
+    //javadoc: FarnebackOpticalFlow::create(numLevels, pyrScale, fastPyramids, winSize, numIters)
+    public static FarnebackOpticalFlow create(int numLevels, double pyrScale, boolean fastPyramids, int winSize, int numIters)
+    {
+        
+        FarnebackOpticalFlow retVal = FarnebackOpticalFlow.__fromPtr__(create_3(numLevels, pyrScale, fastPyramids, winSize, numIters));
+        
+        return retVal;
+    }
+
+    //javadoc: FarnebackOpticalFlow::create(numLevels, pyrScale, fastPyramids, winSize)
+    public static FarnebackOpticalFlow create(int numLevels, double pyrScale, boolean fastPyramids, int winSize)
+    {
+        
+        FarnebackOpticalFlow retVal = FarnebackOpticalFlow.__fromPtr__(create_4(numLevels, pyrScale, fastPyramids, winSize));
+        
+        return retVal;
+    }
+
+    //javadoc: FarnebackOpticalFlow::create(numLevels, pyrScale, fastPyramids)
+    public static FarnebackOpticalFlow create(int numLevels, double pyrScale, boolean fastPyramids)
+    {
+        
+        FarnebackOpticalFlow retVal = FarnebackOpticalFlow.__fromPtr__(create_5(numLevels, pyrScale, fastPyramids));
+        
+        return retVal;
+    }
+
+    //javadoc: FarnebackOpticalFlow::create(numLevels, pyrScale)
+    public static FarnebackOpticalFlow create(int numLevels, double pyrScale)
+    {
+        
+        FarnebackOpticalFlow retVal = FarnebackOpticalFlow.__fromPtr__(create_6(numLevels, pyrScale));
+        
+        return retVal;
+    }
+
+    //javadoc: FarnebackOpticalFlow::create(numLevels)
+    public static FarnebackOpticalFlow create(int numLevels)
+    {
+        
+        FarnebackOpticalFlow retVal = FarnebackOpticalFlow.__fromPtr__(create_7(numLevels));
+        
+        return retVal;
+    }
+
+    //javadoc: FarnebackOpticalFlow::create()
+    public static FarnebackOpticalFlow create()
+    {
+        
+        FarnebackOpticalFlow retVal = FarnebackOpticalFlow.__fromPtr__(create_8());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::FarnebackOpticalFlow::getFastPyramids()
+    //
+
+    //javadoc: FarnebackOpticalFlow::getFastPyramids()
+    public  boolean getFastPyramids()
+    {
+        
+        boolean retVal = getFastPyramids_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::FarnebackOpticalFlow::getPolySigma()
+    //
+
+    //javadoc: FarnebackOpticalFlow::getPolySigma()
+    public  double getPolySigma()
+    {
+        
+        double retVal = getPolySigma_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::FarnebackOpticalFlow::getPyrScale()
+    //
+
+    //javadoc: FarnebackOpticalFlow::getPyrScale()
+    public  double getPyrScale()
+    {
+        
+        double retVal = getPyrScale_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::FarnebackOpticalFlow::getFlags()
+    //
+
+    //javadoc: FarnebackOpticalFlow::getFlags()
+    public  int getFlags()
+    {
+        
+        int retVal = getFlags_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::FarnebackOpticalFlow::getNumIters()
+    //
+
+    //javadoc: FarnebackOpticalFlow::getNumIters()
+    public  int getNumIters()
+    {
+        
+        int retVal = getNumIters_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::FarnebackOpticalFlow::getNumLevels()
+    //
+
+    //javadoc: FarnebackOpticalFlow::getNumLevels()
+    public  int getNumLevels()
+    {
+        
+        int retVal = getNumLevels_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::FarnebackOpticalFlow::getPolyN()
+    //
+
+    //javadoc: FarnebackOpticalFlow::getPolyN()
+    public  int getPolyN()
+    {
+        
+        int retVal = getPolyN_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::FarnebackOpticalFlow::getWinSize()
+    //
+
+    //javadoc: FarnebackOpticalFlow::getWinSize()
+    public  int getWinSize()
+    {
+        
+        int retVal = getWinSize_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::FarnebackOpticalFlow::setFastPyramids(bool fastPyramids)
+    //
+
+    //javadoc: FarnebackOpticalFlow::setFastPyramids(fastPyramids)
+    public  void setFastPyramids(boolean fastPyramids)
+    {
+        
+        setFastPyramids_0(nativeObj, fastPyramids);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::FarnebackOpticalFlow::setFlags(int flags)
+    //
+
+    //javadoc: FarnebackOpticalFlow::setFlags(flags)
+    public  void setFlags(int flags)
+    {
+        
+        setFlags_0(nativeObj, flags);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::FarnebackOpticalFlow::setNumIters(int numIters)
+    //
+
+    //javadoc: FarnebackOpticalFlow::setNumIters(numIters)
+    public  void setNumIters(int numIters)
+    {
+        
+        setNumIters_0(nativeObj, numIters);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::FarnebackOpticalFlow::setNumLevels(int numLevels)
+    //
+
+    //javadoc: FarnebackOpticalFlow::setNumLevels(numLevels)
+    public  void setNumLevels(int numLevels)
+    {
+        
+        setNumLevels_0(nativeObj, numLevels);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::FarnebackOpticalFlow::setPolyN(int polyN)
+    //
+
+    //javadoc: FarnebackOpticalFlow::setPolyN(polyN)
+    public  void setPolyN(int polyN)
+    {
+        
+        setPolyN_0(nativeObj, polyN);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::FarnebackOpticalFlow::setPolySigma(double polySigma)
+    //
+
+    //javadoc: FarnebackOpticalFlow::setPolySigma(polySigma)
+    public  void setPolySigma(double polySigma)
+    {
+        
+        setPolySigma_0(nativeObj, polySigma);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::FarnebackOpticalFlow::setPyrScale(double pyrScale)
+    //
+
+    //javadoc: FarnebackOpticalFlow::setPyrScale(pyrScale)
+    public  void setPyrScale(double pyrScale)
+    {
+        
+        setPyrScale_0(nativeObj, pyrScale);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::FarnebackOpticalFlow::setWinSize(int winSize)
+    //
+
+    //javadoc: FarnebackOpticalFlow::setWinSize(winSize)
+    public  void setWinSize(int winSize)
+    {
+        
+        setWinSize_0(nativeObj, winSize);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++: static Ptr_FarnebackOpticalFlow cv::FarnebackOpticalFlow::create(int numLevels = 5, double pyrScale = 0.5, bool fastPyramids = false, int winSize = 13, int numIters = 10, int polyN = 5, double polySigma = 1.1, int flags = 0)
+    private static native long create_0(int numLevels, double pyrScale, boolean fastPyramids, int winSize, int numIters, int polyN, double polySigma, int flags);
+    private static native long create_1(int numLevels, double pyrScale, boolean fastPyramids, int winSize, int numIters, int polyN, double polySigma);
+    private static native long create_2(int numLevels, double pyrScale, boolean fastPyramids, int winSize, int numIters, int polyN);
+    private static native long create_3(int numLevels, double pyrScale, boolean fastPyramids, int winSize, int numIters);
+    private static native long create_4(int numLevels, double pyrScale, boolean fastPyramids, int winSize);
+    private static native long create_5(int numLevels, double pyrScale, boolean fastPyramids);
+    private static native long create_6(int numLevels, double pyrScale);
+    private static native long create_7(int numLevels);
+    private static native long create_8();
+
+    // C++:  bool cv::FarnebackOpticalFlow::getFastPyramids()
+    private static native boolean getFastPyramids_0(long nativeObj);
+
+    // C++:  double cv::FarnebackOpticalFlow::getPolySigma()
+    private static native double getPolySigma_0(long nativeObj);
+
+    // C++:  double cv::FarnebackOpticalFlow::getPyrScale()
+    private static native double getPyrScale_0(long nativeObj);
+
+    // C++:  int cv::FarnebackOpticalFlow::getFlags()
+    private static native int getFlags_0(long nativeObj);
+
+    // C++:  int cv::FarnebackOpticalFlow::getNumIters()
+    private static native int getNumIters_0(long nativeObj);
+
+    // C++:  int cv::FarnebackOpticalFlow::getNumLevels()
+    private static native int getNumLevels_0(long nativeObj);
+
+    // C++:  int cv::FarnebackOpticalFlow::getPolyN()
+    private static native int getPolyN_0(long nativeObj);
+
+    // C++:  int cv::FarnebackOpticalFlow::getWinSize()
+    private static native int getWinSize_0(long nativeObj);
+
+    // C++:  void cv::FarnebackOpticalFlow::setFastPyramids(bool fastPyramids)
+    private static native void setFastPyramids_0(long nativeObj, boolean fastPyramids);
+
+    // C++:  void cv::FarnebackOpticalFlow::setFlags(int flags)
+    private static native void setFlags_0(long nativeObj, int flags);
+
+    // C++:  void cv::FarnebackOpticalFlow::setNumIters(int numIters)
+    private static native void setNumIters_0(long nativeObj, int numIters);
+
+    // C++:  void cv::FarnebackOpticalFlow::setNumLevels(int numLevels)
+    private static native void setNumLevels_0(long nativeObj, int numLevels);
+
+    // C++:  void cv::FarnebackOpticalFlow::setPolyN(int polyN)
+    private static native void setPolyN_0(long nativeObj, int polyN);
+
+    // C++:  void cv::FarnebackOpticalFlow::setPolySigma(double polySigma)
+    private static native void setPolySigma_0(long nativeObj, double polySigma);
+
+    // C++:  void cv::FarnebackOpticalFlow::setPyrScale(double pyrScale)
+    private static native void setPyrScale_0(long nativeObj, double pyrScale);
+
+    // C++:  void cv::FarnebackOpticalFlow::setWinSize(int winSize)
+    private static native void setWinSize_0(long nativeObj, int winSize);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/video/KalmanFilter.java b/opencv41/src/main/java/org/opencv/video/KalmanFilter.java
new file mode 100644 (file)
index 0000000..91771b7
--- /dev/null
@@ -0,0 +1,469 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.video;
+
+import org.opencv.core.Mat;
+
+// C++: class KalmanFilter
+//javadoc: KalmanFilter
+
+public class KalmanFilter {
+
+    protected final long nativeObj;
+    protected KalmanFilter(long addr) { nativeObj = addr; }
+
+    public long getNativeObjAddr() { return nativeObj; }
+
+    // internal usage only
+    public static KalmanFilter __fromPtr__(long addr) { return new KalmanFilter(addr); }
+
+    //
+    // C++:   cv::KalmanFilter::KalmanFilter(int dynamParams, int measureParams, int controlParams = 0, int type = CV_32F)
+    //
+
+    //javadoc: KalmanFilter::KalmanFilter(dynamParams, measureParams, controlParams, type)
+    public   KalmanFilter(int dynamParams, int measureParams, int controlParams, int type)
+    {
+        
+        nativeObj = KalmanFilter_0(dynamParams, measureParams, controlParams, type);
+        
+        return;
+    }
+
+    //javadoc: KalmanFilter::KalmanFilter(dynamParams, measureParams, controlParams)
+    public   KalmanFilter(int dynamParams, int measureParams, int controlParams)
+    {
+        
+        nativeObj = KalmanFilter_1(dynamParams, measureParams, controlParams);
+        
+        return;
+    }
+
+    //javadoc: KalmanFilter::KalmanFilter(dynamParams, measureParams)
+    public   KalmanFilter(int dynamParams, int measureParams)
+    {
+        
+        nativeObj = KalmanFilter_2(dynamParams, measureParams);
+        
+        return;
+    }
+
+
+    //
+    // C++:   cv::KalmanFilter::KalmanFilter()
+    //
+
+    //javadoc: KalmanFilter::KalmanFilter()
+    public   KalmanFilter()
+    {
+        
+        nativeObj = KalmanFilter_3();
+        
+        return;
+    }
+
+
+    //
+    // C++:  Mat cv::KalmanFilter::correct(Mat measurement)
+    //
+
+    //javadoc: KalmanFilter::correct(measurement)
+    public  Mat correct(Mat measurement)
+    {
+        
+        Mat retVal = new Mat(correct_0(nativeObj, measurement.nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Mat cv::KalmanFilter::predict(Mat control = Mat())
+    //
+
+    //javadoc: KalmanFilter::predict(control)
+    public  Mat predict(Mat control)
+    {
+        
+        Mat retVal = new Mat(predict_0(nativeObj, control.nativeObj));
+        
+        return retVal;
+    }
+
+    //javadoc: KalmanFilter::predict()
+    public  Mat predict()
+    {
+        
+        Mat retVal = new Mat(predict_1(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: Mat KalmanFilter::statePre
+    //
+
+    //javadoc: KalmanFilter::get_statePre()
+    public  Mat get_statePre()
+    {
+        
+        Mat retVal = new Mat(get_statePre_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: void KalmanFilter::statePre
+    //
+
+    //javadoc: KalmanFilter::set_statePre(statePre)
+    public  void set_statePre(Mat statePre)
+    {
+        
+        set_statePre_0(nativeObj, statePre.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++: Mat KalmanFilter::statePost
+    //
+
+    //javadoc: KalmanFilter::get_statePost()
+    public  Mat get_statePost()
+    {
+        
+        Mat retVal = new Mat(get_statePost_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: void KalmanFilter::statePost
+    //
+
+    //javadoc: KalmanFilter::set_statePost(statePost)
+    public  void set_statePost(Mat statePost)
+    {
+        
+        set_statePost_0(nativeObj, statePost.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++: Mat KalmanFilter::transitionMatrix
+    //
+
+    //javadoc: KalmanFilter::get_transitionMatrix()
+    public  Mat get_transitionMatrix()
+    {
+        
+        Mat retVal = new Mat(get_transitionMatrix_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: void KalmanFilter::transitionMatrix
+    //
+
+    //javadoc: KalmanFilter::set_transitionMatrix(transitionMatrix)
+    public  void set_transitionMatrix(Mat transitionMatrix)
+    {
+        
+        set_transitionMatrix_0(nativeObj, transitionMatrix.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++: Mat KalmanFilter::controlMatrix
+    //
+
+    //javadoc: KalmanFilter::get_controlMatrix()
+    public  Mat get_controlMatrix()
+    {
+        
+        Mat retVal = new Mat(get_controlMatrix_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: void KalmanFilter::controlMatrix
+    //
+
+    //javadoc: KalmanFilter::set_controlMatrix(controlMatrix)
+    public  void set_controlMatrix(Mat controlMatrix)
+    {
+        
+        set_controlMatrix_0(nativeObj, controlMatrix.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++: Mat KalmanFilter::measurementMatrix
+    //
+
+    //javadoc: KalmanFilter::get_measurementMatrix()
+    public  Mat get_measurementMatrix()
+    {
+        
+        Mat retVal = new Mat(get_measurementMatrix_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: void KalmanFilter::measurementMatrix
+    //
+
+    //javadoc: KalmanFilter::set_measurementMatrix(measurementMatrix)
+    public  void set_measurementMatrix(Mat measurementMatrix)
+    {
+        
+        set_measurementMatrix_0(nativeObj, measurementMatrix.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++: Mat KalmanFilter::processNoiseCov
+    //
+
+    //javadoc: KalmanFilter::get_processNoiseCov()
+    public  Mat get_processNoiseCov()
+    {
+        
+        Mat retVal = new Mat(get_processNoiseCov_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: void KalmanFilter::processNoiseCov
+    //
+
+    //javadoc: KalmanFilter::set_processNoiseCov(processNoiseCov)
+    public  void set_processNoiseCov(Mat processNoiseCov)
+    {
+        
+        set_processNoiseCov_0(nativeObj, processNoiseCov.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++: Mat KalmanFilter::measurementNoiseCov
+    //
+
+    //javadoc: KalmanFilter::get_measurementNoiseCov()
+    public  Mat get_measurementNoiseCov()
+    {
+        
+        Mat retVal = new Mat(get_measurementNoiseCov_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: void KalmanFilter::measurementNoiseCov
+    //
+
+    //javadoc: KalmanFilter::set_measurementNoiseCov(measurementNoiseCov)
+    public  void set_measurementNoiseCov(Mat measurementNoiseCov)
+    {
+        
+        set_measurementNoiseCov_0(nativeObj, measurementNoiseCov.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++: Mat KalmanFilter::errorCovPre
+    //
+
+    //javadoc: KalmanFilter::get_errorCovPre()
+    public  Mat get_errorCovPre()
+    {
+        
+        Mat retVal = new Mat(get_errorCovPre_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: void KalmanFilter::errorCovPre
+    //
+
+    //javadoc: KalmanFilter::set_errorCovPre(errorCovPre)
+    public  void set_errorCovPre(Mat errorCovPre)
+    {
+        
+        set_errorCovPre_0(nativeObj, errorCovPre.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++: Mat KalmanFilter::gain
+    //
+
+    //javadoc: KalmanFilter::get_gain()
+    public  Mat get_gain()
+    {
+        
+        Mat retVal = new Mat(get_gain_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: void KalmanFilter::gain
+    //
+
+    //javadoc: KalmanFilter::set_gain(gain)
+    public  void set_gain(Mat gain)
+    {
+        
+        set_gain_0(nativeObj, gain.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++: Mat KalmanFilter::errorCovPost
+    //
+
+    //javadoc: KalmanFilter::get_errorCovPost()
+    public  Mat get_errorCovPost()
+    {
+        
+        Mat retVal = new Mat(get_errorCovPost_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: void KalmanFilter::errorCovPost
+    //
+
+    //javadoc: KalmanFilter::set_errorCovPost(errorCovPost)
+    public  void set_errorCovPost(Mat errorCovPost)
+    {
+        
+        set_errorCovPost_0(nativeObj, errorCovPost.nativeObj);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:   cv::KalmanFilter::KalmanFilter(int dynamParams, int measureParams, int controlParams = 0, int type = CV_32F)
+    private static native long KalmanFilter_0(int dynamParams, int measureParams, int controlParams, int type);
+    private static native long KalmanFilter_1(int dynamParams, int measureParams, int controlParams);
+    private static native long KalmanFilter_2(int dynamParams, int measureParams);
+
+    // C++:   cv::KalmanFilter::KalmanFilter()
+    private static native long KalmanFilter_3();
+
+    // C++:  Mat cv::KalmanFilter::correct(Mat measurement)
+    private static native long correct_0(long nativeObj, long measurement_nativeObj);
+
+    // C++:  Mat cv::KalmanFilter::predict(Mat control = Mat())
+    private static native long predict_0(long nativeObj, long control_nativeObj);
+    private static native long predict_1(long nativeObj);
+
+    // C++: Mat KalmanFilter::statePre
+    private static native long get_statePre_0(long nativeObj);
+
+    // C++: void KalmanFilter::statePre
+    private static native void set_statePre_0(long nativeObj, long statePre_nativeObj);
+
+    // C++: Mat KalmanFilter::statePost
+    private static native long get_statePost_0(long nativeObj);
+
+    // C++: void KalmanFilter::statePost
+    private static native void set_statePost_0(long nativeObj, long statePost_nativeObj);
+
+    // C++: Mat KalmanFilter::transitionMatrix
+    private static native long get_transitionMatrix_0(long nativeObj);
+
+    // C++: void KalmanFilter::transitionMatrix
+    private static native void set_transitionMatrix_0(long nativeObj, long transitionMatrix_nativeObj);
+
+    // C++: Mat KalmanFilter::controlMatrix
+    private static native long get_controlMatrix_0(long nativeObj);
+
+    // C++: void KalmanFilter::controlMatrix
+    private static native void set_controlMatrix_0(long nativeObj, long controlMatrix_nativeObj);
+
+    // C++: Mat KalmanFilter::measurementMatrix
+    private static native long get_measurementMatrix_0(long nativeObj);
+
+    // C++: void KalmanFilter::measurementMatrix
+    private static native void set_measurementMatrix_0(long nativeObj, long measurementMatrix_nativeObj);
+
+    // C++: Mat KalmanFilter::processNoiseCov
+    private static native long get_processNoiseCov_0(long nativeObj);
+
+    // C++: void KalmanFilter::processNoiseCov
+    private static native void set_processNoiseCov_0(long nativeObj, long processNoiseCov_nativeObj);
+
+    // C++: Mat KalmanFilter::measurementNoiseCov
+    private static native long get_measurementNoiseCov_0(long nativeObj);
+
+    // C++: void KalmanFilter::measurementNoiseCov
+    private static native void set_measurementNoiseCov_0(long nativeObj, long measurementNoiseCov_nativeObj);
+
+    // C++: Mat KalmanFilter::errorCovPre
+    private static native long get_errorCovPre_0(long nativeObj);
+
+    // C++: void KalmanFilter::errorCovPre
+    private static native void set_errorCovPre_0(long nativeObj, long errorCovPre_nativeObj);
+
+    // C++: Mat KalmanFilter::gain
+    private static native long get_gain_0(long nativeObj);
+
+    // C++: void KalmanFilter::gain
+    private static native void set_gain_0(long nativeObj, long gain_nativeObj);
+
+    // C++: Mat KalmanFilter::errorCovPost
+    private static native long get_errorCovPost_0(long nativeObj);
+
+    // C++: void KalmanFilter::errorCovPost
+    private static native void set_errorCovPost_0(long nativeObj, long errorCovPost_nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/video/SparseOpticalFlow.java b/opencv41/src/main/java/org/opencv/video/SparseOpticalFlow.java
new file mode 100644 (file)
index 0000000..dba7b72
--- /dev/null
@@ -0,0 +1,56 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.video;
+
+import org.opencv.core.Algorithm;
+import org.opencv.core.Mat;
+
+// C++: class SparseOpticalFlow
+//javadoc: SparseOpticalFlow
+
+public class SparseOpticalFlow extends Algorithm {
+
+    protected SparseOpticalFlow(long addr) { super(addr); }
+
+    // internal usage only
+    public static SparseOpticalFlow __fromPtr__(long addr) { return new SparseOpticalFlow(addr); }
+
+    //
+    // C++:  void cv::SparseOpticalFlow::calc(Mat prevImg, Mat nextImg, Mat prevPts, Mat& nextPts, Mat& status, Mat& err = cv::Mat())
+    //
+
+    //javadoc: SparseOpticalFlow::calc(prevImg, nextImg, prevPts, nextPts, status, err)
+    public  void calc(Mat prevImg, Mat nextImg, Mat prevPts, Mat nextPts, Mat status, Mat err)
+    {
+        
+        calc_0(nativeObj, prevImg.nativeObj, nextImg.nativeObj, prevPts.nativeObj, nextPts.nativeObj, status.nativeObj, err.nativeObj);
+        
+        return;
+    }
+
+    //javadoc: SparseOpticalFlow::calc(prevImg, nextImg, prevPts, nextPts, status)
+    public  void calc(Mat prevImg, Mat nextImg, Mat prevPts, Mat nextPts, Mat status)
+    {
+        
+        calc_1(nativeObj, prevImg.nativeObj, nextImg.nativeObj, prevPts.nativeObj, nextPts.nativeObj, status.nativeObj);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:  void cv::SparseOpticalFlow::calc(Mat prevImg, Mat nextImg, Mat prevPts, Mat& nextPts, Mat& status, Mat& err = cv::Mat())
+    private static native void calc_0(long nativeObj, long prevImg_nativeObj, long nextImg_nativeObj, long prevPts_nativeObj, long nextPts_nativeObj, long status_nativeObj, long err_nativeObj);
+    private static native void calc_1(long nativeObj, long prevImg_nativeObj, long nextImg_nativeObj, long prevPts_nativeObj, long nextPts_nativeObj, long status_nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/video/SparsePyrLKOpticalFlow.java b/opencv41/src/main/java/org/opencv/video/SparsePyrLKOpticalFlow.java
new file mode 100644 (file)
index 0000000..9f1a122
--- /dev/null
@@ -0,0 +1,268 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.video;
+
+import org.opencv.core.Size;
+import org.opencv.core.TermCriteria;
+import org.opencv.video.SparseOpticalFlow;
+import org.opencv.video.SparsePyrLKOpticalFlow;
+
+// C++: class SparsePyrLKOpticalFlow
+//javadoc: SparsePyrLKOpticalFlow
+
+public class SparsePyrLKOpticalFlow extends SparseOpticalFlow {
+
+    protected SparsePyrLKOpticalFlow(long addr) { super(addr); }
+
+    // internal usage only
+    public static SparsePyrLKOpticalFlow __fromPtr__(long addr) { return new SparsePyrLKOpticalFlow(addr); }
+
+    //
+    // C++: static Ptr_SparsePyrLKOpticalFlow cv::SparsePyrLKOpticalFlow::create(Size winSize = Size(21, 21), int maxLevel = 3, TermCriteria crit = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), int flags = 0, double minEigThreshold = 1e-4)
+    //
+
+    //javadoc: SparsePyrLKOpticalFlow::create(winSize, maxLevel, crit, flags, minEigThreshold)
+    public static SparsePyrLKOpticalFlow create(Size winSize, int maxLevel, TermCriteria crit, int flags, double minEigThreshold)
+    {
+        
+        SparsePyrLKOpticalFlow retVal = SparsePyrLKOpticalFlow.__fromPtr__(create_0(winSize.width, winSize.height, maxLevel, crit.type, crit.maxCount, crit.epsilon, flags, minEigThreshold));
+        
+        return retVal;
+    }
+
+    //javadoc: SparsePyrLKOpticalFlow::create(winSize, maxLevel, crit, flags)
+    public static SparsePyrLKOpticalFlow create(Size winSize, int maxLevel, TermCriteria crit, int flags)
+    {
+        
+        SparsePyrLKOpticalFlow retVal = SparsePyrLKOpticalFlow.__fromPtr__(create_1(winSize.width, winSize.height, maxLevel, crit.type, crit.maxCount, crit.epsilon, flags));
+        
+        return retVal;
+    }
+
+    //javadoc: SparsePyrLKOpticalFlow::create(winSize, maxLevel, crit)
+    public static SparsePyrLKOpticalFlow create(Size winSize, int maxLevel, TermCriteria crit)
+    {
+        
+        SparsePyrLKOpticalFlow retVal = SparsePyrLKOpticalFlow.__fromPtr__(create_2(winSize.width, winSize.height, maxLevel, crit.type, crit.maxCount, crit.epsilon));
+        
+        return retVal;
+    }
+
+    //javadoc: SparsePyrLKOpticalFlow::create(winSize, maxLevel)
+    public static SparsePyrLKOpticalFlow create(Size winSize, int maxLevel)
+    {
+        
+        SparsePyrLKOpticalFlow retVal = SparsePyrLKOpticalFlow.__fromPtr__(create_3(winSize.width, winSize.height, maxLevel));
+        
+        return retVal;
+    }
+
+    //javadoc: SparsePyrLKOpticalFlow::create(winSize)
+    public static SparsePyrLKOpticalFlow create(Size winSize)
+    {
+        
+        SparsePyrLKOpticalFlow retVal = SparsePyrLKOpticalFlow.__fromPtr__(create_4(winSize.width, winSize.height));
+        
+        return retVal;
+    }
+
+    //javadoc: SparsePyrLKOpticalFlow::create()
+    public static SparsePyrLKOpticalFlow create()
+    {
+        
+        SparsePyrLKOpticalFlow retVal = SparsePyrLKOpticalFlow.__fromPtr__(create_5());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Size cv::SparsePyrLKOpticalFlow::getWinSize()
+    //
+
+    //javadoc: SparsePyrLKOpticalFlow::getWinSize()
+    public  Size getWinSize()
+    {
+        
+        Size retVal = new Size(getWinSize_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  TermCriteria cv::SparsePyrLKOpticalFlow::getTermCriteria()
+    //
+
+    //javadoc: SparsePyrLKOpticalFlow::getTermCriteria()
+    public  TermCriteria getTermCriteria()
+    {
+        
+        TermCriteria retVal = new TermCriteria(getTermCriteria_0(nativeObj));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::SparsePyrLKOpticalFlow::getMinEigThreshold()
+    //
+
+    //javadoc: SparsePyrLKOpticalFlow::getMinEigThreshold()
+    public  double getMinEigThreshold()
+    {
+        
+        double retVal = getMinEigThreshold_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::SparsePyrLKOpticalFlow::getFlags()
+    //
+
+    //javadoc: SparsePyrLKOpticalFlow::getFlags()
+    public  int getFlags()
+    {
+        
+        int retVal = getFlags_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::SparsePyrLKOpticalFlow::getMaxLevel()
+    //
+
+    //javadoc: SparsePyrLKOpticalFlow::getMaxLevel()
+    public  int getMaxLevel()
+    {
+        
+        int retVal = getMaxLevel_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::SparsePyrLKOpticalFlow::setFlags(int flags)
+    //
+
+    //javadoc: SparsePyrLKOpticalFlow::setFlags(flags)
+    public  void setFlags(int flags)
+    {
+        
+        setFlags_0(nativeObj, flags);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::SparsePyrLKOpticalFlow::setMaxLevel(int maxLevel)
+    //
+
+    //javadoc: SparsePyrLKOpticalFlow::setMaxLevel(maxLevel)
+    public  void setMaxLevel(int maxLevel)
+    {
+        
+        setMaxLevel_0(nativeObj, maxLevel);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::SparsePyrLKOpticalFlow::setMinEigThreshold(double minEigThreshold)
+    //
+
+    //javadoc: SparsePyrLKOpticalFlow::setMinEigThreshold(minEigThreshold)
+    public  void setMinEigThreshold(double minEigThreshold)
+    {
+        
+        setMinEigThreshold_0(nativeObj, minEigThreshold);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::SparsePyrLKOpticalFlow::setTermCriteria(TermCriteria crit)
+    //
+
+    //javadoc: SparsePyrLKOpticalFlow::setTermCriteria(crit)
+    public  void setTermCriteria(TermCriteria crit)
+    {
+        
+        setTermCriteria_0(nativeObj, crit.type, crit.maxCount, crit.epsilon);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::SparsePyrLKOpticalFlow::setWinSize(Size winSize)
+    //
+
+    //javadoc: SparsePyrLKOpticalFlow::setWinSize(winSize)
+    public  void setWinSize(Size winSize)
+    {
+        
+        setWinSize_0(nativeObj, winSize.width, winSize.height);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++: static Ptr_SparsePyrLKOpticalFlow cv::SparsePyrLKOpticalFlow::create(Size winSize = Size(21, 21), int maxLevel = 3, TermCriteria crit = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), int flags = 0, double minEigThreshold = 1e-4)
+    private static native long create_0(double winSize_width, double winSize_height, int maxLevel, int crit_type, int crit_maxCount, double crit_epsilon, int flags, double minEigThreshold);
+    private static native long create_1(double winSize_width, double winSize_height, int maxLevel, int crit_type, int crit_maxCount, double crit_epsilon, int flags);
+    private static native long create_2(double winSize_width, double winSize_height, int maxLevel, int crit_type, int crit_maxCount, double crit_epsilon);
+    private static native long create_3(double winSize_width, double winSize_height, int maxLevel);
+    private static native long create_4(double winSize_width, double winSize_height);
+    private static native long create_5();
+
+    // C++:  Size cv::SparsePyrLKOpticalFlow::getWinSize()
+    private static native double[] getWinSize_0(long nativeObj);
+
+    // C++:  TermCriteria cv::SparsePyrLKOpticalFlow::getTermCriteria()
+    private static native double[] getTermCriteria_0(long nativeObj);
+
+    // C++:  double cv::SparsePyrLKOpticalFlow::getMinEigThreshold()
+    private static native double getMinEigThreshold_0(long nativeObj);
+
+    // C++:  int cv::SparsePyrLKOpticalFlow::getFlags()
+    private static native int getFlags_0(long nativeObj);
+
+    // C++:  int cv::SparsePyrLKOpticalFlow::getMaxLevel()
+    private static native int getMaxLevel_0(long nativeObj);
+
+    // C++:  void cv::SparsePyrLKOpticalFlow::setFlags(int flags)
+    private static native void setFlags_0(long nativeObj, int flags);
+
+    // C++:  void cv::SparsePyrLKOpticalFlow::setMaxLevel(int maxLevel)
+    private static native void setMaxLevel_0(long nativeObj, int maxLevel);
+
+    // C++:  void cv::SparsePyrLKOpticalFlow::setMinEigThreshold(double minEigThreshold)
+    private static native void setMinEigThreshold_0(long nativeObj, double minEigThreshold);
+
+    // C++:  void cv::SparsePyrLKOpticalFlow::setTermCriteria(TermCriteria crit)
+    private static native void setTermCriteria_0(long nativeObj, int crit_type, int crit_maxCount, double crit_epsilon);
+
+    // C++:  void cv::SparsePyrLKOpticalFlow::setWinSize(Size winSize)
+    private static native void setWinSize_0(long nativeObj, double winSize_width, double winSize_height);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/video/VariationalRefinement.java b/opencv41/src/main/java/org/opencv/video/VariationalRefinement.java
new file mode 100644 (file)
index 0000000..0b2c64a
--- /dev/null
@@ -0,0 +1,268 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.video;
+
+import org.opencv.core.Mat;
+import org.opencv.video.DenseOpticalFlow;
+import org.opencv.video.VariationalRefinement;
+
+// C++: class VariationalRefinement
+//javadoc: VariationalRefinement
+
+public class VariationalRefinement extends DenseOpticalFlow {
+
+    protected VariationalRefinement(long addr) { super(addr); }
+
+    // internal usage only
+    public static VariationalRefinement __fromPtr__(long addr) { return new VariationalRefinement(addr); }
+
+    //
+    // C++: static Ptr_VariationalRefinement cv::VariationalRefinement::create()
+    //
+
+    //javadoc: VariationalRefinement::create()
+    public static VariationalRefinement create()
+    {
+        
+        VariationalRefinement retVal = VariationalRefinement.__fromPtr__(create_0());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::VariationalRefinement::getAlpha()
+    //
+
+    //javadoc: VariationalRefinement::getAlpha()
+    public  float getAlpha()
+    {
+        
+        float retVal = getAlpha_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::VariationalRefinement::getDelta()
+    //
+
+    //javadoc: VariationalRefinement::getDelta()
+    public  float getDelta()
+    {
+        
+        float retVal = getDelta_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::VariationalRefinement::getGamma()
+    //
+
+    //javadoc: VariationalRefinement::getGamma()
+    public  float getGamma()
+    {
+        
+        float retVal = getGamma_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  float cv::VariationalRefinement::getOmega()
+    //
+
+    //javadoc: VariationalRefinement::getOmega()
+    public  float getOmega()
+    {
+        
+        float retVal = getOmega_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::VariationalRefinement::getFixedPointIterations()
+    //
+
+    //javadoc: VariationalRefinement::getFixedPointIterations()
+    public  int getFixedPointIterations()
+    {
+        
+        int retVal = getFixedPointIterations_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::VariationalRefinement::getSorIterations()
+    //
+
+    //javadoc: VariationalRefinement::getSorIterations()
+    public  int getSorIterations()
+    {
+        
+        int retVal = getSorIterations_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::VariationalRefinement::calcUV(Mat I0, Mat I1, Mat& flow_u, Mat& flow_v)
+    //
+
+    //javadoc: VariationalRefinement::calcUV(I0, I1, flow_u, flow_v)
+    public  void calcUV(Mat I0, Mat I1, Mat flow_u, Mat flow_v)
+    {
+        
+        calcUV_0(nativeObj, I0.nativeObj, I1.nativeObj, flow_u.nativeObj, flow_v.nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::VariationalRefinement::setAlpha(float val)
+    //
+
+    //javadoc: VariationalRefinement::setAlpha(val)
+    public  void setAlpha(float val)
+    {
+        
+        setAlpha_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::VariationalRefinement::setDelta(float val)
+    //
+
+    //javadoc: VariationalRefinement::setDelta(val)
+    public  void setDelta(float val)
+    {
+        
+        setDelta_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::VariationalRefinement::setFixedPointIterations(int val)
+    //
+
+    //javadoc: VariationalRefinement::setFixedPointIterations(val)
+    public  void setFixedPointIterations(int val)
+    {
+        
+        setFixedPointIterations_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::VariationalRefinement::setGamma(float val)
+    //
+
+    //javadoc: VariationalRefinement::setGamma(val)
+    public  void setGamma(float val)
+    {
+        
+        setGamma_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::VariationalRefinement::setOmega(float val)
+    //
+
+    //javadoc: VariationalRefinement::setOmega(val)
+    public  void setOmega(float val)
+    {
+        
+        setOmega_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::VariationalRefinement::setSorIterations(int val)
+    //
+
+    //javadoc: VariationalRefinement::setSorIterations(val)
+    public  void setSorIterations(int val)
+    {
+        
+        setSorIterations_0(nativeObj, val);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++: static Ptr_VariationalRefinement cv::VariationalRefinement::create()
+    private static native long create_0();
+
+    // C++:  float cv::VariationalRefinement::getAlpha()
+    private static native float getAlpha_0(long nativeObj);
+
+    // C++:  float cv::VariationalRefinement::getDelta()
+    private static native float getDelta_0(long nativeObj);
+
+    // C++:  float cv::VariationalRefinement::getGamma()
+    private static native float getGamma_0(long nativeObj);
+
+    // C++:  float cv::VariationalRefinement::getOmega()
+    private static native float getOmega_0(long nativeObj);
+
+    // C++:  int cv::VariationalRefinement::getFixedPointIterations()
+    private static native int getFixedPointIterations_0(long nativeObj);
+
+    // C++:  int cv::VariationalRefinement::getSorIterations()
+    private static native int getSorIterations_0(long nativeObj);
+
+    // C++:  void cv::VariationalRefinement::calcUV(Mat I0, Mat I1, Mat& flow_u, Mat& flow_v)
+    private static native void calcUV_0(long nativeObj, long I0_nativeObj, long I1_nativeObj, long flow_u_nativeObj, long flow_v_nativeObj);
+
+    // C++:  void cv::VariationalRefinement::setAlpha(float val)
+    private static native void setAlpha_0(long nativeObj, float val);
+
+    // C++:  void cv::VariationalRefinement::setDelta(float val)
+    private static native void setDelta_0(long nativeObj, float val);
+
+    // C++:  void cv::VariationalRefinement::setFixedPointIterations(int val)
+    private static native void setFixedPointIterations_0(long nativeObj, int val);
+
+    // C++:  void cv::VariationalRefinement::setGamma(float val)
+    private static native void setGamma_0(long nativeObj, float val);
+
+    // C++:  void cv::VariationalRefinement::setOmega(float val)
+    private static native void setOmega_0(long nativeObj, float val);
+
+    // C++:  void cv::VariationalRefinement::setSorIterations(int val)
+    private static native void setSorIterations_0(long nativeObj, int val);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/video/Video.java b/opencv41/src/main/java/org/opencv/video/Video.java
new file mode 100644 (file)
index 0000000..4268a30
--- /dev/null
@@ -0,0 +1,414 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.video;
+
+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.MatOfFloat;
+import org.opencv.core.MatOfPoint2f;
+import org.opencv.core.Rect;
+import org.opencv.core.RotatedRect;
+import org.opencv.core.Size;
+import org.opencv.core.TermCriteria;
+import org.opencv.utils.Converters;
+import org.opencv.video.BackgroundSubtractorKNN;
+import org.opencv.video.BackgroundSubtractorMOG2;
+
+// C++: class Video
+//javadoc: Video
+
+public class Video {
+
+    private static final int
+            CV_LKFLOW_INITIAL_GUESSES = 4,
+            CV_LKFLOW_GET_MIN_EIGENVALS = 8;
+
+
+    // C++: enum <unnamed>
+    public static final int
+            OPTFLOW_USE_INITIAL_FLOW = 4,
+            OPTFLOW_LK_GET_MIN_EIGENVALS = 8,
+            OPTFLOW_FARNEBACK_GAUSSIAN = 256,
+            MOTION_TRANSLATION = 0,
+            MOTION_EUCLIDEAN = 1,
+            MOTION_AFFINE = 2,
+            MOTION_HOMOGRAPHY = 3;
+
+
+    //
+    // C++:  Mat cv::readOpticalFlow(String path)
+    //
+
+    //javadoc: readOpticalFlow(path)
+    public static Mat readOpticalFlow(String path)
+    {
+        
+        Mat retVal = new Mat(readOpticalFlow_0(path));
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Ptr_BackgroundSubtractorKNN cv::createBackgroundSubtractorKNN(int history = 500, double dist2Threshold = 400.0, bool detectShadows = true)
+    //
+
+    //javadoc: createBackgroundSubtractorKNN(history, dist2Threshold, detectShadows)
+    public static BackgroundSubtractorKNN createBackgroundSubtractorKNN(int history, double dist2Threshold, boolean detectShadows)
+    {
+        
+        BackgroundSubtractorKNN retVal = BackgroundSubtractorKNN.__fromPtr__(createBackgroundSubtractorKNN_0(history, dist2Threshold, detectShadows));
+        
+        return retVal;
+    }
+
+    //javadoc: createBackgroundSubtractorKNN(history, dist2Threshold)
+    public static BackgroundSubtractorKNN createBackgroundSubtractorKNN(int history, double dist2Threshold)
+    {
+        
+        BackgroundSubtractorKNN retVal = BackgroundSubtractorKNN.__fromPtr__(createBackgroundSubtractorKNN_1(history, dist2Threshold));
+        
+        return retVal;
+    }
+
+    //javadoc: createBackgroundSubtractorKNN(history)
+    public static BackgroundSubtractorKNN createBackgroundSubtractorKNN(int history)
+    {
+        
+        BackgroundSubtractorKNN retVal = BackgroundSubtractorKNN.__fromPtr__(createBackgroundSubtractorKNN_2(history));
+        
+        return retVal;
+    }
+
+    //javadoc: createBackgroundSubtractorKNN()
+    public static BackgroundSubtractorKNN createBackgroundSubtractorKNN()
+    {
+        
+        BackgroundSubtractorKNN retVal = BackgroundSubtractorKNN.__fromPtr__(createBackgroundSubtractorKNN_3());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  Ptr_BackgroundSubtractorMOG2 cv::createBackgroundSubtractorMOG2(int history = 500, double varThreshold = 16, bool detectShadows = true)
+    //
+
+    //javadoc: createBackgroundSubtractorMOG2(history, varThreshold, detectShadows)
+    public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, double varThreshold, boolean detectShadows)
+    {
+        
+        BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_0(history, varThreshold, detectShadows));
+        
+        return retVal;
+    }
+
+    //javadoc: createBackgroundSubtractorMOG2(history, varThreshold)
+    public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, double varThreshold)
+    {
+        
+        BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_1(history, varThreshold));
+        
+        return retVal;
+    }
+
+    //javadoc: createBackgroundSubtractorMOG2(history)
+    public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history)
+    {
+        
+        BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_2(history));
+        
+        return retVal;
+    }
+
+    //javadoc: createBackgroundSubtractorMOG2()
+    public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2()
+    {
+        
+        BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_3());
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  RotatedRect cv::CamShift(Mat probImage, Rect& window, TermCriteria criteria)
+    //
+
+    //javadoc: CamShift(probImage, window, criteria)
+    public static RotatedRect CamShift(Mat probImage, Rect window, TermCriteria criteria)
+    {
+        double[] window_out = new double[4];
+        RotatedRect retVal = new RotatedRect(CamShift_0(probImage.nativeObj, window.x, window.y, window.width, window.height, window_out, criteria.type, criteria.maxCount, criteria.epsilon));
+        if(window!=null){ window.x = (int)window_out[0]; window.y = (int)window_out[1]; window.width = (int)window_out[2]; window.height = (int)window_out[3]; } 
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::writeOpticalFlow(String path, Mat flow)
+    //
+
+    //javadoc: writeOpticalFlow(path, flow)
+    public static boolean writeOpticalFlow(String path, Mat flow)
+    {
+        
+        boolean retVal = writeOpticalFlow_0(path, flow.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::computeECC(Mat templateImage, Mat inputImage, Mat inputMask = Mat())
+    //
+
+    //javadoc: computeECC(templateImage, inputImage, inputMask)
+    public static double computeECC(Mat templateImage, Mat inputImage, Mat inputMask)
+    {
+        
+        double retVal = computeECC_0(templateImage.nativeObj, inputImage.nativeObj, inputMask.nativeObj);
+        
+        return retVal;
+    }
+
+    //javadoc: computeECC(templateImage, inputImage)
+    public static double computeECC(Mat templateImage, Mat inputImage)
+    {
+        
+        double retVal = computeECC_1(templateImage.nativeObj, inputImage.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::findTransformECC(Mat templateImage, Mat inputImage, Mat& warpMatrix, int motionType, TermCriteria criteria, Mat inputMask, int gaussFiltSize)
+    //
+
+    //javadoc: findTransformECC(templateImage, inputImage, warpMatrix, motionType, criteria, inputMask, gaussFiltSize)
+    public static double findTransformECC(Mat templateImage, Mat inputImage, Mat warpMatrix, int motionType, TermCriteria criteria, Mat inputMask, int gaussFiltSize)
+    {
+        
+        double retVal = findTransformECC_0(templateImage.nativeObj, inputImage.nativeObj, warpMatrix.nativeObj, motionType, criteria.type, criteria.maxCount, criteria.epsilon, inputMask.nativeObj, gaussFiltSize);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::buildOpticalFlowPyramid(Mat img, vector_Mat& pyramid, Size winSize, int maxLevel, bool withDerivatives = true, int pyrBorder = BORDER_REFLECT_101, int derivBorder = BORDER_CONSTANT, bool tryReuseInputImage = true)
+    //
+
+    //javadoc: buildOpticalFlowPyramid(img, pyramid, winSize, maxLevel, withDerivatives, pyrBorder, derivBorder, tryReuseInputImage)
+    public static int buildOpticalFlowPyramid(Mat img, List<Mat> pyramid, Size winSize, int maxLevel, boolean withDerivatives, int pyrBorder, int derivBorder, boolean tryReuseInputImage)
+    {
+        Mat pyramid_mat = new Mat();
+        int retVal = buildOpticalFlowPyramid_0(img.nativeObj, pyramid_mat.nativeObj, winSize.width, winSize.height, maxLevel, withDerivatives, pyrBorder, derivBorder, tryReuseInputImage);
+        Converters.Mat_to_vector_Mat(pyramid_mat, pyramid);
+        pyramid_mat.release();
+        return retVal;
+    }
+
+    //javadoc: buildOpticalFlowPyramid(img, pyramid, winSize, maxLevel, withDerivatives, pyrBorder, derivBorder)
+    public static int buildOpticalFlowPyramid(Mat img, List<Mat> pyramid, Size winSize, int maxLevel, boolean withDerivatives, int pyrBorder, int derivBorder)
+    {
+        Mat pyramid_mat = new Mat();
+        int retVal = buildOpticalFlowPyramid_1(img.nativeObj, pyramid_mat.nativeObj, winSize.width, winSize.height, maxLevel, withDerivatives, pyrBorder, derivBorder);
+        Converters.Mat_to_vector_Mat(pyramid_mat, pyramid);
+        pyramid_mat.release();
+        return retVal;
+    }
+
+    //javadoc: buildOpticalFlowPyramid(img, pyramid, winSize, maxLevel, withDerivatives, pyrBorder)
+    public static int buildOpticalFlowPyramid(Mat img, List<Mat> pyramid, Size winSize, int maxLevel, boolean withDerivatives, int pyrBorder)
+    {
+        Mat pyramid_mat = new Mat();
+        int retVal = buildOpticalFlowPyramid_2(img.nativeObj, pyramid_mat.nativeObj, winSize.width, winSize.height, maxLevel, withDerivatives, pyrBorder);
+        Converters.Mat_to_vector_Mat(pyramid_mat, pyramid);
+        pyramid_mat.release();
+        return retVal;
+    }
+
+    //javadoc: buildOpticalFlowPyramid(img, pyramid, winSize, maxLevel, withDerivatives)
+    public static int buildOpticalFlowPyramid(Mat img, List<Mat> pyramid, Size winSize, int maxLevel, boolean withDerivatives)
+    {
+        Mat pyramid_mat = new Mat();
+        int retVal = buildOpticalFlowPyramid_3(img.nativeObj, pyramid_mat.nativeObj, winSize.width, winSize.height, maxLevel, withDerivatives);
+        Converters.Mat_to_vector_Mat(pyramid_mat, pyramid);
+        pyramid_mat.release();
+        return retVal;
+    }
+
+    //javadoc: buildOpticalFlowPyramid(img, pyramid, winSize, maxLevel)
+    public static int buildOpticalFlowPyramid(Mat img, List<Mat> pyramid, Size winSize, int maxLevel)
+    {
+        Mat pyramid_mat = new Mat();
+        int retVal = buildOpticalFlowPyramid_4(img.nativeObj, pyramid_mat.nativeObj, winSize.width, winSize.height, maxLevel);
+        Converters.Mat_to_vector_Mat(pyramid_mat, pyramid);
+        pyramid_mat.release();
+        return retVal;
+    }
+
+
+    //
+    // C++:  int cv::meanShift(Mat probImage, Rect& window, TermCriteria criteria)
+    //
+
+    //javadoc: meanShift(probImage, window, criteria)
+    public static int meanShift(Mat probImage, Rect window, TermCriteria criteria)
+    {
+        double[] window_out = new double[4];
+        int retVal = meanShift_0(probImage.nativeObj, window.x, window.y, window.width, window.height, window_out, criteria.type, criteria.maxCount, criteria.epsilon);
+        if(window!=null){ window.x = (int)window_out[0]; window.y = (int)window_out[1]; window.width = (int)window_out[2]; window.height = (int)window_out[3]; } 
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::calcOpticalFlowFarneback(Mat prev, Mat next, Mat& flow, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags)
+    //
+
+    //javadoc: calcOpticalFlowFarneback(prev, next, flow, pyr_scale, levels, winsize, iterations, poly_n, poly_sigma, flags)
+    public static void calcOpticalFlowFarneback(Mat prev, Mat next, Mat flow, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags)
+    {
+        
+        calcOpticalFlowFarneback_0(prev.nativeObj, next.nativeObj, flow.nativeObj, pyr_scale, levels, winsize, iterations, poly_n, poly_sigma, flags);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, vector_Point2f prevPts, vector_Point2f& nextPts, vector_uchar& status, vector_float& err, Size winSize = Size(21,21), int maxLevel = 3, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), int flags = 0, double minEigThreshold = 1e-4)
+    //
+
+    //javadoc: calcOpticalFlowPyrLK(prevImg, nextImg, prevPts, nextPts, status, err, winSize, maxLevel, criteria, flags, minEigThreshold)
+    public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel, TermCriteria criteria, int flags, double minEigThreshold)
+    {
+        Mat prevPts_mat = prevPts;
+        Mat nextPts_mat = nextPts;
+        Mat status_mat = status;
+        Mat err_mat = err;
+        calcOpticalFlowPyrLK_0(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel, criteria.type, criteria.maxCount, criteria.epsilon, flags, minEigThreshold);
+        
+        return;
+    }
+
+    //javadoc: calcOpticalFlowPyrLK(prevImg, nextImg, prevPts, nextPts, status, err, winSize, maxLevel, criteria, flags)
+    public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel, TermCriteria criteria, int flags)
+    {
+        Mat prevPts_mat = prevPts;
+        Mat nextPts_mat = nextPts;
+        Mat status_mat = status;
+        Mat err_mat = err;
+        calcOpticalFlowPyrLK_1(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel, criteria.type, criteria.maxCount, criteria.epsilon, flags);
+        
+        return;
+    }
+
+    //javadoc: calcOpticalFlowPyrLK(prevImg, nextImg, prevPts, nextPts, status, err, winSize, maxLevel, criteria)
+    public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel, TermCriteria criteria)
+    {
+        Mat prevPts_mat = prevPts;
+        Mat nextPts_mat = nextPts;
+        Mat status_mat = status;
+        Mat err_mat = err;
+        calcOpticalFlowPyrLK_2(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel, criteria.type, criteria.maxCount, criteria.epsilon);
+        
+        return;
+    }
+
+    //javadoc: calcOpticalFlowPyrLK(prevImg, nextImg, prevPts, nextPts, status, err, winSize, maxLevel)
+    public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel)
+    {
+        Mat prevPts_mat = prevPts;
+        Mat nextPts_mat = nextPts;
+        Mat status_mat = status;
+        Mat err_mat = err;
+        calcOpticalFlowPyrLK_3(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel);
+        
+        return;
+    }
+
+    //javadoc: calcOpticalFlowPyrLK(prevImg, nextImg, prevPts, nextPts, status, err, winSize)
+    public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize)
+    {
+        Mat prevPts_mat = prevPts;
+        Mat nextPts_mat = nextPts;
+        Mat status_mat = status;
+        Mat err_mat = err;
+        calcOpticalFlowPyrLK_4(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height);
+        
+        return;
+    }
+
+    //javadoc: calcOpticalFlowPyrLK(prevImg, nextImg, prevPts, nextPts, status, err)
+    public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err)
+    {
+        Mat prevPts_mat = prevPts;
+        Mat nextPts_mat = nextPts;
+        Mat status_mat = status;
+        Mat err_mat = err;
+        calcOpticalFlowPyrLK_5(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj);
+        
+        return;
+    }
+
+
+
+
+    // C++:  Mat cv::readOpticalFlow(String path)
+    private static native long readOpticalFlow_0(String path);
+
+    // C++:  Ptr_BackgroundSubtractorKNN cv::createBackgroundSubtractorKNN(int history = 500, double dist2Threshold = 400.0, bool detectShadows = true)
+    private static native long createBackgroundSubtractorKNN_0(int history, double dist2Threshold, boolean detectShadows);
+    private static native long createBackgroundSubtractorKNN_1(int history, double dist2Threshold);
+    private static native long createBackgroundSubtractorKNN_2(int history);
+    private static native long createBackgroundSubtractorKNN_3();
+
+    // C++:  Ptr_BackgroundSubtractorMOG2 cv::createBackgroundSubtractorMOG2(int history = 500, double varThreshold = 16, bool detectShadows = true)
+    private static native long createBackgroundSubtractorMOG2_0(int history, double varThreshold, boolean detectShadows);
+    private static native long createBackgroundSubtractorMOG2_1(int history, double varThreshold);
+    private static native long createBackgroundSubtractorMOG2_2(int history);
+    private static native long createBackgroundSubtractorMOG2_3();
+
+    // C++:  RotatedRect cv::CamShift(Mat probImage, Rect& window, TermCriteria criteria)
+    private static native double[] CamShift_0(long probImage_nativeObj, int window_x, int window_y, int window_width, int window_height, double[] window_out, int criteria_type, int criteria_maxCount, double criteria_epsilon);
+
+    // C++:  bool cv::writeOpticalFlow(String path, Mat flow)
+    private static native boolean writeOpticalFlow_0(String path, long flow_nativeObj);
+
+    // C++:  double cv::computeECC(Mat templateImage, Mat inputImage, Mat inputMask = Mat())
+    private static native double computeECC_0(long templateImage_nativeObj, long inputImage_nativeObj, long inputMask_nativeObj);
+    private static native double computeECC_1(long templateImage_nativeObj, long inputImage_nativeObj);
+
+    // C++:  double cv::findTransformECC(Mat templateImage, Mat inputImage, Mat& warpMatrix, int motionType, TermCriteria criteria, Mat inputMask, int gaussFiltSize)
+    private static native double findTransformECC_0(long templateImage_nativeObj, long inputImage_nativeObj, long warpMatrix_nativeObj, int motionType, int criteria_type, int criteria_maxCount, double criteria_epsilon, long inputMask_nativeObj, int gaussFiltSize);
+
+    // C++:  int cv::buildOpticalFlowPyramid(Mat img, vector_Mat& pyramid, Size winSize, int maxLevel, bool withDerivatives = true, int pyrBorder = BORDER_REFLECT_101, int derivBorder = BORDER_CONSTANT, bool tryReuseInputImage = true)
+    private static native int buildOpticalFlowPyramid_0(long img_nativeObj, long pyramid_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel, boolean withDerivatives, int pyrBorder, int derivBorder, boolean tryReuseInputImage);
+    private static native int buildOpticalFlowPyramid_1(long img_nativeObj, long pyramid_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel, boolean withDerivatives, int pyrBorder, int derivBorder);
+    private static native int buildOpticalFlowPyramid_2(long img_nativeObj, long pyramid_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel, boolean withDerivatives, int pyrBorder);
+    private static native int buildOpticalFlowPyramid_3(long img_nativeObj, long pyramid_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel, boolean withDerivatives);
+    private static native int buildOpticalFlowPyramid_4(long img_nativeObj, long pyramid_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel);
+
+    // C++:  int cv::meanShift(Mat probImage, Rect& window, TermCriteria criteria)
+    private static native int meanShift_0(long probImage_nativeObj, int window_x, int window_y, int window_width, int window_height, double[] window_out, int criteria_type, int criteria_maxCount, double criteria_epsilon);
+
+    // C++:  void cv::calcOpticalFlowFarneback(Mat prev, Mat next, Mat& flow, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags)
+    private static native void calcOpticalFlowFarneback_0(long prev_nativeObj, long next_nativeObj, long flow_nativeObj, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags);
+
+    // C++:  void cv::calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, vector_Point2f prevPts, vector_Point2f& nextPts, vector_uchar& status, vector_float& err, Size winSize = Size(21,21), int maxLevel = 3, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), int flags = 0, double minEigThreshold = 1e-4)
+    private static native void calcOpticalFlowPyrLK_0(long prevImg_nativeObj, long nextImg_nativeObj, long prevPts_mat_nativeObj, long nextPts_mat_nativeObj, long status_mat_nativeObj, long err_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel, int criteria_type, int criteria_maxCount, double criteria_epsilon, int flags, double minEigThreshold);
+    private static native void calcOpticalFlowPyrLK_1(long prevImg_nativeObj, long nextImg_nativeObj, long prevPts_mat_nativeObj, long nextPts_mat_nativeObj, long status_mat_nativeObj, long err_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel, int criteria_type, int criteria_maxCount, double criteria_epsilon, int flags);
+    private static native void calcOpticalFlowPyrLK_2(long prevImg_nativeObj, long nextImg_nativeObj, long prevPts_mat_nativeObj, long nextPts_mat_nativeObj, long status_mat_nativeObj, long err_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel, int criteria_type, int criteria_maxCount, double criteria_epsilon);
+    private static native void calcOpticalFlowPyrLK_3(long prevImg_nativeObj, long nextImg_nativeObj, long prevPts_mat_nativeObj, long nextPts_mat_nativeObj, long status_mat_nativeObj, long err_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel);
+    private static native void calcOpticalFlowPyrLK_4(long prevImg_nativeObj, long nextImg_nativeObj, long prevPts_mat_nativeObj, long nextPts_mat_nativeObj, long status_mat_nativeObj, long err_mat_nativeObj, double winSize_width, double winSize_height);
+    private static native void calcOpticalFlowPyrLK_5(long prevImg_nativeObj, long nextImg_nativeObj, long prevPts_mat_nativeObj, long nextPts_mat_nativeObj, long status_mat_nativeObj, long err_mat_nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/videoio/VideoCapture.java b/opencv41/src/main/java/org/opencv/videoio/VideoCapture.java
new file mode 100644 (file)
index 0000000..0bd03e8
--- /dev/null
@@ -0,0 +1,303 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.videoio;
+
+import java.lang.String;
+import org.opencv.core.Mat;
+
+// C++: class VideoCapture
+//javadoc: VideoCapture
+
+public class VideoCapture {
+
+    protected final long nativeObj;
+    protected VideoCapture(long addr) { nativeObj = addr; }
+
+    public long getNativeObjAddr() { return nativeObj; }
+
+    // internal usage only
+    public static VideoCapture __fromPtr__(long addr) { return new VideoCapture(addr); }
+
+    //
+    // C++:   cv::VideoCapture::VideoCapture(String filename, int apiPreference = CAP_ANY)
+    //
+
+    //javadoc: VideoCapture::VideoCapture(filename, apiPreference)
+    public   VideoCapture(String filename, int apiPreference)
+    {
+        
+        nativeObj = VideoCapture_0(filename, apiPreference);
+        
+        return;
+    }
+
+    //javadoc: VideoCapture::VideoCapture(filename)
+    public   VideoCapture(String filename)
+    {
+        
+        nativeObj = VideoCapture_1(filename);
+        
+        return;
+    }
+
+
+    //
+    // C++:   cv::VideoCapture::VideoCapture(int index, int apiPreference = CAP_ANY)
+    //
+
+    //javadoc: VideoCapture::VideoCapture(index, apiPreference)
+    public   VideoCapture(int index, int apiPreference)
+    {
+        
+        nativeObj = VideoCapture_2(index, apiPreference);
+        
+        return;
+    }
+
+    //javadoc: VideoCapture::VideoCapture(index)
+    public   VideoCapture(int index)
+    {
+        
+        nativeObj = VideoCapture_3(index);
+        
+        return;
+    }
+
+
+    //
+    // C++:   cv::VideoCapture::VideoCapture()
+    //
+
+    //javadoc: VideoCapture::VideoCapture()
+    public   VideoCapture()
+    {
+        
+        nativeObj = VideoCapture_4();
+        
+        return;
+    }
+
+
+    //
+    // C++:  String cv::VideoCapture::getBackendName()
+    //
+
+    //javadoc: VideoCapture::getBackendName()
+    public  String getBackendName()
+    {
+        
+        String retVal = getBackendName_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::VideoCapture::grab()
+    //
+
+    //javadoc: VideoCapture::grab()
+    public  boolean grab()
+    {
+        
+        boolean retVal = grab_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::VideoCapture::isOpened()
+    //
+
+    //javadoc: VideoCapture::isOpened()
+    public  boolean isOpened()
+    {
+        
+        boolean retVal = isOpened_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::VideoCapture::open(String filename, int apiPreference = CAP_ANY)
+    //
+
+    //javadoc: VideoCapture::open(filename, apiPreference)
+    public  boolean open(String filename, int apiPreference)
+    {
+        
+        boolean retVal = open_0(nativeObj, filename, apiPreference);
+        
+        return retVal;
+    }
+
+    //javadoc: VideoCapture::open(filename)
+    public  boolean open(String filename)
+    {
+        
+        boolean retVal = open_1(nativeObj, filename);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::VideoCapture::open(int index, int apiPreference = CAP_ANY)
+    //
+
+    //javadoc: VideoCapture::open(index, apiPreference)
+    public  boolean open(int index, int apiPreference)
+    {
+        
+        boolean retVal = open_2(nativeObj, index, apiPreference);
+        
+        return retVal;
+    }
+
+    //javadoc: VideoCapture::open(index)
+    public  boolean open(int index)
+    {
+        
+        boolean retVal = open_3(nativeObj, index);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::VideoCapture::read(Mat& image)
+    //
+
+    //javadoc: VideoCapture::read(image)
+    public  boolean read(Mat image)
+    {
+        
+        boolean retVal = read_0(nativeObj, image.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::VideoCapture::retrieve(Mat& image, int flag = 0)
+    //
+
+    //javadoc: VideoCapture::retrieve(image, flag)
+    public  boolean retrieve(Mat image, int flag)
+    {
+        
+        boolean retVal = retrieve_0(nativeObj, image.nativeObj, flag);
+        
+        return retVal;
+    }
+
+    //javadoc: VideoCapture::retrieve(image)
+    public  boolean retrieve(Mat image)
+    {
+        
+        boolean retVal = retrieve_1(nativeObj, image.nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::VideoCapture::set(int propId, double value)
+    //
+
+    //javadoc: VideoCapture::set(propId, value)
+    public  boolean set(int propId, double value)
+    {
+        
+        boolean retVal = set_0(nativeObj, propId, value);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::VideoCapture::get(int propId)
+    //
+
+    //javadoc: VideoCapture::get(propId)
+    public  double get(int propId)
+    {
+        
+        double retVal = get_0(nativeObj, propId);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::VideoCapture::release()
+    //
+
+    //javadoc: VideoCapture::release()
+    public  void release()
+    {
+        
+        release_0(nativeObj);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:   cv::VideoCapture::VideoCapture(String filename, int apiPreference = CAP_ANY)
+    private static native long VideoCapture_0(String filename, int apiPreference);
+    private static native long VideoCapture_1(String filename);
+
+    // C++:   cv::VideoCapture::VideoCapture(int index, int apiPreference = CAP_ANY)
+    private static native long VideoCapture_2(int index, int apiPreference);
+    private static native long VideoCapture_3(int index);
+
+    // C++:   cv::VideoCapture::VideoCapture()
+    private static native long VideoCapture_4();
+
+    // C++:  String cv::VideoCapture::getBackendName()
+    private static native String getBackendName_0(long nativeObj);
+
+    // C++:  bool cv::VideoCapture::grab()
+    private static native boolean grab_0(long nativeObj);
+
+    // C++:  bool cv::VideoCapture::isOpened()
+    private static native boolean isOpened_0(long nativeObj);
+
+    // C++:  bool cv::VideoCapture::open(String filename, int apiPreference = CAP_ANY)
+    private static native boolean open_0(long nativeObj, String filename, int apiPreference);
+    private static native boolean open_1(long nativeObj, String filename);
+
+    // C++:  bool cv::VideoCapture::open(int index, int apiPreference = CAP_ANY)
+    private static native boolean open_2(long nativeObj, int index, int apiPreference);
+    private static native boolean open_3(long nativeObj, int index);
+
+    // C++:  bool cv::VideoCapture::read(Mat& image)
+    private static native boolean read_0(long nativeObj, long image_nativeObj);
+
+    // C++:  bool cv::VideoCapture::retrieve(Mat& image, int flag = 0)
+    private static native boolean retrieve_0(long nativeObj, long image_nativeObj, int flag);
+    private static native boolean retrieve_1(long nativeObj, long image_nativeObj);
+
+    // C++:  bool cv::VideoCapture::set(int propId, double value)
+    private static native boolean set_0(long nativeObj, int propId, double value);
+
+    // C++:  double cv::VideoCapture::get(int propId)
+    private static native double get_0(long nativeObj, int propId);
+
+    // C++:  void cv::VideoCapture::release()
+    private static native void release_0(long nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/videoio/VideoWriter.java b/opencv41/src/main/java/org/opencv/videoio/VideoWriter.java
new file mode 100644 (file)
index 0000000..55e6639
--- /dev/null
@@ -0,0 +1,277 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.videoio;
+
+import java.lang.String;
+import org.opencv.core.Mat;
+import org.opencv.core.Size;
+
+// C++: class VideoWriter
+//javadoc: VideoWriter
+
+public class VideoWriter {
+
+    protected final long nativeObj;
+    protected VideoWriter(long addr) { nativeObj = addr; }
+
+    public long getNativeObjAddr() { return nativeObj; }
+
+    // internal usage only
+    public static VideoWriter __fromPtr__(long addr) { return new VideoWriter(addr); }
+
+    //
+    // C++:   cv::VideoWriter::VideoWriter(String filename, int apiPreference, int fourcc, double fps, Size frameSize, bool isColor = true)
+    //
+
+    //javadoc: VideoWriter::VideoWriter(filename, apiPreference, fourcc, fps, frameSize, isColor)
+    public   VideoWriter(String filename, int apiPreference, int fourcc, double fps, Size frameSize, boolean isColor)
+    {
+        
+        nativeObj = VideoWriter_0(filename, apiPreference, fourcc, fps, frameSize.width, frameSize.height, isColor);
+        
+        return;
+    }
+
+    //javadoc: VideoWriter::VideoWriter(filename, apiPreference, fourcc, fps, frameSize)
+    public   VideoWriter(String filename, int apiPreference, int fourcc, double fps, Size frameSize)
+    {
+        
+        nativeObj = VideoWriter_1(filename, apiPreference, fourcc, fps, frameSize.width, frameSize.height);
+        
+        return;
+    }
+
+
+    //
+    // C++:   cv::VideoWriter::VideoWriter(String filename, int fourcc, double fps, Size frameSize, bool isColor = true)
+    //
+
+    //javadoc: VideoWriter::VideoWriter(filename, fourcc, fps, frameSize, isColor)
+    public   VideoWriter(String filename, int fourcc, double fps, Size frameSize, boolean isColor)
+    {
+        
+        nativeObj = VideoWriter_2(filename, fourcc, fps, frameSize.width, frameSize.height, isColor);
+        
+        return;
+    }
+
+    //javadoc: VideoWriter::VideoWriter(filename, fourcc, fps, frameSize)
+    public   VideoWriter(String filename, int fourcc, double fps, Size frameSize)
+    {
+        
+        nativeObj = VideoWriter_3(filename, fourcc, fps, frameSize.width, frameSize.height);
+        
+        return;
+    }
+
+
+    //
+    // C++:   cv::VideoWriter::VideoWriter()
+    //
+
+    //javadoc: VideoWriter::VideoWriter()
+    public   VideoWriter()
+    {
+        
+        nativeObj = VideoWriter_4();
+        
+        return;
+    }
+
+
+    //
+    // C++:  String cv::VideoWriter::getBackendName()
+    //
+
+    //javadoc: VideoWriter::getBackendName()
+    public  String getBackendName()
+    {
+        
+        String retVal = getBackendName_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::VideoWriter::isOpened()
+    //
+
+    //javadoc: VideoWriter::isOpened()
+    public  boolean isOpened()
+    {
+        
+        boolean retVal = isOpened_0(nativeObj);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::VideoWriter::open(String filename, int apiPreference, int fourcc, double fps, Size frameSize, bool isColor = true)
+    //
+
+    //javadoc: VideoWriter::open(filename, apiPreference, fourcc, fps, frameSize, isColor)
+    public  boolean open(String filename, int apiPreference, int fourcc, double fps, Size frameSize, boolean isColor)
+    {
+        
+        boolean retVal = open_0(nativeObj, filename, apiPreference, fourcc, fps, frameSize.width, frameSize.height, isColor);
+        
+        return retVal;
+    }
+
+    //javadoc: VideoWriter::open(filename, apiPreference, fourcc, fps, frameSize)
+    public  boolean open(String filename, int apiPreference, int fourcc, double fps, Size frameSize)
+    {
+        
+        boolean retVal = open_1(nativeObj, filename, apiPreference, fourcc, fps, frameSize.width, frameSize.height);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::VideoWriter::open(String filename, int fourcc, double fps, Size frameSize, bool isColor = true)
+    //
+
+    //javadoc: VideoWriter::open(filename, fourcc, fps, frameSize, isColor)
+    public  boolean open(String filename, int fourcc, double fps, Size frameSize, boolean isColor)
+    {
+        
+        boolean retVal = open_2(nativeObj, filename, fourcc, fps, frameSize.width, frameSize.height, isColor);
+        
+        return retVal;
+    }
+
+    //javadoc: VideoWriter::open(filename, fourcc, fps, frameSize)
+    public  boolean open(String filename, int fourcc, double fps, Size frameSize)
+    {
+        
+        boolean retVal = open_3(nativeObj, filename, fourcc, fps, frameSize.width, frameSize.height);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  bool cv::VideoWriter::set(int propId, double value)
+    //
+
+    //javadoc: VideoWriter::set(propId, value)
+    public  boolean set(int propId, double value)
+    {
+        
+        boolean retVal = set_0(nativeObj, propId, value);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  double cv::VideoWriter::get(int propId)
+    //
+
+    //javadoc: VideoWriter::get(propId)
+    public  double get(int propId)
+    {
+        
+        double retVal = get_0(nativeObj, propId);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++: static int cv::VideoWriter::fourcc(char c1, char c2, char c3, char c4)
+    //
+
+    //javadoc: VideoWriter::fourcc(c1, c2, c3, c4)
+    public static int fourcc(char c1, char c2, char c3, char c4)
+    {
+        
+        int retVal = fourcc_0(c1, c2, c3, c4);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  void cv::VideoWriter::release()
+    //
+
+    //javadoc: VideoWriter::release()
+    public  void release()
+    {
+        
+        release_0(nativeObj);
+        
+        return;
+    }
+
+
+    //
+    // C++:  void cv::VideoWriter::write(Mat image)
+    //
+
+    //javadoc: VideoWriter::write(image)
+    public  void write(Mat image)
+    {
+        
+        write_0(nativeObj, image.nativeObj);
+        
+        return;
+    }
+
+
+    @Override
+    protected void finalize() throws Throwable {
+        delete(nativeObj);
+    }
+
+
+
+    // C++:   cv::VideoWriter::VideoWriter(String filename, int apiPreference, int fourcc, double fps, Size frameSize, bool isColor = true)
+    private static native long VideoWriter_0(String filename, int apiPreference, int fourcc, double fps, double frameSize_width, double frameSize_height, boolean isColor);
+    private static native long VideoWriter_1(String filename, int apiPreference, int fourcc, double fps, double frameSize_width, double frameSize_height);
+
+    // C++:   cv::VideoWriter::VideoWriter(String filename, int fourcc, double fps, Size frameSize, bool isColor = true)
+    private static native long VideoWriter_2(String filename, int fourcc, double fps, double frameSize_width, double frameSize_height, boolean isColor);
+    private static native long VideoWriter_3(String filename, int fourcc, double fps, double frameSize_width, double frameSize_height);
+
+    // C++:   cv::VideoWriter::VideoWriter()
+    private static native long VideoWriter_4();
+
+    // C++:  String cv::VideoWriter::getBackendName()
+    private static native String getBackendName_0(long nativeObj);
+
+    // C++:  bool cv::VideoWriter::isOpened()
+    private static native boolean isOpened_0(long nativeObj);
+
+    // C++:  bool cv::VideoWriter::open(String filename, int apiPreference, int fourcc, double fps, Size frameSize, bool isColor = true)
+    private static native boolean open_0(long nativeObj, String filename, int apiPreference, int fourcc, double fps, double frameSize_width, double frameSize_height, boolean isColor);
+    private static native boolean open_1(long nativeObj, String filename, int apiPreference, int fourcc, double fps, double frameSize_width, double frameSize_height);
+
+    // C++:  bool cv::VideoWriter::open(String filename, int fourcc, double fps, Size frameSize, bool isColor = true)
+    private static native boolean open_2(long nativeObj, String filename, int fourcc, double fps, double frameSize_width, double frameSize_height, boolean isColor);
+    private static native boolean open_3(long nativeObj, String filename, int fourcc, double fps, double frameSize_width, double frameSize_height);
+
+    // C++:  bool cv::VideoWriter::set(int propId, double value)
+    private static native boolean set_0(long nativeObj, int propId, double value);
+
+    // C++:  double cv::VideoWriter::get(int propId)
+    private static native double get_0(long nativeObj, int propId);
+
+    // C++: static int cv::VideoWriter::fourcc(char c1, char c2, char c3, char c4)
+    private static native int fourcc_0(char c1, char c2, char c3, char c4);
+
+    // C++:  void cv::VideoWriter::release()
+    private static native void release_0(long nativeObj);
+
+    // C++:  void cv::VideoWriter::write(Mat image)
+    private static native void write_0(long nativeObj, long image_nativeObj);
+
+    // native support for java finalize()
+    private static native void delete(long nativeObj);
+
+}
diff --git a/opencv41/src/main/java/org/opencv/videoio/Videoio.java b/opencv41/src/main/java/org/opencv/videoio/Videoio.java
new file mode 100644 (file)
index 0000000..3b8a007
--- /dev/null
@@ -0,0 +1,413 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.videoio;
+
+import java.lang.String;
+
+// C++: class Videoio
+//javadoc: Videoio
+
+public class Videoio {
+
+    // C++: enum VideoWriterProperties
+    public static final int
+            VIDEOWRITER_PROP_QUALITY = 1,
+            VIDEOWRITER_PROP_FRAMEBYTES = 2,
+            VIDEOWRITER_PROP_NSTRIPES = 3;
+
+
+    // C++: enum VideoCaptureProperties
+    public static final int
+            CAP_PROP_POS_MSEC = 0,
+            CAP_PROP_POS_FRAMES = 1,
+            CAP_PROP_POS_AVI_RATIO = 2,
+            CAP_PROP_FRAME_WIDTH = 3,
+            CAP_PROP_FRAME_HEIGHT = 4,
+            CAP_PROP_FPS = 5,
+            CAP_PROP_FOURCC = 6,
+            CAP_PROP_FRAME_COUNT = 7,
+            CAP_PROP_FORMAT = 8,
+            CAP_PROP_MODE = 9,
+            CAP_PROP_BRIGHTNESS = 10,
+            CAP_PROP_CONTRAST = 11,
+            CAP_PROP_SATURATION = 12,
+            CAP_PROP_HUE = 13,
+            CAP_PROP_GAIN = 14,
+            CAP_PROP_EXPOSURE = 15,
+            CAP_PROP_CONVERT_RGB = 16,
+            CAP_PROP_WHITE_BALANCE_BLUE_U = 17,
+            CAP_PROP_RECTIFICATION = 18,
+            CAP_PROP_MONOCHROME = 19,
+            CAP_PROP_SHARPNESS = 20,
+            CAP_PROP_AUTO_EXPOSURE = 21,
+            CAP_PROP_GAMMA = 22,
+            CAP_PROP_TEMPERATURE = 23,
+            CAP_PROP_TRIGGER = 24,
+            CAP_PROP_TRIGGER_DELAY = 25,
+            CAP_PROP_WHITE_BALANCE_RED_V = 26,
+            CAP_PROP_ZOOM = 27,
+            CAP_PROP_FOCUS = 28,
+            CAP_PROP_GUID = 29,
+            CAP_PROP_ISO_SPEED = 30,
+            CAP_PROP_BACKLIGHT = 32,
+            CAP_PROP_PAN = 33,
+            CAP_PROP_TILT = 34,
+            CAP_PROP_ROLL = 35,
+            CAP_PROP_IRIS = 36,
+            CAP_PROP_SETTINGS = 37,
+            CAP_PROP_BUFFERSIZE = 38,
+            CAP_PROP_AUTOFOCUS = 39,
+            CAP_PROP_SAR_NUM = 40,
+            CAP_PROP_SAR_DEN = 41,
+            CAP_PROP_BACKEND = 42,
+            CAP_PROP_CHANNEL = 43,
+            CAP_PROP_AUTO_WB = 44,
+            CAP_PROP_WB_TEMPERATURE = 45;
+
+
+    // C++: enum <unnamed>
+    public static final int
+            CAP_PROP_DC1394_OFF = -4,
+            CAP_PROP_DC1394_MODE_MANUAL = -3,
+            CAP_PROP_DC1394_MODE_AUTO = -2,
+            CAP_PROP_DC1394_MODE_ONE_PUSH_AUTO = -1,
+            CAP_PROP_DC1394_MAX = 31,
+            CAP_OPENNI_DEPTH_GENERATOR = 1 << 31,
+            CAP_OPENNI_IMAGE_GENERATOR = 1 << 30,
+            CAP_OPENNI_IR_GENERATOR = 1 << 29,
+            CAP_OPENNI_GENERATORS_MASK = CAP_OPENNI_DEPTH_GENERATOR + CAP_OPENNI_IMAGE_GENERATOR + CAP_OPENNI_IR_GENERATOR,
+            CAP_PROP_OPENNI_OUTPUT_MODE = 100,
+            CAP_PROP_OPENNI_FRAME_MAX_DEPTH = 101,
+            CAP_PROP_OPENNI_BASELINE = 102,
+            CAP_PROP_OPENNI_FOCAL_LENGTH = 103,
+            CAP_PROP_OPENNI_REGISTRATION = 104,
+            CAP_PROP_OPENNI_REGISTRATION_ON = CAP_PROP_OPENNI_REGISTRATION,
+            CAP_PROP_OPENNI_APPROX_FRAME_SYNC = 105,
+            CAP_PROP_OPENNI_MAX_BUFFER_SIZE = 106,
+            CAP_PROP_OPENNI_CIRCLE_BUFFER = 107,
+            CAP_PROP_OPENNI_MAX_TIME_DURATION = 108,
+            CAP_PROP_OPENNI_GENERATOR_PRESENT = 109,
+            CAP_PROP_OPENNI2_SYNC = 110,
+            CAP_PROP_OPENNI2_MIRROR = 111,
+            CAP_OPENNI_IMAGE_GENERATOR_PRESENT = CAP_OPENNI_IMAGE_GENERATOR + CAP_PROP_OPENNI_GENERATOR_PRESENT,
+            CAP_OPENNI_IMAGE_GENERATOR_OUTPUT_MODE = CAP_OPENNI_IMAGE_GENERATOR + CAP_PROP_OPENNI_OUTPUT_MODE,
+            CAP_OPENNI_DEPTH_GENERATOR_PRESENT = CAP_OPENNI_DEPTH_GENERATOR + CAP_PROP_OPENNI_GENERATOR_PRESENT,
+            CAP_OPENNI_DEPTH_GENERATOR_BASELINE = CAP_OPENNI_DEPTH_GENERATOR + CAP_PROP_OPENNI_BASELINE,
+            CAP_OPENNI_DEPTH_GENERATOR_FOCAL_LENGTH = CAP_OPENNI_DEPTH_GENERATOR + CAP_PROP_OPENNI_FOCAL_LENGTH,
+            CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION = CAP_OPENNI_DEPTH_GENERATOR + CAP_PROP_OPENNI_REGISTRATION,
+            CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION_ON = CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION,
+            CAP_OPENNI_IR_GENERATOR_PRESENT = CAP_OPENNI_IR_GENERATOR + CAP_PROP_OPENNI_GENERATOR_PRESENT,
+            CAP_OPENNI_DEPTH_MAP = 0,
+            CAP_OPENNI_POINT_CLOUD_MAP = 1,
+            CAP_OPENNI_DISPARITY_MAP = 2,
+            CAP_OPENNI_DISPARITY_MAP_32F = 3,
+            CAP_OPENNI_VALID_DEPTH_MASK = 4,
+            CAP_OPENNI_BGR_IMAGE = 5,
+            CAP_OPENNI_GRAY_IMAGE = 6,
+            CAP_OPENNI_IR_IMAGE = 7,
+            CAP_OPENNI_VGA_30HZ = 0,
+            CAP_OPENNI_SXGA_15HZ = 1,
+            CAP_OPENNI_SXGA_30HZ = 2,
+            CAP_OPENNI_QVGA_30HZ = 3,
+            CAP_OPENNI_QVGA_60HZ = 4,
+            CAP_PROP_GSTREAMER_QUEUE_LENGTH = 200,
+            CAP_PROP_PVAPI_MULTICASTIP = 300,
+            CAP_PROP_PVAPI_FRAMESTARTTRIGGERMODE = 301,
+            CAP_PROP_PVAPI_DECIMATIONHORIZONTAL = 302,
+            CAP_PROP_PVAPI_DECIMATIONVERTICAL = 303,
+            CAP_PROP_PVAPI_BINNINGX = 304,
+            CAP_PROP_PVAPI_BINNINGY = 305,
+            CAP_PROP_PVAPI_PIXELFORMAT = 306,
+            CAP_PVAPI_FSTRIGMODE_FREERUN = 0,
+            CAP_PVAPI_FSTRIGMODE_SYNCIN1 = 1,
+            CAP_PVAPI_FSTRIGMODE_SYNCIN2 = 2,
+            CAP_PVAPI_FSTRIGMODE_FIXEDRATE = 3,
+            CAP_PVAPI_FSTRIGMODE_SOFTWARE = 4,
+            CAP_PVAPI_DECIMATION_OFF = 1,
+            CAP_PVAPI_DECIMATION_2OUTOF4 = 2,
+            CAP_PVAPI_DECIMATION_2OUTOF8 = 4,
+            CAP_PVAPI_DECIMATION_2OUTOF16 = 8,
+            CAP_PVAPI_PIXELFORMAT_MONO8 = 1,
+            CAP_PVAPI_PIXELFORMAT_MONO16 = 2,
+            CAP_PVAPI_PIXELFORMAT_BAYER8 = 3,
+            CAP_PVAPI_PIXELFORMAT_BAYER16 = 4,
+            CAP_PVAPI_PIXELFORMAT_RGB24 = 5,
+            CAP_PVAPI_PIXELFORMAT_BGR24 = 6,
+            CAP_PVAPI_PIXELFORMAT_RGBA32 = 7,
+            CAP_PVAPI_PIXELFORMAT_BGRA32 = 8,
+            CAP_PROP_XI_DOWNSAMPLING = 400,
+            CAP_PROP_XI_DATA_FORMAT = 401,
+            CAP_PROP_XI_OFFSET_X = 402,
+            CAP_PROP_XI_OFFSET_Y = 403,
+            CAP_PROP_XI_TRG_SOURCE = 404,
+            CAP_PROP_XI_TRG_SOFTWARE = 405,
+            CAP_PROP_XI_GPI_SELECTOR = 406,
+            CAP_PROP_XI_GPI_MODE = 407,
+            CAP_PROP_XI_GPI_LEVEL = 408,
+            CAP_PROP_XI_GPO_SELECTOR = 409,
+            CAP_PROP_XI_GPO_MODE = 410,
+            CAP_PROP_XI_LED_SELECTOR = 411,
+            CAP_PROP_XI_LED_MODE = 412,
+            CAP_PROP_XI_MANUAL_WB = 413,
+            CAP_PROP_XI_AUTO_WB = 414,
+            CAP_PROP_XI_AEAG = 415,
+            CAP_PROP_XI_EXP_PRIORITY = 416,
+            CAP_PROP_XI_AE_MAX_LIMIT = 417,
+            CAP_PROP_XI_AG_MAX_LIMIT = 418,
+            CAP_PROP_XI_AEAG_LEVEL = 419,
+            CAP_PROP_XI_TIMEOUT = 420,
+            CAP_PROP_XI_EXPOSURE = 421,
+            CAP_PROP_XI_EXPOSURE_BURST_COUNT = 422,
+            CAP_PROP_XI_GAIN_SELECTOR = 423,
+            CAP_PROP_XI_GAIN = 424,
+            CAP_PROP_XI_DOWNSAMPLING_TYPE = 426,
+            CAP_PROP_XI_BINNING_SELECTOR = 427,
+            CAP_PROP_XI_BINNING_VERTICAL = 428,
+            CAP_PROP_XI_BINNING_HORIZONTAL = 429,
+            CAP_PROP_XI_BINNING_PATTERN = 430,
+            CAP_PROP_XI_DECIMATION_SELECTOR = 431,
+            CAP_PROP_XI_DECIMATION_VERTICAL = 432,
+            CAP_PROP_XI_DECIMATION_HORIZONTAL = 433,
+            CAP_PROP_XI_DECIMATION_PATTERN = 434,
+            CAP_PROP_XI_TEST_PATTERN_GENERATOR_SELECTOR = 587,
+            CAP_PROP_XI_TEST_PATTERN = 588,
+            CAP_PROP_XI_IMAGE_DATA_FORMAT = 435,
+            CAP_PROP_XI_SHUTTER_TYPE = 436,
+            CAP_PROP_XI_SENSOR_TAPS = 437,
+            CAP_PROP_XI_AEAG_ROI_OFFSET_X = 439,
+            CAP_PROP_XI_AEAG_ROI_OFFSET_Y = 440,
+            CAP_PROP_XI_AEAG_ROI_WIDTH = 441,
+            CAP_PROP_XI_AEAG_ROI_HEIGHT = 442,
+            CAP_PROP_XI_BPC = 445,
+            CAP_PROP_XI_WB_KR = 448,
+            CAP_PROP_XI_WB_KG = 449,
+            CAP_PROP_XI_WB_KB = 450,
+            CAP_PROP_XI_WIDTH = 451,
+            CAP_PROP_XI_HEIGHT = 452,
+            CAP_PROP_XI_REGION_SELECTOR = 589,
+            CAP_PROP_XI_REGION_MODE = 595,
+            CAP_PROP_XI_LIMIT_BANDWIDTH = 459,
+            CAP_PROP_XI_SENSOR_DATA_BIT_DEPTH = 460,
+            CAP_PROP_XI_OUTPUT_DATA_BIT_DEPTH = 461,
+            CAP_PROP_XI_IMAGE_DATA_BIT_DEPTH = 462,
+            CAP_PROP_XI_OUTPUT_DATA_PACKING = 463,
+            CAP_PROP_XI_OUTPUT_DATA_PACKING_TYPE = 464,
+            CAP_PROP_XI_IS_COOLED = 465,
+            CAP_PROP_XI_COOLING = 466,
+            CAP_PROP_XI_TARGET_TEMP = 467,
+            CAP_PROP_XI_CHIP_TEMP = 468,
+            CAP_PROP_XI_HOUS_TEMP = 469,
+            CAP_PROP_XI_HOUS_BACK_SIDE_TEMP = 590,
+            CAP_PROP_XI_SENSOR_BOARD_TEMP = 596,
+            CAP_PROP_XI_CMS = 470,
+            CAP_PROP_XI_APPLY_CMS = 471,
+            CAP_PROP_XI_IMAGE_IS_COLOR = 474,
+            CAP_PROP_XI_COLOR_FILTER_ARRAY = 475,
+            CAP_PROP_XI_GAMMAY = 476,
+            CAP_PROP_XI_GAMMAC = 477,
+            CAP_PROP_XI_SHARPNESS = 478,
+            CAP_PROP_XI_CC_MATRIX_00 = 479,
+            CAP_PROP_XI_CC_MATRIX_01 = 480,
+            CAP_PROP_XI_CC_MATRIX_02 = 481,
+            CAP_PROP_XI_CC_MATRIX_03 = 482,
+            CAP_PROP_XI_CC_MATRIX_10 = 483,
+            CAP_PROP_XI_CC_MATRIX_11 = 484,
+            CAP_PROP_XI_CC_MATRIX_12 = 485,
+            CAP_PROP_XI_CC_MATRIX_13 = 486,
+            CAP_PROP_XI_CC_MATRIX_20 = 487,
+            CAP_PROP_XI_CC_MATRIX_21 = 488,
+            CAP_PROP_XI_CC_MATRIX_22 = 489,
+            CAP_PROP_XI_CC_MATRIX_23 = 490,
+            CAP_PROP_XI_CC_MATRIX_30 = 491,
+            CAP_PROP_XI_CC_MATRIX_31 = 492,
+            CAP_PROP_XI_CC_MATRIX_32 = 493,
+            CAP_PROP_XI_CC_MATRIX_33 = 494,
+            CAP_PROP_XI_DEFAULT_CC_MATRIX = 495,
+            CAP_PROP_XI_TRG_SELECTOR = 498,
+            CAP_PROP_XI_ACQ_FRAME_BURST_COUNT = 499,
+            CAP_PROP_XI_DEBOUNCE_EN = 507,
+            CAP_PROP_XI_DEBOUNCE_T0 = 508,
+            CAP_PROP_XI_DEBOUNCE_T1 = 509,
+            CAP_PROP_XI_DEBOUNCE_POL = 510,
+            CAP_PROP_XI_LENS_MODE = 511,
+            CAP_PROP_XI_LENS_APERTURE_VALUE = 512,
+            CAP_PROP_XI_LENS_FOCUS_MOVEMENT_VALUE = 513,
+            CAP_PROP_XI_LENS_FOCUS_MOVE = 514,
+            CAP_PROP_XI_LENS_FOCUS_DISTANCE = 515,
+            CAP_PROP_XI_LENS_FOCAL_LENGTH = 516,
+            CAP_PROP_XI_LENS_FEATURE_SELECTOR = 517,
+            CAP_PROP_XI_LENS_FEATURE = 518,
+            CAP_PROP_XI_DEVICE_MODEL_ID = 521,
+            CAP_PROP_XI_DEVICE_SN = 522,
+            CAP_PROP_XI_IMAGE_DATA_FORMAT_RGB32_ALPHA = 529,
+            CAP_PROP_XI_IMAGE_PAYLOAD_SIZE = 530,
+            CAP_PROP_XI_TRANSPORT_PIXEL_FORMAT = 531,
+            CAP_PROP_XI_SENSOR_CLOCK_FREQ_HZ = 532,
+            CAP_PROP_XI_SENSOR_CLOCK_FREQ_INDEX = 533,
+            CAP_PROP_XI_SENSOR_OUTPUT_CHANNEL_COUNT = 534,
+            CAP_PROP_XI_FRAMERATE = 535,
+            CAP_PROP_XI_COUNTER_SELECTOR = 536,
+            CAP_PROP_XI_COUNTER_VALUE = 537,
+            CAP_PROP_XI_ACQ_TIMING_MODE = 538,
+            CAP_PROP_XI_AVAILABLE_BANDWIDTH = 539,
+            CAP_PROP_XI_BUFFER_POLICY = 540,
+            CAP_PROP_XI_LUT_EN = 541,
+            CAP_PROP_XI_LUT_INDEX = 542,
+            CAP_PROP_XI_LUT_VALUE = 543,
+            CAP_PROP_XI_TRG_DELAY = 544,
+            CAP_PROP_XI_TS_RST_MODE = 545,
+            CAP_PROP_XI_TS_RST_SOURCE = 546,
+            CAP_PROP_XI_IS_DEVICE_EXIST = 547,
+            CAP_PROP_XI_ACQ_BUFFER_SIZE = 548,
+            CAP_PROP_XI_ACQ_BUFFER_SIZE_UNIT = 549,
+            CAP_PROP_XI_ACQ_TRANSPORT_BUFFER_SIZE = 550,
+            CAP_PROP_XI_BUFFERS_QUEUE_SIZE = 551,
+            CAP_PROP_XI_ACQ_TRANSPORT_BUFFER_COMMIT = 552,
+            CAP_PROP_XI_RECENT_FRAME = 553,
+            CAP_PROP_XI_DEVICE_RESET = 554,
+            CAP_PROP_XI_COLUMN_FPN_CORRECTION = 555,
+            CAP_PROP_XI_ROW_FPN_CORRECTION = 591,
+            CAP_PROP_XI_SENSOR_MODE = 558,
+            CAP_PROP_XI_HDR = 559,
+            CAP_PROP_XI_HDR_KNEEPOINT_COUNT = 560,
+            CAP_PROP_XI_HDR_T1 = 561,
+            CAP_PROP_XI_HDR_T2 = 562,
+            CAP_PROP_XI_KNEEPOINT1 = 563,
+            CAP_PROP_XI_KNEEPOINT2 = 564,
+            CAP_PROP_XI_IMAGE_BLACK_LEVEL = 565,
+            CAP_PROP_XI_HW_REVISION = 571,
+            CAP_PROP_XI_DEBUG_LEVEL = 572,
+            CAP_PROP_XI_AUTO_BANDWIDTH_CALCULATION = 573,
+            CAP_PROP_XI_FFS_FILE_ID = 594,
+            CAP_PROP_XI_FFS_FILE_SIZE = 580,
+            CAP_PROP_XI_FREE_FFS_SIZE = 581,
+            CAP_PROP_XI_USED_FFS_SIZE = 582,
+            CAP_PROP_XI_FFS_ACCESS_KEY = 583,
+            CAP_PROP_XI_SENSOR_FEATURE_SELECTOR = 585,
+            CAP_PROP_XI_SENSOR_FEATURE_VALUE = 586,
+            CAP_PROP_IOS_DEVICE_FOCUS = 9001,
+            CAP_PROP_IOS_DEVICE_EXPOSURE = 9002,
+            CAP_PROP_IOS_DEVICE_FLASH = 9003,
+            CAP_PROP_IOS_DEVICE_WHITEBALANCE = 9004,
+            CAP_PROP_IOS_DEVICE_TORCH = 9005,
+            CAP_PROP_GIGA_FRAME_OFFSET_X = 10001,
+            CAP_PROP_GIGA_FRAME_OFFSET_Y = 10002,
+            CAP_PROP_GIGA_FRAME_WIDTH_MAX = 10003,
+            CAP_PROP_GIGA_FRAME_HEIGH_MAX = 10004,
+            CAP_PROP_GIGA_FRAME_SENS_WIDTH = 10005,
+            CAP_PROP_GIGA_FRAME_SENS_HEIGH = 10006,
+            CAP_PROP_INTELPERC_PROFILE_COUNT = 11001,
+            CAP_PROP_INTELPERC_PROFILE_IDX = 11002,
+            CAP_PROP_INTELPERC_DEPTH_LOW_CONFIDENCE_VALUE = 11003,
+            CAP_PROP_INTELPERC_DEPTH_SATURATION_VALUE = 11004,
+            CAP_PROP_INTELPERC_DEPTH_CONFIDENCE_THRESHOLD = 11005,
+            CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_HORZ = 11006,
+            CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_VERT = 11007,
+            CAP_INTELPERC_DEPTH_GENERATOR = 1 << 29,
+            CAP_INTELPERC_IMAGE_GENERATOR = 1 << 28,
+            CAP_INTELPERC_IR_GENERATOR = 1 << 27,
+            CAP_INTELPERC_GENERATORS_MASK = CAP_INTELPERC_DEPTH_GENERATOR + CAP_INTELPERC_IMAGE_GENERATOR + CAP_INTELPERC_IR_GENERATOR,
+            CAP_INTELPERC_DEPTH_MAP = 0,
+            CAP_INTELPERC_UVDEPTH_MAP = 1,
+            CAP_INTELPERC_IR_MAP = 2,
+            CAP_INTELPERC_IMAGE = 3,
+            CAP_PROP_GPHOTO2_PREVIEW = 17001,
+            CAP_PROP_GPHOTO2_WIDGET_ENUMERATE = 17002,
+            CAP_PROP_GPHOTO2_RELOAD_CONFIG = 17003,
+            CAP_PROP_GPHOTO2_RELOAD_ON_CHANGE = 17004,
+            CAP_PROP_GPHOTO2_COLLECT_MSGS = 17005,
+            CAP_PROP_GPHOTO2_FLUSH_MSGS = 17006,
+            CAP_PROP_SPEED = 17007,
+            CAP_PROP_APERTURE = 17008,
+            CAP_PROP_EXPOSUREPROGRAM = 17009,
+            CAP_PROP_VIEWFINDER = 17010,
+            CAP_PROP_IMAGES_BASE = 18000,
+            CAP_PROP_IMAGES_LAST = 19000;
+
+
+    // C++: enum VideoCaptureAPIs
+    public static final int
+            CAP_ANY = 0,
+            CAP_VFW = 200,
+            CAP_V4L = 200,
+            CAP_V4L2 = CAP_V4L,
+            CAP_FIREWIRE = 300,
+            CAP_FIREWARE = CAP_FIREWIRE,
+            CAP_IEEE1394 = CAP_FIREWIRE,
+            CAP_DC1394 = CAP_FIREWIRE,
+            CAP_CMU1394 = CAP_FIREWIRE,
+            CAP_QT = 500,
+            CAP_UNICAP = 600,
+            CAP_DSHOW = 700,
+            CAP_PVAPI = 800,
+            CAP_OPENNI = 900,
+            CAP_OPENNI_ASUS = 910,
+            CAP_ANDROID = 1000,
+            CAP_XIAPI = 1100,
+            CAP_AVFOUNDATION = 1200,
+            CAP_GIGANETIX = 1300,
+            CAP_MSMF = 1400,
+            CAP_WINRT = 1410,
+            CAP_INTELPERC = 1500,
+            CAP_REALSENSE = 1500,
+            CAP_OPENNI2 = 1600,
+            CAP_OPENNI2_ASUS = 1610,
+            CAP_GPHOTO2 = 1700,
+            CAP_GSTREAMER = 1800,
+            CAP_FFMPEG = 1900,
+            CAP_IMAGES = 2000,
+            CAP_ARAVIS = 2100,
+            CAP_OPENCV_MJPEG = 2200,
+            CAP_INTEL_MFX = 2300,
+            CAP_XINE = 2400;
+
+
+    //
+    // C++:  String cv::videoio_registry::getBackendName(VideoCaptureAPIs api)
+    //
+
+    //javadoc: getBackendName(api)
+    public static String getBackendName(int api)
+    {
+        
+        String retVal = getBackendName_0(api);
+        
+        return retVal;
+    }
+
+
+    //
+    // C++:  vector_VideoCaptureAPIs cv::videoio_registry::getBackends()
+    //
+
+    // Return type 'vector_VideoCaptureAPIs' is not supported, skipping the function
+
+
+    //
+    // C++:  vector_VideoCaptureAPIs cv::videoio_registry::getCameraBackends()
+    //
+
+    // Return type 'vector_VideoCaptureAPIs' is not supported, skipping the function
+
+
+    //
+    // C++:  vector_VideoCaptureAPIs cv::videoio_registry::getStreamBackends()
+    //
+
+    // Return type 'vector_VideoCaptureAPIs' is not supported, skipping the function
+
+
+    //
+    // C++:  vector_VideoCaptureAPIs cv::videoio_registry::getWriterBackends()
+    //
+
+    // Return type 'vector_VideoCaptureAPIs' is not supported, skipping the function
+
+
+
+
+    // C++:  String cv::videoio_registry::getBackendName(VideoCaptureAPIs api)
+    private static native String getBackendName_0(int api);
+
+}
diff --git a/opencv41/src/main/res/values/attrs.xml b/opencv41/src/main/res/values/attrs.xml
new file mode 100644 (file)
index 0000000..6902621
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <declare-styleable name = "CameraBridgeViewBase" >
+       <attr name="show_fps" format="boolean"/>
+       <attr name="camera_id" format="integer" >
+          <enum name="any" value="-1" />
+          <enum name="back" value="99" />
+          <enum name="front" value="98" />
+       </attr>
+    </declare-styleable>
+</resources>
index e7b4def..3632760 100644 (file)
@@ -1 +1,2 @@
 include ':app'
+include ':opencv41'