123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
-
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.Features2dModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.Xfeatures2dModule {
- // C++: class BoostDesc
- //javadoc: BoostDesc
- public class BoostDesc : Feature2D {
- protected override void Dispose(bool disposing) {
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- try {
- if (disposing) {
- }
- if (IsEnabledDispose) {
- if (nativeObj != IntPtr.Zero)
- xfeatures2d_BoostDesc_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- } finally {
- base.Dispose(disposing);
- }
- #else
- return;
- #endif
- }
- protected internal BoostDesc(IntPtr addr) : base(addr) { }
- // internal usage only
- public static new BoostDesc __fromPtr__(IntPtr addr) { return new BoostDesc(addr); }
- //
- // C++: static Ptr_BoostDesc cv::xfeatures2d::BoostDesc::create(int desc = BoostDesc::BINBOOST_256, bool use_scale_orientation = true, float scale_factor = 6.25f)
- //
- //javadoc: BoostDesc::create(desc, use_scale_orientation, scale_factor)
- public static BoostDesc create(int desc, bool use_scale_orientation, float scale_factor) {
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- BoostDesc retVal = BoostDesc.__fromPtr__(xfeatures2d_BoostDesc_create_10(desc, use_scale_orientation, scale_factor));
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: BoostDesc::create(desc, use_scale_orientation)
- public static BoostDesc create(int desc, bool use_scale_orientation) {
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- BoostDesc retVal = BoostDesc.__fromPtr__(xfeatures2d_BoostDesc_create_11(desc, use_scale_orientation));
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: BoostDesc::create(desc)
- public static BoostDesc create(int desc) {
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- BoostDesc retVal = BoostDesc.__fromPtr__(xfeatures2d_BoostDesc_create_12(desc));
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: BoostDesc::create()
- public static BoostDesc create() {
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- BoostDesc retVal = BoostDesc.__fromPtr__(xfeatures2d_BoostDesc_create_13());
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: bool cv::xfeatures2d::BoostDesc::getUseScaleOrientation()
- //
- //javadoc: BoostDesc::getUseScaleOrientation()
- public bool getUseScaleOrientation() {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- bool retVal = xfeatures2d_BoostDesc_getUseScaleOrientation_10(nativeObj);
- return retVal;
- #else
- return false;
- #endif
- }
- //
- // C++: float cv::xfeatures2d::BoostDesc::getScaleFactor()
- //
- //javadoc: BoostDesc::getScaleFactor()
- public float getScaleFactor() {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- float retVal = xfeatures2d_BoostDesc_getScaleFactor_10(nativeObj);
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: void cv::xfeatures2d::BoostDesc::setScaleFactor(float scale_factor)
- //
- //javadoc: BoostDesc::setScaleFactor(scale_factor)
- public void setScaleFactor(float scale_factor) {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- xfeatures2d_BoostDesc_setScaleFactor_10(nativeObj, scale_factor);
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::xfeatures2d::BoostDesc::setUseScaleOrientation(bool use_scale_orientation)
- //
- //javadoc: BoostDesc::setUseScaleOrientation(use_scale_orientation)
- public void setUseScaleOrientation(bool use_scale_orientation) {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- xfeatures2d_BoostDesc_setUseScaleOrientation_10(nativeObj, use_scale_orientation);
- return;
- #else
- return;
- #endif
- }
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- const string LIBNAME = "opencvforunity";
- // C++: static Ptr_BoostDesc cv::xfeatures2d::BoostDesc::create(int desc = BoostDesc::BINBOOST_256, bool use_scale_orientation = true, float scale_factor = 6.25f)
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_BoostDesc_create_10(int desc, bool use_scale_orientation, float scale_factor);
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_BoostDesc_create_11(int desc, bool use_scale_orientation);
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_BoostDesc_create_12(int desc);
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_BoostDesc_create_13();
- // C++: bool cv::xfeatures2d::BoostDesc::getUseScaleOrientation()
- [DllImport(LIBNAME)]
- private static extern bool xfeatures2d_BoostDesc_getUseScaleOrientation_10(IntPtr nativeObj);
- // C++: float cv::xfeatures2d::BoostDesc::getScaleFactor()
- [DllImport(LIBNAME)]
- private static extern float xfeatures2d_BoostDesc_getScaleFactor_10(IntPtr nativeObj);
- // C++: void cv::xfeatures2d::BoostDesc::setScaleFactor(float scale_factor)
- [DllImport(LIBNAME)]
- private static extern void xfeatures2d_BoostDesc_setScaleFactor_10(IntPtr nativeObj, float scale_factor);
- // C++: void cv::xfeatures2d::BoostDesc::setUseScaleOrientation(bool use_scale_orientation)
- [DllImport(LIBNAME)]
- private static extern void xfeatures2d_BoostDesc_setUseScaleOrientation_10(IntPtr nativeObj, bool use_scale_orientation);
- // native support for java finalize()
- [DllImport(LIBNAME)]
- private static extern void xfeatures2d_BoostDesc_delete(IntPtr nativeObj);
- #endif
- }
- }
|