123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- /***********************************************************
- * File generated by the HALCON-Compiler hcomp version 20.11
- * Usage: Interface to C++
- *
- * Software by: MVTec Software GmbH, www.mvtec.com
- ***********************************************************/
- #ifndef HCPP_HBGESTI
- #define HCPP_HBGESTI
- namespace HalconCpp
- {
- // Represents an instance of a background estimator.
- class LIntExport HBgEsti : public HHandle
- {
- public:
- // Create an uninitialized instance
- HBgEsti():HHandle() {}
- // Copy constructor
- HBgEsti(const HBgEsti& source) : HHandle(source) {}
- // Copy constructor
- HBgEsti(const HHandle& handle);
- // Create HBgEsti from handle, taking ownership
- explicit HBgEsti(Hlong handle);
- bool operator==(const HHandle& obj) const
- {
- return HHandleBase::operator==(obj);
- }
- bool operator!=(const HHandle& obj) const
- {
- return HHandleBase::operator!=(obj);
- }
- protected:
- // Verify matching semantic type ('bg_estimation')!
- virtual void AssertType(Hphandle handle) const;
- public:
- /*****************************************************************************
- * Operator-based class constructors
- *****************************************************************************/
- // create_bg_esti: Generate and initialize a data set for the background estimation.
- 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);
- // create_bg_esti: Generate and initialize a data set for the background estimation.
- 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);
- #ifdef _WIN32
- // create_bg_esti: Generate and initialize a data set for the background estimation.
- 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);
- #endif
- /***************************************************************************
- * Operators *
- ***************************************************************************/
- // Delete the background estimation data set.
- void CloseBgEsti() const;
- // Return the estimated background image.
- HImage GiveBgEsti() const;
- // Change the estimated background image.
- void UpdateBgEsti(const HImage& PresentImage, const HRegion& UpDateRegion) const;
- // Estimate the background and return the foreground region.
- HRegion RunBgEsti(const HImage& PresentImage) const;
- // Return the parameters of the data set.
- double GetBgEstiParams(double* Syspar2, HString* GainMode, double* Gain1, double* Gain2, HString* AdaptMode, double* MinDiff, Hlong* StatNum, double* ConfidenceC, double* TimeC) const;
- // Change the parameters of the data set.
- 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;
- // Change the parameters of the data set.
- 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;
- #ifdef _WIN32
- // Change the parameters of the data set.
- 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;
- #endif
- // Generate and initialize a data set for the background estimation.
- 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);
- // Generate and initialize a data set for the background estimation.
- 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);
- #ifdef _WIN32
- // Generate and initialize a data set for the background estimation.
- 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);
- #endif
- };
- // forward declarations and types for internal array implementation
- template<class T> class HSmartPtr;
- template<class T> class HHandleBaseArrayRef;
- typedef HHandleBaseArrayRef<HBgEsti> HBgEstiArrayRef;
- typedef HSmartPtr< HBgEstiArrayRef > HBgEstiArrayPtr;
- // Represents multiple tool instances
- class LIntExport HBgEstiArray : public HHandleBaseArray
- {
- public:
- // Create empty array
- HBgEstiArray();
- // Create array from native array of tool instances
- HBgEstiArray(HBgEsti* classes, Hlong length);
- // Copy constructor
- HBgEstiArray(const HBgEstiArray &tool_array);
- // Destructor
- virtual ~HBgEstiArray();
- // Assignment operator
- HBgEstiArray &operator=(const HBgEstiArray &tool_array);
- // Clears array and all tool instances
- virtual void Clear();
- // Get array of native tool instances
- const HBgEsti* Tools() const;
- // Get number of tools
- virtual Hlong Length() const;
- // Create tool array from tuple of handles
- virtual void SetFromTuple(const HTuple& handles);
- // Get tuple of handles for tool array
- virtual HTuple ConvertToTuple() const;
- protected:
- // Smart pointer to internal data container
- HBgEstiArrayPtr *mArrayPtr;
- };
- }
- #endif
|