123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.ObjdetectModule
- {
- // C++: class RefineParameters
- /**
- * struct RefineParameters is used by ArucoDetector
- */
- public class RefineParameters : DisposableOpenCVObject
- {
- protected override void Dispose(bool disposing)
- {
- try
- {
- if (disposing)
- {
- }
- if (IsEnabledDispose)
- {
- if (nativeObj != IntPtr.Zero)
- objdetect_RefineParameters_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- }
- finally
- {
- base.Dispose(disposing);
- }
- }
- protected internal RefineParameters(IntPtr addr) : base(addr) { }
- public IntPtr getNativeObjAddr() { return nativeObj; }
- // internal usage only
- public static RefineParameters __fromPtr__(IntPtr addr) { return new RefineParameters(addr); }
- //
- // C++: cv::aruco::RefineParameters::RefineParameters(float minRepDistance = 10.f, float errorCorrectionRate = 3.f, bool checkAllOrders = true)
- //
- public RefineParameters(float minRepDistance, float errorCorrectionRate, bool checkAllOrders)
- {
- nativeObj = DisposableObject.ThrowIfNullIntPtr(objdetect_RefineParameters_RefineParameters_10(minRepDistance, errorCorrectionRate, checkAllOrders));
- }
- public RefineParameters(float minRepDistance, float errorCorrectionRate)
- {
- nativeObj = DisposableObject.ThrowIfNullIntPtr(objdetect_RefineParameters_RefineParameters_11(minRepDistance, errorCorrectionRate));
- }
- public RefineParameters(float minRepDistance)
- {
- nativeObj = DisposableObject.ThrowIfNullIntPtr(objdetect_RefineParameters_RefineParameters_12(minRepDistance));
- }
- public RefineParameters()
- {
- nativeObj = DisposableObject.ThrowIfNullIntPtr(objdetect_RefineParameters_RefineParameters_13());
- }
- //
- // C++: bool cv::aruco::RefineParameters::readRefineParameters(FileNode fn)
- //
- // Unknown type 'FileNode' (I), skipping the function
- //
- // C++: bool cv::aruco::RefineParameters::writeRefineParameters(FileStorage fs, String name = String())
- //
- // Unknown type 'FileStorage' (I), skipping the function
- //
- // C++: float RefineParameters::minRepDistance
- //
- public float get_minRepDistance()
- {
- ThrowIfDisposed();
- return objdetect_RefineParameters_get_1minRepDistance_10(nativeObj);
- }
- //
- // C++: void RefineParameters::minRepDistance
- //
- public void set_minRepDistance(float minRepDistance)
- {
- ThrowIfDisposed();
- objdetect_RefineParameters_set_1minRepDistance_10(nativeObj, minRepDistance);
- }
- //
- // C++: float RefineParameters::errorCorrectionRate
- //
- public float get_errorCorrectionRate()
- {
- ThrowIfDisposed();
- return objdetect_RefineParameters_get_1errorCorrectionRate_10(nativeObj);
- }
- //
- // C++: void RefineParameters::errorCorrectionRate
- //
- public void set_errorCorrectionRate(float errorCorrectionRate)
- {
- ThrowIfDisposed();
- objdetect_RefineParameters_set_1errorCorrectionRate_10(nativeObj, errorCorrectionRate);
- }
- //
- // C++: bool RefineParameters::checkAllOrders
- //
- public bool get_checkAllOrders()
- {
- ThrowIfDisposed();
- return objdetect_RefineParameters_get_1checkAllOrders_10(nativeObj);
- }
- //
- // C++: void RefineParameters::checkAllOrders
- //
- public void set_checkAllOrders(bool checkAllOrders)
- {
- ThrowIfDisposed();
- objdetect_RefineParameters_set_1checkAllOrders_10(nativeObj, checkAllOrders);
- }
- #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
- const string LIBNAME = "__Internal";
- #else
- const string LIBNAME = "opencvforunity";
- #endif
- // C++: cv::aruco::RefineParameters::RefineParameters(float minRepDistance = 10.f, float errorCorrectionRate = 3.f, bool checkAllOrders = true)
- [DllImport(LIBNAME)]
- private static extern IntPtr objdetect_RefineParameters_RefineParameters_10(float minRepDistance, float errorCorrectionRate, [MarshalAs(UnmanagedType.U1)] bool checkAllOrders);
- [DllImport(LIBNAME)]
- private static extern IntPtr objdetect_RefineParameters_RefineParameters_11(float minRepDistance, float errorCorrectionRate);
- [DllImport(LIBNAME)]
- private static extern IntPtr objdetect_RefineParameters_RefineParameters_12(float minRepDistance);
- [DllImport(LIBNAME)]
- private static extern IntPtr objdetect_RefineParameters_RefineParameters_13();
- // C++: float RefineParameters::minRepDistance
- [DllImport(LIBNAME)]
- private static extern float objdetect_RefineParameters_get_1minRepDistance_10(IntPtr nativeObj);
- // C++: void RefineParameters::minRepDistance
- [DllImport(LIBNAME)]
- private static extern void objdetect_RefineParameters_set_1minRepDistance_10(IntPtr nativeObj, float minRepDistance);
- // C++: float RefineParameters::errorCorrectionRate
- [DllImport(LIBNAME)]
- private static extern float objdetect_RefineParameters_get_1errorCorrectionRate_10(IntPtr nativeObj);
- // C++: void RefineParameters::errorCorrectionRate
- [DllImport(LIBNAME)]
- private static extern void objdetect_RefineParameters_set_1errorCorrectionRate_10(IntPtr nativeObj, float errorCorrectionRate);
- // C++: bool RefineParameters::checkAllOrders
- [DllImport(LIBNAME)]
- [return: MarshalAs(UnmanagedType.U1)]
- private static extern bool objdetect_RefineParameters_get_1checkAllOrders_10(IntPtr nativeObj);
- // C++: void RefineParameters::checkAllOrders
- [DllImport(LIBNAME)]
- private static extern void objdetect_RefineParameters_set_1checkAllOrders_10(IntPtr nativeObj, [MarshalAs(UnmanagedType.U1)] bool checkAllOrders);
- // native support for java finalize()
- [DllImport(LIBNAME)]
- private static extern void objdetect_RefineParameters_delete(IntPtr nativeObj);
- }
- }
|