HBgEsti.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. /***********************************************************
  2. * File generated by the HALCON-Compiler hcomp version 20.11
  3. * Usage: Interface to C++
  4. *
  5. * Software by: MVTec Software GmbH, www.mvtec.com
  6. ***********************************************************/
  7. #ifndef HCPP_HBGESTI
  8. #define HCPP_HBGESTI
  9. namespace HalconCpp
  10. {
  11. // Represents an instance of a background estimator.
  12. class LIntExport HBgEsti : public HHandle
  13. {
  14. public:
  15. // Create an uninitialized instance
  16. HBgEsti():HHandle() {}
  17. // Copy constructor
  18. HBgEsti(const HBgEsti& source) : HHandle(source) {}
  19. // Copy constructor
  20. HBgEsti(const HHandle& handle);
  21. // Create HBgEsti from handle, taking ownership
  22. explicit HBgEsti(Hlong handle);
  23. bool operator==(const HHandle& obj) const
  24. {
  25. return HHandleBase::operator==(obj);
  26. }
  27. bool operator!=(const HHandle& obj) const
  28. {
  29. return HHandleBase::operator!=(obj);
  30. }
  31. protected:
  32. // Verify matching semantic type ('bg_estimation')!
  33. virtual void AssertType(Hphandle handle) const;
  34. public:
  35. /*****************************************************************************
  36. * Operator-based class constructors
  37. *****************************************************************************/
  38. // create_bg_esti: Generate and initialize a data set for the background estimation.
  39. explicit HBgEsti(const HImage& InitializeImage, double Syspar1, double Syspar2, const HString& GainMode, double Gain1, double Gain2, const HString& AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC);
  40. // create_bg_esti: Generate and initialize a data set for the background estimation.
  41. explicit HBgEsti(const HImage& InitializeImage, double Syspar1, double Syspar2, const char* GainMode, double Gain1, double Gain2, const char* AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC);
  42. #ifdef _WIN32
  43. // create_bg_esti: Generate and initialize a data set for the background estimation.
  44. explicit HBgEsti(const HImage& InitializeImage, double Syspar1, double Syspar2, const wchar_t* GainMode, double Gain1, double Gain2, const wchar_t* AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC);
  45. #endif
  46. /***************************************************************************
  47. * Operators *
  48. ***************************************************************************/
  49. // Delete the background estimation data set.
  50. void CloseBgEsti() const;
  51. // Return the estimated background image.
  52. HImage GiveBgEsti() const;
  53. // Change the estimated background image.
  54. void UpdateBgEsti(const HImage& PresentImage, const HRegion& UpDateRegion) const;
  55. // Estimate the background and return the foreground region.
  56. HRegion RunBgEsti(const HImage& PresentImage) const;
  57. // Return the parameters of the data set.
  58. double GetBgEstiParams(double* Syspar2, HString* GainMode, double* Gain1, double* Gain2, HString* AdaptMode, double* MinDiff, Hlong* StatNum, double* ConfidenceC, double* TimeC) const;
  59. // Change the parameters of the data set.
  60. void SetBgEstiParams(double Syspar1, double Syspar2, const HString& GainMode, double Gain1, double Gain2, const HString& AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC) const;
  61. // Change the parameters of the data set.
  62. void SetBgEstiParams(double Syspar1, double Syspar2, const char* GainMode, double Gain1, double Gain2, const char* AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC) const;
  63. #ifdef _WIN32
  64. // Change the parameters of the data set.
  65. void SetBgEstiParams(double Syspar1, double Syspar2, const wchar_t* GainMode, double Gain1, double Gain2, const wchar_t* AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC) const;
  66. #endif
  67. // Generate and initialize a data set for the background estimation.
  68. void CreateBgEsti(const HImage& InitializeImage, double Syspar1, double Syspar2, const HString& GainMode, double Gain1, double Gain2, const HString& AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC);
  69. // Generate and initialize a data set for the background estimation.
  70. void CreateBgEsti(const HImage& InitializeImage, double Syspar1, double Syspar2, const char* GainMode, double Gain1, double Gain2, const char* AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC);
  71. #ifdef _WIN32
  72. // Generate and initialize a data set for the background estimation.
  73. void CreateBgEsti(const HImage& InitializeImage, double Syspar1, double Syspar2, const wchar_t* GainMode, double Gain1, double Gain2, const wchar_t* AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC);
  74. #endif
  75. };
  76. // forward declarations and types for internal array implementation
  77. template<class T> class HSmartPtr;
  78. template<class T> class HHandleBaseArrayRef;
  79. typedef HHandleBaseArrayRef<HBgEsti> HBgEstiArrayRef;
  80. typedef HSmartPtr< HBgEstiArrayRef > HBgEstiArrayPtr;
  81. // Represents multiple tool instances
  82. class LIntExport HBgEstiArray : public HHandleBaseArray
  83. {
  84. public:
  85. // Create empty array
  86. HBgEstiArray();
  87. // Create array from native array of tool instances
  88. HBgEstiArray(HBgEsti* classes, Hlong length);
  89. // Copy constructor
  90. HBgEstiArray(const HBgEstiArray &tool_array);
  91. // Destructor
  92. virtual ~HBgEstiArray();
  93. // Assignment operator
  94. HBgEstiArray &operator=(const HBgEstiArray &tool_array);
  95. // Clears array and all tool instances
  96. virtual void Clear();
  97. // Get array of native tool instances
  98. const HBgEsti* Tools() const;
  99. // Get number of tools
  100. virtual Hlong Length() const;
  101. // Create tool array from tuple of handles
  102. virtual void SetFromTuple(const HTuple& handles);
  103. // Get tuple of handles for tool array
  104. virtual HTuple ConvertToTuple() const;
  105. protected:
  106. // Smart pointer to internal data container
  107. HBgEstiArrayPtr *mArrayPtr;
  108. };
  109. }
  110. #endif