NativeMethods_xfeatures2d.cs 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. using System.Diagnostics.Contracts;
  2. using System.Runtime.InteropServices;
  3. #pragma warning disable 1591
  4. #pragma warning disable CA1401 // P/Invokes should not be visible
  5. #pragma warning disable IDE1006 // Naming style
  6. // ReSharper disable InconsistentNaming
  7. namespace OpenCvSharp.Internal;
  8. static partial class NativeMethods
  9. {
  10. // BriefDescriptorExtractor
  11. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  12. public static extern ExceptionStatus xfeatures2d_BriefDescriptorExtractor_create(int bytes, out IntPtr returnValue);
  13. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  14. public static extern ExceptionStatus xfeatures2d_Ptr_BriefDescriptorExtractor_delete(IntPtr obj);
  15. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  16. public static extern ExceptionStatus xfeatures2d_BriefDescriptorExtractor_read(IntPtr obj, IntPtr fn);
  17. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  18. public static extern ExceptionStatus xfeatures2d_BriefDescriptorExtractor_write(IntPtr obj, IntPtr fs);
  19. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  20. public static extern ExceptionStatus xfeatures2d_BriefDescriptorExtractor_descriptorSize(IntPtr obj, out int returnValue);
  21. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  22. public static extern ExceptionStatus xfeatures2d_BriefDescriptorExtractor_descriptorType(IntPtr obj, out int returnValue);
  23. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  24. public static extern ExceptionStatus xfeatures2d_Ptr_BriefDescriptorExtractor_get(IntPtr ptr, out IntPtr returnValue);
  25. // FREAK
  26. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  27. public static extern ExceptionStatus xfeatures2d_FREAK_create(int orientationNormalized,
  28. int scaleNormalized, float patternScale, int nOctaves,
  29. int[]? selectedPairs, int selectedPairsLength,
  30. out IntPtr returnValue);
  31. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  32. public static extern ExceptionStatus xfeatures2d_Ptr_FREAK_delete(IntPtr ptr);
  33. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  34. public static extern ExceptionStatus xfeatures2d_Ptr_FREAK_get(IntPtr ptr, out IntPtr returnValue);
  35. // StarDetector
  36. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  37. public static extern ExceptionStatus xfeatures2d_StarDetector_create(
  38. int maxSize, int responseThreshold,
  39. int lineThresholdProjected, int lineThresholdBinarized, int suppressNonmaxSize,
  40. out IntPtr returnValue);
  41. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  42. public static extern ExceptionStatus xfeatures2d_Ptr_StarDetector_delete(IntPtr ptr);
  43. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  44. public static extern ExceptionStatus xfeatures2d_Ptr_StarDetector_get(IntPtr ptr, out IntPtr returnValue);
  45. // LUCID
  46. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  47. public static extern ExceptionStatus xfeatures2d_LUCID_create(int lucidKernel, int blurKernel, out IntPtr returnValue);
  48. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  49. public static extern ExceptionStatus xfeatures2d_Ptr_LUCID_delete(IntPtr ptr);
  50. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  51. public static extern ExceptionStatus xfeatures2d_Ptr_LUCID_get(IntPtr ptr, out IntPtr returnValue);
  52. // LATCH
  53. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  54. public static extern ExceptionStatus xfeatures2d_LATCH_create(
  55. int bytes, int rotationInvariance, int halfSsdSize, double sigma, out IntPtr returnValue);
  56. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  57. public static extern ExceptionStatus xfeatures2d_Ptr_LATCH_delete(IntPtr ptr);
  58. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  59. public static extern ExceptionStatus xfeatures2d_Ptr_LATCH_get(IntPtr ptr, out IntPtr returnValue);
  60. // SURF
  61. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  62. public static extern ExceptionStatus xfeatures2d_SURF_create(
  63. double hessianThreshold, int nOctaves,
  64. int nOctaveLayers, int extended, int upright, out IntPtr returnValue);
  65. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  66. public static extern ExceptionStatus xfeatures2d_Ptr_SURF_delete(IntPtr ptr);
  67. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  68. public static extern ExceptionStatus xfeatures2d_Ptr_SURF_get(IntPtr ptr, out IntPtr returnValue);
  69. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  70. public static extern ExceptionStatus xfeatures2d_SURF_getHessianThreshold(IntPtr obj, out double returnValue);
  71. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  72. public static extern ExceptionStatus xfeatures2d_SURF_getNOctaves(IntPtr obj, out int returnValue);
  73. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  74. public static extern ExceptionStatus xfeatures2d_SURF_getNOctaveLayers(IntPtr obj, out int returnValue);
  75. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  76. public static extern ExceptionStatus xfeatures2d_SURF_getExtended(IntPtr obj, out int returnValue);
  77. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  78. public static extern ExceptionStatus xfeatures2d_SURF_getUpright(IntPtr obj, out int returnValue);
  79. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  80. public static extern ExceptionStatus xfeatures2d_SURF_setHessianThreshold(IntPtr obj, double value);
  81. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  82. public static extern ExceptionStatus xfeatures2d_SURF_setNOctaves(IntPtr obj, int value);
  83. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  84. public static extern ExceptionStatus xfeatures2d_SURF_setNOctaveLayers(IntPtr obj, int value);
  85. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  86. public static extern ExceptionStatus xfeatures2d_SURF_setExtended(IntPtr obj, int value);
  87. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  88. public static extern ExceptionStatus xfeatures2d_SURF_setUpright(IntPtr obj, int value);
  89. }