123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509 |
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.Features2dModule
- {
- // C++: class BRISK
- /**
- * Class implementing the BRISK keypoint detector and descriptor extractor, described in CITE: LCS11 .
- */
- public class BRISK : Feature2D
- {
- protected override void Dispose(bool disposing)
- {
- try
- {
- if (disposing)
- {
- }
- if (IsEnabledDispose)
- {
- if (nativeObj != IntPtr.Zero)
- features2d_BRISK_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- }
- finally
- {
- base.Dispose(disposing);
- }
- }
- protected internal BRISK(IntPtr addr) : base(addr) { }
- // internal usage only
- public static new BRISK __fromPtr__(IntPtr addr) { return new BRISK(addr); }
- //
- // C++: static Ptr_BRISK cv::BRISK::create(int thresh = 30, int octaves = 3, float patternScale = 1.0f)
- //
- /**
- * The BRISK constructor
- *
- * param thresh AGAST detection threshold score.
- * param octaves detection octaves. Use 0 to do single scale.
- * param patternScale apply this scale to the pattern used for sampling the neighbourhood of a
- * keypoint.
- * return automatically generated
- */
- public static BRISK create(int thresh, int octaves, float patternScale)
- {
- return BRISK.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(features2d_BRISK_create_10(thresh, octaves, patternScale)));
- }
- /**
- * The BRISK constructor
- *
- * param thresh AGAST detection threshold score.
- * param octaves detection octaves. Use 0 to do single scale.
- * keypoint.
- * return automatically generated
- */
- public static BRISK create(int thresh, int octaves)
- {
- return BRISK.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(features2d_BRISK_create_11(thresh, octaves)));
- }
- /**
- * The BRISK constructor
- *
- * param thresh AGAST detection threshold score.
- * keypoint.
- * return automatically generated
- */
- public static BRISK create(int thresh)
- {
- return BRISK.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(features2d_BRISK_create_12(thresh)));
- }
- /**
- * The BRISK constructor
- *
- * keypoint.
- * return automatically generated
- */
- public static BRISK create()
- {
- return BRISK.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(features2d_BRISK_create_13()));
- }
- //
- // C++: static Ptr_BRISK cv::BRISK::create(vector_float radiusList, vector_int numberList, float dMax = 5.85f, float dMin = 8.2f, vector_int indexChange = std::vector<int>())
- //
- /**
- * The BRISK constructor for a custom pattern
- *
- * param radiusList defines the radii (in pixels) where the samples around a keypoint are taken (for
- * keypoint scale 1).
- * param numberList defines the number of sampling points on the sampling circle. Must be the same
- * size as radiusList..
- * param dMax threshold for the short pairings used for descriptor formation (in pixels for keypoint
- * scale 1).
- * param dMin threshold for the long pairings used for orientation determination (in pixels for
- * keypoint scale 1).
- * param indexChange index remapping of the bits.
- * return automatically generated
- */
- public static BRISK create(MatOfFloat radiusList, MatOfInt numberList, float dMax, float dMin, MatOfInt indexChange)
- {
- if (radiusList != null) radiusList.ThrowIfDisposed();
- if (numberList != null) numberList.ThrowIfDisposed();
- if (indexChange != null) indexChange.ThrowIfDisposed();
- Mat radiusList_mat = radiusList;
- Mat numberList_mat = numberList;
- Mat indexChange_mat = indexChange;
- return BRISK.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(features2d_BRISK_create_14(radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax, dMin, indexChange_mat.nativeObj)));
- }
- /**
- * The BRISK constructor for a custom pattern
- *
- * param radiusList defines the radii (in pixels) where the samples around a keypoint are taken (for
- * keypoint scale 1).
- * param numberList defines the number of sampling points on the sampling circle. Must be the same
- * size as radiusList..
- * param dMax threshold for the short pairings used for descriptor formation (in pixels for keypoint
- * scale 1).
- * param dMin threshold for the long pairings used for orientation determination (in pixels for
- * keypoint scale 1).
- * return automatically generated
- */
- public static BRISK create(MatOfFloat radiusList, MatOfInt numberList, float dMax, float dMin)
- {
- if (radiusList != null) radiusList.ThrowIfDisposed();
- if (numberList != null) numberList.ThrowIfDisposed();
- Mat radiusList_mat = radiusList;
- Mat numberList_mat = numberList;
- return BRISK.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(features2d_BRISK_create_15(radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax, dMin)));
- }
- /**
- * The BRISK constructor for a custom pattern
- *
- * param radiusList defines the radii (in pixels) where the samples around a keypoint are taken (for
- * keypoint scale 1).
- * param numberList defines the number of sampling points on the sampling circle. Must be the same
- * size as radiusList..
- * param dMax threshold for the short pairings used for descriptor formation (in pixels for keypoint
- * scale 1).
- * keypoint scale 1).
- * return automatically generated
- */
- public static BRISK create(MatOfFloat radiusList, MatOfInt numberList, float dMax)
- {
- if (radiusList != null) radiusList.ThrowIfDisposed();
- if (numberList != null) numberList.ThrowIfDisposed();
- Mat radiusList_mat = radiusList;
- Mat numberList_mat = numberList;
- return BRISK.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(features2d_BRISK_create_16(radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax)));
- }
- /**
- * The BRISK constructor for a custom pattern
- *
- * param radiusList defines the radii (in pixels) where the samples around a keypoint are taken (for
- * keypoint scale 1).
- * param numberList defines the number of sampling points on the sampling circle. Must be the same
- * size as radiusList..
- * scale 1).
- * keypoint scale 1).
- * return automatically generated
- */
- public static BRISK create(MatOfFloat radiusList, MatOfInt numberList)
- {
- if (radiusList != null) radiusList.ThrowIfDisposed();
- if (numberList != null) numberList.ThrowIfDisposed();
- Mat radiusList_mat = radiusList;
- Mat numberList_mat = numberList;
- return BRISK.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(features2d_BRISK_create_17(radiusList_mat.nativeObj, numberList_mat.nativeObj)));
- }
- //
- // C++: static Ptr_BRISK cv::BRISK::create(int thresh, int octaves, vector_float radiusList, vector_int numberList, float dMax = 5.85f, float dMin = 8.2f, vector_int indexChange = std::vector<int>())
- //
- /**
- * The BRISK constructor for a custom pattern, detection threshold and octaves
- *
- * param thresh AGAST detection threshold score.
- * param octaves detection octaves. Use 0 to do single scale.
- * param radiusList defines the radii (in pixels) where the samples around a keypoint are taken (for
- * keypoint scale 1).
- * param numberList defines the number of sampling points on the sampling circle. Must be the same
- * size as radiusList..
- * param dMax threshold for the short pairings used for descriptor formation (in pixels for keypoint
- * scale 1).
- * param dMin threshold for the long pairings used for orientation determination (in pixels for
- * keypoint scale 1).
- * param indexChange index remapping of the bits.
- * return automatically generated
- */
- public static BRISK create(int thresh, int octaves, MatOfFloat radiusList, MatOfInt numberList, float dMax, float dMin, MatOfInt indexChange)
- {
- if (radiusList != null) radiusList.ThrowIfDisposed();
- if (numberList != null) numberList.ThrowIfDisposed();
- if (indexChange != null) indexChange.ThrowIfDisposed();
- Mat radiusList_mat = radiusList;
- Mat numberList_mat = numberList;
- Mat indexChange_mat = indexChange;
- return BRISK.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(features2d_BRISK_create_18(thresh, octaves, radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax, dMin, indexChange_mat.nativeObj)));
- }
- /**
- * The BRISK constructor for a custom pattern, detection threshold and octaves
- *
- * param thresh AGAST detection threshold score.
- * param octaves detection octaves. Use 0 to do single scale.
- * param radiusList defines the radii (in pixels) where the samples around a keypoint are taken (for
- * keypoint scale 1).
- * param numberList defines the number of sampling points on the sampling circle. Must be the same
- * size as radiusList..
- * param dMax threshold for the short pairings used for descriptor formation (in pixels for keypoint
- * scale 1).
- * param dMin threshold for the long pairings used for orientation determination (in pixels for
- * keypoint scale 1).
- * return automatically generated
- */
- public static BRISK create(int thresh, int octaves, MatOfFloat radiusList, MatOfInt numberList, float dMax, float dMin)
- {
- if (radiusList != null) radiusList.ThrowIfDisposed();
- if (numberList != null) numberList.ThrowIfDisposed();
- Mat radiusList_mat = radiusList;
- Mat numberList_mat = numberList;
- return BRISK.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(features2d_BRISK_create_19(thresh, octaves, radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax, dMin)));
- }
- /**
- * The BRISK constructor for a custom pattern, detection threshold and octaves
- *
- * param thresh AGAST detection threshold score.
- * param octaves detection octaves. Use 0 to do single scale.
- * param radiusList defines the radii (in pixels) where the samples around a keypoint are taken (for
- * keypoint scale 1).
- * param numberList defines the number of sampling points on the sampling circle. Must be the same
- * size as radiusList..
- * param dMax threshold for the short pairings used for descriptor formation (in pixels for keypoint
- * scale 1).
- * keypoint scale 1).
- * return automatically generated
- */
- public static BRISK create(int thresh, int octaves, MatOfFloat radiusList, MatOfInt numberList, float dMax)
- {
- if (radiusList != null) radiusList.ThrowIfDisposed();
- if (numberList != null) numberList.ThrowIfDisposed();
- Mat radiusList_mat = radiusList;
- Mat numberList_mat = numberList;
- return BRISK.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(features2d_BRISK_create_110(thresh, octaves, radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax)));
- }
- /**
- * The BRISK constructor for a custom pattern, detection threshold and octaves
- *
- * param thresh AGAST detection threshold score.
- * param octaves detection octaves. Use 0 to do single scale.
- * param radiusList defines the radii (in pixels) where the samples around a keypoint are taken (for
- * keypoint scale 1).
- * param numberList defines the number of sampling points on the sampling circle. Must be the same
- * size as radiusList..
- * scale 1).
- * keypoint scale 1).
- * return automatically generated
- */
- public static BRISK create(int thresh, int octaves, MatOfFloat radiusList, MatOfInt numberList)
- {
- if (radiusList != null) radiusList.ThrowIfDisposed();
- if (numberList != null) numberList.ThrowIfDisposed();
- Mat radiusList_mat = radiusList;
- Mat numberList_mat = numberList;
- return BRISK.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(features2d_BRISK_create_111(thresh, octaves, radiusList_mat.nativeObj, numberList_mat.nativeObj)));
- }
- //
- // C++: String cv::BRISK::getDefaultName()
- //
- public override string getDefaultName()
- {
- ThrowIfDisposed();
- string retVal = Marshal.PtrToStringAnsi(DisposableObject.ThrowIfNullIntPtr(features2d_BRISK_getDefaultName_10(nativeObj)));
- return retVal;
- }
- //
- // C++: void cv::BRISK::setThreshold(int threshold)
- //
- /**
- * Set detection threshold.
- * param threshold AGAST detection threshold score.
- */
- public void setThreshold(int threshold)
- {
- ThrowIfDisposed();
- features2d_BRISK_setThreshold_10(nativeObj, threshold);
- }
- //
- // C++: int cv::BRISK::getThreshold()
- //
- public int getThreshold()
- {
- ThrowIfDisposed();
- return features2d_BRISK_getThreshold_10(nativeObj);
- }
- //
- // C++: void cv::BRISK::setOctaves(int octaves)
- //
- /**
- * Set detection octaves.
- * param octaves detection octaves. Use 0 to do single scale.
- */
- public void setOctaves(int octaves)
- {
- ThrowIfDisposed();
- features2d_BRISK_setOctaves_10(nativeObj, octaves);
- }
- //
- // C++: int cv::BRISK::getOctaves()
- //
- public int getOctaves()
- {
- ThrowIfDisposed();
- return features2d_BRISK_getOctaves_10(nativeObj);
- }
- //
- // C++: void cv::BRISK::setPatternScale(float patternScale)
- //
- /**
- * Set detection patternScale.
- * param patternScale apply this scale to the pattern used for sampling the neighbourhood of a
- * keypoint.
- */
- public void setPatternScale(float patternScale)
- {
- ThrowIfDisposed();
- features2d_BRISK_setPatternScale_10(nativeObj, patternScale);
- }
- //
- // C++: float cv::BRISK::getPatternScale()
- //
- public float getPatternScale()
- {
- ThrowIfDisposed();
- return features2d_BRISK_getPatternScale_10(nativeObj);
- }
- #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
- const string LIBNAME = "__Internal";
- #else
- const string LIBNAME = "opencvforunity";
- #endif
- // C++: static Ptr_BRISK cv::BRISK::create(int thresh = 30, int octaves = 3, float patternScale = 1.0f)
- [DllImport(LIBNAME)]
- private static extern IntPtr features2d_BRISK_create_10(int thresh, int octaves, float patternScale);
- [DllImport(LIBNAME)]
- private static extern IntPtr features2d_BRISK_create_11(int thresh, int octaves);
- [DllImport(LIBNAME)]
- private static extern IntPtr features2d_BRISK_create_12(int thresh);
- [DllImport(LIBNAME)]
- private static extern IntPtr features2d_BRISK_create_13();
- // C++: static Ptr_BRISK cv::BRISK::create(vector_float radiusList, vector_int numberList, float dMax = 5.85f, float dMin = 8.2f, vector_int indexChange = std::vector<int>())
- [DllImport(LIBNAME)]
- private static extern IntPtr features2d_BRISK_create_14(IntPtr radiusList_mat_nativeObj, IntPtr numberList_mat_nativeObj, float dMax, float dMin, IntPtr indexChange_mat_nativeObj);
- [DllImport(LIBNAME)]
- private static extern IntPtr features2d_BRISK_create_15(IntPtr radiusList_mat_nativeObj, IntPtr numberList_mat_nativeObj, float dMax, float dMin);
- [DllImport(LIBNAME)]
- private static extern IntPtr features2d_BRISK_create_16(IntPtr radiusList_mat_nativeObj, IntPtr numberList_mat_nativeObj, float dMax);
- [DllImport(LIBNAME)]
- private static extern IntPtr features2d_BRISK_create_17(IntPtr radiusList_mat_nativeObj, IntPtr numberList_mat_nativeObj);
- // C++: static Ptr_BRISK cv::BRISK::create(int thresh, int octaves, vector_float radiusList, vector_int numberList, float dMax = 5.85f, float dMin = 8.2f, vector_int indexChange = std::vector<int>())
- [DllImport(LIBNAME)]
- private static extern IntPtr features2d_BRISK_create_18(int thresh, int octaves, IntPtr radiusList_mat_nativeObj, IntPtr numberList_mat_nativeObj, float dMax, float dMin, IntPtr indexChange_mat_nativeObj);
- [DllImport(LIBNAME)]
- private static extern IntPtr features2d_BRISK_create_19(int thresh, int octaves, IntPtr radiusList_mat_nativeObj, IntPtr numberList_mat_nativeObj, float dMax, float dMin);
- [DllImport(LIBNAME)]
- private static extern IntPtr features2d_BRISK_create_110(int thresh, int octaves, IntPtr radiusList_mat_nativeObj, IntPtr numberList_mat_nativeObj, float dMax);
- [DllImport(LIBNAME)]
- private static extern IntPtr features2d_BRISK_create_111(int thresh, int octaves, IntPtr radiusList_mat_nativeObj, IntPtr numberList_mat_nativeObj);
- // C++: String cv::BRISK::getDefaultName()
- [DllImport(LIBNAME)]
- private static extern IntPtr features2d_BRISK_getDefaultName_10(IntPtr nativeObj);
- // C++: void cv::BRISK::setThreshold(int threshold)
- [DllImport(LIBNAME)]
- private static extern void features2d_BRISK_setThreshold_10(IntPtr nativeObj, int threshold);
- // C++: int cv::BRISK::getThreshold()
- [DllImport(LIBNAME)]
- private static extern int features2d_BRISK_getThreshold_10(IntPtr nativeObj);
- // C++: void cv::BRISK::setOctaves(int octaves)
- [DllImport(LIBNAME)]
- private static extern void features2d_BRISK_setOctaves_10(IntPtr nativeObj, int octaves);
- // C++: int cv::BRISK::getOctaves()
- [DllImport(LIBNAME)]
- private static extern int features2d_BRISK_getOctaves_10(IntPtr nativeObj);
- // C++: void cv::BRISK::setPatternScale(float patternScale)
- [DllImport(LIBNAME)]
- private static extern void features2d_BRISK_setPatternScale_10(IntPtr nativeObj, float patternScale);
- // C++: float cv::BRISK::getPatternScale()
- [DllImport(LIBNAME)]
- private static extern float features2d_BRISK_getPatternScale_10(IntPtr nativeObj);
- // native support for java finalize()
- [DllImport(LIBNAME)]
- private static extern void features2d_BRISK_delete(IntPtr nativeObj);
- }
- }
|