NativeMethods_img_hash.cs 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. namespace OpenCvSharp.Internal;
  7. static partial class NativeMethods
  8. {
  9. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  10. public static extern ExceptionStatus img_hash_ImgHashBase_compute(IntPtr obj, IntPtr inputArr, IntPtr outputArr);
  11. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  12. public static extern ExceptionStatus img_hash_ImgHashBase_compare(IntPtr obj, IntPtr hashOne, IntPtr hashTwo, out double returnValue);
  13. // AverageHash
  14. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  15. public static extern ExceptionStatus img_hash_AverageHash_create(out IntPtr returnValue);
  16. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  17. public static extern ExceptionStatus img_hash_Ptr_AverageHash_delete(IntPtr ptr);
  18. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  19. public static extern ExceptionStatus img_hash_Ptr_AverageHash_get(IntPtr ptr, out IntPtr returnValue);
  20. // BlockMeanHash
  21. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  22. public static extern ExceptionStatus img_hash_BlockMeanHash_create(int mode, out IntPtr returnValue);
  23. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  24. public static extern ExceptionStatus img_hash_Ptr_BlockMeanHash_delete(IntPtr ptr);
  25. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  26. public static extern ExceptionStatus img_hash_Ptr_BlockMeanHash_get(IntPtr ptr, out IntPtr returnValue);
  27. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  28. public static extern ExceptionStatus img_hash_BlockMeanHash_setMode(IntPtr obj, int mode);
  29. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  30. public static extern ExceptionStatus img_hash_BlockMeanHash_getMean(IntPtr obj, IntPtr outVec);
  31. // ColorMomentHash
  32. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  33. public static extern ExceptionStatus img_hash_ColorMomentHash_create(out IntPtr returnValue);
  34. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  35. public static extern ExceptionStatus img_hash_Ptr_ColorMomentHash_delete(IntPtr ptr);
  36. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  37. public static extern ExceptionStatus img_hash_Ptr_ColorMomentHash_get(IntPtr ptr, out IntPtr returnValue);
  38. // MarrHildrethHash
  39. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  40. public static extern ExceptionStatus img_hash_MarrHildrethHash_create(float alpha, float scale, out IntPtr returnValue);
  41. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  42. public static extern ExceptionStatus img_hash_Ptr_MarrHildrethHash_delete(IntPtr ptr);
  43. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  44. public static extern ExceptionStatus img_hash_Ptr_MarrHildrethHash_get(IntPtr ptr, out IntPtr returnValue);
  45. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  46. public static extern ExceptionStatus img_hash_MarrHildrethHash_setKernelParam(IntPtr obj, float alpha, float scale);
  47. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  48. public static extern ExceptionStatus img_hash_MarrHildrethHash_getAlpha(IntPtr obj, out float returnValue);
  49. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  50. public static extern ExceptionStatus img_hash_MarrHildrethHash_getScale(IntPtr obj, out float returnValue);
  51. // PHash
  52. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  53. public static extern ExceptionStatus img_hash_PHash_create(out IntPtr returnValue);
  54. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  55. public static extern ExceptionStatus img_hash_Ptr_PHash_delete(IntPtr ptr);
  56. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  57. public static extern ExceptionStatus img_hash_Ptr_PHash_get(IntPtr ptr, out IntPtr returnValue);
  58. // RadialVarianceHash
  59. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  60. public static extern ExceptionStatus img_hash_RadialVarianceHash_create(double sigma, int numOfAngleLine, out IntPtr returnValue);
  61. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  62. public static extern ExceptionStatus img_hash_Ptr_RadialVarianceHash_delete(IntPtr ptr);
  63. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  64. public static extern ExceptionStatus img_hash_Ptr_RadialVarianceHash_get(IntPtr ptr, out IntPtr returnValue);
  65. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  66. public static extern ExceptionStatus img_hash_RadialVarianceHash_setNumOfAngleLine(IntPtr obj, int value);
  67. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  68. public static extern ExceptionStatus img_hash_RadialVarianceHash_setSigma(IntPtr obj, double value);
  69. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  70. public static extern ExceptionStatus img_hash_RadialVarianceHash_getNumOfAngleLine(IntPtr obj, out int returnValue);
  71. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  72. public static extern ExceptionStatus img_hash_RadialVarianceHash_getSigma(IntPtr obj, out double returnValue);
  73. }