Files
2024-02-27 15:29:15 +08:00

152 lines
4.9 KiB
C++

/***********************************************************
* File generated by the HALCON-Compiler hcomp version 18.05
* 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);
/***************************************************************************
* 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;
// 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);
};
// 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