123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482 |
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.Features2dModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.Xfeatures2dModule
- {
- // C++: class DAISY
- /**
- * Class implementing DAISY descriptor, described in CITE: Tola10
- *
- * radius radius of the descriptor at the initial scale
- * q_radius amount of radial range division quantity
- * q_theta amount of angular range division quantity
- * q_hist amount of gradient orientations range division quantity
- * norm choose descriptors normalization type, where
- * DAISY::NRM_NONE will not do any normalization (default),
- * DAISY::NRM_PARTIAL mean that histograms are normalized independently for L2 norm equal to 1.0,
- * DAISY::NRM_FULL mean that descriptors are normalized for L2 norm equal to 1.0,
- * DAISY::NRM_SIFT mean that descriptors are normalized for L2 norm equal to 1.0 but no individual one is bigger than 0.154 as in SIFT
- * H optional 3x3 homography matrix used to warp the grid of daisy but sampling keypoints remains unwarped on image
- * interpolation switch to disable interpolation for speed improvement at minor quality loss
- * use_orientation sample patterns using keypoints orientation, disabled by default.
- */
- public class DAISY : Feature2D
- {
- protected override void Dispose(bool disposing)
- {
- try
- {
- if (disposing)
- {
- }
- if (IsEnabledDispose)
- {
- if (nativeObj != IntPtr.Zero)
- xfeatures2d_DAISY_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- }
- finally
- {
- base.Dispose(disposing);
- }
- }
- protected internal DAISY(IntPtr addr) : base(addr) { }
- // internal usage only
- public static new DAISY __fromPtr__(IntPtr addr) { return new DAISY(addr); }
- // C++: enum cv.xfeatures2d.DAISY.NormalizationType
- public const int NRM_NONE = 100;
- public const int NRM_PARTIAL = 101;
- public const int NRM_FULL = 102;
- public const int NRM_SIFT = 103;
- //
- // C++: static Ptr_DAISY cv::xfeatures2d::DAISY::create(float radius = 15, int q_radius = 3, int q_theta = 8, int q_hist = 8, DAISY_NormalizationType norm = DAISY::NRM_NONE, Mat H = Mat(), bool interpolation = true, bool use_orientation = false)
- //
- public static DAISY create(float radius, int q_radius, int q_theta, int q_hist, Mat H, bool interpolation, bool use_orientation)
- {
- if (H != null) H.ThrowIfDisposed();
- return DAISY.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(xfeatures2d_DAISY_create_10(radius, q_radius, q_theta, q_hist, H.nativeObj, interpolation, use_orientation)));
- }
- public static DAISY create(float radius, int q_radius, int q_theta, int q_hist, Mat H, bool interpolation)
- {
- if (H != null) H.ThrowIfDisposed();
- return DAISY.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(xfeatures2d_DAISY_create_11(radius, q_radius, q_theta, q_hist, H.nativeObj, interpolation)));
- }
- public static DAISY create(float radius, int q_radius, int q_theta, int q_hist, Mat H)
- {
- if (H != null) H.ThrowIfDisposed();
- return DAISY.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(xfeatures2d_DAISY_create_12(radius, q_radius, q_theta, q_hist, H.nativeObj)));
- }
- public static DAISY create(float radius, int q_radius, int q_theta, int q_hist)
- {
- return DAISY.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(xfeatures2d_DAISY_create_13(radius, q_radius, q_theta, q_hist)));
- }
- public static DAISY create(float radius, int q_radius, int q_theta)
- {
- return DAISY.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(xfeatures2d_DAISY_create_15(radius, q_radius, q_theta)));
- }
- public static DAISY create(float radius, int q_radius)
- {
- return DAISY.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(xfeatures2d_DAISY_create_16(radius, q_radius)));
- }
- public static DAISY create(float radius)
- {
- return DAISY.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(xfeatures2d_DAISY_create_17(radius)));
- }
- public static DAISY create()
- {
- return DAISY.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(xfeatures2d_DAISY_create_18()));
- }
- //
- // C++: void cv::xfeatures2d::DAISY::setRadius(float radius)
- //
- public void setRadius(float radius)
- {
- ThrowIfDisposed();
- xfeatures2d_DAISY_setRadius_10(nativeObj, radius);
- }
- //
- // C++: float cv::xfeatures2d::DAISY::getRadius()
- //
- public float getRadius()
- {
- ThrowIfDisposed();
- return xfeatures2d_DAISY_getRadius_10(nativeObj);
- }
- //
- // C++: void cv::xfeatures2d::DAISY::setQRadius(int q_radius)
- //
- public void setQRadius(int q_radius)
- {
- ThrowIfDisposed();
- xfeatures2d_DAISY_setQRadius_10(nativeObj, q_radius);
- }
- //
- // C++: int cv::xfeatures2d::DAISY::getQRadius()
- //
- public int getQRadius()
- {
- ThrowIfDisposed();
- return xfeatures2d_DAISY_getQRadius_10(nativeObj);
- }
- //
- // C++: void cv::xfeatures2d::DAISY::setQTheta(int q_theta)
- //
- public void setQTheta(int q_theta)
- {
- ThrowIfDisposed();
- xfeatures2d_DAISY_setQTheta_10(nativeObj, q_theta);
- }
- //
- // C++: int cv::xfeatures2d::DAISY::getQTheta()
- //
- public int getQTheta()
- {
- ThrowIfDisposed();
- return xfeatures2d_DAISY_getQTheta_10(nativeObj);
- }
- //
- // C++: void cv::xfeatures2d::DAISY::setQHist(int q_hist)
- //
- public void setQHist(int q_hist)
- {
- ThrowIfDisposed();
- xfeatures2d_DAISY_setQHist_10(nativeObj, q_hist);
- }
- //
- // C++: int cv::xfeatures2d::DAISY::getQHist()
- //
- public int getQHist()
- {
- ThrowIfDisposed();
- return xfeatures2d_DAISY_getQHist_10(nativeObj);
- }
- //
- // C++: void cv::xfeatures2d::DAISY::setNorm(int norm)
- //
- public void setNorm(int norm)
- {
- ThrowIfDisposed();
- xfeatures2d_DAISY_setNorm_10(nativeObj, norm);
- }
- //
- // C++: int cv::xfeatures2d::DAISY::getNorm()
- //
- public int getNorm()
- {
- ThrowIfDisposed();
- return xfeatures2d_DAISY_getNorm_10(nativeObj);
- }
- //
- // C++: void cv::xfeatures2d::DAISY::setH(Mat H)
- //
- public void setH(Mat H)
- {
- ThrowIfDisposed();
- if (H != null) H.ThrowIfDisposed();
- xfeatures2d_DAISY_setH_10(nativeObj, H.nativeObj);
- }
- //
- // C++: Mat cv::xfeatures2d::DAISY::getH()
- //
- public Mat getH()
- {
- ThrowIfDisposed();
- return new Mat(DisposableObject.ThrowIfNullIntPtr(xfeatures2d_DAISY_getH_10(nativeObj)));
- }
- //
- // C++: void cv::xfeatures2d::DAISY::setInterpolation(bool interpolation)
- //
- public void setInterpolation(bool interpolation)
- {
- ThrowIfDisposed();
- xfeatures2d_DAISY_setInterpolation_10(nativeObj, interpolation);
- }
- //
- // C++: bool cv::xfeatures2d::DAISY::getInterpolation()
- //
- public bool getInterpolation()
- {
- ThrowIfDisposed();
- return xfeatures2d_DAISY_getInterpolation_10(nativeObj);
- }
- //
- // C++: void cv::xfeatures2d::DAISY::setUseOrientation(bool use_orientation)
- //
- public void setUseOrientation(bool use_orientation)
- {
- ThrowIfDisposed();
- xfeatures2d_DAISY_setUseOrientation_10(nativeObj, use_orientation);
- }
- //
- // C++: bool cv::xfeatures2d::DAISY::getUseOrientation()
- //
- public bool getUseOrientation()
- {
- ThrowIfDisposed();
- return xfeatures2d_DAISY_getUseOrientation_10(nativeObj);
- }
- //
- // C++: String cv::xfeatures2d::DAISY::getDefaultName()
- //
- public override string getDefaultName()
- {
- ThrowIfDisposed();
- string retVal = Marshal.PtrToStringAnsi(DisposableObject.ThrowIfNullIntPtr(xfeatures2d_DAISY_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_DAISY cv::xfeatures2d::DAISY::create(float radius = 15, int q_radius = 3, int q_theta = 8, int q_hist = 8, DAISY_NormalizationType norm = DAISY::NRM_NONE, Mat H = Mat(), bool interpolation = true, bool use_orientation = false)
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_DAISY_create_10(float radius, int q_radius, int q_theta, int q_hist, IntPtr H_nativeObj, [MarshalAs(UnmanagedType.U1)] bool interpolation, [MarshalAs(UnmanagedType.U1)] bool use_orientation);
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_DAISY_create_11(float radius, int q_radius, int q_theta, int q_hist, IntPtr H_nativeObj, [MarshalAs(UnmanagedType.U1)] bool interpolation);
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_DAISY_create_12(float radius, int q_radius, int q_theta, int q_hist, IntPtr H_nativeObj);
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_DAISY_create_13(float radius, int q_radius, int q_theta, int q_hist);
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_DAISY_create_15(float radius, int q_radius, int q_theta);
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_DAISY_create_16(float radius, int q_radius);
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_DAISY_create_17(float radius);
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_DAISY_create_18();
- // C++: void cv::xfeatures2d::DAISY::setRadius(float radius)
- [DllImport(LIBNAME)]
- private static extern void xfeatures2d_DAISY_setRadius_10(IntPtr nativeObj, float radius);
- // C++: float cv::xfeatures2d::DAISY::getRadius()
- [DllImport(LIBNAME)]
- private static extern float xfeatures2d_DAISY_getRadius_10(IntPtr nativeObj);
- // C++: void cv::xfeatures2d::DAISY::setQRadius(int q_radius)
- [DllImport(LIBNAME)]
- private static extern void xfeatures2d_DAISY_setQRadius_10(IntPtr nativeObj, int q_radius);
- // C++: int cv::xfeatures2d::DAISY::getQRadius()
- [DllImport(LIBNAME)]
- private static extern int xfeatures2d_DAISY_getQRadius_10(IntPtr nativeObj);
- // C++: void cv::xfeatures2d::DAISY::setQTheta(int q_theta)
- [DllImport(LIBNAME)]
- private static extern void xfeatures2d_DAISY_setQTheta_10(IntPtr nativeObj, int q_theta);
- // C++: int cv::xfeatures2d::DAISY::getQTheta()
- [DllImport(LIBNAME)]
- private static extern int xfeatures2d_DAISY_getQTheta_10(IntPtr nativeObj);
- // C++: void cv::xfeatures2d::DAISY::setQHist(int q_hist)
- [DllImport(LIBNAME)]
- private static extern void xfeatures2d_DAISY_setQHist_10(IntPtr nativeObj, int q_hist);
- // C++: int cv::xfeatures2d::DAISY::getQHist()
- [DllImport(LIBNAME)]
- private static extern int xfeatures2d_DAISY_getQHist_10(IntPtr nativeObj);
- // C++: void cv::xfeatures2d::DAISY::setNorm(int norm)
- [DllImport(LIBNAME)]
- private static extern void xfeatures2d_DAISY_setNorm_10(IntPtr nativeObj, int norm);
- // C++: int cv::xfeatures2d::DAISY::getNorm()
- [DllImport(LIBNAME)]
- private static extern int xfeatures2d_DAISY_getNorm_10(IntPtr nativeObj);
- // C++: void cv::xfeatures2d::DAISY::setH(Mat H)
- [DllImport(LIBNAME)]
- private static extern void xfeatures2d_DAISY_setH_10(IntPtr nativeObj, IntPtr H_nativeObj);
- // C++: Mat cv::xfeatures2d::DAISY::getH()
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_DAISY_getH_10(IntPtr nativeObj);
- // C++: void cv::xfeatures2d::DAISY::setInterpolation(bool interpolation)
- [DllImport(LIBNAME)]
- private static extern void xfeatures2d_DAISY_setInterpolation_10(IntPtr nativeObj, [MarshalAs(UnmanagedType.U1)] bool interpolation);
- // C++: bool cv::xfeatures2d::DAISY::getInterpolation()
- [DllImport(LIBNAME)]
- [return: MarshalAs(UnmanagedType.U1)]
- private static extern bool xfeatures2d_DAISY_getInterpolation_10(IntPtr nativeObj);
- // C++: void cv::xfeatures2d::DAISY::setUseOrientation(bool use_orientation)
- [DllImport(LIBNAME)]
- private static extern void xfeatures2d_DAISY_setUseOrientation_10(IntPtr nativeObj, [MarshalAs(UnmanagedType.U1)] bool use_orientation);
- // C++: bool cv::xfeatures2d::DAISY::getUseOrientation()
- [DllImport(LIBNAME)]
- [return: MarshalAs(UnmanagedType.U1)]
- private static extern bool xfeatures2d_DAISY_getUseOrientation_10(IntPtr nativeObj);
- // C++: String cv::xfeatures2d::DAISY::getDefaultName()
- [DllImport(LIBNAME)]
- private static extern IntPtr xfeatures2d_DAISY_getDefaultName_10(IntPtr nativeObj);
- // native support for java finalize()
- [DllImport(LIBNAME)]
- private static extern void xfeatures2d_DAISY_delete(IntPtr nativeObj);
- }
- }
|