+ *
+ * , the caller's class name is used as the prefix.
+ *
+ * @param tag identifies the source of a log message.
+ * @param messagePrefix prepended to every message if non-null. If null, the name of the caller is
+ * being used
+ */
+ public Logger(final String tag, final String messagePrefix) {
+ this.tag = tag;
+ final String prefix = messagePrefix == null ? getCallerSimpleName() : messagePrefix;
+ this.messagePrefix = (prefix.length() > 0) ? prefix + ": " : prefix;
+ }
+
+ /** Creates a Logger using the caller's class name as the message prefix. */
+ public Logger() {
+ this(DEFAULT_TAG, null);
+ }
+
+ /** Creates a Logger using the caller's class name as the message prefix. */
+ public Logger(final int minLogLevel) {
+ this(DEFAULT_TAG, null);
+ this.minLogLevel = minLogLevel;
+ }
+
+ /**
+ * Return caller's simple name.
+ *
+ *
Android getStackTrace() returns an array that looks like this: stackTrace[0]:
+ * dalvik.system.VMStack stackTrace[1]: java.lang.Thread stackTrace[2]:
+ * com.google.android.apps.unveil.env.UnveilLogger stackTrace[3]:
+ * com.google.android.apps.unveil.BaseApplication
+ *
+ *
This function returns the simple version of the first non-filtered name.
+ *
+ * @return caller's simple name
+ */
+ private static String getCallerSimpleName() {
+ // Get the current callstack so we can pull the class of the caller off of it.
+ final StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
+
+ for (final StackTraceElement elem : stackTrace) {
+ final String className = elem.getClassName();
+ if (!IGNORED_CLASS_NAMES.contains(className)) {
+ // We're only interested in the simple name of the class, not the complete package.
+ final String[] classParts = className.split("\\.");
+ return classParts[classParts.length - 1];
+ }
+ }
+
+ return Logger.class.getSimpleName();
+ }
+
+ public void setMinLogLevel(final int minLogLevel) {
+ this.minLogLevel = minLogLevel;
+ }
+
+ public boolean isLoggable(final int logLevel) {
+ return logLevel >= minLogLevel || Log.isLoggable(tag, logLevel);
+ }
+
+ private String toMessage(final String format, final Object... args) {
+ return messagePrefix + (args.length > 0 ? String.format(format, args) : format);
+ }
+
+ public void v(final String format, final Object... args) {
+ if (isLoggable(Log.VERBOSE)) {
+ Log.v(tag, toMessage(format, args));
+ }
+ }
+
+ public void v(final Throwable t, final String format, final Object... args) {
+ if (isLoggable(Log.VERBOSE)) {
+ Log.v(tag, toMessage(format, args), t);
+ }
+ }
+
+ public void d(final String format, final Object... args) {
+ if (isLoggable(Log.DEBUG)) {
+ Log.d(tag, toMessage(format, args));
+ }
+ }
+
+ public void d(final Throwable t, final String format, final Object... args) {
+ if (isLoggable(Log.DEBUG)) {
+ Log.d(tag, toMessage(format, args), t);
+ }
+ }
+
+ public void i(final String format, final Object... args) {
+ if (isLoggable(Log.INFO)) {
+ Log.i(tag, toMessage(format, args));
+ }
+ }
+
+ public void i(final Throwable t, final String format, final Object... args) {
+ if (isLoggable(Log.INFO)) {
+ Log.i(tag, toMessage(format, args), t);
+ }
+ }
+
+ public void w(final String format, final Object... args) {
+ if (isLoggable(Log.WARN)) {
+ Log.w(tag, toMessage(format, args));
+ }
+ }
+
+ public void w(final Throwable t, final String format, final Object... args) {
+ if (isLoggable(Log.WARN)) {
+ Log.w(tag, toMessage(format, args), t);
+ }
+ }
+
+ public void e(final String format, final Object... args) {
+ if (isLoggable(Log.ERROR)) {
+ Log.e(tag, toMessage(format, args));
+ }
+ }
+
+ public void e(final Throwable t, final String format, final Object... args) {
+ if (isLoggable(Log.ERROR)) {
+ Log.e(tag, toMessage(format, args), t);
+ }
+ }
+}
diff --git a/tflite/android/app/src/main/java/com/mogoweb/nsfw/env/Utility.java b/tflite/android/app/src/main/java/com/mogoweb/nsfw/env/Utility.java
new file mode 100644
index 0000000..edc82af
--- /dev/null
+++ b/tflite/android/app/src/main/java/com/mogoweb/nsfw/env/Utility.java
@@ -0,0 +1,93 @@
+package com.mogoweb.nsfw.env;
+
+import android.Manifest;
+import android.annotation.TargetApi;
+import android.app.Activity;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.pm.PackageManager;
+import android.os.Build;
+import android.support.design.widget.Snackbar;
+import android.support.v4.app.ActivityCompat;
+import android.support.v4.content.ContextCompat;
+import android.support.v7.app.AlertDialog;
+import android.view.View;
+
+import com.mogoweb.nsfw.MainActivity;
+import com.mogoweb.nsfw.R;
+
+public class Utility {
+ public static final int MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE = 123;
+ public static final int MY_PERMISSIONS_REQUEST_CAMERA = 124;
+
+ @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
+ public static boolean checkStoragePermission(final Context context)
+ {
+ int currentAPIVersion = Build.VERSION.SDK_INT;
+ if(currentAPIVersion>=android.os.Build.VERSION_CODES.M)
+ {
+ if (ContextCompat.checkSelfPermission(context, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
+ if (ActivityCompat.shouldShowRequestPermissionRationale((Activity) context, Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
+ AlertDialog.Builder alertBuilder = new AlertDialog.Builder(context);
+ alertBuilder.setCancelable(true);
+ alertBuilder.setTitle("Permission necessary");
+ alertBuilder.setMessage("External storage permission is necessary");
+ alertBuilder.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
+ @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
+ public void onClick(DialogInterface dialog, int which) {
+ ActivityCompat.requestPermissions((Activity) context,
+ new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
+ MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE);
+ }
+ });
+ AlertDialog alert = alertBuilder.create();
+ alert.show();
+ } else {
+ ActivityCompat.requestPermissions((Activity) context, new String[] {Manifest.permission.WRITE_EXTERNAL_STORAGE}, MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE);
+ }
+ return false;
+ } else {
+ return true;
+ }
+ } else {
+ return true;
+ }
+ }
+
+ /**
+ * Requests the {@link android.Manifest.permission#CAMERA} permission.
+ * If an additional rationale should be displayed, the user has to launch the request from
+ * a SnackBar that includes additional information.
+ */
+ public static boolean checkCameraPermission(final Context context) {
+ int currentAPIVersion = Build.VERSION.SDK_INT;
+ if (currentAPIVersion >= android.os.Build.VERSION_CODES.M) {
+ if (ContextCompat.checkSelfPermission(context, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
+ if (ActivityCompat.shouldShowRequestPermissionRationale((Activity) context, Manifest.permission.CAMERA)) {
+ AlertDialog.Builder alertBuilder = new AlertDialog.Builder(context);
+ alertBuilder.setCancelable(true);
+ alertBuilder.setTitle("Permission necessary");
+ alertBuilder.setMessage("camera permission is necessary");
+ alertBuilder.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
+ @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
+ public void onClick(DialogInterface dialog, int which) {
+ ActivityCompat.requestPermissions((Activity) context,
+ new String[]{Manifest.permission.CAMERA},
+ MY_PERMISSIONS_REQUEST_CAMERA);
+ }
+ });
+ AlertDialog alert = alertBuilder.create();
+ alert.show();
+ } else {
+ ActivityCompat.requestPermissions((Activity) context, new String[] {Manifest.permission.CAMERA}, MY_PERMISSIONS_REQUEST_CAMERA);
+ }
+ return false;
+ } else {
+ return true;
+ }
+ } else {
+ return true;
+ }
+ }
+}
+
diff --git a/tflite/android/app/src/main/java/com/mogoweb/nsfw/tflite/Classifier.java b/tflite/android/app/src/main/java/com/mogoweb/nsfw/tflite/Classifier.java
new file mode 100644
index 0000000..4143a80
--- /dev/null
+++ b/tflite/android/app/src/main/java/com/mogoweb/nsfw/tflite/Classifier.java
@@ -0,0 +1,423 @@
+/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+==============================================================================*/
+
+package com.mogoweb.nsfw.tflite;
+
+import android.app.Activity;
+import android.content.res.AssetFileDescriptor;
+import android.graphics.Bitmap;
+import android.graphics.Matrix;
+import android.graphics.RectF;
+import android.os.SystemClock;
+import android.os.Trace;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.nio.MappedByteBuffer;
+import java.nio.channels.FileChannel;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+import java.util.PriorityQueue;
+
+import org.opencv.android.OpenCVLoader;
+import org.tensorflow.lite.Interpreter;
+
+import com.mogoweb.nsfw.env.ImageUtils;
+import com.mogoweb.nsfw.env.Logger;
+
+import org.tensorflow.lite.Tensor;
+import org.tensorflow.lite.gpu.GpuDelegate;
+
+import static java.lang.Math.max;
+
+/** A classifier specialized to label images using TensorFlow Lite. */
+public abstract class Classifier {
+ private static final Logger LOGGER = new Logger();
+
+ /** The model type used for classification. */
+ public enum Model {
+ FLOAT,
+ QUANTIZED,
+ }
+
+ /** The runtime device type used for executing classification. */
+ public enum Device {
+ CPU,
+ NNAPI,
+ GPU
+ }
+
+ /** Number of results to show in the UI. */
+ private static final int MAX_RESULTS = 2;
+
+ /** Dimensions of inputs. */
+ private static final int DIM_BATCH_SIZE = 1;
+
+ private static final int DIM_PIXEL_SIZE = 3;
+
+ protected static final int VGG_MEAN[] = {123, 117, 104};
+
+ /** Preallocated buffers for storing image data in. */
+ private final int[] intValues = new int[getImageSizeX() * getImageSizeY()];
+
+ /** Options for configuring the Interpreter. */
+ private final Interpreter.Options tfliteOptions = new Interpreter.Options();
+
+ /** The loaded TensorFlow Lite model. */
+ private MappedByteBuffer tfliteModel;
+
+ /** Labels corresponding to the output of the vision model. */
+ private List labels;
+
+ /** Optional GPU delegate for accleration. */
+ private GpuDelegate gpuDelegate = null;
+
+ /** An instance of the driver class to run model inference with Tensorflow Lite. */
+ protected Interpreter tflite;
+
+ /** A ByteBuffer to hold image data, to be feed into Tensorflow Lite as inputs. */
+ protected ByteBuffer imgData = null;
+
+ /**
+ * Creates a classifier with the provided configuration.
+ *
+ * @param activity The current Activity.
+ * @param model The model to use for classification.
+ * @param device The device to use for classification.
+ * @param numThreads The number of threads to use for classification.
+ * @return A classifier with the desired configuration.
+ */
+ public static Classifier create(Activity activity, Model model, Device device, int numThreads)
+ throws IOException {
+ if (model == Model.QUANTIZED) {
+ return new ClassifierQuantized(activity, device, numThreads);
+ } else {
+ return new ClassifierFloat(activity, device, numThreads);
+ }
+ }
+
+ /** An immutable result returned by a Classifier describing what was recognized. */
+ public static class Recognition {
+ /**
+ * A unique identifier for what has been recognized. Specific to the class, not the instance of
+ * the object.
+ */
+ private final String id;
+
+ /** Display name for the recognition. */
+ private final String title;
+
+ /**
+ * A sortable score for how good the recognition is relative to others. Higher should be better.
+ */
+ private final Float confidence;
+
+ public Recognition(
+ final String id, final String title, final Float confidence) {
+ this.id = id;
+ this.title = title;
+ this.confidence = confidence;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public Float getConfidence() {
+ return confidence;
+ }
+
+ @Override
+ public String toString() {
+ String resultString = "";
+ if (id != null) {
+ resultString += "[" + id + "] ";
+ }
+
+ if (title != null) {
+ resultString += title + " ";
+ }
+
+ if (confidence != null) {
+ resultString += String.format("(%.1f%%) ", confidence * 100.0f);
+ }
+
+ return resultString.trim();
+ }
+ }
+
+ /** Initializes a {@code Classifier}. */
+ protected Classifier(Activity activity, Device device, int numThreads) throws IOException {
+ tfliteModel = loadModelFile(activity);
+ switch (device) {
+ case NNAPI:
+ tfliteOptions.setUseNNAPI(true);
+ break;
+ case GPU:
+ gpuDelegate = new GpuDelegate();
+ tfliteOptions.addDelegate(gpuDelegate);
+ break;
+ case CPU:
+ break;
+ }
+ tfliteOptions.setNumThreads(numThreads);
+ tflite = new Interpreter(tfliteModel, tfliteOptions);
+
+ Tensor tensor = tflite.getInputTensor(tflite.getInputIndex("input"));
+ String stringBuilder = " \n"
+ +"dataType : " +
+ tensor.dataType() +
+ "\n" +
+ "numBytes : " +
+ tensor.numBytes() +
+ "\n" +
+ "numDimensions : " +
+ tensor.numDimensions() +
+ "\n" +
+ "numElements : " +
+ tensor.numElements() +
+ "\n" +
+ "shape : " +
+ tensor.shape().length;
+ LOGGER.d(stringBuilder);
+
+ labels = loadLabelList(activity);
+ imgData =
+ ByteBuffer.allocateDirect(
+ DIM_BATCH_SIZE
+ * getImageSizeX()
+ * getImageSizeY()
+ * DIM_PIXEL_SIZE
+ * getNumBytesPerChannel());
+ imgData.order(ByteOrder.nativeOrder());
+
+ if (OpenCVLoader.initDebug()) {
+ LOGGER.d("OpenCv Initialization Success.");
+ } else {
+ LOGGER.e("OpenCv Initialization Error.");
+ }
+ LOGGER.d("Created a Tensorflow Lite Image Classifier.");
+ }
+
+ /** Reads label list from Assets. */
+ private List loadLabelList(Activity activity) throws IOException {
+ List labels = new ArrayList();
+ BufferedReader reader =
+ new BufferedReader(new InputStreamReader(activity.getAssets().open(getLabelPath())));
+ String line;
+ while ((line = reader.readLine()) != null) {
+ labels.add(line);
+ }
+ reader.close();
+ return labels;
+ }
+
+ /** Memory-map the model file in Assets. */
+ private MappedByteBuffer loadModelFile(Activity activity) throws IOException {
+ AssetFileDescriptor fileDescriptor = activity.getAssets().openFd(getModelPath());
+ FileInputStream inputStream = new FileInputStream(fileDescriptor.getFileDescriptor());
+ FileChannel fileChannel = inputStream.getChannel();
+ long startOffset = fileDescriptor.getStartOffset();
+ long declaredLength = fileDescriptor.getDeclaredLength();
+ return fileChannel.map(FileChannel.MapMode.READ_ONLY, startOffset, declaredLength);
+ }
+
+ /** Writes Image data into a {@code ByteBuffer}. */
+ private void convertBitmapToByteBuffer(Bitmap bitmap) {
+ if (imgData == null) {
+ return;
+ }
+ imgData.rewind();
+
+ int W = bitmap.getWidth();
+ int H = bitmap.getHeight();
+
+ int w_off = max((W - getImageSizeX()) / 2, 0);
+ int h_off = max((H - getImageSizeY()) / 2, 0);
+
+ Matrix m = new Matrix();
+ m.setScale(-1, 1);//水平翻转
+ Bitmap reversePic = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), m, true);
+ reversePic.getPixels(intValues, 0, getImageSizeX(), w_off, h_off, getImageSizeX(), getImageSizeY());
+
+// FileOutputStream fOut;
+// try {
+// String tmp = "/sdcard/reverse1.jpg";
+// fOut = new FileOutputStream(tmp);
+// reversePic.compress(Bitmap.CompressFormat.JPEG, 100, fOut);
+//
+// try {
+// fOut.flush();
+// fOut.close();
+// } catch (IOException e) {
+// e.printStackTrace();
+// }
+//
+// } catch (FileNotFoundException e) {
+// e.printStackTrace();
+// }
+
+ // Convert the image to floating point.
+ int pixel = 0;
+ long startTime = SystemClock.uptimeMillis();
+ for (int i = h_off; i < getImageSizeX() + h_off; ++i) {
+ for (int j = w_off; j < getImageSizeY() + w_off; ++j) {
+ final int val = intValues[pixel++];
+ addPixelValue(val);
+ }
+ }
+ long endTime = SystemClock.uptimeMillis();
+ LOGGER.v("Timecost to put values into ByteBuffer: " + (endTime - startTime));
+ }
+
+ /** Runs inference and returns the classification results. */
+ public List recognizeImage(final Bitmap bitmap) {
+ // Log this method so that it can be analyzed with systrace.
+ Trace.beginSection("recognizeImage");
+
+ Trace.beginSection("preprocessBitmap");
+ // resize to 256 x 256
+ Bitmap bm = ImageUtils.scaleBitmap(bitmap, 256, 256);
+
+ convertBitmapToByteBuffer(bm);
+ Trace.endSection();
+
+ // Run the inference call.
+ Trace.beginSection("runInference");
+ long startTime = SystemClock.uptimeMillis();
+ runInference();
+ long endTime = SystemClock.uptimeMillis();
+ Trace.endSection();
+ LOGGER.i("Timecost to run model inference: " + (endTime - startTime));
+
+ final ArrayList recognitions = new ArrayList();
+ int recognitionsSize = Math.min(labels.size(), MAX_RESULTS);
+ for (int i = 0; i < recognitionsSize; ++i) {
+ recognitions.add(new Recognition(
+ "" + i,
+ labels.size() > i ? labels.get(i) : "unknown",
+ getNormalizedProbability(i)));
+ }
+ Trace.endSection();
+ return recognitions;
+ }
+
+ /** Closes the interpreter and model to release resources. */
+ public void close() {
+ if (tflite != null) {
+ tflite.close();
+ tflite = null;
+ }
+ if (gpuDelegate != null) {
+ gpuDelegate.close();
+ gpuDelegate = null;
+ }
+ tfliteModel = null;
+ }
+
+ /**
+ * Get the image size along the x axis.
+ *
+ * @return
+ */
+ public abstract int getImageSizeX();
+
+ /**
+ * Get the image size along the y axis.
+ *
+ * @return
+ */
+ public abstract int getImageSizeY();
+
+ /**
+ * Get the name of the model file stored in Assets.
+ *
+ * @return
+ */
+ protected abstract String getModelPath();
+
+ /**
+ * Get the name of the label file stored in Assets.
+ *
+ * @return
+ */
+ protected abstract String getLabelPath();
+
+ /**
+ * Get the number of bytes that is used to store a single color channel value.
+ *
+ * @return
+ */
+ protected abstract int getNumBytesPerChannel();
+
+ /**
+ * Add pixelValue to byteBuffer.
+ *
+ * @param pixelValue
+ */
+ protected abstract void addPixelValue(int pixelValue);
+
+ /**
+ * Read the probability value for the specified label This is either the original value as it was
+ * read from the net's output or the updated value after the filter was applied.
+ *
+ * @param labelIndex
+ * @return
+ */
+ protected abstract float getProbability(int labelIndex);
+
+ /**
+ * Set the probability value for the specified label.
+ *
+ * @param labelIndex
+ * @param value
+ */
+ protected abstract void setProbability(int labelIndex, Number value);
+
+ /**
+ * Get the normalized probability value for the specified label. This is the final value as it
+ * will be shown to the user.
+ *
+ * @return
+ */
+ protected abstract float getNormalizedProbability(int labelIndex);
+
+ /**
+ * Run inference using the prepared input in {@link #imgData}. Afterwards, the result will be
+ * provided by getProbability().
+ *
+ *
This additional method is necessary, because we don't have a common base for different
+ * primitive data types.
+ */
+ protected abstract void runInference();
+
+ /**
+ * Get the total number of labels.
+ *
+ * @return
+ */
+ protected int getNumLabels() {
+ return labels.size();
+ }
+}
diff --git a/tflite/android/app/src/main/java/com/mogoweb/nsfw/tflite/ClassifierFloat.java b/tflite/android/app/src/main/java/com/mogoweb/nsfw/tflite/ClassifierFloat.java
new file mode 100644
index 0000000..fd825d9
--- /dev/null
+++ b/tflite/android/app/src/main/java/com/mogoweb/nsfw/tflite/ClassifierFloat.java
@@ -0,0 +1,103 @@
+/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+==============================================================================*/
+
+package com.mogoweb.nsfw.tflite;
+
+import android.app.Activity;
+import android.graphics.Color;
+
+import java.io.IOException;
+
+/** This TensorFlowLite classifier works with the float MobileNet model. */
+public class ClassifierFloat extends Classifier {
+
+ /**
+ * An array to hold inference results, to be feed into Tensorflow Lite as outputs. This isn't part
+ * of the super class, because we need a primitive array here.
+ */
+ private float[][] labelProbArray = null;
+
+ /**
+ * Initializes a {@code ClassifierFloat}.
+ *
+ * @param activity
+ */
+ public ClassifierFloat(Activity activity, Device device, int numThreads)
+ throws IOException {
+ super(activity, device, numThreads);
+ labelProbArray = new float[1][getNumLabels()];
+ }
+
+ @Override
+ public int getImageSizeX() {
+ return 224;
+ }
+
+ @Override
+ public int getImageSizeY() {
+ return 224;
+ }
+
+ @Override
+ protected String getModelPath() {
+ // you can download this file from
+ // see build.gradle for where to obtain this file. It should be auto
+ // downloaded into assets.
+ return "open_nsfw.tflite";
+ }
+
+ @Override
+ protected String getLabelPath() {
+ return "labels.txt";
+ }
+
+ @Override
+ protected int getNumBytesPerChannel() {
+ return 4; // Float.SIZE / Byte.SIZE;
+ }
+
+ @Override
+ protected void addPixelValue(int pixelValue) {
+ final int color = pixelValue;
+ int r1 = Color.red(color);
+ int g1 = Color.green(color);
+ int b1 = Color.blue(color);
+
+ int rr1 = r1 - VGG_MEAN[0];
+ int gg1 = g1 - VGG_MEAN[1];
+ int bb1 = b1 - VGG_MEAN[2];
+
+ imgData.putFloat(bb1);
+ imgData.putFloat(gg1);
+ imgData.putFloat(rr1);
+ }
+
+ @Override
+ protected float getProbability(int labelIndex) {
+ return labelProbArray[0][labelIndex];
+ }
+
+ @Override
+ protected void setProbability(int labelIndex, Number value) {
+ labelProbArray[0][labelIndex] = value.floatValue();
+ }
+
+ @Override
+ protected float getNormalizedProbability(int labelIndex) {
+ return labelProbArray[0][labelIndex];
+ }
+
+ @Override
+ protected void runInference() {
+ tflite.run(imgData, labelProbArray);
+ }
+}
diff --git a/tflite/android/app/src/main/java/com/mogoweb/nsfw/tflite/ClassifierQuantized.java b/tflite/android/app/src/main/java/com/mogoweb/nsfw/tflite/ClassifierQuantized.java
new file mode 100644
index 0000000..9e59ead
--- /dev/null
+++ b/tflite/android/app/src/main/java/com/mogoweb/nsfw/tflite/ClassifierQuantized.java
@@ -0,0 +1,107 @@
+/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+==============================================================================*/
+
+package com.mogoweb.nsfw.tflite;
+
+import android.app.Activity;
+import android.graphics.Color;
+
+import com.mogoweb.nsfw.tflite.Classifier;
+
+import java.io.IOException;
+
+/** This TensorFlow Lite classifier works with the quantized MobileNet model. */
+public class ClassifierQuantized extends Classifier {
+
+ /**
+ * An array to hold inference results, to be feed into Tensorflow Lite as outputs. This isn't part
+ * of the super class, because we need a primitive array here.
+ */
+ private float[][] labelProbArray = null;
+
+ /**
+ * Initializes a {@code ClassifierQuantized}.
+ *
+ * @param activity
+ */
+ public ClassifierQuantized(Activity activity, Device device, int numThreads)
+ throws IOException {
+ super(activity, device, numThreads);
+ labelProbArray = new float[1][getNumLabels()];
+ }
+
+ @Override
+ public int getImageSizeX() {
+ return 224;
+ }
+
+ @Override
+ public int getImageSizeY() {
+ return 224;
+ }
+
+ @Override
+ protected String getModelPath() {
+ // you can download this file from
+ // see build.gradle for where to obtain this file. It should be auto
+ // downloaded into assets.
+ return "open_nsfw_quant.tflite";
+ }
+
+ @Override
+ protected String getLabelPath() {
+ return "labels.txt";
+ }
+
+ @Override
+ protected int getNumBytesPerChannel() {
+ // the quantized model uses a single byte only
+ return 4;
+ }
+
+ @Override
+ protected void addPixelValue(int pixelValue) {
+ final int color = pixelValue;
+ int r1 = Color.red(color);
+ int g1 = Color.green(color);
+ int b1 = Color.blue(color);
+
+ int rr1 = r1 - VGG_MEAN[0];
+ int gg1 = g1 - VGG_MEAN[1];
+ int bb1 = b1 - VGG_MEAN[2];
+
+ imgData.putFloat(bb1);
+ imgData.putFloat(gg1);
+ imgData.putFloat(rr1);
+ }
+
+ @Override
+ protected float getProbability(int labelIndex) {
+ return labelProbArray[0][labelIndex];
+ }
+
+ @Override
+ protected void setProbability(int labelIndex, Number value) {
+ labelProbArray[0][labelIndex] = value.floatValue();
+ }
+
+ @Override
+ protected float getNormalizedProbability(int labelIndex) {
+ return labelProbArray[0][labelIndex];
+ }
+
+ @Override
+ protected void runInference() {
+ tflite.run(imgData, labelProbArray);
+ }
+}
+
diff --git a/tflite/android/app/src/main/jniLibs/arm64-v8a/libopencv_java3.so b/tflite/android/app/src/main/jniLibs/arm64-v8a/libopencv_java3.so
new file mode 100644
index 0000000..2b34981
Binary files /dev/null and b/tflite/android/app/src/main/jniLibs/arm64-v8a/libopencv_java3.so differ
diff --git a/tflite/android/app/src/main/jniLibs/armeabi-v7a/libopencv_java3.so b/tflite/android/app/src/main/jniLibs/armeabi-v7a/libopencv_java3.so
new file mode 100644
index 0000000..38f1ba4
Binary files /dev/null and b/tflite/android/app/src/main/jniLibs/armeabi-v7a/libopencv_java3.so differ
diff --git a/tflite/android/app/src/main/jniLibs/armeabi/libopencv_java3.so b/tflite/android/app/src/main/jniLibs/armeabi/libopencv_java3.so
new file mode 100644
index 0000000..4d61c60
Binary files /dev/null and b/tflite/android/app/src/main/jniLibs/armeabi/libopencv_java3.so differ
diff --git a/tflite/android/app/src/main/jniLibs/mips/libopencv_java3.so b/tflite/android/app/src/main/jniLibs/mips/libopencv_java3.so
new file mode 100644
index 0000000..04e59a5
Binary files /dev/null and b/tflite/android/app/src/main/jniLibs/mips/libopencv_java3.so differ
diff --git a/tflite/android/app/src/main/jniLibs/mips64/libopencv_java3.so b/tflite/android/app/src/main/jniLibs/mips64/libopencv_java3.so
new file mode 100644
index 0000000..c7c558a
Binary files /dev/null and b/tflite/android/app/src/main/jniLibs/mips64/libopencv_java3.so differ
diff --git a/tflite/android/app/src/main/jniLibs/x86/libopencv_java3.so b/tflite/android/app/src/main/jniLibs/x86/libopencv_java3.so
new file mode 100644
index 0000000..9c78fa2
Binary files /dev/null and b/tflite/android/app/src/main/jniLibs/x86/libopencv_java3.so differ
diff --git a/tflite/android/app/src/main/jniLibs/x86_64/libopencv_java3.so b/tflite/android/app/src/main/jniLibs/x86_64/libopencv_java3.so
new file mode 100644
index 0000000..69e7843
Binary files /dev/null and b/tflite/android/app/src/main/jniLibs/x86_64/libopencv_java3.so differ
diff --git a/tflite/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/tflite/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 0000000..1f6bb29
--- /dev/null
+++ b/tflite/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tflite/android/app/src/main/res/drawable/ic_launcher_background.xml b/tflite/android/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..0d025f9
--- /dev/null
+++ b/tflite/android/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tflite/android/app/src/main/res/layout/activity_main.xml b/tflite/android/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..9ff6cc0
--- /dev/null
+++ b/tflite/android/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tflite/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/tflite/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..6b78462
--- /dev/null
+++ b/tflite/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/tflite/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/tflite/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..6b78462
--- /dev/null
+++ b/tflite/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/tflite/android/app/src/main/res/values/colors.xml b/tflite/android/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..69b2233
--- /dev/null
+++ b/tflite/android/app/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #008577
+ #00574B
+ #D81B60
+
diff --git a/tflite/android/app/src/main/res/values/strings.xml b/tflite/android/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..fe9b8fc
--- /dev/null
+++ b/tflite/android/app/src/main/res/values/strings.xml
@@ -0,0 +1,22 @@
+
+ NSFW
+ This device doesn\'t support Camera2 API.
+ Take Photo
+ Select Photo
+ Camera access is required to take a photo.
+ OK
+ Camera permission request was denied. You cannot take a photo!
+ Storage permission request was denied. You cannot visit images on storage!
+ Model:
+
+ Quantized
+ Float
+
+
+ Device:
+
+ CPU
+ GPU
+ NNAPI
+
+
diff --git a/tflite/android/app/src/main/res/values/styles.xml b/tflite/android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..5885930
--- /dev/null
+++ b/tflite/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/tflite/android/app/src/test/java/com/mogoweb/nsfw/ExampleUnitTest.java b/tflite/android/app/src/test/java/com/mogoweb/nsfw/ExampleUnitTest.java
new file mode 100644
index 0000000..532fa42
--- /dev/null
+++ b/tflite/android/app/src/test/java/com/mogoweb/nsfw/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package com.mogoweb.nsfw;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() {
+ assertEquals(4, 2 + 2);
+ }
+}
diff --git a/tflite/android/build.gradle b/tflite/android/build.gradle
new file mode 100644
index 0000000..78fbc17
--- /dev/null
+++ b/tflite/android/build.gradle
@@ -0,0 +1,27 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+ repositories {
+ google()
+ jcenter()
+
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:3.4.1'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ jcenter()
+
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/tflite/android/gradle.properties b/tflite/android/gradle.properties
new file mode 100644
index 0000000..82618ce
--- /dev/null
+++ b/tflite/android/gradle.properties
@@ -0,0 +1,15 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx1536m
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+
+
diff --git a/tflite/android/gradle/wrapper/gradle-wrapper.jar b/tflite/android/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..f6b961f
Binary files /dev/null and b/tflite/android/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/tflite/android/gradle/wrapper/gradle-wrapper.properties b/tflite/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..a300093
--- /dev/null
+++ b/tflite/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Thu May 23 09:04:38 CST 2019
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
diff --git a/tflite/android/gradlew b/tflite/android/gradlew
new file mode 100755
index 0000000..cccdd3d
--- /dev/null
+++ b/tflite/android/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/tflite/android/gradlew.bat b/tflite/android/gradlew.bat
new file mode 100644
index 0000000..e95643d
--- /dev/null
+++ b/tflite/android/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/tflite/android/import-summary.txt b/tflite/android/import-summary.txt
new file mode 100644
index 0000000..650ca14
--- /dev/null
+++ b/tflite/android/import-summary.txt
@@ -0,0 +1,245 @@
+ECLIPSE ANDROID PROJECT IMPORT SUMMARY
+======================================
+
+Ignored Files:
+--------------
+The following files were *not* copied into the new Gradle project; you
+should evaluate whether these are still needed in your project and if
+so manually move them:
+
+* javadoc/
+* javadoc/allclasses-frame.html
+* javadoc/allclasses-noframe.html
+* javadoc/constant-values.html
+* javadoc/help-doc.html
+* javadoc/index-all.html
+* javadoc/index.html
+* javadoc/org/
+* javadoc/org/opencv/
+* javadoc/org/opencv/android/
+* javadoc/org/opencv/android/BaseLoaderCallback.html
+* javadoc/org/opencv/android/Camera2Renderer.html
+* javadoc/org/opencv/android/CameraBridgeViewBase.CvCameraViewFrame.html
+* javadoc/org/opencv/android/CameraBridgeViewBase.CvCameraViewListener.html
+* javadoc/org/opencv/android/CameraBridgeViewBase.CvCameraViewListener2.html
+* javadoc/org/opencv/android/CameraBridgeViewBase.ListItemAccessor.html
+* javadoc/org/opencv/android/CameraBridgeViewBase.html
+* javadoc/org/opencv/android/CameraGLRendererBase.html
+* javadoc/org/opencv/android/CameraGLSurfaceView.CameraTextureListener.html
+* javadoc/org/opencv/android/CameraGLSurfaceView.html
+* javadoc/org/opencv/android/CameraRenderer.html
+* javadoc/org/opencv/android/FpsMeter.html
+* javadoc/org/opencv/android/InstallCallbackInterface.html
+* javadoc/org/opencv/android/JavaCamera2View.html
+* javadoc/org/opencv/android/JavaCameraView.JavaCameraSizeAccessor.html
+* javadoc/org/opencv/android/JavaCameraView.html
+* javadoc/org/opencv/android/LoaderCallbackInterface.html
+* javadoc/org/opencv/android/OpenCVLoader.html
+* javadoc/org/opencv/android/Utils.html
+* javadoc/org/opencv/android/package-frame.html
+* javadoc/org/opencv/android/package-summary.html
+* javadoc/org/opencv/android/package-tree.html
+* javadoc/org/opencv/calib3d/
+* javadoc/org/opencv/calib3d/Calib3d.html
+* javadoc/org/opencv/calib3d/StereoBM.html
+* javadoc/org/opencv/calib3d/StereoMatcher.html
+* javadoc/org/opencv/calib3d/StereoSGBM.html
+* javadoc/org/opencv/calib3d/package-frame.html
+* javadoc/org/opencv/calib3d/package-summary.html
+* javadoc/org/opencv/calib3d/package-tree.html
+* javadoc/org/opencv/core/
+* javadoc/org/opencv/core/Algorithm.html
+* javadoc/org/opencv/core/Core.MinMaxLocResult.html
+* javadoc/org/opencv/core/Core.html
+* javadoc/org/opencv/core/CvException.html
+* javadoc/org/opencv/core/CvType.html
+* javadoc/org/opencv/core/DMatch.html
+* javadoc/org/opencv/core/KeyPoint.html
+* javadoc/org/opencv/core/Mat.html
+* javadoc/org/opencv/core/MatOfByte.html
+* javadoc/org/opencv/core/MatOfDMatch.html
+* javadoc/org/opencv/core/MatOfDouble.html
+* javadoc/org/opencv/core/MatOfFloat.html
+* javadoc/org/opencv/core/MatOfFloat4.html
+* javadoc/org/opencv/core/MatOfFloat6.html
+* javadoc/org/opencv/core/MatOfInt.html
+* javadoc/org/opencv/core/MatOfInt4.html
+* javadoc/org/opencv/core/MatOfKeyPoint.html
+* javadoc/org/opencv/core/MatOfPoint.html
+* javadoc/org/opencv/core/MatOfPoint2f.html
+* javadoc/org/opencv/core/MatOfPoint3.html
+* javadoc/org/opencv/core/MatOfPoint3f.html
+* javadoc/org/opencv/core/MatOfRect.html
+* javadoc/org/opencv/core/MatOfRect2d.html
+* javadoc/org/opencv/core/MatOfRotatedRect.html
+* javadoc/org/opencv/core/Point.html
+* javadoc/org/opencv/core/Point3.html
+* javadoc/org/opencv/core/Range.html
+* javadoc/org/opencv/core/Rect.html
+* javadoc/org/opencv/core/Rect2d.html
+* javadoc/org/opencv/core/RotatedRect.html
+* javadoc/org/opencv/core/Scalar.html
+* javadoc/org/opencv/core/Size.html
+* javadoc/org/opencv/core/TermCriteria.html
+* javadoc/org/opencv/core/TickMeter.html
+* javadoc/org/opencv/core/package-frame.html
+* javadoc/org/opencv/core/package-summary.html
+* javadoc/org/opencv/core/package-tree.html
+* javadoc/org/opencv/dnn/
+* javadoc/org/opencv/dnn/DictValue.html
+* javadoc/org/opencv/dnn/Dnn.html
+* javadoc/org/opencv/dnn/Layer.html
+* javadoc/org/opencv/dnn/Net.html
+* javadoc/org/opencv/dnn/package-frame.html
+* javadoc/org/opencv/dnn/package-summary.html
+* javadoc/org/opencv/dnn/package-tree.html
+* javadoc/org/opencv/features2d/
+* javadoc/org/opencv/features2d/AKAZE.html
+* javadoc/org/opencv/features2d/AgastFeatureDetector.html
+* javadoc/org/opencv/features2d/BFMatcher.html
+* javadoc/org/opencv/features2d/BOWImgDescriptorExtractor.html
+* javadoc/org/opencv/features2d/BOWKMeansTrainer.html
+* javadoc/org/opencv/features2d/BOWTrainer.html
+* javadoc/org/opencv/features2d/BRISK.html
+* javadoc/org/opencv/features2d/DescriptorMatcher.html
+* javadoc/org/opencv/features2d/FastFeatureDetector.html
+* javadoc/org/opencv/features2d/Feature2D.html
+* javadoc/org/opencv/features2d/Features2d.html
+* javadoc/org/opencv/features2d/FlannBasedMatcher.html
+* javadoc/org/opencv/features2d/GFTTDetector.html
+* javadoc/org/opencv/features2d/KAZE.html
+* javadoc/org/opencv/features2d/MSER.html
+* javadoc/org/opencv/features2d/ORB.html
+* javadoc/org/opencv/features2d/Params.html
+* javadoc/org/opencv/features2d/package-frame.html
+* javadoc/org/opencv/features2d/package-summary.html
+* javadoc/org/opencv/features2d/package-tree.html
+* javadoc/org/opencv/imgcodecs/
+* javadoc/org/opencv/imgcodecs/Imgcodecs.html
+* javadoc/org/opencv/imgcodecs/package-frame.html
+* javadoc/org/opencv/imgcodecs/package-summary.html
+* javadoc/org/opencv/imgcodecs/package-tree.html
+* javadoc/org/opencv/imgproc/
+* javadoc/org/opencv/imgproc/CLAHE.html
+* javadoc/org/opencv/imgproc/Imgproc.html
+* javadoc/org/opencv/imgproc/LineSegmentDetector.html
+* javadoc/org/opencv/imgproc/Moments.html
+* javadoc/org/opencv/imgproc/Subdiv2D.html
+* javadoc/org/opencv/imgproc/package-frame.html
+* javadoc/org/opencv/imgproc/package-summary.html
+* javadoc/org/opencv/imgproc/package-tree.html
+* javadoc/org/opencv/ml/
+* javadoc/org/opencv/ml/ANN_MLP.html
+* javadoc/org/opencv/ml/ANN_MLP_ANNEAL.html
+* javadoc/org/opencv/ml/Boost.html
+* javadoc/org/opencv/ml/DTrees.html
+* javadoc/org/opencv/ml/EM.html
+* javadoc/org/opencv/ml/KNearest.html
+* javadoc/org/opencv/ml/LogisticRegression.html
+* javadoc/org/opencv/ml/Ml.html
+* javadoc/org/opencv/ml/NormalBayesClassifier.html
+* javadoc/org/opencv/ml/ParamGrid.html
+* javadoc/org/opencv/ml/RTrees.html
+* javadoc/org/opencv/ml/SVM.html
+* javadoc/org/opencv/ml/SVMSGD.html
+* javadoc/org/opencv/ml/StatModel.html
+* javadoc/org/opencv/ml/TrainData.html
+* javadoc/org/opencv/ml/package-frame.html
+* javadoc/org/opencv/ml/package-summary.html
+* javadoc/org/opencv/ml/package-tree.html
+* javadoc/org/opencv/objdetect/
+* javadoc/org/opencv/objdetect/BaseCascadeClassifier.html
+* javadoc/org/opencv/objdetect/CascadeClassifier.html
+* javadoc/org/opencv/objdetect/HOGDescriptor.html
+* javadoc/org/opencv/objdetect/Objdetect.html
+* javadoc/org/opencv/objdetect/package-frame.html
+* javadoc/org/opencv/objdetect/package-summary.html
+* javadoc/org/opencv/objdetect/package-tree.html
+* javadoc/org/opencv/osgi/
+* javadoc/org/opencv/osgi/OpenCVInterface.html
+* javadoc/org/opencv/osgi/OpenCVNativeLoader.html
+* javadoc/org/opencv/osgi/package-frame.html
+* javadoc/org/opencv/osgi/package-summary.html
+* javadoc/org/opencv/osgi/package-tree.html
+* javadoc/org/opencv/photo/
+* javadoc/org/opencv/photo/AlignExposures.html
+* javadoc/org/opencv/photo/AlignMTB.html
+* javadoc/org/opencv/photo/CalibrateCRF.html
+* javadoc/org/opencv/photo/CalibrateDebevec.html
+* javadoc/org/opencv/photo/CalibrateRobertson.html
+* javadoc/org/opencv/photo/MergeDebevec.html
+* javadoc/org/opencv/photo/MergeExposures.html
+* javadoc/org/opencv/photo/MergeMertens.html
+* javadoc/org/opencv/photo/MergeRobertson.html
+* javadoc/org/opencv/photo/Photo.html
+* javadoc/org/opencv/photo/Tonemap.html
+* javadoc/org/opencv/photo/TonemapDrago.html
+* javadoc/org/opencv/photo/TonemapDurand.html
+* javadoc/org/opencv/photo/TonemapMantiuk.html
+* javadoc/org/opencv/photo/TonemapReinhard.html
+* javadoc/org/opencv/photo/package-frame.html
+* javadoc/org/opencv/photo/package-summary.html
+* javadoc/org/opencv/photo/package-tree.html
+* javadoc/org/opencv/utils/
+* javadoc/org/opencv/utils/Converters.html
+* javadoc/org/opencv/utils/package-frame.html
+* javadoc/org/opencv/utils/package-summary.html
+* javadoc/org/opencv/utils/package-tree.html
+* javadoc/org/opencv/video/
+* javadoc/org/opencv/video/BackgroundSubtractor.html
+* javadoc/org/opencv/video/BackgroundSubtractorKNN.html
+* javadoc/org/opencv/video/BackgroundSubtractorMOG2.html
+* javadoc/org/opencv/video/DenseOpticalFlow.html
+* javadoc/org/opencv/video/DualTVL1OpticalFlow.html
+* javadoc/org/opencv/video/FarnebackOpticalFlow.html
+* javadoc/org/opencv/video/KalmanFilter.html
+* javadoc/org/opencv/video/SparseOpticalFlow.html
+* javadoc/org/opencv/video/SparsePyrLKOpticalFlow.html
+* javadoc/org/opencv/video/Video.html
+* javadoc/org/opencv/video/package-frame.html
+* javadoc/org/opencv/video/package-summary.html
+* javadoc/org/opencv/video/package-tree.html
+* javadoc/org/opencv/videoio/
+* javadoc/org/opencv/videoio/VideoCapture.html
+* javadoc/org/opencv/videoio/VideoWriter.html
+* javadoc/org/opencv/videoio/Videoio.html
+* javadoc/org/opencv/videoio/package-frame.html
+* javadoc/org/opencv/videoio/package-summary.html
+* javadoc/org/opencv/videoio/package-tree.html
+* javadoc/overview-frame.html
+* javadoc/overview-summary.html
+* javadoc/overview-tree.html
+* javadoc/package-list
+* javadoc/resources/
+* javadoc/resources/background.gif
+* javadoc/resources/tab.gif
+* javadoc/resources/titlebar.gif
+* javadoc/resources/titlebar_end.gif
+* javadoc/serialized-form.html
+* javadoc/stylesheet.css
+
+Moved Files:
+------------
+Android Gradle projects use a different directory structure than ADT
+Eclipse projects. Here's how the projects were restructured:
+
+* AndroidManifest.xml => openCVLibrary343/src/main/AndroidManifest.xml
+* lint.xml => openCVLibrary343/lint.xml
+* res/ => openCVLibrary343/src/main/res/
+* src/ => openCVLibrary343/src/main/java/
+* src/org/opencv/engine/OpenCVEngineInterface.aidl => openCVLibrary343/src/main/aidl/org/opencv/engine/OpenCVEngineInterface.aidl
+
+Next Steps:
+-----------
+You can now build the project. The Gradle project needs network
+connectivity to download dependencies.
+
+Bugs:
+-----
+If for some reason your project does not build, and you determine that
+it is due to a bug or limitation of the Eclipse to Gradle importer,
+please file a bug at http://b.android.com with category
+Component-Tools.
+
+(This import summary is for your information only, and can be deleted
+after import once you are satisfied with the results.)
diff --git a/tflite/android/openCVLibrary343/build.gradle b/tflite/android/openCVLibrary343/build.gradle
new file mode 100644
index 0000000..87724bf
--- /dev/null
+++ b/tflite/android/openCVLibrary343/build.gradle
@@ -0,0 +1,18 @@
+apply plugin: 'com.android.library'
+
+android {
+ compileSdkVersion 27
+ buildToolsVersion "28.0.3"
+
+ defaultConfig {
+ minSdkVersion 8
+ targetSdkVersion 27
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
+ }
+ }
+}
diff --git a/tflite/android/openCVLibrary343/lint.xml b/tflite/android/openCVLibrary343/lint.xml
new file mode 100644
index 0000000..6a5c9c6
--- /dev/null
+++ b/tflite/android/openCVLibrary343/lint.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/tflite/android/openCVLibrary343/src/main/AndroidManifest.xml b/tflite/android/openCVLibrary343/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..37acffa
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/tflite/android/openCVLibrary343/src/main/aidl/org/opencv/engine/OpenCVEngineInterface.aidl b/tflite/android/openCVLibrary343/src/main/aidl/org/opencv/engine/OpenCVEngineInterface.aidl
new file mode 100644
index 0000000..21fe5f7
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/aidl/org/opencv/engine/OpenCVEngineInterface.aidl
@@ -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/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/AsyncServiceHelper.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/AsyncServiceHelper.java
new file mode 100644
index 0000000..04a4ac6
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/AsyncServiceHelper.java
@@ -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_java3.so";
+ result = loadLibrary(AbsLibraryPath);
+ }
+
+ return result;
+ }
+ else
+ {
+ Log.d(TAG, "Library path \"" + Path + "\" is empty");
+ return false;
+ }
+ }
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/BaseLoaderCallback.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/BaseLoaderCallback.java
new file mode 100644
index 0000000..0b8aeed
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/BaseLoaderCallback.java
@@ -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 = "OpenCVLoader/BaseLoaderCallback";
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/Camera2Renderer.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/Camera2Renderer.java
new file mode 100644
index 0000000..4082140
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/Camera2Renderer.java
@@ -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/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/CameraBridgeViewBase.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/CameraBridgeViewBase.java
new file mode 100644
index 0000000..5487105
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/CameraBridgeViewBase.java
@@ -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/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/CameraGLRendererBase.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/CameraGLRendererBase.java
new file mode 100644
index 0000000..60c37c3
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/CameraGLRendererBase.java
@@ -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/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/CameraGLSurfaceView.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/CameraGLSurfaceView.java
new file mode 100644
index 0000000..05f950b
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/CameraGLSurfaceView.java
@@ -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/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/CameraRenderer.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/CameraRenderer.java
new file mode 100644
index 0000000..2d668ff
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/CameraRenderer.java
@@ -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 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 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/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/FpsMeter.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/FpsMeter.java
new file mode 100644
index 0000000..88e826c
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/FpsMeter.java
@@ -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 mFramesCouner;
+ private double mFrequency;
+ private long mprevFrameTime;
+ private String mStrfps;
+ Paint mPaint;
+ boolean mIsInitialized = false;
+ int mWidth = 0;
+ int mHeight = 0;
+
+ public void init() {
+ mFramesCouner = 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 {
+ mFramesCouner++;
+ if (mFramesCouner % 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/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/InstallCallbackInterface.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/InstallCallbackInterface.java
new file mode 100644
index 0000000..f68027a
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/InstallCallbackInterface.java
@@ -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/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/JavaCamera2View.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/JavaCamera2View.java
new file mode 100644
index 0000000..2cf512f
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/JavaCamera2View.java
@@ -0,0 +1,374 @@
+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);
+ }
+ 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/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/JavaCameraView.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/JavaCameraView.java
new file mode 100644
index 0000000..a7c72e4
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/JavaCameraView.java
@@ -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 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 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/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/LoaderCallbackInterface.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/LoaderCallbackInterface.java
new file mode 100644
index 0000000..a941e83
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/LoaderCallbackInterface.java
@@ -0,0 +1,40 @@
+package org.opencv.android;
+
+/**
+ * Interface for callback object in case of asynchronous initialization of OpenCV.
+ */
+public interface LoaderCallbackInterface
+{
+ /**
+ * OpenCV initialization finished successfully.
+ */
+ static final int SUCCESS = 0;
+ /**
+ * Google Play Market cannot be invoked.
+ */
+ static final int MARKET_ERROR = 2;
+ /**
+ * OpenCV library installation has been canceled by the user.
+ */
+ static final int INSTALL_CANCELED = 3;
+ /**
+ * This version of OpenCV Manager Service is incompatible with the app. Possibly, a service update is required.
+ */
+ static final int INCOMPATIBLE_MANAGER_VERSION = 4;
+ /**
+ * OpenCV library initialization has failed.
+ */
+ static final int INIT_FAILED = 0xff;
+
+ /**
+ * Callback method, called after OpenCV library initialization.
+ * @param status status of initialization (see initialization status constants).
+ */
+ public void onManagerConnected(int status);
+
+ /**
+ * Callback method, called in case the package installation is needed.
+ * @param callback answer object with approve and cancel methods and the package description.
+ */
+ public void onPackageInstall(final int operation, InstallCallbackInterface callback);
+};
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/OpenCVLoader.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/OpenCVLoader.java
new file mode 100644
index 0000000..2793250
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/OpenCVLoader.java
@@ -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 = "3.4.3";
+
+
+ /**
+ * 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/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/StaticHelper.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/StaticHelper.java
new file mode 100644
index 0000000..f670d93
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/StaticHelper.java
@@ -0,0 +1,104 @@
+package org.opencv.android;
+
+import org.opencv.core.Core;
+
+import java.util.StringTokenizer;
+import android.util.Log;
+
+class StaticHelper {
+
+ public static boolean initOpenCV(boolean InitCuda)
+ {
+ boolean result;
+ String libs = "";
+
+ if(InitCuda)
+ {
+ loadLibrary("cudart");
+ loadLibrary("nppc");
+ loadLibrary("nppi");
+ loadLibrary("npps");
+ loadLibrary("cufft");
+ loadLibrary("cublas");
+ }
+
+ Log.d(TAG, "Trying to get library list");
+
+ try
+ {
+ System.loadLibrary("opencv_info");
+ libs = getLibraryList();
+ }
+ catch(UnsatisfiedLinkError e)
+ {
+ Log.e(TAG, "OpenCV error: Cannot load info library for OpenCV");
+ }
+
+ Log.d(TAG, "Library list: \"" + libs + "\"");
+ Log.d(TAG, "First attempt to load libs");
+ if (initOpenCVLibs(libs))
+ {
+ Log.d(TAG, "First attempt to load libs is OK");
+ String eol = System.getProperty("line.separator");
+ for (String str : Core.getBuildInformation().split(eol))
+ Log.i(TAG, str);
+
+ result = true;
+ }
+ else
+ {
+ Log.d(TAG, "First attempt to load libs fails");
+ result = false;
+ }
+
+ return result;
+ }
+
+ private static boolean loadLibrary(String Name)
+ {
+ boolean result = true;
+
+ Log.d(TAG, "Trying to load library " + Name);
+ try
+ {
+ System.loadLibrary(Name);
+ Log.d(TAG, "Library " + Name + " loaded");
+ }
+ catch(UnsatisfiedLinkError e)
+ {
+ Log.d(TAG, "Cannot load library \"" + Name + "\"");
+ e.printStackTrace();
+ result = false;
+ }
+
+ return result;
+ }
+
+ private static boolean initOpenCVLibs(String Libs)
+ {
+ Log.d(TAG, "Trying to init OpenCV libs");
+
+ boolean result = true;
+
+ if ((null != Libs) && (Libs.length() != 0))
+ {
+ Log.d(TAG, "Trying to load libs by dependency list");
+ StringTokenizer splitter = new StringTokenizer(Libs, ";");
+ while(splitter.hasMoreTokens())
+ {
+ result &= loadLibrary(splitter.nextToken());
+ }
+ }
+ else
+ {
+ // If dependencies list is not defined or empty.
+ result = loadLibrary("opencv_java3");
+ }
+
+ return result;
+ }
+
+ private static final String TAG = "OpenCV/StaticHelper";
+
+ private static native String getLibraryList();
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/Utils.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/Utils.java
new file mode 100644
index 0000000..404c986
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/android/Utils.java
@@ -0,0 +1,139 @@
+package org.opencv.android;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+
+import org.opencv.core.CvException;
+import org.opencv.core.CvType;
+import org.opencv.core.Mat;
+import org.opencv.imgcodecs.Imgcodecs;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class Utils {
+
+ public static String exportResource(Context context, int resourceId) {
+ return exportResource(context, resourceId, "OpenCV_data");
+ }
+
+ public static String exportResource(Context context, int resourceId, String dirname) {
+ String fullname = context.getResources().getString(resourceId);
+ String resName = fullname.substring(fullname.lastIndexOf("/") + 1);
+ try {
+ InputStream is = context.getResources().openRawResource(resourceId);
+ File resDir = context.getDir(dirname, Context.MODE_PRIVATE);
+ File resFile = new File(resDir, resName);
+
+ FileOutputStream os = new FileOutputStream(resFile);
+
+ byte[] buffer = new byte[4096];
+ int bytesRead;
+ while ((bytesRead = is.read(buffer)) != -1) {
+ os.write(buffer, 0, bytesRead);
+ }
+ is.close();
+ os.close();
+
+ return resFile.getAbsolutePath();
+ } catch (IOException e) {
+ e.printStackTrace();
+ throw new CvException("Failed to export resource " + resName
+ + ". Exception thrown: " + e);
+ }
+ }
+
+ public static Mat loadResource(Context context, int resourceId) throws IOException
+ {
+ return loadResource(context, resourceId, -1);
+ }
+
+ public static Mat loadResource(Context context, int resourceId, int flags) throws IOException
+ {
+ InputStream is = context.getResources().openRawResource(resourceId);
+ ByteArrayOutputStream os = new ByteArrayOutputStream(is.available());
+
+ byte[] buffer = new byte[4096];
+ int bytesRead;
+ while ((bytesRead = is.read(buffer)) != -1) {
+ os.write(buffer, 0, bytesRead);
+ }
+ is.close();
+
+ Mat encoded = new Mat(1, os.size(), CvType.CV_8U);
+ encoded.put(0, 0, os.toByteArray());
+ os.close();
+
+ Mat decoded = Imgcodecs.imdecode(encoded, flags);
+ encoded.release();
+
+ return decoded;
+ }
+
+ /**
+ * Converts Android Bitmap to OpenCV Mat.
+ *
+ * This function converts an Android Bitmap image to the OpenCV Mat.
+ * 'ARGB_8888' and 'RGB_565' input Bitmap formats are supported.
+ * The output Mat is always created of the same size as the input Bitmap and of the 'CV_8UC4' type,
+ * it keeps the image in RGBA format.
+ * This function throws an exception if the conversion fails.
+ * @param bmp is a valid input Bitmap object of the type 'ARGB_8888' or 'RGB_565'.
+ * @param mat is a valid output Mat object, it will be reallocated if needed, so it may be empty.
+ * @param unPremultiplyAlpha is a flag, that determines, whether the bitmap needs to be converted from alpha premultiplied format (like Android keeps 'ARGB_8888' ones) to regular one; this flag is ignored for 'RGB_565' bitmaps.
+ */
+ public static void bitmapToMat(Bitmap bmp, Mat mat, boolean unPremultiplyAlpha) {
+ if (bmp == null)
+ throw new java.lang.IllegalArgumentException("bmp == null");
+ if (mat == null)
+ throw new java.lang.IllegalArgumentException("mat == null");
+ nBitmapToMat2(bmp, mat.nativeObj, unPremultiplyAlpha);
+ }
+
+ /**
+ * Short form of the bitmapToMat(bmp, mat, unPremultiplyAlpha=false).
+ * @param bmp is a valid input Bitmap object of the type 'ARGB_8888' or 'RGB_565'.
+ * @param mat is a valid output Mat object, it will be reallocated if needed, so Mat may be empty.
+ */
+ public static void bitmapToMat(Bitmap bmp, Mat mat) {
+ bitmapToMat(bmp, mat, false);
+ }
+
+
+ /**
+ * Converts OpenCV Mat to Android Bitmap.
+ *
+ * This function converts an image in the OpenCV Mat representation to the Android Bitmap.
+ * The input Mat object has to be of the types 'CV_8UC1' (gray-scale), 'CV_8UC3' (RGB) or 'CV_8UC4' (RGBA).
+ * The output Bitmap object has to be of the same size as the input Mat and of the types 'ARGB_8888' or 'RGB_565'.
+ * This function throws an exception if the conversion fails.
+ *
+ * @param mat is a valid input Mat object of types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
+ * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
+ * @param premultiplyAlpha is a flag, that determines, whether the Mat needs to be converted to alpha premultiplied format (like Android keeps 'ARGB_8888' bitmaps); the flag is ignored for 'RGB_565' bitmaps.
+ */
+ public static void matToBitmap(Mat mat, Bitmap bmp, boolean premultiplyAlpha) {
+ if (mat == null)
+ throw new java.lang.IllegalArgumentException("mat == null");
+ if (bmp == null)
+ throw new java.lang.IllegalArgumentException("bmp == null");
+ nMatToBitmap2(mat.nativeObj, bmp, premultiplyAlpha);
+ }
+
+ /**
+ * Short form of the matToBitmap(mat, bmp, premultiplyAlpha=false)
+ * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
+ * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
+ */
+ public static void matToBitmap(Mat mat, Bitmap bmp) {
+ matToBitmap(mat, bmp, false);
+ }
+
+
+ private static native void nBitmapToMat2(Bitmap b, long m_addr, boolean unPremultiplyAlpha);
+
+ private static native void nMatToBitmap2(long m_addr, Bitmap b, boolean premultiplyAlpha);
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/calib3d/Calib3d.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/calib3d/Calib3d.java
new file mode 100644
index 0000000..7266841
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/calib3d/Calib3d.java
@@ -0,0 +1,2233 @@
+//
+// 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 {
+
+ public static final int
+ CALIB_USE_INTRINSIC_GUESS = 1,
+ CALIB_RECOMPUTE_EXTRINSIC = 2,
+ CALIB_CHECK_COND = 4,
+ CALIB_FIX_SKEW = 8,
+ CALIB_FIX_K1 = 16,
+ CALIB_FIX_K2 = 32,
+ CALIB_FIX_K3 = 64,
+ CALIB_FIX_K4 = 128,
+ CALIB_FIX_INTRINSIC = 256,
+ CV_ITERATIVE = 0,
+ CV_EPNP = 1,
+ CV_P3P = 2,
+ CV_DLS = 3,
+ LMEDS = 4,
+ RANSAC = 8,
+ RHO = 16,
+ SOLVEPNP_ITERATIVE = 0,
+ SOLVEPNP_EPNP = 1,
+ SOLVEPNP_P3P = 2,
+ SOLVEPNP_DLS = 3,
+ SOLVEPNP_UPNP = 4,
+ SOLVEPNP_AP3P = 5,
+ SOLVEPNP_MAX_COUNT = 5+1,
+ CALIB_CB_ADAPTIVE_THRESH = 1,
+ CALIB_CB_NORMALIZE_IMAGE = 2,
+ CALIB_CB_FILTER_QUADS = 4,
+ CALIB_CB_FAST_CHECK = 8,
+ CALIB_CB_SYMMETRIC_GRID = 1,
+ CALIB_CB_ASYMMETRIC_GRID = 2,
+ CALIB_CB_CLUSTERING = 4,
+ CALIB_FIX_ASPECT_RATIO = 0x00002,
+ CALIB_FIX_PRINCIPAL_POINT = 0x00004,
+ CALIB_ZERO_TANGENT_DIST = 0x00008,
+ CALIB_FIX_FOCAL_LENGTH = 0x00010,
+ CALIB_FIX_K5 = 0x01000,
+ CALIB_FIX_K6 = 0x02000,
+ CALIB_RATIONAL_MODEL = 0x04000,
+ CALIB_THIN_PRISM_MODEL = 0x08000,
+ CALIB_FIX_S1_S2_S3_S4 = 0x10000,
+ CALIB_TILTED_MODEL = 0x40000,
+ CALIB_FIX_TAUX_TAUY = 0x80000,
+ CALIB_USE_QR = 0x100000,
+ CALIB_FIX_TANGENT_DIST = 0x200000,
+ CALIB_SAME_FOCAL_LENGTH = 0x00200,
+ CALIB_ZERO_DISPARITY = 0x00400,
+ CALIB_USE_LU = (1 << 17),
+ 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++: 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::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 objectPoints, List imagePoints, Size imageSize, double aspectRatio)
+ {
+ List objectPoints_tmplm = new ArrayList((objectPoints != null) ? objectPoints.size() : 0);
+ Mat objectPoints_mat = Converters.vector_vector_Point3f_to_Mat(objectPoints, objectPoints_tmplm);
+ List imagePoints_tmplm = new ArrayList((imagePoints != null) ? imagePoints.size() : 0);
+ Mat imagePoints_mat = Converters.vector_vector_Point2f_to_Mat(imagePoints, imagePoints_tmplm);
+ Mat retVal = new Mat(initCameraMatrix2D_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, aspectRatio));
+
+ return retVal;
+ }
+
+ //javadoc: initCameraMatrix2D(objectPoints, imagePoints, imageSize)
+ public static Mat initCameraMatrix2D(List objectPoints, List imagePoints, Size imageSize)
+ {
+ List objectPoints_tmplm = new ArrayList((objectPoints != null) ? objectPoints.size() : 0);
+ Mat objectPoints_mat = Converters.vector_vector_Point3f_to_Mat(objectPoints, objectPoints_tmplm);
+ List imagePoints_tmplm = new ArrayList((imagePoints != null) ? imagePoints.size() : 0);
+ Mat imagePoints_mat = Converters.vector_vector_Point2f_to_Mat(imagePoints, imagePoints_tmplm);
+ Mat retVal = new Mat(initCameraMatrix2D_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: Rect 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::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::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::findCirclesGrid2(Mat image, Size patternSize, Mat& centers, int flags, Ptr_FeatureDetector blobDetector, CirclesGridFinderParameters2 parameters)
+ //
+
+ // Unknown type 'Ptr_FeatureDetector' (I), skipping the function
+
+
+ //
+ // 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 objectPoints, List imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List rvecs, List tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors, int flags, TermCriteria criteria)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+ Mat rvecs_mat = new Mat();
+ Mat tvecs_mat = new Mat();
+ double retVal = calibrateCameraExtended_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, stdDeviationsIntrinsics.nativeObj, stdDeviationsExtrinsics.nativeObj, perViewErrors.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
+ Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
+ rvecs_mat.release();
+ Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
+ tvecs_mat.release();
+ return retVal;
+ }
+
+ //javadoc: calibrateCameraExtended(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, stdDeviationsIntrinsics, stdDeviationsExtrinsics, perViewErrors, flags)
+ public static double calibrateCameraExtended(List objectPoints, List imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List rvecs, List tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors, int flags)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+ Mat rvecs_mat = new Mat();
+ Mat tvecs_mat = new Mat();
+ double retVal = calibrateCameraExtended_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, stdDeviationsIntrinsics.nativeObj, stdDeviationsExtrinsics.nativeObj, perViewErrors.nativeObj, flags);
+ Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
+ rvecs_mat.release();
+ Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
+ tvecs_mat.release();
+ return retVal;
+ }
+
+ //javadoc: calibrateCameraExtended(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, stdDeviationsIntrinsics, stdDeviationsExtrinsics, perViewErrors)
+ public static double calibrateCameraExtended(List objectPoints, List imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List rvecs, List tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+ Mat rvecs_mat = new Mat();
+ Mat tvecs_mat = new Mat();
+ double retVal = calibrateCameraExtended_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, stdDeviationsIntrinsics.nativeObj, stdDeviationsExtrinsics.nativeObj, perViewErrors.nativeObj);
+ Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
+ rvecs_mat.release();
+ Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
+ tvecs_mat.release();
+ return retVal;
+ }
+
+
+ //
+ // C++: double 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 objectPoints, List imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List rvecs, List tvecs, int flags, TermCriteria criteria)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+ Mat rvecs_mat = new Mat();
+ Mat tvecs_mat = new Mat();
+ double retVal = calibrateCamera_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
+ Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
+ rvecs_mat.release();
+ Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
+ tvecs_mat.release();
+ return retVal;
+ }
+
+ //javadoc: calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, flags)
+ public static double calibrateCamera(List objectPoints, List imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List rvecs, List tvecs, int flags)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+ Mat rvecs_mat = new Mat();
+ Mat tvecs_mat = new Mat();
+ double retVal = calibrateCamera_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, flags);
+ Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
+ rvecs_mat.release();
+ Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
+ tvecs_mat.release();
+ return retVal;
+ }
+
+ //javadoc: calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs)
+ public static double calibrateCamera(List objectPoints, List imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List rvecs, List tvecs)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+ Mat rvecs_mat = new Mat();
+ Mat tvecs_mat = new Mat();
+ double retVal = calibrateCamera_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj);
+ Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
+ rvecs_mat.release();
+ Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
+ tvecs_mat.release();
+ return retVal;
+ }
+
+
+ //
+ // C++: double 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 objectPoints, List imagePoints1, List 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 objectPoints, List imagePoints1, List 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 objectPoints, List imagePoints1, List 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 objectPoints, List imagePoints1, List imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, int flags, TermCriteria criteria)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
+ Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
+ double retVal = stereoCalibrate_0(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, E.nativeObj, F.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
+
+ return retVal;
+ }
+
+ //javadoc: stereoCalibrate(objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F, flags)
+ public static double stereoCalibrate(List objectPoints, List imagePoints1, List imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, int flags)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
+ Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
+ double retVal = stereoCalibrate_1(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, E.nativeObj, F.nativeObj, flags);
+
+ return retVal;
+ }
+
+ //javadoc: stereoCalibrate(objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F)
+ public static double stereoCalibrate(List objectPoints, List imagePoints1, List imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
+ Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
+ double retVal = stereoCalibrate_2(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, E.nativeObj, F.nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: double 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 objectPoints, List imagePoints, Size image_size, Mat K, Mat D, List rvecs, List tvecs, int flags, TermCriteria criteria)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+ Mat rvecs_mat = new Mat();
+ Mat tvecs_mat = new Mat();
+ double retVal = 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 objectPoints, List imagePoints, Size image_size, Mat K, Mat D, List rvecs, List tvecs, int flags)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+ Mat rvecs_mat = new Mat();
+ Mat tvecs_mat = new Mat();
+ double retVal = 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 objectPoints, List imagePoints, Size image_size, Mat K, Mat D, List rvecs, List tvecs)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
+ Mat rvecs_mat = new Mat();
+ Mat tvecs_mat = new Mat();
+ double retVal = 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 objectPoints, List imagePoints1, List imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T, int flags, TermCriteria criteria)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
+ Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
+ double retVal = 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 objectPoints, List imagePoints1, List imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T, int flags)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
+ Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
+ double retVal = 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 objectPoints, List imagePoints1, List imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T)
+ {
+ Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
+ Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
+ Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
+ double retVal = 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 imgpt1, List imgpt3, Size imageSize, Mat R12, Mat T12, Mat R13, Mat T13, Mat R1, Mat R2, Mat R3, Mat P1, Mat P2, Mat P3, Mat Q, double alpha, Size newImgSize, Rect roi1, Rect roi2, int flags)
+ {
+ Mat imgpt1_mat = Converters.vector_Mat_to_Mat(imgpt1);
+ Mat imgpt3_mat = Converters.vector_Mat_to_Mat(imgpt3);
+ double[] roi1_out = new double[4];
+ double[] roi2_out = new double[4];
+ float retVal = rectify3Collinear_0(cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, cameraMatrix3.nativeObj, distCoeffs3.nativeObj, imgpt1_mat.nativeObj, imgpt3_mat.nativeObj, imageSize.width, imageSize.height, R12.nativeObj, T12.nativeObj, R13.nativeObj, T13.nativeObj, R1.nativeObj, R2.nativeObj, R3.nativeObj, P1.nativeObj, P2.nativeObj, P3.nativeObj, Q.nativeObj, alpha, newImgSize.width, newImgSize.height, roi1_out, roi2_out, flags);
+ if(roi1!=null){ roi1.x = (int)roi1_out[0]; roi1.y = (int)roi1_out[1]; roi1.width = (int)roi1_out[2]; roi1.height = (int)roi1_out[3]; }
+ if(roi2!=null){ roi2.x = (int)roi2_out[0]; roi2.y = (int)roi2_out[1]; roi2.width = (int)roi2_out[2]; roi2.height = (int)roi2_out[3]; }
+ return retVal;
+ }
+
+
+ //
+ // C++: int 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 rotations, List translations, List normals)
+ {
+ Mat rotations_mat = new Mat();
+ Mat translations_mat = new Mat();
+ Mat normals_mat = new Mat();
+ int retVal = decomposeHomographyMat_0(H.nativeObj, K.nativeObj, rotations_mat.nativeObj, translations_mat.nativeObj, normals_mat.nativeObj);
+ Converters.Mat_to_vector_Mat(rotations_mat, rotations);
+ rotations_mat.release();
+ Converters.Mat_to_vector_Mat(translations_mat, translations);
+ translations_mat.release();
+ Converters.Mat_to_vector_Mat(normals_mat, normals);
+ normals_mat.release();
+ return retVal;
+ }
+
+
+ //
+ // C++: int 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 rvecs, List tvecs, int flags)
+ {
+ Mat rvecs_mat = new Mat();
+ Mat tvecs_mat = new Mat();
+ int retVal = solveP3P_0(objectPoints.nativeObj, imagePoints.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, flags);
+ Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
+ rvecs_mat.release();
+ Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
+ tvecs_mat.release();
+ return retVal;
+ }
+
+
+ //
+ // C++: void 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::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::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 rotations, List 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 rotations, List 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::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::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::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::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::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::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::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::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::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::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/tflite/android/openCVLibrary343/src/main/java/org/opencv/calib3d/StereoBM.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/calib3d/StereoBM.java
new file mode 100644
index 0000000..4c730b8
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/calib3d/StereoBM.java
@@ -0,0 +1,344 @@
+//
+// 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); }
+
+ 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/tflite/android/openCVLibrary343/src/main/java/org/opencv/calib3d/StereoMatcher.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/calib3d/StereoMatcher.java
new file mode 100644
index 0000000..3977791
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/calib3d/StereoMatcher.java
@@ -0,0 +1,255 @@
+//
+// 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); }
+
+ 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/tflite/android/openCVLibrary343/src/main/java/org/opencv/calib3d/StereoSGBM.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/calib3d/StereoSGBM.java
new file mode 100644
index 0000000..372c4f2
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/calib3d/StereoSGBM.java
@@ -0,0 +1,333 @@
+//
+// 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); }
+
+ 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/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Algorithm.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Algorithm.java
new file mode 100644
index 0000000..8db0fe0
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Algorithm.java
@@ -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/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Core.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Core.java
new file mode 100644
index 0000000..9afc6b3
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Core.java
@@ -0,0 +1,2983 @@
+//
+// 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 "3.4.3"; }
+ private static String getNativeLibraryName() { return "opencv_java343"; }
+ private static int getVersionMajorJ() { return 3; }
+ private static int getVersionMinorJ() { return 4; }
+ private static int getVersionRevisionJ() { return 3; }
+ 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;
+
+
+ public static final int
+ SVD_MODIFY_A = 1,
+ SVD_NO_UV = 2,
+ SVD_FULL_UV = 4,
+ FILLED = -1,
+ REDUCE_SUM = 0,
+ REDUCE_AVG = 1,
+ REDUCE_MAX = 2,
+ REDUCE_MIN = 3,
+ StsOk = 0,
+ StsBackTrace = -1,
+ StsError = -2,
+ StsInternal = -3,
+ StsNoMem = -4,
+ StsBadArg = -5,
+ StsBadFunc = -6,
+ StsNoConv = -7,
+ StsAutoTrace = -8,
+ HeaderIsNull = -9,
+ BadImageSize = -10,
+ BadOffset = -11,
+ BadDataPtr = -12,
+ BadStep = -13,
+ BadModelOrChSeq = -14,
+ BadNumChannels = -15,
+ BadNumChannel1U = -16,
+ BadDepth = -17,
+ BadAlphaChannel = -18,
+ BadOrder = -19,
+ BadOrigin = -20,
+ BadAlign = -21,
+ BadCallBack = -22,
+ BadTileSize = -23,
+ BadCOI = -24,
+ BadROISize = -25,
+ MaskIsTiled = -26,
+ StsNullPtr = -27,
+ StsVecLengthErr = -28,
+ StsFilterStructContentErr = -29,
+ StsKernelStructContentErr = -30,
+ StsFilterOffsetErr = -31,
+ StsBadSize = -201,
+ StsDivByZero = -202,
+ StsInplaceNotSupported = -203,
+ StsObjectNotFound = -204,
+ StsUnmatchedFormats = -205,
+ StsBadFlag = -206,
+ StsBadPoint = -207,
+ StsBadMask = -208,
+ StsUnmatchedSizes = -209,
+ StsUnsupportedFormat = -210,
+ StsOutOfRange = -211,
+ StsParseError = -212,
+ StsNotImplemented = -213,
+ StsBadMemBlock = -214,
+ StsAssert = -215,
+ GpuNotSupported = -216,
+ GpuApiCallError = -217,
+ OpenGlNotSupported = -218,
+ OpenGlApiCallError = -219,
+ OpenCLApiCallError = -220,
+ OpenCLDoubleNotSupported = -221,
+ OpenCLInitError = -222,
+ OpenCLNoAMDBlasFft = -223,
+ DECOMP_LU = 0,
+ DECOMP_SVD = 1,
+ DECOMP_EIG = 2,
+ DECOMP_CHOLESKY = 3,
+ DECOMP_QR = 4,
+ DECOMP_NORMAL = 16,
+ NORM_INF = 1,
+ NORM_L1 = 2,
+ NORM_L2 = 4,
+ NORM_L2SQR = 5,
+ NORM_HAMMING = 6,
+ NORM_HAMMING2 = 7,
+ NORM_TYPE_MASK = 7,
+ NORM_RELATIVE = 8,
+ NORM_MINMAX = 32,
+ CMP_EQ = 0,
+ CMP_GT = 1,
+ CMP_GE = 2,
+ CMP_LT = 3,
+ CMP_LE = 4,
+ CMP_NE = 5,
+ GEMM_1_T = 1,
+ GEMM_2_T = 2,
+ GEMM_3_T = 4,
+ DFT_INVERSE = 1,
+ DFT_SCALE = 2,
+ DFT_ROWS = 4,
+ DFT_COMPLEX_OUTPUT = 16,
+ DFT_REAL_OUTPUT = 32,
+ DFT_COMPLEX_INPUT = 64,
+ DCT_INVERSE = DFT_INVERSE,
+ DCT_ROWS = DFT_ROWS,
+ BORDER_CONSTANT = 0,
+ BORDER_REPLICATE = 1,
+ BORDER_REFLECT = 2,
+ BORDER_WRAP = 3,
+ BORDER_REFLECT_101 = 4,
+ BORDER_TRANSPARENT = 5,
+ BORDER_REFLECT101 = BORDER_REFLECT_101,
+ BORDER_DEFAULT = BORDER_REFLECT_101,
+ BORDER_ISOLATED = 16,
+ SORT_EVERY_ROW = 0,
+ SORT_EVERY_COLUMN = 1,
+ SORT_ASCENDING = 0,
+ SORT_DESCENDING = 16,
+ COVAR_SCRAMBLED = 0,
+ COVAR_NORMAL = 1,
+ COVAR_USE_AVG = 2,
+ COVAR_SCALE = 4,
+ COVAR_ROWS = 8,
+ COVAR_COLS = 16,
+ KMEANS_RANDOM_CENTERS = 0,
+ KMEANS_PP_CENTERS = 2,
+ KMEANS_USE_INITIAL_LABELS = 1,
+ LINE_4 = 4,
+ LINE_8 = 8,
+ LINE_AA = 16,
+ FONT_HERSHEY_SIMPLEX = 0,
+ FONT_HERSHEY_PLAIN = 1,
+ FONT_HERSHEY_DUPLEX = 2,
+ FONT_HERSHEY_COMPLEX = 3,
+ FONT_HERSHEY_TRIPLEX = 4,
+ FONT_HERSHEY_COMPLEX_SMALL = 5,
+ FONT_HERSHEY_SCRIPT_SIMPLEX = 6,
+ FONT_HERSHEY_SCRIPT_COMPLEX = 7,
+ FONT_ITALIC = 16,
+ ROTATE_90_CLOCKWISE = 0,
+ ROTATE_180 = 1,
+ ROTATE_90_COUNTERCLOCKWISE = 2,
+ TYPE_GENERAL = 0,
+ TYPE_MARKER = 0+1,
+ TYPE_WRAPPER = 0+2,
+ TYPE_FUN = 0+3,
+ IMPL_PLAIN = 0,
+ IMPL_IPP = 0+1,
+ IMPL_OPENCL = 0+2,
+ FLAGS_NONE = 0,
+ FLAGS_MAPPING = 0x01,
+ FLAGS_EXPAND_SAME_NAMES = 0x02;
+
+
+ //
+ // C++: Scalar 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++: 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_NE()
+ //
+
+ //javadoc: useIPP_NE()
+ public static boolean useIPP_NE()
+ {
+
+ boolean retVal = useIPP_NE_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)
+ //
+
+ //javadoc: PSNR(src1, src2)
+ public static double PSNR(Mat src1, Mat src2)
+ {
+
+ double retVal = PSNR_0(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::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 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 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 src, List dst, MatOfInt fromTo)
+ {
+ Mat src_mat = Converters.vector_Mat_to_Mat(src);
+ Mat dst_mat = Converters.vector_Mat_to_Mat(dst);
+ Mat fromTo_mat = fromTo;
+ mixChannels_0(src_mat.nativeObj, dst_mat.nativeObj, fromTo_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void 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 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 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_NE(bool flag)
+ //
+
+ //javadoc: setUseIPP_NE(flag)
+ public static void setUseIPP_NE(boolean flag)
+ {
+
+ setUseIPP_NE_0(flag);
+
+ return;
+ }
+
+// manual port
+public static class MinMaxLocResult {
+ public double minVal;
+ public double maxVal;
+ public Point minLoc;
+ public Point maxLoc;
+
+
+ public MinMaxLocResult() {
+ minVal=0; maxVal=0;
+ minLoc=new Point();
+ maxLoc=new Point();
+ }
+}
+
+
+// C++: minMaxLoc(Mat src, double* minVal, double* maxVal=0, Point* minLoc=0, Point* maxLoc=0, InputArray mask=noArray())
+
+
+//javadoc: minMaxLoc(src, mask)
+public static MinMaxLocResult minMaxLoc(Mat src, Mat mask) {
+ MinMaxLocResult res = new MinMaxLocResult();
+ long maskNativeObj=0;
+ if (mask != null) {
+ maskNativeObj=mask.nativeObj;
+ }
+ double resarr[] = n_minMaxLocManual(src.nativeObj, maskNativeObj);
+ res.minVal=resarr[0];
+ res.maxVal=resarr[1];
+ res.minLoc.x=resarr[2];
+ res.minLoc.y=resarr[3];
+ res.maxLoc.x=resarr[4];
+ res.maxLoc.y=resarr[5];
+ return res;
+}
+
+
+//javadoc: minMaxLoc(src)
+public static MinMaxLocResult minMaxLoc(Mat src) {
+ return minMaxLoc(src, null);
+}
+
+
+ // C++: Scalar 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++: 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_NE()
+ private static native boolean useIPP_NE_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)
+ private static native double PSNR_0(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::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_NE(bool flag)
+ private static native void setUseIPP_NE_0(boolean flag);
+private static native double[] n_minMaxLocManual(long src_nativeObj, long mask_nativeObj);
+
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/CvException.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/CvException.java
new file mode 100644
index 0000000..e9241e6
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/CvException.java
@@ -0,0 +1,15 @@
+package org.opencv.core;
+
+public class CvException extends RuntimeException {
+
+ private static final long serialVersionUID = 1L;
+
+ public CvException(String msg) {
+ super(msg);
+ }
+
+ @Override
+ public String toString() {
+ return "CvException [" + super.toString() + "]";
+ }
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/CvType.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/CvType.java
new file mode 100644
index 0000000..748c1cd
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/CvType.java
@@ -0,0 +1,136 @@
+package org.opencv.core;
+
+public final class CvType {
+
+ // type depth constants
+ public static final int
+ CV_8U = 0, CV_8S = 1,
+ CV_16U = 2, CV_16S = 3,
+ CV_32S = 4,
+ CV_32F = 5,
+ CV_64F = 6,
+ CV_USRTYPE1 = 7;
+
+ // predefined type constants
+ public static final int
+ CV_8UC1 = CV_8UC(1), CV_8UC2 = CV_8UC(2), CV_8UC3 = CV_8UC(3), CV_8UC4 = CV_8UC(4),
+ CV_8SC1 = CV_8SC(1), CV_8SC2 = CV_8SC(2), CV_8SC3 = CV_8SC(3), CV_8SC4 = CV_8SC(4),
+ CV_16UC1 = CV_16UC(1), CV_16UC2 = CV_16UC(2), CV_16UC3 = CV_16UC(3), CV_16UC4 = CV_16UC(4),
+ CV_16SC1 = CV_16SC(1), CV_16SC2 = CV_16SC(2), CV_16SC3 = CV_16SC(3), CV_16SC4 = CV_16SC(4),
+ CV_32SC1 = CV_32SC(1), CV_32SC2 = CV_32SC(2), CV_32SC3 = CV_32SC(3), CV_32SC4 = CV_32SC(4),
+ CV_32FC1 = CV_32FC(1), CV_32FC2 = CV_32FC(2), CV_32FC3 = CV_32FC(3), CV_32FC4 = CV_32FC(4),
+ CV_64FC1 = CV_64FC(1), CV_64FC2 = CV_64FC(2), CV_64FC3 = CV_64FC(3), CV_64FC4 = CV_64FC(4);
+
+ private static final int CV_CN_MAX = 512, CV_CN_SHIFT = 3, CV_DEPTH_MAX = (1 << CV_CN_SHIFT);
+
+ public static final int makeType(int depth, int channels) {
+ if (channels <= 0 || channels >= CV_CN_MAX) {
+ throw new java.lang.UnsupportedOperationException(
+ "Channels count should be 1.." + (CV_CN_MAX - 1));
+ }
+ if (depth < 0 || depth >= CV_DEPTH_MAX) {
+ throw new java.lang.UnsupportedOperationException(
+ "Data type depth should be 0.." + (CV_DEPTH_MAX - 1));
+ }
+ return (depth & (CV_DEPTH_MAX - 1)) + ((channels - 1) << CV_CN_SHIFT);
+ }
+
+ public static final int CV_8UC(int ch) {
+ return makeType(CV_8U, ch);
+ }
+
+ public static final int CV_8SC(int ch) {
+ return makeType(CV_8S, ch);
+ }
+
+ public static final int CV_16UC(int ch) {
+ return makeType(CV_16U, ch);
+ }
+
+ public static final int CV_16SC(int ch) {
+ return makeType(CV_16S, ch);
+ }
+
+ public static final int CV_32SC(int ch) {
+ return makeType(CV_32S, ch);
+ }
+
+ public static final int CV_32FC(int ch) {
+ return makeType(CV_32F, ch);
+ }
+
+ public static final int CV_64FC(int ch) {
+ return makeType(CV_64F, ch);
+ }
+
+ public static final int channels(int type) {
+ return (type >> CV_CN_SHIFT) + 1;
+ }
+
+ public static final int depth(int type) {
+ return type & (CV_DEPTH_MAX - 1);
+ }
+
+ public static final boolean isInteger(int type) {
+ return depth(type) < CV_32F;
+ }
+
+ public static final int ELEM_SIZE(int type) {
+ switch (depth(type)) {
+ case CV_8U:
+ case CV_8S:
+ return channels(type);
+ case CV_16U:
+ case CV_16S:
+ return 2 * channels(type);
+ case CV_32S:
+ case CV_32F:
+ return 4 * channels(type);
+ case CV_64F:
+ return 8 * channels(type);
+ default:
+ throw new java.lang.UnsupportedOperationException(
+ "Unsupported CvType value: " + type);
+ }
+ }
+
+ public static final String typeToString(int type) {
+ String s;
+ switch (depth(type)) {
+ case CV_8U:
+ s = "CV_8U";
+ break;
+ case CV_8S:
+ s = "CV_8S";
+ break;
+ case CV_16U:
+ s = "CV_16U";
+ break;
+ case CV_16S:
+ s = "CV_16S";
+ break;
+ case CV_32S:
+ s = "CV_32S";
+ break;
+ case CV_32F:
+ s = "CV_32F";
+ break;
+ case CV_64F:
+ s = "CV_64F";
+ break;
+ case CV_USRTYPE1:
+ s = "CV_USRTYPE1";
+ break;
+ default:
+ throw new java.lang.UnsupportedOperationException(
+ "Unsupported CvType value: " + type);
+ }
+
+ int ch = channels(type);
+ if (ch <= 4)
+ return s + "C" + ch;
+ else
+ return s + "C(" + ch + ")";
+ }
+
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/DMatch.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/DMatch.java
new file mode 100644
index 0000000..db44d9a
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/DMatch.java
@@ -0,0 +1,58 @@
+package org.opencv.core;
+
+//C++: class DMatch
+
+/**
+ * Structure for matching: query descriptor index, train descriptor index, train
+ * image index and distance between descriptors.
+ */
+public class DMatch {
+
+ /**
+ * Query descriptor index.
+ */
+ public int queryIdx;
+ /**
+ * Train descriptor index.
+ */
+ public int trainIdx;
+ /**
+ * Train image index.
+ */
+ public int imgIdx;
+
+ // javadoc: DMatch::distance
+ public float distance;
+
+ // javadoc: DMatch::DMatch()
+ public DMatch() {
+ this(-1, -1, Float.MAX_VALUE);
+ }
+
+ // javadoc: DMatch::DMatch(_queryIdx, _trainIdx, _distance)
+ public DMatch(int _queryIdx, int _trainIdx, float _distance) {
+ queryIdx = _queryIdx;
+ trainIdx = _trainIdx;
+ imgIdx = -1;
+ distance = _distance;
+ }
+
+ // javadoc: DMatch::DMatch(_queryIdx, _trainIdx, _imgIdx, _distance)
+ public DMatch(int _queryIdx, int _trainIdx, int _imgIdx, float _distance) {
+ queryIdx = _queryIdx;
+ trainIdx = _trainIdx;
+ imgIdx = _imgIdx;
+ distance = _distance;
+ }
+
+ public boolean lessThan(DMatch it) {
+ return distance < it.distance;
+ }
+
+ @Override
+ public String toString() {
+ return "DMatch [queryIdx=" + queryIdx + ", trainIdx=" + trainIdx
+ + ", imgIdx=" + imgIdx + ", distance=" + distance + "]";
+ }
+
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/KeyPoint.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/KeyPoint.java
new file mode 100644
index 0000000..de5b215
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/KeyPoint.java
@@ -0,0 +1,83 @@
+package org.opencv.core;
+
+import org.opencv.core.Point;
+
+//javadoc: KeyPoint
+public class KeyPoint {
+
+ /**
+ * Coordinates of the keypoint.
+ */
+ public Point pt;
+ /**
+ * Diameter of the useful keypoint adjacent area.
+ */
+ public float size;
+ /**
+ * Computed orientation of the keypoint (-1 if not applicable).
+ */
+ public float angle;
+ /**
+ * The response, by which the strongest keypoints have been selected. Can
+ * be used for further sorting or subsampling.
+ */
+ public float response;
+ /**
+ * Octave (pyramid layer), from which the keypoint has been extracted.
+ */
+ public int octave;
+ /**
+ * Object ID, that can be used to cluster keypoints by an object they
+ * belong to.
+ */
+ public int class_id;
+
+ // javadoc:KeyPoint::KeyPoint(x,y,_size,_angle,_response,_octave,_class_id)
+ public KeyPoint(float x, float y, float _size, float _angle, float _response, int _octave, int _class_id)
+ {
+ pt = new Point(x, y);
+ size = _size;
+ angle = _angle;
+ response = _response;
+ octave = _octave;
+ class_id = _class_id;
+ }
+
+ // javadoc: KeyPoint::KeyPoint()
+ public KeyPoint()
+ {
+ this(0, 0, 0, -1, 0, 0, -1);
+ }
+
+ // javadoc: KeyPoint::KeyPoint(x, y, _size, _angle, _response, _octave)
+ public KeyPoint(float x, float y, float _size, float _angle, float _response, int _octave)
+ {
+ this(x, y, _size, _angle, _response, _octave, -1);
+ }
+
+ // javadoc: KeyPoint::KeyPoint(x, y, _size, _angle, _response)
+ public KeyPoint(float x, float y, float _size, float _angle, float _response)
+ {
+ this(x, y, _size, _angle, _response, 0, -1);
+ }
+
+ // javadoc: KeyPoint::KeyPoint(x, y, _size, _angle)
+ public KeyPoint(float x, float y, float _size, float _angle)
+ {
+ this(x, y, _size, _angle, 0, 0, -1);
+ }
+
+ // javadoc: KeyPoint::KeyPoint(x, y, _size)
+ public KeyPoint(float x, float y, float _size)
+ {
+ this(x, y, _size, -1, 0, 0, -1);
+ }
+
+ @Override
+ public String toString() {
+ return "KeyPoint [pt=" + pt + ", size=" + size + ", angle=" + angle
+ + ", response=" + response + ", octave=" + octave
+ + ", class_id=" + class_id + "]";
+ }
+
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Mat.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Mat.java
new file mode 100644
index 0000000..c975f0c
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Mat.java
@@ -0,0 +1,1351 @@
+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 rows, int cols, int type, Scalar s)
+ //
+
+ // javadoc: Mat::Mat(rows, cols, type, s)
+ public Mat(int rows, int cols, int type, Scalar s)
+ {
+
+ nativeObj = n_Mat(rows, cols, type, s.val[0], s.val[1], s.val[2], s.val[3]);
+
+ return;
+ }
+
+ //
+ // C++: Mat::Mat(Size size, int type, Scalar s)
+ //
+
+ // javadoc: Mat::Mat(size, type, s)
+ public Mat(Size size, int type, Scalar s)
+ {
+
+ nativeObj = n_Mat(size.width, size.height, type, s.val[0], s.val[1], s.val[2], s.val[3]);
+
+ return;
+ }
+
+ //
+ // C++: Mat::Mat(Mat m, Range rowRange, Range colRange = Range::all())
+ //
+
+ // javadoc: Mat::Mat(m, rowRange, colRange)
+ public Mat(Mat m, Range rowRange, Range colRange)
+ {
+
+ nativeObj = n_Mat(m.nativeObj, rowRange.start, rowRange.end, colRange.start, colRange.end);
+
+ return;
+ }
+
+ // javadoc: Mat::Mat(m, rowRange)
+ public Mat(Mat m, Range rowRange)
+ {
+
+ nativeObj = n_Mat(m.nativeObj, rowRange.start, rowRange.end);
+
+ return;
+ }
+
+ //
+ // C++: Mat::Mat(Mat m, Rect roi)
+ //
+
+ // javadoc: Mat::Mat(m, roi)
+ public Mat(Mat m, Rect roi)
+ {
+
+ nativeObj = n_Mat(m.nativeObj, roi.y, roi.y + roi.height, roi.x, roi.x + roi.width);
+
+ return;
+ }
+
+ //
+ // C++: Mat Mat::adjustROI(int dtop, int dbottom, int dleft, int dright)
+ //
+
+ // javadoc: Mat::adjustROI(dtop, dbottom, dleft, dright)
+ public Mat adjustROI(int dtop, int dbottom, int dleft, int dright)
+ {
+
+ Mat retVal = new Mat(n_adjustROI(nativeObj, dtop, dbottom, dleft, dright));
+
+ return retVal;
+ }
+
+ //
+ // C++: void Mat::assignTo(Mat m, int type = -1)
+ //
+
+ // javadoc: Mat::assignTo(m, type)
+ public void assignTo(Mat m, int type)
+ {
+
+ n_assignTo(nativeObj, m.nativeObj, type);
+
+ return;
+ }
+
+ // javadoc: Mat::assignTo(m)
+ public void assignTo(Mat m)
+ {
+
+ n_assignTo(nativeObj, m.nativeObj);
+
+ return;
+ }
+
+ //
+ // C++: int Mat::channels()
+ //
+
+ // javadoc: Mat::channels()
+ public int channels()
+ {
+
+ int retVal = n_channels(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: int Mat::checkVector(int elemChannels, int depth = -1, bool
+ // requireContinuous = true)
+ //
+
+ // javadoc: Mat::checkVector(elemChannels, depth, requireContinuous)
+ public int checkVector(int elemChannels, int depth, boolean requireContinuous)
+ {
+
+ int retVal = n_checkVector(nativeObj, elemChannels, depth, requireContinuous);
+
+ return retVal;
+ }
+
+ // javadoc: Mat::checkVector(elemChannels, depth)
+ public int checkVector(int elemChannels, int depth)
+ {
+
+ int retVal = n_checkVector(nativeObj, elemChannels, depth);
+
+ return retVal;
+ }
+
+ // javadoc: Mat::checkVector(elemChannels)
+ public int checkVector(int elemChannels)
+ {
+
+ int retVal = n_checkVector(nativeObj, elemChannels);
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::clone()
+ //
+
+ // javadoc: Mat::clone()
+ public Mat clone()
+ {
+
+ Mat retVal = new Mat(n_clone(nativeObj));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::col(int x)
+ //
+
+ // javadoc: Mat::col(x)
+ public Mat col(int x)
+ {
+
+ Mat retVal = new Mat(n_col(nativeObj, x));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::colRange(int startcol, int endcol)
+ //
+
+ // javadoc: Mat::colRange(startcol, endcol)
+ public Mat colRange(int startcol, int endcol)
+ {
+
+ Mat retVal = new Mat(n_colRange(nativeObj, startcol, endcol));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::colRange(Range r)
+ //
+
+ // javadoc: Mat::colRange(r)
+ public Mat colRange(Range r)
+ {
+
+ Mat retVal = new Mat(n_colRange(nativeObj, r.start, r.end));
+
+ return retVal;
+ }
+
+ //
+ // C++: int Mat::dims()
+ //
+
+ // javadoc: Mat::dims()
+ public int dims()
+ {
+
+ int retVal = n_dims(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: int Mat::cols()
+ //
+
+ // javadoc: Mat::cols()
+ public int cols()
+ {
+
+ int retVal = n_cols(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: void Mat::convertTo(Mat& m, int rtype, double alpha = 1, double beta
+ // = 0)
+ //
+
+ // javadoc: Mat::convertTo(m, rtype, alpha, beta)
+ public void convertTo(Mat m, int rtype, double alpha, double beta)
+ {
+
+ n_convertTo(nativeObj, m.nativeObj, rtype, alpha, beta);
+
+ return;
+ }
+
+ // javadoc: Mat::convertTo(m, rtype, alpha)
+ public void convertTo(Mat m, int rtype, double alpha)
+ {
+
+ n_convertTo(nativeObj, m.nativeObj, rtype, alpha);
+
+ return;
+ }
+
+ // javadoc: Mat::convertTo(m, rtype)
+ public void convertTo(Mat m, int rtype)
+ {
+
+ n_convertTo(nativeObj, m.nativeObj, rtype);
+
+ return;
+ }
+
+ //
+ // C++: void Mat::copyTo(Mat& m)
+ //
+
+ // javadoc: Mat::copyTo(m)
+ public void copyTo(Mat m)
+ {
+
+ n_copyTo(nativeObj, m.nativeObj);
+
+ return;
+ }
+
+ //
+ // C++: void Mat::copyTo(Mat& m, Mat mask)
+ //
+
+ // javadoc: Mat::copyTo(m, mask)
+ public void copyTo(Mat m, Mat mask)
+ {
+
+ n_copyTo(nativeObj, m.nativeObj, mask.nativeObj);
+
+ return;
+ }
+
+ //
+ // C++: void Mat::create(int rows, int cols, int type)
+ //
+
+ // javadoc: Mat::create(rows, cols, type)
+ public void create(int rows, int cols, int type)
+ {
+
+ n_create(nativeObj, rows, cols, type);
+
+ return;
+ }
+
+ //
+ // C++: void Mat::create(Size size, int type)
+ //
+
+ // javadoc: Mat::create(size, type)
+ public void create(Size size, int type)
+ {
+
+ n_create(nativeObj, size.width, size.height, type);
+
+ return;
+ }
+
+ //
+ // C++: Mat Mat::cross(Mat m)
+ //
+
+ // javadoc: Mat::cross(m)
+ public Mat cross(Mat m)
+ {
+
+ Mat retVal = new Mat(n_cross(nativeObj, m.nativeObj));
+
+ return retVal;
+ }
+
+ //
+ // C++: long Mat::dataAddr()
+ //
+
+ // javadoc: Mat::dataAddr()
+ public long dataAddr()
+ {
+
+ long retVal = n_dataAddr(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: int Mat::depth()
+ //
+
+ // javadoc: Mat::depth()
+ public int depth()
+ {
+
+ int retVal = n_depth(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::diag(int d = 0)
+ //
+
+ // javadoc: Mat::diag(d)
+ public Mat diag(int d)
+ {
+
+ Mat retVal = new Mat(n_diag(nativeObj, d));
+
+ return retVal;
+ }
+
+ // javadoc: Mat::diag()
+ public Mat diag()
+ {
+
+ Mat retVal = new Mat(n_diag(nativeObj, 0));
+
+ return retVal;
+ }
+
+ //
+ // C++: static Mat Mat::diag(Mat d)
+ //
+
+ // javadoc: Mat::diag(d)
+ public static Mat diag(Mat d)
+ {
+
+ Mat retVal = new Mat(n_diag(d.nativeObj));
+
+ return retVal;
+ }
+
+ //
+ // C++: double Mat::dot(Mat m)
+ //
+
+ // javadoc: Mat::dot(m)
+ public double dot(Mat m)
+ {
+
+ double retVal = n_dot(nativeObj, m.nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: size_t Mat::elemSize()
+ //
+
+ // javadoc: Mat::elemSize()
+ public long elemSize()
+ {
+
+ long retVal = n_elemSize(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: size_t Mat::elemSize1()
+ //
+
+ // javadoc: Mat::elemSize1()
+ public long elemSize1()
+ {
+
+ long retVal = n_elemSize1(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: bool Mat::empty()
+ //
+
+ // javadoc: Mat::empty()
+ public boolean empty()
+ {
+
+ boolean retVal = n_empty(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: static Mat Mat::eye(int rows, int cols, int type)
+ //
+
+ // javadoc: Mat::eye(rows, cols, type)
+ public static Mat eye(int rows, int cols, int type)
+ {
+
+ Mat retVal = new Mat(n_eye(rows, cols, type));
+
+ return retVal;
+ }
+
+ //
+ // C++: static Mat Mat::eye(Size size, int type)
+ //
+
+ // javadoc: Mat::eye(size, type)
+ public static Mat eye(Size size, int type)
+ {
+
+ Mat retVal = new Mat(n_eye(size.width, size.height, type));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::inv(int method = DECOMP_LU)
+ //
+
+ // javadoc: Mat::inv(method)
+ public Mat inv(int method)
+ {
+
+ Mat retVal = new Mat(n_inv(nativeObj, method));
+
+ return retVal;
+ }
+
+ // javadoc: Mat::inv()
+ public Mat inv()
+ {
+
+ Mat retVal = new Mat(n_inv(nativeObj));
+
+ return retVal;
+ }
+
+ //
+ // C++: bool Mat::isContinuous()
+ //
+
+ // javadoc: Mat::isContinuous()
+ public boolean isContinuous()
+ {
+
+ boolean retVal = n_isContinuous(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: bool Mat::isSubmatrix()
+ //
+
+ // javadoc: Mat::isSubmatrix()
+ public boolean isSubmatrix()
+ {
+
+ boolean retVal = n_isSubmatrix(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: void Mat::locateROI(Size wholeSize, Point ofs)
+ //
+
+ // javadoc: Mat::locateROI(wholeSize, ofs)
+ public void locateROI(Size wholeSize, Point ofs)
+ {
+ double[] wholeSize_out = new double[2];
+ double[] ofs_out = new double[2];
+ locateROI_0(nativeObj, wholeSize_out, ofs_out);
+ if(wholeSize!=null){ wholeSize.width = wholeSize_out[0]; wholeSize.height = wholeSize_out[1]; }
+ if(ofs!=null){ ofs.x = ofs_out[0]; ofs.y = ofs_out[1]; }
+ return;
+ }
+
+ //
+ // C++: Mat Mat::mul(Mat m, double scale = 1)
+ //
+
+ // javadoc: Mat::mul(m, scale)
+ public Mat mul(Mat m, double scale)
+ {
+
+ Mat retVal = new Mat(n_mul(nativeObj, m.nativeObj, scale));
+
+ return retVal;
+ }
+
+ // javadoc: Mat::mul(m)
+ public Mat mul(Mat m)
+ {
+
+ Mat retVal = new Mat(n_mul(nativeObj, m.nativeObj));
+
+ return retVal;
+ }
+
+ //
+ // C++: static Mat Mat::ones(int rows, int cols, int type)
+ //
+
+ // javadoc: Mat::ones(rows, cols, type)
+ public static Mat ones(int rows, int cols, int type)
+ {
+
+ Mat retVal = new Mat(n_ones(rows, cols, type));
+
+ return retVal;
+ }
+
+ //
+ // C++: static Mat Mat::ones(Size size, int type)
+ //
+
+ // javadoc: Mat::ones(size, type)
+ public static Mat ones(Size size, int type)
+ {
+
+ Mat retVal = new Mat(n_ones(size.width, size.height, type));
+
+ return retVal;
+ }
+
+ //
+ // C++: void Mat::push_back(Mat m)
+ //
+
+ // javadoc: Mat::push_back(m)
+ public void push_back(Mat m)
+ {
+
+ n_push_back(nativeObj, m.nativeObj);
+
+ return;
+ }
+
+ //
+ // C++: void Mat::release()
+ //
+
+ // javadoc: Mat::release()
+ public void release()
+ {
+
+ n_release(nativeObj);
+
+ return;
+ }
+
+ //
+ // C++: Mat Mat::reshape(int cn, int rows = 0)
+ //
+
+ // javadoc: Mat::reshape(cn, rows)
+ public Mat reshape(int cn, int rows)
+ {
+
+ Mat retVal = new Mat(n_reshape(nativeObj, cn, rows));
+
+ return retVal;
+ }
+
+ // javadoc: Mat::reshape(cn)
+ public Mat reshape(int cn)
+ {
+
+ Mat retVal = new Mat(n_reshape(nativeObj, cn));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::row(int y)
+ //
+
+ // javadoc: Mat::row(y)
+ public Mat row(int y)
+ {
+
+ Mat retVal = new Mat(n_row(nativeObj, y));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::rowRange(int startrow, int endrow)
+ //
+
+ // javadoc: Mat::rowRange(startrow, endrow)
+ public Mat rowRange(int startrow, int endrow)
+ {
+
+ Mat retVal = new Mat(n_rowRange(nativeObj, startrow, endrow));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::rowRange(Range r)
+ //
+
+ // javadoc: Mat::rowRange(r)
+ public Mat rowRange(Range r)
+ {
+
+ Mat retVal = new Mat(n_rowRange(nativeObj, r.start, r.end));
+
+ return retVal;
+ }
+
+ //
+ // C++: int Mat::rows()
+ //
+
+ // javadoc: Mat::rows()
+ public int rows()
+ {
+
+ int retVal = n_rows(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::operator =(Scalar s)
+ //
+
+ // javadoc: Mat::operator =(s)
+ public Mat setTo(Scalar s)
+ {
+
+ Mat retVal = new Mat(n_setTo(nativeObj, s.val[0], s.val[1], s.val[2], s.val[3]));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::setTo(Scalar value, Mat mask = Mat())
+ //
+
+ // javadoc: Mat::setTo(value, mask)
+ public Mat setTo(Scalar value, Mat mask)
+ {
+
+ Mat retVal = new Mat(n_setTo(nativeObj, value.val[0], value.val[1], value.val[2], value.val[3], mask.nativeObj));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::setTo(Mat value, Mat mask = Mat())
+ //
+
+ // javadoc: Mat::setTo(value, mask)
+ public Mat setTo(Mat value, Mat mask)
+ {
+
+ Mat retVal = new Mat(n_setTo(nativeObj, value.nativeObj, mask.nativeObj));
+
+ return retVal;
+ }
+
+ // javadoc: Mat::setTo(value)
+ public Mat setTo(Mat value)
+ {
+
+ Mat retVal = new Mat(n_setTo(nativeObj, value.nativeObj));
+
+ return retVal;
+ }
+
+ //
+ // C++: Size Mat::size()
+ //
+
+ // javadoc: Mat::size()
+ public Size size()
+ {
+
+ Size retVal = new Size(n_size(nativeObj));
+
+ return retVal;
+ }
+
+ //
+ // C++: size_t Mat::step1(int i = 0)
+ //
+
+ // javadoc: Mat::step1(i)
+ public long step1(int i)
+ {
+
+ long retVal = n_step1(nativeObj, i);
+
+ return retVal;
+ }
+
+ // javadoc: Mat::step1()
+ public long step1()
+ {
+
+ long retVal = n_step1(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::operator()(int rowStart, int rowEnd, int colStart, int
+ // colEnd)
+ //
+
+ // javadoc: Mat::operator()(rowStart, rowEnd, colStart, colEnd)
+ public Mat submat(int rowStart, int rowEnd, int colStart, int colEnd)
+ {
+
+ Mat retVal = new Mat(n_submat_rr(nativeObj, rowStart, rowEnd, colStart, colEnd));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::operator()(Range rowRange, Range colRange)
+ //
+
+ // javadoc: Mat::operator()(rowRange, colRange)
+ public Mat submat(Range rowRange, Range colRange)
+ {
+
+ Mat retVal = new Mat(n_submat_rr(nativeObj, rowRange.start, rowRange.end, colRange.start, colRange.end));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::operator()(Rect roi)
+ //
+
+ // javadoc: Mat::operator()(roi)
+ public Mat submat(Rect roi)
+ {
+
+ Mat retVal = new Mat(n_submat(nativeObj, roi.x, roi.y, roi.width, roi.height));
+
+ return retVal;
+ }
+
+ //
+ // C++: Mat Mat::t()
+ //
+
+ // javadoc: Mat::t()
+ public Mat t()
+ {
+
+ Mat retVal = new Mat(n_t(nativeObj));
+
+ return retVal;
+ }
+
+ //
+ // C++: size_t Mat::total()
+ //
+
+ // javadoc: Mat::total()
+ public long total()
+ {
+
+ long retVal = n_total(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: int Mat::type()
+ //
+
+ // javadoc: Mat::type()
+ public int type()
+ {
+
+ int retVal = n_type(nativeObj);
+
+ return retVal;
+ }
+
+ //
+ // C++: static Mat Mat::zeros(int rows, int cols, int type)
+ //
+
+ // javadoc: Mat::zeros(rows, cols, type)
+ public static Mat zeros(int rows, int cols, int type)
+ {
+
+ Mat retVal = new Mat(n_zeros(rows, cols, type));
+
+ return retVal;
+ }
+
+ //
+ // C++: static Mat Mat::zeros(Size size, int type)
+ //
+
+ // javadoc: Mat::zeros(size, type)
+ public static Mat zeros(Size size, int type)
+ {
+
+ Mat retVal = new Mat(n_zeros(size.width, size.height, type));
+
+ return retVal;
+ }
+
+ @Override
+ protected void finalize() throws Throwable {
+ n_delete(nativeObj);
+ super.finalize();
+ }
+
+ // javadoc:Mat::toString()
+ @Override
+ public String toString() {
+ return "Mat [ " +
+ rows() + "*" + cols() + "*" + CvType.typeToString(type()) +
+ ", isCont=" + isContinuous() + ", isSubmat=" + isSubmatrix() +
+ ", nativeObj=0x" + Long.toHexString(nativeObj) +
+ ", dataAddr=0x" + Long.toHexString(dataAddr()) +
+ " ]";
+ }
+
+ // javadoc:Mat::dump()
+ public String dump() {
+ return nDump(nativeObj);
+ }
+
+ // javadoc:Mat::put(row,col,data)
+ public int put(int row, int col, double... data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ return nPutD(nativeObj, row, col, data.length, data);
+ }
+
+ // javadoc:Mat::put(row,col,data)
+ public int put(int row, int col, float[] data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ if (CvType.depth(t) == CvType.CV_32F) {
+ return nPutF(nativeObj, row, col, data.length, data);
+ }
+ throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+ }
+
+ // javadoc:Mat::put(row,col,data)
+ public int put(int row, int col, int[] data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ if (CvType.depth(t) == CvType.CV_32S) {
+ return nPutI(nativeObj, row, col, data.length, data);
+ }
+ throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+ }
+
+ // javadoc:Mat::put(row,col,data)
+ public int put(int row, int col, short[] data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ if (CvType.depth(t) == CvType.CV_16U || CvType.depth(t) == CvType.CV_16S) {
+ return nPutS(nativeObj, row, col, data.length, data);
+ }
+ throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+ }
+
+ // javadoc:Mat::put(row,col,data)
+ public int put(int row, int col, byte[] data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ if (CvType.depth(t) == CvType.CV_8U || CvType.depth(t) == CvType.CV_8S) {
+ return nPutB(nativeObj, row, col, data.length, data);
+ }
+ throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+ }
+
+ // javadoc:Mat::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::get(row,col,data)
+ public int get(int row, int col, byte[] data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ if (CvType.depth(t) == CvType.CV_8U || CvType.depth(t) == CvType.CV_8S) {
+ return nGetB(nativeObj, row, col, data.length, data);
+ }
+ throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+ }
+
+ // javadoc:Mat::get(row,col,data)
+ public int get(int row, int col, short[] data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ if (CvType.depth(t) == CvType.CV_16U || CvType.depth(t) == CvType.CV_16S) {
+ return nGetS(nativeObj, row, col, data.length, data);
+ }
+ throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+ }
+
+ // javadoc:Mat::get(row,col,data)
+ public int get(int row, int col, int[] data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ if (CvType.depth(t) == CvType.CV_32S) {
+ return nGetI(nativeObj, row, col, data.length, data);
+ }
+ throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+ }
+
+ // javadoc:Mat::get(row,col,data)
+ public int get(int row, int col, float[] data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ if (CvType.depth(t) == CvType.CV_32F) {
+ return nGetF(nativeObj, row, col, data.length, data);
+ }
+ throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+ }
+
+ // javadoc:Mat::get(row,col,data)
+ public int get(int row, int col, double[] data) {
+ int t = type();
+ if (data == null || data.length % CvType.channels(t) != 0)
+ throw new java.lang.UnsupportedOperationException(
+ "Provided data element number (" +
+ (data == null ? 0 : data.length) +
+ ") should be multiple of the Mat channels count (" +
+ CvType.channels(t) + ")");
+ if (CvType.depth(t) == CvType.CV_64F) {
+ return nGetD(nativeObj, row, col, data.length, data);
+ }
+ throw new java.lang.UnsupportedOperationException("Mat data type is not compatible: " + t);
+ }
+
+ // javadoc:Mat::get(row,col)
+ public double[] get(int row, int col) {
+ return nGet(nativeObj, row, col);
+ }
+
+ // javadoc:Mat::height()
+ public int height() {
+ return rows();
+ }
+
+ // javadoc:Mat::width()
+ public int width() {
+ return cols();
+ }
+
+ // javadoc:Mat::getNativeObjAddr()
+ public long getNativeObjAddr() {
+ return nativeObj;
+ }
+
+ // C++: Mat::Mat()
+ private static native long n_Mat();
+
+ // C++: Mat::Mat(int rows, int cols, int type)
+ private static native long n_Mat(int rows, int cols, int type);
+
+ // C++: Mat::Mat(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(Mat m, Range rowRange, Range colRange = Range::all())
+ private static native long n_Mat(long m_nativeObj, int rowRange_start, int rowRange_end, int colRange_start, int colRange_end);
+
+ private static native long n_Mat(long m_nativeObj, int rowRange_start, int rowRange_end);
+
+ // C++: Mat Mat::adjustROI(int dtop, int dbottom, int dleft, int dright)
+ private static native long n_adjustROI(long nativeObj, int dtop, int dbottom, int dleft, int dright);
+
+ // C++: void Mat::assignTo(Mat m, int type = -1)
+ private static native void n_assignTo(long nativeObj, long m_nativeObj, int type);
+
+ private static native void n_assignTo(long nativeObj, long m_nativeObj);
+
+ // C++: int Mat::channels()
+ private static native int n_channels(long nativeObj);
+
+ // C++: int Mat::checkVector(int elemChannels, int depth = -1, bool
+ // requireContinuous = true)
+ private static native int n_checkVector(long nativeObj, int elemChannels, int depth, boolean requireContinuous);
+
+ private static native int n_checkVector(long nativeObj, int elemChannels, int depth);
+
+ private static native int n_checkVector(long nativeObj, int elemChannels);
+
+ // C++: Mat Mat::clone()
+ private static native long n_clone(long nativeObj);
+
+ // C++: Mat Mat::col(int x)
+ private static native long n_col(long nativeObj, int x);
+
+ // C++: Mat Mat::colRange(int startcol, int endcol)
+ private static native long n_colRange(long nativeObj, int startcol, int endcol);
+
+ // C++: int Mat::dims()
+ private static native int n_dims(long nativeObj);
+
+ // C++: int Mat::cols()
+ private static native int n_cols(long nativeObj);
+
+ // C++: void Mat::convertTo(Mat& m, int rtype, double alpha = 1, double beta
+ // = 0)
+ private static native void n_convertTo(long nativeObj, long m_nativeObj, int rtype, double alpha, double beta);
+
+ private static native void n_convertTo(long nativeObj, long m_nativeObj, int rtype, double alpha);
+
+ private static native void n_convertTo(long nativeObj, long m_nativeObj, int rtype);
+
+ // C++: void Mat::copyTo(Mat& m)
+ private static native void n_copyTo(long nativeObj, long m_nativeObj);
+
+ // C++: void Mat::copyTo(Mat& m, Mat mask)
+ private static native void n_copyTo(long nativeObj, long m_nativeObj, long mask_nativeObj);
+
+ // C++: void Mat::create(int rows, int cols, int type)
+ private static native void n_create(long nativeObj, int rows, int cols, int type);
+
+ // C++: void Mat::create(Size size, int type)
+ private static native void n_create(long nativeObj, double size_width, double size_height, int type);
+
+ // C++: Mat Mat::cross(Mat m)
+ private static native long n_cross(long nativeObj, long m_nativeObj);
+
+ // C++: long Mat::dataAddr()
+ private static native long n_dataAddr(long nativeObj);
+
+ // C++: int Mat::depth()
+ private static native int n_depth(long nativeObj);
+
+ // C++: Mat Mat::diag(int d = 0)
+ private static native long n_diag(long nativeObj, int d);
+
+ // C++: static Mat Mat::diag(Mat d)
+ private static native long n_diag(long d_nativeObj);
+
+ // C++: double Mat::dot(Mat m)
+ private static native double n_dot(long nativeObj, long m_nativeObj);
+
+ // C++: size_t Mat::elemSize()
+ private static native long n_elemSize(long nativeObj);
+
+ // C++: size_t Mat::elemSize1()
+ private static native long n_elemSize1(long nativeObj);
+
+ // C++: bool Mat::empty()
+ private static native boolean n_empty(long nativeObj);
+
+ // C++: static Mat Mat::eye(int rows, int cols, int type)
+ private static native long n_eye(int rows, int cols, int type);
+
+ // C++: static Mat Mat::eye(Size size, int type)
+ private static native long n_eye(double size_width, double size_height, int type);
+
+ // C++: Mat Mat::inv(int method = DECOMP_LU)
+ private static native long n_inv(long nativeObj, int method);
+
+ private static native long n_inv(long nativeObj);
+
+ // C++: bool Mat::isContinuous()
+ private static native boolean n_isContinuous(long nativeObj);
+
+ // C++: bool Mat::isSubmatrix()
+ private static native boolean n_isSubmatrix(long nativeObj);
+
+ // C++: void Mat::locateROI(Size wholeSize, Point ofs)
+ private static native void locateROI_0(long nativeObj, double[] wholeSize_out, double[] ofs_out);
+
+ // C++: Mat Mat::mul(Mat m, double scale = 1)
+ private static native long n_mul(long nativeObj, long m_nativeObj, double scale);
+
+ private static native long n_mul(long nativeObj, long m_nativeObj);
+
+ // C++: static Mat Mat::ones(int rows, int cols, int type)
+ private static native long n_ones(int rows, int cols, int type);
+
+ // C++: static Mat Mat::ones(Size size, int type)
+ private static native long n_ones(double size_width, double size_height, int type);
+
+ // C++: void Mat::push_back(Mat m)
+ private static native void n_push_back(long nativeObj, long m_nativeObj);
+
+ // C++: void Mat::release()
+ private static native void n_release(long nativeObj);
+
+ // C++: Mat Mat::reshape(int cn, int rows = 0)
+ private static native long n_reshape(long nativeObj, int cn, int rows);
+
+ private static native long n_reshape(long nativeObj, int cn);
+
+ // C++: Mat Mat::row(int y)
+ private static native long n_row(long nativeObj, int y);
+
+ // C++: Mat Mat::rowRange(int startrow, int endrow)
+ private static native long n_rowRange(long nativeObj, int startrow, int endrow);
+
+ // C++: int Mat::rows()
+ private static native int n_rows(long nativeObj);
+
+ // C++: Mat Mat::operator =(Scalar s)
+ private static native long n_setTo(long nativeObj, double s_val0, double s_val1, double s_val2, double s_val3);
+
+ // C++: Mat Mat::setTo(Scalar value, Mat mask = Mat())
+ private static native long n_setTo(long nativeObj, double s_val0, double s_val1, double s_val2, double s_val3, long mask_nativeObj);
+
+ // C++: Mat Mat::setTo(Mat value, Mat mask = Mat())
+ private static native long n_setTo(long nativeObj, long value_nativeObj, long mask_nativeObj);
+
+ private static native long n_setTo(long nativeObj, long value_nativeObj);
+
+ // C++: Size Mat::size()
+ private static native double[] n_size(long nativeObj);
+
+ // C++: size_t Mat::step1(int i = 0)
+ private static native long n_step1(long nativeObj, int i);
+
+ private static native long n_step1(long nativeObj);
+
+ // C++: Mat Mat::operator()(Range rowRange, Range colRange)
+ private static native long n_submat_rr(long nativeObj, int rowRange_start, int rowRange_end, int colRange_start, int colRange_end);
+
+ // C++: Mat Mat::operator()(Rect roi)
+ private static native long n_submat(long nativeObj, int roi_x, int roi_y, int roi_width, int roi_height);
+
+ // C++: Mat Mat::t()
+ private static native long n_t(long nativeObj);
+
+ // C++: size_t Mat::total()
+ private static native long n_total(long nativeObj);
+
+ // C++: int Mat::type()
+ private static native int n_type(long nativeObj);
+
+ // C++: static Mat Mat::zeros(int rows, int cols, int type)
+ private static native long n_zeros(int rows, int cols, int type);
+
+ // C++: static Mat Mat::zeros(Size size, int type)
+ private static native long n_zeros(double size_width, double size_height, int type);
+
+ // native support for java finalize()
+ private static native void n_delete(long nativeObj);
+
+ private static native int nPutD(long self, int row, int col, int count, double[] data);
+
+ private static native int nPutF(long self, int row, int col, int count, float[] data);
+
+ private static native int nPutI(long self, int row, int col, int count, int[] data);
+
+ private static native int nPutS(long self, int row, int col, int count, short[] data);
+
+ private static native int nPutB(long self, int row, int col, int count, byte[] data);
+
+ private static native int nPutBwOffset(long self, int row, int col, 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 nGetS(long self, int row, int col, int count, short[] vals);
+
+ private static native int nGetI(long self, int row, int col, int count, int[] vals);
+
+ private static native int nGetF(long self, int row, int col, int count, float[] vals);
+
+ private static native int nGetD(long self, int row, int col, int count, double[] vals);
+
+ private static native double[] nGet(long self, int row, int col);
+
+ private static native String nDump(long self);
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfByte.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfByte.java
new file mode 100644
index 0000000..eb928fb
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfByte.java
@@ -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 lb) {
+ if(lb==null || lb.size()==0)
+ return;
+ Byte ab[] = lb.toArray(new Byte[0]);
+ byte a[] = new byte[ab.length];
+ for(int i=0; i toList() {
+ byte[] a = toArray();
+ Byte ab[] = new Byte[a.length];
+ for(int i=0; i0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+
+ public void fromArray(DMatch...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length;
+ alloc(num);
+ float buff[] = new float[num * _channels];
+ for(int i=0; i ldm) {
+ DMatch adm[] = ldm.toArray(new DMatch[0]);
+ fromArray(adm);
+ }
+
+ public List toList() {
+ DMatch[] adm = toArray();
+ return Arrays.asList(adm);
+ }
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfDouble.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfDouble.java
new file mode 100644
index 0000000..1a8e23c
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfDouble.java
@@ -0,0 +1,79 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class MatOfDouble extends Mat {
+ // 64FC(x)
+ private static final int _depth = CvType.CV_64F;
+ private static final int _channels = 1;
+
+ public MatOfDouble() {
+ super();
+ }
+
+ protected MatOfDouble(long addr) {
+ super(addr);
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public static MatOfDouble fromNativeAddr(long addr) {
+ return new MatOfDouble(addr);
+ }
+
+ public MatOfDouble(Mat m) {
+ super(m, Range.all());
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public MatOfDouble(double...a) {
+ super();
+ fromArray(a);
+ }
+
+ public void alloc(int elemNumber) {
+ if(elemNumber>0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(double...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length / _channels;
+ alloc(num);
+ put(0, 0, a); //TODO: check ret val!
+ }
+
+ public double[] toArray() {
+ int num = checkVector(_channels, _depth);
+ if(num < 0)
+ throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
+ double[] a = new double[num * _channels];
+ if(num == 0)
+ return a;
+ get(0, 0, a); //TODO: check ret val!
+ return a;
+ }
+
+ public void fromList(List lb) {
+ if(lb==null || lb.size()==0)
+ return;
+ Double ab[] = lb.toArray(new Double[0]);
+ double a[] = new double[ab.length];
+ for(int i=0; i toList() {
+ double[] a = toArray();
+ Double ab[] = new Double[a.length];
+ for(int i=0; i0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(float...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length / _channels;
+ alloc(num);
+ put(0, 0, a); //TODO: check ret val!
+ }
+
+ public float[] toArray() {
+ int num = checkVector(_channels, _depth);
+ if(num < 0)
+ throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
+ float[] a = new float[num * _channels];
+ if(num == 0)
+ return a;
+ get(0, 0, a); //TODO: check ret val!
+ return a;
+ }
+
+ public void fromList(List lb) {
+ if(lb==null || lb.size()==0)
+ return;
+ Float ab[] = lb.toArray(new Float[0]);
+ float a[] = new float[ab.length];
+ for(int i=0; i toList() {
+ float[] a = toArray();
+ Float ab[] = new Float[a.length];
+ for(int i=0; i0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(float...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length / _channels;
+ alloc(num);
+ put(0, 0, a); //TODO: check ret val!
+ }
+
+ public float[] toArray() {
+ int num = checkVector(_channels, _depth);
+ if(num < 0)
+ throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
+ float[] a = new float[num * _channels];
+ if(num == 0)
+ return a;
+ get(0, 0, a); //TODO: check ret val!
+ return a;
+ }
+
+ public void fromList(List lb) {
+ if(lb==null || lb.size()==0)
+ return;
+ Float ab[] = lb.toArray(new Float[0]);
+ float a[] = new float[ab.length];
+ for(int i=0; i toList() {
+ float[] a = toArray();
+ Float ab[] = new Float[a.length];
+ for(int i=0; i0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(float...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length / _channels;
+ alloc(num);
+ put(0, 0, a); //TODO: check ret val!
+ }
+
+ public float[] toArray() {
+ int num = checkVector(_channels, _depth);
+ if(num < 0)
+ throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
+ float[] a = new float[num * _channels];
+ if(num == 0)
+ return a;
+ get(0, 0, a); //TODO: check ret val!
+ return a;
+ }
+
+ public void fromList(List lb) {
+ if(lb==null || lb.size()==0)
+ return;
+ Float ab[] = lb.toArray(new Float[0]);
+ float a[] = new float[ab.length];
+ for(int i=0; i toList() {
+ float[] a = toArray();
+ Float ab[] = new Float[a.length];
+ for(int i=0; i0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(int...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length / _channels;
+ alloc(num);
+ put(0, 0, a); //TODO: check ret val!
+ }
+
+ public int[] toArray() {
+ int num = checkVector(_channels, _depth);
+ if(num < 0)
+ throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
+ int[] a = new int[num * _channels];
+ if(num == 0)
+ return a;
+ get(0, 0, a); //TODO: check ret val!
+ return a;
+ }
+
+ public void fromList(List lb) {
+ if(lb==null || lb.size()==0)
+ return;
+ Integer ab[] = lb.toArray(new Integer[0]);
+ int a[] = new int[ab.length];
+ for(int i=0; i toList() {
+ int[] a = toArray();
+ Integer ab[] = new Integer[a.length];
+ for(int i=0; i0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(int...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length / _channels;
+ alloc(num);
+ put(0, 0, a); //TODO: check ret val!
+ }
+
+ public int[] toArray() {
+ int num = checkVector(_channels, _depth);
+ if(num < 0)
+ throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
+ int[] a = new int[num * _channels];
+ if(num == 0)
+ return a;
+ get(0, 0, a); //TODO: check ret val!
+ return a;
+ }
+
+ public void fromList(List lb) {
+ if(lb==null || lb.size()==0)
+ return;
+ Integer ab[] = lb.toArray(new Integer[0]);
+ int a[] = new int[ab.length];
+ for(int i=0; i toList() {
+ int[] a = toArray();
+ Integer ab[] = new Integer[a.length];
+ for(int i=0; i0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(KeyPoint...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length;
+ alloc(num);
+ float buff[] = new float[num * _channels];
+ for(int i=0; i lkp) {
+ KeyPoint akp[] = lkp.toArray(new KeyPoint[0]);
+ fromArray(akp);
+ }
+
+ public List toList() {
+ KeyPoint[] akp = toArray();
+ return Arrays.asList(akp);
+ }
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfPoint.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfPoint.java
new file mode 100644
index 0000000..f4d573b
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfPoint.java
@@ -0,0 +1,78 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class MatOfPoint extends Mat {
+ // 32SC2
+ private static final int _depth = CvType.CV_32S;
+ private static final int _channels = 2;
+
+ public MatOfPoint() {
+ super();
+ }
+
+ protected MatOfPoint(long addr) {
+ super(addr);
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public static MatOfPoint fromNativeAddr(long addr) {
+ return new MatOfPoint(addr);
+ }
+
+ public MatOfPoint(Mat m) {
+ super(m, Range.all());
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public MatOfPoint(Point...a) {
+ super();
+ fromArray(a);
+ }
+
+ public void alloc(int elemNumber) {
+ if(elemNumber>0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(Point...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length;
+ alloc(num);
+ int buff[] = new int[num * _channels];
+ for(int i=0; i lp) {
+ Point ap[] = lp.toArray(new Point[0]);
+ fromArray(ap);
+ }
+
+ public List toList() {
+ Point[] ap = toArray();
+ return Arrays.asList(ap);
+ }
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfPoint2f.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfPoint2f.java
new file mode 100644
index 0000000..4b8c926
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfPoint2f.java
@@ -0,0 +1,78 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class MatOfPoint2f extends Mat {
+ // 32FC2
+ private static final int _depth = CvType.CV_32F;
+ private static final int _channels = 2;
+
+ public MatOfPoint2f() {
+ super();
+ }
+
+ protected MatOfPoint2f(long addr) {
+ super(addr);
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public static MatOfPoint2f fromNativeAddr(long addr) {
+ return new MatOfPoint2f(addr);
+ }
+
+ public MatOfPoint2f(Mat m) {
+ super(m, Range.all());
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public MatOfPoint2f(Point...a) {
+ super();
+ fromArray(a);
+ }
+
+ public void alloc(int elemNumber) {
+ if(elemNumber>0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(Point...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length;
+ alloc(num);
+ float buff[] = new float[num * _channels];
+ for(int i=0; i lp) {
+ Point ap[] = lp.toArray(new Point[0]);
+ fromArray(ap);
+ }
+
+ public List toList() {
+ Point[] ap = toArray();
+ return Arrays.asList(ap);
+ }
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfPoint3.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfPoint3.java
new file mode 100644
index 0000000..3b50561
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfPoint3.java
@@ -0,0 +1,79 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class MatOfPoint3 extends Mat {
+ // 32SC3
+ private static final int _depth = CvType.CV_32S;
+ private static final int _channels = 3;
+
+ public MatOfPoint3() {
+ super();
+ }
+
+ protected MatOfPoint3(long addr) {
+ super(addr);
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public static MatOfPoint3 fromNativeAddr(long addr) {
+ return new MatOfPoint3(addr);
+ }
+
+ public MatOfPoint3(Mat m) {
+ super(m, Range.all());
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public MatOfPoint3(Point3...a) {
+ super();
+ fromArray(a);
+ }
+
+ public void alloc(int elemNumber) {
+ if(elemNumber>0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(Point3...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length;
+ alloc(num);
+ int buff[] = new int[num * _channels];
+ for(int i=0; i lp) {
+ Point3 ap[] = lp.toArray(new Point3[0]);
+ fromArray(ap);
+ }
+
+ public List toList() {
+ Point3[] ap = toArray();
+ return Arrays.asList(ap);
+ }
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfPoint3f.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfPoint3f.java
new file mode 100644
index 0000000..fc5fee4
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfPoint3f.java
@@ -0,0 +1,79 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class MatOfPoint3f extends Mat {
+ // 32FC3
+ private static final int _depth = CvType.CV_32F;
+ private static final int _channels = 3;
+
+ public MatOfPoint3f() {
+ super();
+ }
+
+ protected MatOfPoint3f(long addr) {
+ super(addr);
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public static MatOfPoint3f fromNativeAddr(long addr) {
+ return new MatOfPoint3f(addr);
+ }
+
+ public MatOfPoint3f(Mat m) {
+ super(m, Range.all());
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public MatOfPoint3f(Point3...a) {
+ super();
+ fromArray(a);
+ }
+
+ public void alloc(int elemNumber) {
+ if(elemNumber>0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(Point3...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length;
+ alloc(num);
+ float buff[] = new float[num * _channels];
+ for(int i=0; i lp) {
+ Point3 ap[] = lp.toArray(new Point3[0]);
+ fromArray(ap);
+ }
+
+ public List toList() {
+ Point3[] ap = toArray();
+ return Arrays.asList(ap);
+ }
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfRect.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfRect.java
new file mode 100644
index 0000000..ec0fb01
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfRect.java
@@ -0,0 +1,81 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+
+public class MatOfRect extends Mat {
+ // 32SC4
+ private static final int _depth = CvType.CV_32S;
+ private static final int _channels = 4;
+
+ public MatOfRect() {
+ super();
+ }
+
+ protected MatOfRect(long addr) {
+ super(addr);
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public static MatOfRect fromNativeAddr(long addr) {
+ return new MatOfRect(addr);
+ }
+
+ public MatOfRect(Mat m) {
+ super(m, Range.all());
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public MatOfRect(Rect...a) {
+ super();
+ fromArray(a);
+ }
+
+ public void alloc(int elemNumber) {
+ if(elemNumber>0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(Rect...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length;
+ alloc(num);
+ int buff[] = new int[num * _channels];
+ for(int i=0; i lr) {
+ Rect ap[] = lr.toArray(new Rect[0]);
+ fromArray(ap);
+ }
+
+ public List toList() {
+ Rect[] ar = toArray();
+ return Arrays.asList(ar);
+ }
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfRect2d.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfRect2d.java
new file mode 100644
index 0000000..71c4b1a
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfRect2d.java
@@ -0,0 +1,81 @@
+package org.opencv.core;
+
+import java.util.Arrays;
+import java.util.List;
+
+
+public class MatOfRect2d extends Mat {
+ // 64FC4
+ private static final int _depth = CvType.CV_64F;
+ private static final int _channels = 4;
+
+ public MatOfRect2d() {
+ super();
+ }
+
+ protected MatOfRect2d(long addr) {
+ super(addr);
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public static MatOfRect2d fromNativeAddr(long addr) {
+ return new MatOfRect2d(addr);
+ }
+
+ public MatOfRect2d(Mat m) {
+ super(m, Range.all());
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incompatible Mat");
+ //FIXME: do we need release() here?
+ }
+
+ public MatOfRect2d(Rect2d...a) {
+ super();
+ fromArray(a);
+ }
+
+ public void alloc(int elemNumber) {
+ if(elemNumber>0)
+ super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
+ }
+
+ public void fromArray(Rect2d...a) {
+ if(a==null || a.length==0)
+ return;
+ int num = a.length;
+ alloc(num);
+ double buff[] = new double[num * _channels];
+ for(int i=0; i lr) {
+ Rect2d ap[] = lr.toArray(new Rect2d[0]);
+ fromArray(ap);
+ }
+
+ public List toList() {
+ Rect2d[] ar = toArray();
+ return Arrays.asList(ar);
+ }
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfRotatedRect.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfRotatedRect.java
new file mode 100644
index 0000000..6f36e6c
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/MatOfRotatedRect.java
@@ -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 lr) {
+ RotatedRect ap[] = lr.toArray(new RotatedRect[0]);
+ fromArray(ap);
+ }
+
+ public List toList() {
+ RotatedRect[] ar = toArray();
+ return Arrays.asList(ar);
+ }
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Point.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Point.java
new file mode 100644
index 0000000..ce493d7
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Point.java
@@ -0,0 +1,68 @@
+package org.opencv.core;
+
+//javadoc:Point_
+public class Point {
+
+ public double x, y;
+
+ public Point(double x, double y) {
+ this.x = x;
+ this.y = y;
+ }
+
+ public Point() {
+ this(0, 0);
+ }
+
+ public Point(double[] vals) {
+ this();
+ set(vals);
+ }
+
+ public void set(double[] vals) {
+ if (vals != null) {
+ x = vals.length > 0 ? vals[0] : 0;
+ y = vals.length > 1 ? vals[1] : 0;
+ } else {
+ x = 0;
+ y = 0;
+ }
+ }
+
+ public Point clone() {
+ return new Point(x, y);
+ }
+
+ public double dot(Point p) {
+ return x * p.x + y * p.y;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ long temp;
+ temp = Double.doubleToLongBits(x);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(y);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (!(obj instanceof Point)) return false;
+ Point it = (Point) obj;
+ return x == it.x && y == it.y;
+ }
+
+ public boolean inside(Rect r) {
+ return r.contains(this);
+ }
+
+ @Override
+ public String toString() {
+ return "{" + x + ", " + y + "}";
+ }
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Point3.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Point3.java
new file mode 100644
index 0000000..14b91c6
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Point3.java
@@ -0,0 +1,79 @@
+package org.opencv.core;
+
+//javadoc:Point3_
+public class Point3 {
+
+ public double x, y, z;
+
+ public Point3(double x, double y, double z) {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ }
+
+ public Point3() {
+ this(0, 0, 0);
+ }
+
+ public Point3(Point p) {
+ x = p.x;
+ y = p.y;
+ z = 0;
+ }
+
+ public Point3(double[] vals) {
+ this();
+ set(vals);
+ }
+
+ public void set(double[] vals) {
+ if (vals != null) {
+ x = vals.length > 0 ? vals[0] : 0;
+ y = vals.length > 1 ? vals[1] : 0;
+ z = vals.length > 2 ? vals[2] : 0;
+ } else {
+ x = 0;
+ y = 0;
+ z = 0;
+ }
+ }
+
+ public Point3 clone() {
+ return new Point3(x, y, z);
+ }
+
+ public double dot(Point3 p) {
+ return x * p.x + y * p.y + z * p.z;
+ }
+
+ public Point3 cross(Point3 p) {
+ return new Point3(y * p.z - z * p.y, z * p.x - x * p.z, x * p.y - y * p.x);
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ long temp;
+ temp = Double.doubleToLongBits(x);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(y);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(z);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (!(obj instanceof Point3)) return false;
+ Point3 it = (Point3) obj;
+ return x == it.x && y == it.y && z == it.z;
+ }
+
+ @Override
+ public String toString() {
+ return "{" + x + ", " + y + ", " + z + "}";
+ }
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Range.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Range.java
new file mode 100644
index 0000000..f7eee4d
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Range.java
@@ -0,0 +1,82 @@
+package org.opencv.core;
+
+//javadoc:Range
+public class Range {
+
+ public int start, end;
+
+ public Range(int s, int e) {
+ this.start = s;
+ this.end = e;
+ }
+
+ public Range() {
+ this(0, 0);
+ }
+
+ public Range(double[] vals) {
+ set(vals);
+ }
+
+ public void set(double[] vals) {
+ if (vals != null) {
+ start = vals.length > 0 ? (int) vals[0] : 0;
+ end = vals.length > 1 ? (int) vals[1] : 0;
+ } else {
+ start = 0;
+ end = 0;
+ }
+
+ }
+
+ public int size() {
+ return empty() ? 0 : end - start;
+ }
+
+ public boolean empty() {
+ return end <= start;
+ }
+
+ public static Range all() {
+ return new Range(Integer.MIN_VALUE, Integer.MAX_VALUE);
+ }
+
+ public Range intersection(Range r1) {
+ Range r = new Range(Math.max(r1.start, this.start), Math.min(r1.end, this.end));
+ r.end = Math.max(r.end, r.start);
+ return r;
+ }
+
+ public Range shift(int delta) {
+ return new Range(start + delta, end + delta);
+ }
+
+ public Range clone() {
+ return new Range(start, end);
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ long temp;
+ temp = Double.doubleToLongBits(start);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(end);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (!(obj instanceof Range)) return false;
+ Range it = (Range) obj;
+ return start == it.start && end == it.end;
+ }
+
+ @Override
+ public String toString() {
+ return "[" + start + ", " + end + ")";
+ }
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Rect.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Rect.java
new file mode 100644
index 0000000..c68e818
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Rect.java
@@ -0,0 +1,104 @@
+package org.opencv.core;
+
+//javadoc:Rect_
+public class Rect {
+
+ public int x, y, width, height;
+
+ public Rect(int x, int y, int width, int height) {
+ this.x = x;
+ this.y = y;
+ this.width = width;
+ this.height = height;
+ }
+
+ public Rect() {
+ this(0, 0, 0, 0);
+ }
+
+ public Rect(Point p1, Point p2) {
+ x = (int) (p1.x < p2.x ? p1.x : p2.x);
+ y = (int) (p1.y < p2.y ? p1.y : p2.y);
+ width = (int) (p1.x > p2.x ? p1.x : p2.x) - x;
+ height = (int) (p1.y > p2.y ? p1.y : p2.y) - y;
+ }
+
+ public Rect(Point p, Size s) {
+ this((int) p.x, (int) p.y, (int) s.width, (int) s.height);
+ }
+
+ public Rect(double[] vals) {
+ set(vals);
+ }
+
+ public void set(double[] vals) {
+ if (vals != null) {
+ x = vals.length > 0 ? (int) vals[0] : 0;
+ y = vals.length > 1 ? (int) vals[1] : 0;
+ width = vals.length > 2 ? (int) vals[2] : 0;
+ height = vals.length > 3 ? (int) vals[3] : 0;
+ } else {
+ x = 0;
+ y = 0;
+ width = 0;
+ height = 0;
+ }
+ }
+
+ public Rect clone() {
+ return new Rect(x, y, width, height);
+ }
+
+ public Point tl() {
+ return new Point(x, y);
+ }
+
+ public Point br() {
+ return new Point(x + width, y + height);
+ }
+
+ public Size size() {
+ return new Size(width, height);
+ }
+
+ public double area() {
+ return width * height;
+ }
+
+ public boolean empty() {
+ return width <= 0 || height <= 0;
+ }
+
+ public boolean contains(Point p) {
+ return x <= p.x && p.x < x + width && y <= p.y && p.y < y + height;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ long temp;
+ temp = Double.doubleToLongBits(height);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(width);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(x);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(y);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (!(obj instanceof Rect)) return false;
+ Rect it = (Rect) obj;
+ return x == it.x && y == it.y && width == it.width && height == it.height;
+ }
+
+ @Override
+ public String toString() {
+ return "{" + x + ", " + y + ", " + width + "x" + height + "}";
+ }
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Rect2d.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Rect2d.java
new file mode 100644
index 0000000..4c27869
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Rect2d.java
@@ -0,0 +1,104 @@
+package org.opencv.core;
+
+//javadoc:Rect2d_
+public class Rect2d {
+
+ public double x, y, width, height;
+
+ public Rect2d(double x, double y, double width, double height) {
+ this.x = x;
+ this.y = y;
+ this.width = width;
+ this.height = height;
+ }
+
+ public Rect2d() {
+ this(0, 0, 0, 0);
+ }
+
+ public Rect2d(Point p1, Point p2) {
+ x = (double) (p1.x < p2.x ? p1.x : p2.x);
+ y = (double) (p1.y < p2.y ? p1.y : p2.y);
+ width = (double) (p1.x > p2.x ? p1.x : p2.x) - x;
+ height = (double) (p1.y > p2.y ? p1.y : p2.y) - y;
+ }
+
+ public Rect2d(Point p, Size s) {
+ this((double) p.x, (double) p.y, (double) s.width, (double) s.height);
+ }
+
+ public Rect2d(double[] vals) {
+ set(vals);
+ }
+
+ public void set(double[] vals) {
+ if (vals != null) {
+ x = vals.length > 0 ? (double) vals[0] : 0;
+ y = vals.length > 1 ? (double) vals[1] : 0;
+ width = vals.length > 2 ? (double) vals[2] : 0;
+ height = vals.length > 3 ? (double) vals[3] : 0;
+ } else {
+ x = 0;
+ y = 0;
+ width = 0;
+ height = 0;
+ }
+ }
+
+ public Rect2d clone() {
+ return new Rect2d(x, y, width, height);
+ }
+
+ public Point tl() {
+ return new Point(x, y);
+ }
+
+ public Point br() {
+ return new Point(x + width, y + height);
+ }
+
+ public Size size() {
+ return new Size(width, height);
+ }
+
+ public double area() {
+ return width * height;
+ }
+
+ public boolean empty() {
+ return width <= 0 || height <= 0;
+ }
+
+ public boolean contains(Point p) {
+ return x <= p.x && p.x < x + width && y <= p.y && p.y < y + height;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ long temp;
+ temp = Double.doubleToLongBits(height);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(width);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(x);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(y);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (!(obj instanceof Rect2d)) return false;
+ Rect2d it = (Rect2d) obj;
+ return x == it.x && y == it.y && width == it.width && height == it.height;
+ }
+
+ @Override
+ public String toString() {
+ return "{" + x + ", " + y + ", " + width + "x" + height + "}";
+ }
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/RotatedRect.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/RotatedRect.java
new file mode 100644
index 0000000..f6d1163
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/RotatedRect.java
@@ -0,0 +1,113 @@
+package org.opencv.core;
+
+//javadoc:RotatedRect_
+public class RotatedRect {
+
+ public Point center;
+ public Size size;
+ public double angle;
+
+ public RotatedRect() {
+ this.center = new Point();
+ this.size = new Size();
+ this.angle = 0;
+ }
+
+ public RotatedRect(Point c, Size s, double a) {
+ this.center = c.clone();
+ this.size = s.clone();
+ this.angle = a;
+ }
+
+ public RotatedRect(double[] vals) {
+ this();
+ set(vals);
+ }
+
+ public void set(double[] vals) {
+ if (vals != null) {
+ center.x = vals.length > 0 ? (double) vals[0] : 0;
+ center.y = vals.length > 1 ? (double) vals[1] : 0;
+ size.width = vals.length > 2 ? (double) vals[2] : 0;
+ size.height = vals.length > 3 ? (double) vals[3] : 0;
+ angle = vals.length > 4 ? (double) vals[4] : 0;
+ } else {
+ center.x = 0;
+ center.x = 0;
+ size.width = 0;
+ size.height = 0;
+ angle = 0;
+ }
+ }
+
+ public void points(Point pt[])
+ {
+ double _angle = angle * Math.PI / 180.0;
+ double b = (double) Math.cos(_angle) * 0.5f;
+ double a = (double) Math.sin(_angle) * 0.5f;
+
+ pt[0] = new Point(
+ center.x - a * size.height - b * size.width,
+ center.y + b * size.height - a * size.width);
+
+ pt[1] = new Point(
+ center.x + a * size.height - b * size.width,
+ center.y - b * size.height - a * size.width);
+
+ pt[2] = new Point(
+ 2 * center.x - pt[0].x,
+ 2 * center.y - pt[0].y);
+
+ pt[3] = new Point(
+ 2 * center.x - pt[1].x,
+ 2 * center.y - pt[1].y);
+ }
+
+ public Rect boundingRect()
+ {
+ Point pt[] = new Point[4];
+ points(pt);
+ Rect r = new Rect((int) Math.floor(Math.min(Math.min(Math.min(pt[0].x, pt[1].x), pt[2].x), pt[3].x)),
+ (int) Math.floor(Math.min(Math.min(Math.min(pt[0].y, pt[1].y), pt[2].y), pt[3].y)),
+ (int) Math.ceil(Math.max(Math.max(Math.max(pt[0].x, pt[1].x), pt[2].x), pt[3].x)),
+ (int) Math.ceil(Math.max(Math.max(Math.max(pt[0].y, pt[1].y), pt[2].y), pt[3].y)));
+ r.width -= r.x - 1;
+ r.height -= r.y - 1;
+ return r;
+ }
+
+ public RotatedRect clone() {
+ return new RotatedRect(center, size, angle);
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ long temp;
+ temp = Double.doubleToLongBits(center.x);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(center.y);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(size.width);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(size.height);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(angle);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (!(obj instanceof RotatedRect)) return false;
+ RotatedRect it = (RotatedRect) obj;
+ return center.equals(it.center) && size.equals(it.size) && angle == it.angle;
+ }
+
+ @Override
+ public String toString() {
+ return "{ " + center + " " + size + " * " + angle + " }";
+ }
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Scalar.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Scalar.java
new file mode 100644
index 0000000..01676e4
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Scalar.java
@@ -0,0 +1,90 @@
+package org.opencv.core;
+
+//javadoc:Scalar_
+public class Scalar {
+
+ public double val[];
+
+ public Scalar(double v0, double v1, double v2, double v3) {
+ val = new double[] { v0, v1, v2, v3 };
+ }
+
+ public Scalar(double v0, double v1, double v2) {
+ val = new double[] { v0, v1, v2, 0 };
+ }
+
+ public Scalar(double v0, double v1) {
+ val = new double[] { v0, v1, 0, 0 };
+ }
+
+ public Scalar(double v0) {
+ val = new double[] { v0, 0, 0, 0 };
+ }
+
+ public Scalar(double[] vals) {
+ if (vals != null && vals.length == 4)
+ val = vals.clone();
+ else {
+ val = new double[4];
+ set(vals);
+ }
+ }
+
+ public void set(double[] vals) {
+ if (vals != null) {
+ val[0] = vals.length > 0 ? vals[0] : 0;
+ val[1] = vals.length > 1 ? vals[1] : 0;
+ val[2] = vals.length > 2 ? vals[2] : 0;
+ val[3] = vals.length > 3 ? vals[3] : 0;
+ } else
+ val[0] = val[1] = val[2] = val[3] = 0;
+ }
+
+ public static Scalar all(double v) {
+ return new Scalar(v, v, v, v);
+ }
+
+ public Scalar clone() {
+ return new Scalar(val);
+ }
+
+ public Scalar mul(Scalar it, double scale) {
+ return new Scalar(val[0] * it.val[0] * scale, val[1] * it.val[1] * scale,
+ val[2] * it.val[2] * scale, val[3] * it.val[3] * scale);
+ }
+
+ public Scalar mul(Scalar it) {
+ return mul(it, 1);
+ }
+
+ public Scalar conj() {
+ return new Scalar(val[0], -val[1], -val[2], -val[3]);
+ }
+
+ public boolean isReal() {
+ return val[1] == 0 && val[2] == 0 && val[3] == 0;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + java.util.Arrays.hashCode(val);
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (!(obj instanceof Scalar)) return false;
+ Scalar it = (Scalar) obj;
+ if (!java.util.Arrays.equals(val, it.val)) return false;
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ return "[" + val[0] + ", " + val[1] + ", " + val[2] + ", " + val[3] + "]";
+ }
+
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Size.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Size.java
new file mode 100644
index 0000000..f7d69f3
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/Size.java
@@ -0,0 +1,73 @@
+package org.opencv.core;
+
+//javadoc:Size_
+public class Size {
+
+ public double width, height;
+
+ public Size(double width, double height) {
+ this.width = width;
+ this.height = height;
+ }
+
+ public Size() {
+ this(0, 0);
+ }
+
+ public Size(Point p) {
+ width = p.x;
+ height = p.y;
+ }
+
+ public Size(double[] vals) {
+ set(vals);
+ }
+
+ public void set(double[] vals) {
+ if (vals != null) {
+ width = vals.length > 0 ? vals[0] : 0;
+ height = vals.length > 1 ? vals[1] : 0;
+ } else {
+ width = 0;
+ height = 0;
+ }
+ }
+
+ public double area() {
+ return width * height;
+ }
+
+ public boolean empty() {
+ return width <= 0 || height <= 0;
+ }
+
+ public Size clone() {
+ return new Size(width, height);
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ long temp;
+ temp = Double.doubleToLongBits(height);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(width);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (!(obj instanceof Size)) return false;
+ Size it = (Size) obj;
+ return width == it.width && height == it.height;
+ }
+
+ @Override
+ public String toString() {
+ return (int)width + "x" + (int)height;
+ }
+
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/TermCriteria.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/TermCriteria.java
new file mode 100644
index 0000000..c67e51e
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/TermCriteria.java
@@ -0,0 +1,92 @@
+package org.opencv.core;
+
+//javadoc:TermCriteria
+public class TermCriteria {
+
+ /**
+ * The maximum number of iterations or elements to compute
+ */
+ public static final int COUNT = 1;
+ /**
+ * The maximum number of iterations or elements to compute
+ */
+ public static final int MAX_ITER = COUNT;
+ /**
+ * The desired accuracy threshold or change in parameters at which the iterative algorithm is terminated.
+ */
+ public static final int EPS = 2;
+
+ public int type;
+ public int maxCount;
+ public double epsilon;
+
+ /**
+ * Termination criteria for iterative algorithms.
+ *
+ * @param type
+ * the type of termination criteria: COUNT, EPS or COUNT + EPS.
+ * @param maxCount
+ * the maximum number of iterations/elements.
+ * @param epsilon
+ * the desired accuracy.
+ */
+ public TermCriteria(int type, int maxCount, double epsilon) {
+ this.type = type;
+ this.maxCount = maxCount;
+ this.epsilon = epsilon;
+ }
+
+ /**
+ * Termination criteria for iterative algorithms.
+ */
+ public TermCriteria() {
+ this(0, 0, 0.0);
+ }
+
+ public TermCriteria(double[] vals) {
+ set(vals);
+ }
+
+ public void set(double[] vals) {
+ if (vals != null) {
+ type = vals.length > 0 ? (int) vals[0] : 0;
+ maxCount = vals.length > 1 ? (int) vals[1] : 0;
+ epsilon = vals.length > 2 ? (double) vals[2] : 0;
+ } else {
+ type = 0;
+ maxCount = 0;
+ epsilon = 0;
+ }
+ }
+
+ public TermCriteria clone() {
+ return new TermCriteria(type, maxCount, epsilon);
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ long temp;
+ temp = Double.doubleToLongBits(type);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(maxCount);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(epsilon);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (!(obj instanceof TermCriteria)) return false;
+ TermCriteria it = (TermCriteria) obj;
+ return type == it.type && maxCount == it.maxCount && epsilon == it.epsilon;
+ }
+
+ @Override
+ public String toString() {
+ return "{ type: " + type + ", maxCount: " + maxCount + ", epsilon: " + epsilon + "}";
+ }
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/TickMeter.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/TickMeter.java
new file mode 100644
index 0000000..1ad728d
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/core/TickMeter.java
@@ -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/tflite/android/openCVLibrary343/src/main/java/org/opencv/dnn/DictValue.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/dnn/DictValue.java
new file mode 100644
index 0000000..194429a
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/dnn/DictValue.java
@@ -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/tflite/android/openCVLibrary343/src/main/java/org/opencv/dnn/Dnn.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/dnn/Dnn.java
new file mode 100644
index 0000000..e19af9e
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/dnn/Dnn.java
@@ -0,0 +1,587 @@
+//
+// 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.Scalar;
+import org.opencv.core.Size;
+import org.opencv.dnn.Net;
+import org.opencv.utils.Converters;
+
+// C++: class Dnn
+//javadoc: Dnn
+
+public class Dnn {
+
+ public static final int
+ DNN_BACKEND_DEFAULT = 0,
+ DNN_BACKEND_HALIDE = 1,
+ DNN_BACKEND_INFERENCE_ENGINE = 2,
+ DNN_BACKEND_OPENCV = 3,
+ DNN_TARGET_CPU = 0,
+ DNN_TARGET_OPENCL = 1,
+ DNN_TARGET_OPENCL_FP16 = 2,
+ DNN_TARGET_MYRIAD = 3;
+
+
+ //
+ // C++: Mat cv::dnn::blobFromImage(Mat image, double scalefactor = 1.0, Size size = Size(), Scalar mean = Scalar(), bool swapRB = true, bool crop = true, 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 = true, bool crop = true, int ddepth = CV_32F)
+ //
+
+ //javadoc: blobFromImages(images, scalefactor, size, mean, swapRB, crop, ddepth)
+ public static Mat blobFromImages(List 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 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 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 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 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 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 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::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())
+ //
+
+ //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())
+ //
+
+ //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())
+ //
+
+ //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::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())
+ //
+
+ //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)
+ //
+
+ //javadoc: readNetFromTorch(model, isBinary)
+ public static Net readNetFromTorch(String model, boolean isBinary)
+ {
+
+ Net retVal = new Net(readNetFromTorch_0(model, isBinary));
+
+ return retVal;
+ }
+
+ //javadoc: readNetFromTorch(model)
+ public static Net readNetFromTorch(String model)
+ {
+
+ Net retVal = new Net(readNetFromTorch_1(model));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: 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_RotatedRect bboxes, vector_float scores, float score_threshold, float nms_threshold, vector_int& indices, float eta = 1.f, int top_k = 0)
+ //
+
+ // Unknown type 'vector_RotatedRect' (I), skipping the function
+
+
+ //
+ // C++: void cv::dnn::imagesFromBlob(Mat blob_, vector_Mat& images_)
+ //
+
+ //javadoc: imagesFromBlob(blob_, images_)
+ public static void imagesFromBlob(Mat blob_, List 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::shrinkCaffeModel(String src, String dst, vector_String layersTypes = std::vector())
+ //
+
+ //javadoc: shrinkCaffeModel(src, dst, layersTypes)
+ public static void shrinkCaffeModel(String src, String dst, List 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++: Mat cv::dnn::blobFromImage(Mat image, double scalefactor = 1.0, Size size = Size(), Scalar mean = Scalar(), bool swapRB = true, bool crop = true, 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 = true, bool crop = true, 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::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())
+ 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())
+ 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())
+ 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::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())
+ 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)
+ private static native long readNetFromTorch_0(String model, boolean isBinary);
+ private static native long readNetFromTorch_1(String model);
+
+ // 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::imagesFromBlob(Mat blob_, vector_Mat& images_)
+ private static native void imagesFromBlob_0(long blob__nativeObj, long images__mat_nativeObj);
+
+ // C++: void cv::dnn::shrinkCaffeModel(String src, String dst, vector_String layersTypes = std::vector())
+ private static native void shrinkCaffeModel_0(String src, String dst, List layersTypes);
+ private static native void shrinkCaffeModel_1(String src, String dst);
+
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/dnn/Layer.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/dnn/Layer.java
new file mode 100644
index 0000000..04d6122
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/dnn/Layer.java
@@ -0,0 +1,194 @@
+//
+// 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++: vector_Mat cv::dnn::Layer::finalize(vector_Mat inputs)
+ //
+
+ //javadoc: Layer::finalize(inputs)
+ public List finalize(List inputs)
+ {
+ Mat inputs_mat = Converters.vector_Mat_to_Mat(inputs);
+ List retVal = new ArrayList();
+ Mat retValMat = new Mat(finalize_0(nativeObj, inputs_mat.nativeObj));
+ Converters.Mat_to_vector_Mat(retValMat, retVal);
+ return retVal;
+ }
+
+
+ //
+ // C++: void cv::dnn::Layer::finalize(vector_Mat inputs, vector_Mat& outputs)
+ //
+
+ //javadoc: Layer::finalize(inputs, outputs)
+ public void finalize(List inputs, List outputs)
+ {
+ Mat inputs_mat = Converters.vector_Mat_to_Mat(inputs);
+ Mat outputs_mat = new Mat();
+ finalize_1(nativeObj, inputs_mat.nativeObj, outputs_mat.nativeObj);
+ Converters.Mat_to_vector_Mat(outputs_mat, outputs);
+ outputs_mat.release();
+ return;
+ }
+
+
+ //
+ // C++: void cv::dnn::Layer::run(vector_Mat inputs, vector_Mat& outputs, vector_Mat& internals)
+ //
+
+ //javadoc: Layer::run(inputs, outputs, internals)
+ public void run(List inputs, List outputs, List internals)
+ {
+ Mat inputs_mat = Converters.vector_Mat_to_Mat(inputs);
+ Mat outputs_mat = new Mat();
+ Mat internals_mat = Converters.vector_Mat_to_Mat(internals);
+ run_0(nativeObj, inputs_mat.nativeObj, outputs_mat.nativeObj, internals_mat.nativeObj);
+ Converters.Mat_to_vector_Mat(outputs_mat, outputs);
+ outputs_mat.release();
+ Converters.Mat_to_vector_Mat(internals_mat, internals);
+ internals_mat.release();
+ return;
+ }
+
+
+ //
+ // C++: vector_Mat Layer::blobs
+ //
+
+ //javadoc: Layer::get_blobs()
+ public List get_blobs()
+ {
+ List retVal = new ArrayList();
+ Mat retValMat = new Mat(get_blobs_0(nativeObj));
+ Converters.Mat_to_vector_Mat(retValMat, retVal);
+ return retVal;
+ }
+
+
+ //
+ // C++: void Layer::blobs
+ //
+
+ //javadoc: Layer::set_blobs(blobs)
+ public void set_blobs(List blobs)
+ {
+ Mat blobs_mat = Converters.vector_Mat_to_Mat(blobs);
+ set_blobs_0(nativeObj, blobs_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: String Layer::name
+ //
+
+ //javadoc: Layer::get_name()
+ public String get_name()
+ {
+
+ String retVal = get_name_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: String Layer::type
+ //
+
+ //javadoc: Layer::get_type()
+ public String get_type()
+ {
+
+ String retVal = get_type_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int Layer::preferableTarget
+ //
+
+ //javadoc: Layer::get_preferableTarget()
+ public int get_preferableTarget()
+ {
+
+ int retVal = get_preferableTarget_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: int cv::dnn::Layer::outputNameToIndex(String outputName)
+ private static native int outputNameToIndex_0(long nativeObj, String outputName);
+
+ // C++: vector_Mat cv::dnn::Layer::finalize(vector_Mat inputs)
+ private static native long finalize_0(long nativeObj, long inputs_mat_nativeObj);
+
+ // C++: void cv::dnn::Layer::finalize(vector_Mat inputs, vector_Mat& outputs)
+ private static native void finalize_1(long nativeObj, long inputs_mat_nativeObj, long outputs_mat_nativeObj);
+
+ // C++: void 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/tflite/android/openCVLibrary343/src/main/java/org/opencv/dnn/Net.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/dnn/Net.java
new file mode 100644
index 0000000..e389d96
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/dnn/Net.java
@@ -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 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 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 getLayerNames()
+ {
+
+ List retVal = getLayerNames_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::deleteLayer(LayerId layer)
+ //
+
+ //javadoc: Net::deleteLayer(layer)
+ public void deleteLayer(DictValue layer)
+ {
+
+ deleteLayer_0(nativeObj, layer.getNativeObjAddr());
+
+ 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 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 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 outputBlobs, List 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 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 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 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 netInputShapes);
+
+ // C++: int64 cv::dnn::Net::getFLOPS(vector_MatShape netInputShapes)
+ private static native long getFLOPS_3(long nativeObj, List 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 getLayerNames_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::deleteLayer(LayerId layer)
+ private static native void deleteLayer_0(long nativeObj, long layer_nativeObj);
+
+ // 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 outBlobNames);
+
+ // C++: void cv::dnn::Net::getLayerTypes(vector_String& layersTypes)
+ private static native void getLayerTypes_0(long nativeObj, List 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 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 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/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/AKAZE.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/AKAZE.java
new file mode 100644
index 0000000..42d6507
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/AKAZE.java
@@ -0,0 +1,379 @@
+//
+// 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); }
+
+ public static final int
+ DESCRIPTOR_KAZE_UPRIGHT = 2,
+ DESCRIPTOR_KAZE = 3,
+ DESCRIPTOR_MLDB_UPRIGHT = 4,
+ DESCRIPTOR_MLDB = 5;
+
+
+ //
+ // C++: static Ptr_AKAZE cv::AKAZE::create(int descriptor_type = AKAZE::DESCRIPTOR_MLDB, int descriptor_size = 0, int descriptor_channels = 3, float threshold = 0.001f, int nOctaves = 4, int nOctaveLayers = 4, int diffusivity = KAZE::DIFF_PM_G2)
+ //
+
+ //javadoc: AKAZE::create(descriptor_type, descriptor_size, descriptor_channels, threshold, nOctaves, nOctaveLayers, diffusivity)
+ public static AKAZE create(int descriptor_type, int descriptor_size, int descriptor_channels, float threshold, int nOctaves, int nOctaveLayers, int diffusivity)
+ {
+
+ AKAZE retVal = 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::getDescriptorType()
+ //
+
+ //javadoc: AKAZE::getDescriptorType()
+ public int getDescriptorType()
+ {
+
+ int retVal = getDescriptorType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int cv::AKAZE::getDiffusivity()
+ //
+
+ //javadoc: AKAZE::getDiffusivity()
+ public int getDiffusivity()
+ {
+
+ int retVal = getDiffusivity_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(int dtype)
+ //
+
+ //javadoc: AKAZE::setDescriptorType(dtype)
+ public void setDescriptorType(int dtype)
+ {
+
+ setDescriptorType_0(nativeObj, dtype);
+
+ return;
+ }
+
+
+ //
+ // C++: void cv::AKAZE::setDiffusivity(int 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++: static Ptr_AKAZE cv::AKAZE::create(int descriptor_type = AKAZE::DESCRIPTOR_MLDB, int descriptor_size = 0, int descriptor_channels = 3, float threshold = 0.001f, int nOctaves = 4, int nOctaveLayers = 4, int diffusivity = KAZE::DIFF_PM_G2)
+ private static native long create_0(int descriptor_type, int descriptor_size, int descriptor_channels, float threshold, int nOctaves, int nOctaveLayers, int diffusivity);
+ private static native long create_1(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::getDescriptorType()
+ private static native int getDescriptorType_0(long nativeObj);
+
+ // C++: int cv::AKAZE::getDiffusivity()
+ private static native int getDiffusivity_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(int dtype)
+ private static native void setDescriptorType_0(long nativeObj, int dtype);
+
+ // C++: void cv::AKAZE::setDiffusivity(int 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/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/AgastFeatureDetector.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/AgastFeatureDetector.java
new file mode 100644
index 0000000..f18f0b7
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/AgastFeatureDetector.java
@@ -0,0 +1,205 @@
+//
+// 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); }
+
+ public static final int
+ AGAST_5_8 = 0,
+ AGAST_7_12d = 1,
+ AGAST_7_12s = 2,
+ OAST_9_16 = 3,
+ THRESHOLD = 10000,
+ NONMAX_SUPPRESSION = 10001;
+
+
+ //
+ // C++: static Ptr_AgastFeatureDetector cv::AgastFeatureDetector::create(int threshold = 10, bool nonmaxSuppression = true, int type = AgastFeatureDetector::OAST_9_16)
+ //
+
+ //javadoc: AgastFeatureDetector::create(threshold, nonmaxSuppression, type)
+ public static AgastFeatureDetector create(int threshold, boolean nonmaxSuppression, int type)
+ {
+
+ AgastFeatureDetector retVal = 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++: int cv::AgastFeatureDetector::getType()
+ //
+
+ //javadoc: AgastFeatureDetector::getType()
+ public int getType()
+ {
+
+ int retVal = getType_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(int type)
+ //
+
+ //javadoc: AgastFeatureDetector::setType(type)
+ public void setType(int type)
+ {
+
+ setType_0(nativeObj, type);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: static Ptr_AgastFeatureDetector cv::AgastFeatureDetector::create(int threshold = 10, bool nonmaxSuppression = true, int type = AgastFeatureDetector::OAST_9_16)
+ private static native long create_0(int threshold, boolean nonmaxSuppression, int type);
+ private static native long create_1(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++: int cv::AgastFeatureDetector::getType()
+ private static native int getType_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(int type)
+ private static native void setType_0(long nativeObj, int type);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/BFMatcher.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/BFMatcher.java
new file mode 100644
index 0000000..15a1ffa
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/BFMatcher.java
@@ -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/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/BOWImgDescriptorExtractor.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/BOWImgDescriptorExtractor.java
new file mode 100644
index 0000000..6de2cb6
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/BOWImgDescriptorExtractor.java
@@ -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/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/BOWKMeansTrainer.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/BOWKMeansTrainer.java
new file mode 100644
index 0000000..c578aba
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/BOWKMeansTrainer.java
@@ -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/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/BOWTrainer.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/BOWTrainer.java
new file mode 100644
index 0000000..80b2497
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/BOWTrainer.java
@@ -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 getDescriptors()
+ {
+ List retVal = new ArrayList();
+ 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/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/BRISK.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/BRISK.java
new file mode 100644
index 0000000..d045b86
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/BRISK.java
@@ -0,0 +1,204 @@
+//
+// 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())
+ //
+
+ //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())
+ //
+
+ //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;
+ }
+
+
+ @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())
+ 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())
+ 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);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/DescriptorExtractor.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/DescriptorExtractor.java
new file mode 100644
index 0000000..2bb5d4f
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/DescriptorExtractor.java
@@ -0,0 +1,200 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import java.lang.String;
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfKeyPoint;
+import org.opencv.features2d.DescriptorExtractor;
+import org.opencv.utils.Converters;
+
+// C++: class javaDescriptorExtractor
+//javadoc: javaDescriptorExtractor
+@Deprecated
+public class DescriptorExtractor {
+
+ protected final long nativeObj;
+ protected DescriptorExtractor(long addr) { nativeObj = addr; }
+
+ public long getNativeObjAddr() { return nativeObj; }
+
+ // internal usage only
+ public static DescriptorExtractor __fromPtr__(long addr) { return new DescriptorExtractor(addr); }
+
+ private static final int
+ OPPONENTEXTRACTOR = 1000;
+
+
+ public static final int
+ SIFT = 1,
+ SURF = 2,
+ ORB = 3,
+ BRIEF = 4,
+ BRISK = 5,
+ FREAK = 6,
+ AKAZE = 7,
+ OPPONENT_SIFT = OPPONENTEXTRACTOR + SIFT,
+ OPPONENT_SURF = OPPONENTEXTRACTOR + SURF,
+ OPPONENT_ORB = OPPONENTEXTRACTOR + ORB,
+ OPPONENT_BRIEF = OPPONENTEXTRACTOR + BRIEF,
+ OPPONENT_BRISK = OPPONENTEXTRACTOR + BRISK,
+ OPPONENT_FREAK = OPPONENTEXTRACTOR + FREAK,
+ OPPONENT_AKAZE = OPPONENTEXTRACTOR + AKAZE;
+
+
+ //
+ // C++: static Ptr_javaDescriptorExtractor cv::javaDescriptorExtractor::create(int extractorType)
+ //
+
+ //javadoc: javaDescriptorExtractor::create(extractorType)
+ public static DescriptorExtractor create(int extractorType)
+ {
+
+ DescriptorExtractor retVal = DescriptorExtractor.__fromPtr__(create_0(extractorType));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool cv::javaDescriptorExtractor::empty()
+ //
+
+ //javadoc: javaDescriptorExtractor::empty()
+ public boolean empty()
+ {
+
+ boolean retVal = empty_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int cv::javaDescriptorExtractor::descriptorSize()
+ //
+
+ //javadoc: javaDescriptorExtractor::descriptorSize()
+ public int descriptorSize()
+ {
+
+ int retVal = descriptorSize_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: int cv::javaDescriptorExtractor::descriptorType()
+ //
+
+ //javadoc: javaDescriptorExtractor::descriptorType()
+ public int descriptorType()
+ {
+
+ int retVal = descriptorType_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void cv::javaDescriptorExtractor::compute(Mat image, vector_KeyPoint& keypoints, Mat descriptors)
+ //
+
+ //javadoc: javaDescriptorExtractor::compute(image, keypoints, descriptors)
+ public void compute(Mat image, MatOfKeyPoint keypoints, Mat descriptors)
+ {
+ Mat keypoints_mat = keypoints;
+ compute_0(nativeObj, image.nativeObj, keypoints_mat.nativeObj, descriptors.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void cv::javaDescriptorExtractor::compute(vector_Mat images, vector_vector_KeyPoint& keypoints, vector_Mat& descriptors)
+ //
+
+ //javadoc: javaDescriptorExtractor::compute(images, keypoints, descriptors)
+ public void compute(List images, List keypoints, List descriptors)
+ {
+ Mat images_mat = Converters.vector_Mat_to_Mat(images);
+ List keypoints_tmplm = new ArrayList((keypoints != null) ? keypoints.size() : 0);
+ Mat keypoints_mat = Converters.vector_vector_KeyPoint_to_Mat(keypoints, keypoints_tmplm);
+ Mat descriptors_mat = new Mat();
+ compute_1(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj, descriptors_mat.nativeObj);
+ Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints);
+ keypoints_mat.release();
+ Converters.Mat_to_vector_Mat(descriptors_mat, descriptors);
+ descriptors_mat.release();
+ return;
+ }
+
+
+ //
+ // C++: void cv::javaDescriptorExtractor::read(String fileName)
+ //
+
+ //javadoc: javaDescriptorExtractor::read(fileName)
+ public void read(String fileName)
+ {
+
+ read_0(nativeObj, fileName);
+
+ return;
+ }
+
+
+ //
+ // C++: void cv::javaDescriptorExtractor::write(String fileName)
+ //
+
+ //javadoc: javaDescriptorExtractor::write(fileName)
+ public void write(String fileName)
+ {
+
+ write_0(nativeObj, fileName);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: static Ptr_javaDescriptorExtractor cv::javaDescriptorExtractor::create(int extractorType)
+ private static native long create_0(int extractorType);
+
+ // C++: bool cv::javaDescriptorExtractor::empty()
+ private static native boolean empty_0(long nativeObj);
+
+ // C++: int cv::javaDescriptorExtractor::descriptorSize()
+ private static native int descriptorSize_0(long nativeObj);
+
+ // C++: int cv::javaDescriptorExtractor::descriptorType()
+ private static native int descriptorType_0(long nativeObj);
+
+ // C++: void cv::javaDescriptorExtractor::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::javaDescriptorExtractor::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::javaDescriptorExtractor::read(String fileName)
+ private static native void read_0(long nativeObj, String fileName);
+
+ // C++: void cv::javaDescriptorExtractor::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/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/DescriptorMatcher.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/DescriptorMatcher.java
new file mode 100644
index 0000000..e295a2e
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/DescriptorMatcher.java
@@ -0,0 +1,474 @@
+//
+// 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); }
+
+ 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(String descriptorMatcherType)
+ //
+
+ //javadoc: DescriptorMatcher::create(descriptorMatcherType)
+ public static DescriptorMatcher create(String descriptorMatcherType)
+ {
+
+ DescriptorMatcher retVal = DescriptorMatcher.__fromPtr__(create_0(descriptorMatcherType));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: static Ptr_DescriptorMatcher cv::DescriptorMatcher::create(int matcherType)
+ //
+
+ //javadoc: DescriptorMatcher::create(matcherType)
+ public static DescriptorMatcher create(int matcherType)
+ {
+
+ DescriptorMatcher retVal = DescriptorMatcher.__fromPtr__(create_1(matcherType));
+
+ 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 getTrainDescriptors()
+ {
+ List retVal = new ArrayList();
+ 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 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 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 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 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 matches, int k, List 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 matches, int k, List 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 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 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 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 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 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 matches, float maxDistance, List 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 matches, float maxDistance, List 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 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(String descriptorMatcherType)
+ private static native long create_0(String descriptorMatcherType);
+
+ // C++: static Ptr_DescriptorMatcher cv::DescriptorMatcher::create(int matcherType)
+ private static native long create_1(int matcherType);
+
+ // 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/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/FastFeatureDetector.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/FastFeatureDetector.java
new file mode 100644
index 0000000..a272ec9
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/FastFeatureDetector.java
@@ -0,0 +1,205 @@
+//
+// 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); }
+
+ public static final int
+ TYPE_5_8 = 0,
+ TYPE_7_12 = 1,
+ TYPE_9_16 = 2,
+ THRESHOLD = 10000,
+ NONMAX_SUPPRESSION = 10001,
+ FAST_N = 10002;
+
+
+ //
+ // C++: static Ptr_FastFeatureDetector cv::FastFeatureDetector::create(int threshold = 10, bool nonmaxSuppression = true, int type = FastFeatureDetector::TYPE_9_16)
+ //
+
+ //javadoc: FastFeatureDetector::create(threshold, nonmaxSuppression, type)
+ public static FastFeatureDetector create(int threshold, boolean nonmaxSuppression, int type)
+ {
+
+ FastFeatureDetector retVal = 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++: int cv::FastFeatureDetector::getType()
+ //
+
+ //javadoc: FastFeatureDetector::getType()
+ public int getType()
+ {
+
+ int retVal = getType_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(int type)
+ //
+
+ //javadoc: FastFeatureDetector::setType(type)
+ public void setType(int type)
+ {
+
+ setType_0(nativeObj, type);
+
+ return;
+ }
+
+
+ @Override
+ protected void finalize() throws Throwable {
+ delete(nativeObj);
+ }
+
+
+
+ // C++: static Ptr_FastFeatureDetector cv::FastFeatureDetector::create(int threshold = 10, bool nonmaxSuppression = true, int type = FastFeatureDetector::TYPE_9_16)
+ private static native long create_0(int threshold, boolean nonmaxSuppression, int type);
+ private static native long create_1(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++: int cv::FastFeatureDetector::getType()
+ private static native int getType_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(int type)
+ private static native void setType_0(long nativeObj, int type);
+
+ // native support for java finalize()
+ private static native void delete(long nativeObj);
+
+}
diff --git a/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/Feature2D.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/Feature2D.java
new file mode 100644
index 0000000..0710034
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/Feature2D.java
@@ -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 images, List keypoints, List descriptors)
+ {
+ Mat images_mat = Converters.vector_Mat_to_Mat(images);
+ List keypoints_tmplm = new ArrayList((keypoints != null) ? keypoints.size() : 0);
+ Mat keypoints_mat = Converters.vector_vector_KeyPoint_to_Mat(keypoints, keypoints_tmplm);
+ Mat descriptors_mat = new Mat();
+ compute_1(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj, descriptors_mat.nativeObj);
+ Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints);
+ keypoints_mat.release();
+ Converters.Mat_to_vector_Mat(descriptors_mat, descriptors);
+ descriptors_mat.release();
+ return;
+ }
+
+
+ //
+ // C++: void 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 images, List keypoints, List masks)
+ {
+ Mat images_mat = Converters.vector_Mat_to_Mat(images);
+ Mat keypoints_mat = new Mat();
+ Mat masks_mat = Converters.vector_Mat_to_Mat(masks);
+ detect_2(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj, masks_mat.nativeObj);
+ Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints);
+ keypoints_mat.release();
+ return;
+ }
+
+ //javadoc: Feature2D::detect(images, keypoints)
+ public void detect(List images, List keypoints)
+ {
+ Mat images_mat = Converters.vector_Mat_to_Mat(images);
+ Mat keypoints_mat = new Mat();
+ detect_3(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj);
+ Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints);
+ keypoints_mat.release();
+ return;
+ }
+
+
+ //
+ // C++: void 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/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/FeatureDetector.java b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/FeatureDetector.java
new file mode 100644
index 0000000..b8c0473
--- /dev/null
+++ b/tflite/android/openCVLibrary343/src/main/java/org/opencv/features2d/FeatureDetector.java
@@ -0,0 +1,222 @@
+//
+// This file is auto-generated. Please don't modify it!
+//
+package org.opencv.features2d;
+
+import java.lang.String;
+import java.util.ArrayList;
+import java.util.List;
+import org.opencv.core.Mat;
+import org.opencv.core.MatOfKeyPoint;
+import org.opencv.features2d.FeatureDetector;
+import org.opencv.utils.Converters;
+
+// C++: class javaFeatureDetector
+//javadoc: javaFeatureDetector
+@Deprecated
+public class FeatureDetector {
+
+ protected final long nativeObj;
+ protected FeatureDetector(long addr) { nativeObj = addr; }
+
+ public long getNativeObjAddr() { return nativeObj; }
+
+ // internal usage only
+ public static FeatureDetector __fromPtr__(long addr) { return new FeatureDetector(addr); }
+
+ private static final int
+ GRIDDETECTOR = 1000,
+ PYRAMIDDETECTOR = 2000,
+ DYNAMICDETECTOR = 3000;
+
+
+ public static final int
+ FAST = 1,
+ STAR = 2,
+ SIFT = 3,
+ SURF = 4,
+ ORB = 5,
+ MSER = 6,
+ GFTT = 7,
+ HARRIS = 8,
+ SIMPLEBLOB = 9,
+ DENSE = 10,
+ BRISK = 11,
+ AKAZE = 12,
+ GRID_FAST = GRIDDETECTOR + FAST,
+ GRID_STAR = GRIDDETECTOR + STAR,
+ GRID_SIFT = GRIDDETECTOR + SIFT,
+ GRID_SURF = GRIDDETECTOR + SURF,
+ GRID_ORB = GRIDDETECTOR + ORB,
+ GRID_MSER = GRIDDETECTOR + MSER,
+ GRID_GFTT = GRIDDETECTOR + GFTT,
+ GRID_HARRIS = GRIDDETECTOR + HARRIS,
+ GRID_SIMPLEBLOB = GRIDDETECTOR + SIMPLEBLOB,
+ GRID_DENSE = GRIDDETECTOR + DENSE,
+ GRID_BRISK = GRIDDETECTOR + BRISK,
+ GRID_AKAZE = GRIDDETECTOR + AKAZE,
+ PYRAMID_FAST = PYRAMIDDETECTOR + FAST,
+ PYRAMID_STAR = PYRAMIDDETECTOR + STAR,
+ PYRAMID_SIFT = PYRAMIDDETECTOR + SIFT,
+ PYRAMID_SURF = PYRAMIDDETECTOR + SURF,
+ PYRAMID_ORB = PYRAMIDDETECTOR + ORB,
+ PYRAMID_MSER = PYRAMIDDETECTOR + MSER,
+ PYRAMID_GFTT = PYRAMIDDETECTOR + GFTT,
+ PYRAMID_HARRIS = PYRAMIDDETECTOR + HARRIS,
+ PYRAMID_SIMPLEBLOB = PYRAMIDDETECTOR + SIMPLEBLOB,
+ PYRAMID_DENSE = PYRAMIDDETECTOR + DENSE,
+ PYRAMID_BRISK = PYRAMIDDETECTOR + BRISK,
+ PYRAMID_AKAZE = PYRAMIDDETECTOR + AKAZE,
+ DYNAMIC_FAST = DYNAMICDETECTOR + FAST,
+ DYNAMIC_STAR = DYNAMICDETECTOR + STAR,
+ DYNAMIC_SIFT = DYNAMICDETECTOR + SIFT,
+ DYNAMIC_SURF = DYNAMICDETECTOR + SURF,
+ DYNAMIC_ORB = DYNAMICDETECTOR + ORB,
+ DYNAMIC_MSER = DYNAMICDETECTOR + MSER,
+ DYNAMIC_GFTT = DYNAMICDETECTOR + GFTT,
+ DYNAMIC_HARRIS = DYNAMICDETECTOR + HARRIS,
+ DYNAMIC_SIMPLEBLOB = DYNAMICDETECTOR + SIMPLEBLOB,
+ DYNAMIC_DENSE = DYNAMICDETECTOR + DENSE,
+ DYNAMIC_BRISK = DYNAMICDETECTOR + BRISK,
+ DYNAMIC_AKAZE = DYNAMICDETECTOR + AKAZE;
+
+
+ //
+ // C++: static Ptr_javaFeatureDetector cv::javaFeatureDetector::create(int detectorType)
+ //
+
+ //javadoc: javaFeatureDetector::create(detectorType)
+ @Deprecated
+ public static FeatureDetector create(int detectorType)
+ {
+
+ FeatureDetector retVal = FeatureDetector.__fromPtr__(create_0(detectorType));
+
+ return retVal;
+ }
+
+
+ //
+ // C++: bool cv::javaFeatureDetector::empty()
+ //
+
+ //javadoc: javaFeatureDetector::empty()
+ public boolean empty()
+ {
+
+ boolean retVal = empty_0(nativeObj);
+
+ return retVal;
+ }
+
+
+ //
+ // C++: void cv::javaFeatureDetector::detect(Mat image, vector_KeyPoint& keypoints, Mat mask = Mat())
+ //
+
+ //javadoc: javaFeatureDetector::detect(image, keypoints, mask)
+ public void detect(Mat image, MatOfKeyPoint keypoints, Mat mask)
+ {
+ Mat keypoints_mat = keypoints;
+ detect_0(nativeObj, image.nativeObj, keypoints_mat.nativeObj, mask.nativeObj);
+
+ return;
+ }
+
+ //javadoc: javaFeatureDetector::detect(image, keypoints)
+ public void detect(Mat image, MatOfKeyPoint keypoints)
+ {
+ Mat keypoints_mat = keypoints;
+ detect_1(nativeObj, image.nativeObj, keypoints_mat.nativeObj);
+
+ return;
+ }
+
+
+ //
+ // C++: void cv::javaFeatureDetector::detect(vector_Mat images, vector_vector_KeyPoint& keypoints, vector_Mat masks = std::vector())
+ //
+
+ //javadoc: javaFeatureDetector::detect(images, keypoints, masks)
+ public void detect(List images, List keypoints, List