NativeMethods_bgsegm.cs 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. #region BackgroundSubtractorMOG
  10. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  11. public static extern ExceptionStatus bgsegm_createBackgroundSubtractorMOG(
  12. int history, int nMixtures, double backgroundRatio, double noiseSigma, out IntPtr returnValue);
  13. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  14. public static extern ExceptionStatus bgsegm_Ptr_BackgroundSubtractorMOG_delete(IntPtr obj);
  15. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  16. public static extern ExceptionStatus bgsegm_Ptr_BackgroundSubtractorMOG_get(IntPtr ptr, out IntPtr returnValue);
  17. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  18. public static extern ExceptionStatus bgsegm_BackgroundSubtractorMOG_getHistory(IntPtr ptr, out int returnValue);
  19. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  20. public static extern ExceptionStatus bgsegm_BackgroundSubtractorMOG_setHistory(IntPtr ptr, int value);
  21. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  22. public static extern ExceptionStatus bgsegm_BackgroundSubtractorMOG_getNMixtures(IntPtr ptr, out int returnValue);
  23. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  24. public static extern ExceptionStatus bgsegm_BackgroundSubtractorMOG_setNMixtures(IntPtr ptr, int value);
  25. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  26. public static extern ExceptionStatus bgsegm_BackgroundSubtractorMOG_getBackgroundRatio(IntPtr ptr, out double returnValue);
  27. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  28. public static extern ExceptionStatus bgsegm_BackgroundSubtractorMOG_setBackgroundRatio(IntPtr ptr, double value);
  29. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  30. public static extern ExceptionStatus bgsegm_BackgroundSubtractorMOG_getNoiseSigma(IntPtr ptr, out double returnValue);
  31. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  32. public static extern ExceptionStatus bgsegm_BackgroundSubtractorMOG_setNoiseSigma(IntPtr ptr, double value);
  33. #endregion
  34. #region BackgroundSubtractorGMG
  35. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  36. public static extern ExceptionStatus bgsegm_createBackgroundSubtractorGMG(
  37. int initializationFrames, double decisionThreshold, out IntPtr returnValue);
  38. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  39. public static extern ExceptionStatus bgsegm_Ptr_BackgroundSubtractorGMG_delete(IntPtr obj);
  40. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  41. public static extern ExceptionStatus bgsegm_Ptr_BackgroundSubtractorGMG_get(IntPtr ptr, out IntPtr returnValue);
  42. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  43. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_getMaxFeatures(IntPtr ptr, out int returnValue);
  44. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  45. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_setMaxFeatures(IntPtr ptr, int value);
  46. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  47. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_getDefaultLearningRate(IntPtr ptr, out double returnValue);
  48. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  49. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_setDefaultLearningRate(IntPtr ptr, double value);
  50. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  51. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_getNumFrames(IntPtr ptr, out int returnValue);
  52. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  53. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_setNumFrames(IntPtr ptr, int value);
  54. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  55. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_getQuantizationLevels(IntPtr ptr, out int returnValue);
  56. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  57. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_setQuantizationLevels(IntPtr ptr, int value);
  58. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  59. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_getBackgroundPrior(IntPtr ptr, out double returnValue);
  60. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  61. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_setBackgroundPrior(IntPtr ptr, double value);
  62. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  63. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_getSmoothingRadius(IntPtr ptr, out int returnValue);
  64. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  65. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_setSmoothingRadius(IntPtr ptr, int value);
  66. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  67. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_getDecisionThreshold(IntPtr ptr, out double returnValue);
  68. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  69. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_setDecisionThreshold(IntPtr ptr, double value);
  70. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  71. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_getUpdateBackgroundModel(IntPtr ptr, out int returnValue);
  72. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  73. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_setUpdateBackgroundModel(IntPtr ptr, int value);
  74. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  75. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_getMinVal(IntPtr ptr, out double returnValue);
  76. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  77. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_setMinVal(IntPtr ptr, double value);
  78. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  79. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_getMaxVal(IntPtr ptr, out double returnValue);
  80. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  81. public static extern ExceptionStatus bgsegm_BackgroundSubtractorGMG_setMaxVal(IntPtr ptr, double value);
  82. #endregion
  83. }