123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
-
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.ShapeModule
- {
- // C++: class HistogramCostExtractor
- //javadoc: HistogramCostExtractor
- public class HistogramCostExtractor : Algorithm
- {
- protected override void Dispose (bool disposing)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- try {
- if (disposing) {
- }
- if (IsEnabledDispose) {
- if (nativeObj != IntPtr.Zero)
- shape_HistogramCostExtractor_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- } finally {
- base.Dispose (disposing);
- }
- #else
- return;
- #endif
- }
- protected internal HistogramCostExtractor (IntPtr addr) : base (addr) { }
- // internal usage only
- public static new HistogramCostExtractor __fromPtr__ (IntPtr addr) { return new HistogramCostExtractor (addr); }
- //
- // C++: float cv::HistogramCostExtractor::getDefaultCost()
- //
- //javadoc: HistogramCostExtractor::getDefaultCost()
- public float getDefaultCost ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- float retVal = shape_HistogramCostExtractor_getDefaultCost_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: int cv::HistogramCostExtractor::getNDummies()
- //
- //javadoc: HistogramCostExtractor::getNDummies()
- public int getNDummies ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- int retVal = shape_HistogramCostExtractor_getNDummies_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: void cv::HistogramCostExtractor::buildCostMatrix(Mat descriptors1, Mat descriptors2, Mat& costMatrix)
- //
- //javadoc: HistogramCostExtractor::buildCostMatrix(descriptors1, descriptors2, costMatrix)
- public void buildCostMatrix (Mat descriptors1, Mat descriptors2, Mat costMatrix)
- {
- ThrowIfDisposed ();
- if (descriptors1 != null) descriptors1.ThrowIfDisposed ();
- if (descriptors2 != null) descriptors2.ThrowIfDisposed ();
- if (costMatrix != null) costMatrix.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- shape_HistogramCostExtractor_buildCostMatrix_10(nativeObj, descriptors1.nativeObj, descriptors2.nativeObj, costMatrix.nativeObj);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::HistogramCostExtractor::setDefaultCost(float defaultCost)
- //
- //javadoc: HistogramCostExtractor::setDefaultCost(defaultCost)
- public void setDefaultCost (float defaultCost)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- shape_HistogramCostExtractor_setDefaultCost_10(nativeObj, defaultCost);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::HistogramCostExtractor::setNDummies(int nDummies)
- //
- //javadoc: HistogramCostExtractor::setNDummies(nDummies)
- public void setNDummies (int nDummies)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- shape_HistogramCostExtractor_setNDummies_10(nativeObj, nDummies);
-
- return;
- #else
- return;
- #endif
- }
- #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
- const string LIBNAME = "__Internal";
- #else
- const string LIBNAME = "opencvforunity";
- #endif
- // C++: float cv::HistogramCostExtractor::getDefaultCost()
- [DllImport (LIBNAME)]
- private static extern float shape_HistogramCostExtractor_getDefaultCost_10 (IntPtr nativeObj);
- // C++: int cv::HistogramCostExtractor::getNDummies()
- [DllImport (LIBNAME)]
- private static extern int shape_HistogramCostExtractor_getNDummies_10 (IntPtr nativeObj);
- // C++: void cv::HistogramCostExtractor::buildCostMatrix(Mat descriptors1, Mat descriptors2, Mat& costMatrix)
- [DllImport (LIBNAME)]
- private static extern void shape_HistogramCostExtractor_buildCostMatrix_10 (IntPtr nativeObj, IntPtr descriptors1_nativeObj, IntPtr descriptors2_nativeObj, IntPtr costMatrix_nativeObj);
- // C++: void cv::HistogramCostExtractor::setDefaultCost(float defaultCost)
- [DllImport (LIBNAME)]
- private static extern void shape_HistogramCostExtractor_setDefaultCost_10 (IntPtr nativeObj, float defaultCost);
- // C++: void cv::HistogramCostExtractor::setNDummies(int nDummies)
- [DllImport (LIBNAME)]
- private static extern void shape_HistogramCostExtractor_setNDummies_10 (IntPtr nativeObj, int nDummies);
- // native support for java finalize()
- [DllImport (LIBNAME)]
- private static extern void shape_HistogramCostExtractor_delete (IntPtr nativeObj);
- }
- }
|