123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331 |
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.Features2dModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.Xfeatures2dModule
- {
- // C++: class StarDetector
- /**
- * The class implements the keypoint detector introduced by CITE: Agrawal08, synonym of StarDetector. :
- */
- public class StarDetector : Feature2D
- {
- protected override void Dispose(bool disposing)
- {
- try
- {
- if (disposing)
- {
- }
- if (IsEnabledDispose)
- {
- if (nativeObj != IntPtr.Zero)
- xfeatures2d_StarDetector_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- }
- finally
- {
- base.Dispose(disposing);
- }
- }
- protected internal StarDetector(IntPtr addr) : base(addr) { }
- // internal usage only
- public static new StarDetector __fromPtr__(IntPtr addr) { return new StarDetector(addr); }
- //
- // C++: static Ptr_StarDetector cv::xfeatures2d::StarDetector::create(int maxSize = 45, int responseThreshold = 30, int lineThresholdProjected = 10, int lineThresholdBinarized = 8, int suppressNonmaxSize = 5)
- //
- public static StarDetector create(int maxSize, int responseThreshold, int lineThresholdProjected, int lineThresholdBinarized, int suppressNonmaxSize)
- {
- return StarDetector.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(xfeatures2d_StarDetector_create_10(maxSize, responseThreshold, lineThresholdProjected, lineThresholdBinarized, suppressNonmaxSize)));
- }
- public static StarDetector create(int maxSize, int responseThreshold, int lineThresholdProjected, int lineThresholdBinarized)
- {
- return StarDetector.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(xfeatures2d_StarDetector_create_11(maxSize, responseThreshold, lineThresholdProjected, lineThresholdBinarized)));
- }
- public static StarDetector create(int maxSize, int responseThreshold, int lineThresholdProjected)
- {
- return StarDetector.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(xfeatures2d_StarDetector_create_12(maxSize, responseThreshold, lineThresholdProjected)));
- }
- public static StarDetector create(int maxSize, int responseThreshold)
- {
- return StarDetector.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(xfeatures2d_StarDetector_create_13(maxSize, responseThreshold)));
- }
- public static StarDetector create(int maxSize)
- {
- return StarDetector.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(xfeatures2d_StarDetector_create_14(maxSize)));
- }
- public static StarDetector create()
- {
- return StarDetector.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(xfeatures2d_StarDetector_create_15()));
- }
- //
- // C++: void cv::xfeatures2d::StarDetector::setMaxSize(int _maxSize)
- //
- public void setMaxSize(int _maxSize)
- {
- ThrowIfDisposed();
- xfeatures2d_StarDetector_setMaxSize_10(nativeObj, _maxSize);
- }
- //
- // C++: int cv::xfeatures2d::StarDetector::getMaxSize()
- //
- public int getMaxSize()
- {
- ThrowIfDisposed();
- return xfeatures2d_StarDetector_getMaxSize_10(nativeObj);
- }
- //
- // C++: void cv::xfeatures2d::StarDetector::setResponseThreshold(int _responseThreshold)
- //
- public void setResponseThreshold(int _responseThreshold)
- {
- ThrowIfDisposed();
- xfeatures2d_StarDetector_setResponseThreshold_10(nativeObj, _responseThreshold);
- }
- //
- // C++: int cv::xfeatures2d::StarDetector::getResponseThreshold()
- //
- public int getResponseThreshold()
- {
- ThrowIfDisposed();
- return xfeatures2d_StarDetector_getResponseThreshold_10(nativeObj);
- }
- //
- // C++: void cv::xfeatures2d::StarDetector::setLineThresholdProjected(int _lineThresholdProjected)
- //
- public void setLineThresholdProjected(int _lineThresholdProjected)
- {
- ThrowIfDisposed();
- xfeatures2d_StarDetector_setLineThresholdProjected_10(nativeObj, _lineThresholdProjected);
- }
- //
- // C++: int cv::xfeatures2d::StarDetector::getLineThresholdProjected()
- //
- public int getLineThresholdProjected()
- {
- ThrowIfDisposed();
- return xfeatures2d_StarDetector_getLineThresholdProjected_10(nativeObj);
- }
- //
- // C++: void cv::xfeatures2d::StarDetector::setLineThresholdBinarized(int _lineThresholdBinarized)
- //
- public void setLineThresholdBinarized(int _lineThresholdBinarized)
- {
- ThrowIfDisposed();
- xfeatures2d_StarDetector_setLineThresholdBinarized_10(nativeObj, _lineThresholdBinarized);
- }
- //
- // C++: int cv::xfeatures2d::StarDetector::getLineThresholdBinarized()
- //
- public int getLineThresholdBinarized()
- {
- ThrowIfDisposed();
- return xfeatures2d_StarDetector_getLineThresholdBinarized_10(nativeObj);
- }
- //
- // C++: void cv::xfeatures2d::StarDetector::setSuppressNonmaxSize(int _suppressNonmaxSize)
- //
- public void setSuppressNonmaxSize(int _suppressNonmaxSize)
- {
- ThrowIfDisposed();
- xfeatures2d_StarDetector_setSuppressNonmaxSize_10(nativeObj, _suppressNonmaxSize);
- }
- //
- // C++: int cv::xfeatures2d::StarDetector::getSuppressNonmaxSize()
- //
- public int getSuppressNonmaxSize()
- {
- ThrowIfDisposed();
- return xfeatures2d_StarDetector_getSuppressNonmaxSize_10(nativeObj);
- }
- //
- // C++: String cv::xfeatures2d::StarDetector::getDefaultName()
- //
- public override string getDefaultName()
- {
- ThrowIfDisposed();
- string retVal = Marshal.PtrToStringAnsi(DisposableObject.ThrowIfNullIntPtr(xfeatures2d_StarDetector_getDefaultName_10(nativeObj)));
- return retVal;
- }
- #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
- const string LIBNAME = "__Internal";
- #else
- const string LIBNAME = "opencvforunity";
- #endif
- // C++: static Ptr_StarDetector cv::xfeatures2d::StarDetector::create(int maxSize = 45, int responseThreshold = 30, int lineThresholdProjected = 10, int lineThresholdBinarized = 8, int suppressNonmaxSize = 5)
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_StarDetector_create_10(int maxSize, int responseThreshold, int lineThresholdProjected, int lineThresholdBinarized, int suppressNonmaxSize);
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_StarDetector_create_11(int maxSize, int responseThreshold, int lineThresholdProjected, int lineThresholdBinarized);
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_StarDetector_create_12(int maxSize, int responseThreshold, int lineThresholdProjected);
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_StarDetector_create_13(int maxSize, int responseThreshold);
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_StarDetector_create_14(int maxSize);
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_StarDetector_create_15();
- // C++: void cv::xfeatures2d::StarDetector::setMaxSize(int _maxSize)
- [DllImport(LIBNAME)]
- private static extern void xfeatures2d_StarDetector_setMaxSize_10(IntPtr nativeObj, int _maxSize);
- // C++: int cv::xfeatures2d::StarDetector::getMaxSize()
- [DllImport(LIBNAME)]
- private static extern int xfeatures2d_StarDetector_getMaxSize_10(IntPtr nativeObj);
- // C++: void cv::xfeatures2d::StarDetector::setResponseThreshold(int _responseThreshold)
- [DllImport(LIBNAME)]
- private static extern void xfeatures2d_StarDetector_setResponseThreshold_10(IntPtr nativeObj, int _responseThreshold);
- // C++: int cv::xfeatures2d::StarDetector::getResponseThreshold()
- [DllImport(LIBNAME)]
- private static extern int xfeatures2d_StarDetector_getResponseThreshold_10(IntPtr nativeObj);
- // C++: void cv::xfeatures2d::StarDetector::setLineThresholdProjected(int _lineThresholdProjected)
- [DllImport(LIBNAME)]
- private static extern void xfeatures2d_StarDetector_setLineThresholdProjected_10(IntPtr nativeObj, int _lineThresholdProjected);
- // C++: int cv::xfeatures2d::StarDetector::getLineThresholdProjected()
- [DllImport(LIBNAME)]
- private static extern int xfeatures2d_StarDetector_getLineThresholdProjected_10(IntPtr nativeObj);
- // C++: void cv::xfeatures2d::StarDetector::setLineThresholdBinarized(int _lineThresholdBinarized)
- [DllImport(LIBNAME)]
- private static extern void xfeatures2d_StarDetector_setLineThresholdBinarized_10(IntPtr nativeObj, int _lineThresholdBinarized);
- // C++: int cv::xfeatures2d::StarDetector::getLineThresholdBinarized()
- [DllImport(LIBNAME)]
- private static extern int xfeatures2d_StarDetector_getLineThresholdBinarized_10(IntPtr nativeObj);
- // C++: void cv::xfeatures2d::StarDetector::setSuppressNonmaxSize(int _suppressNonmaxSize)
- [DllImport(LIBNAME)]
- private static extern void xfeatures2d_StarDetector_setSuppressNonmaxSize_10(IntPtr nativeObj, int _suppressNonmaxSize);
- // C++: int cv::xfeatures2d::StarDetector::getSuppressNonmaxSize()
- [DllImport(LIBNAME)]
- private static extern int xfeatures2d_StarDetector_getSuppressNonmaxSize_10(IntPtr nativeObj);
- // C++: String cv::xfeatures2d::StarDetector::getDefaultName()
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_StarDetector_getDefaultName_10(IntPtr nativeObj);
- // native support for java finalize()
- [DllImport(LIBNAME)]
- private static extern void xfeatures2d_StarDetector_delete(IntPtr nativeObj);
- }
- }
|