145 lines
4.5 KiB
C++
145 lines
4.5 KiB
C++
/***********************************************************
|
|||
|
|
* File generated by the HALCON-Compiler hcomp version 20.11
|
||
|
|
* Usage: Interface to C++
|
||
|
|
*
|
||
|
|
* Software by: MVTec Software GmbH, www.mvtec.com
|
||
|
|
***********************************************************/
|
||
|
|
|
||
|
|
|
||
|
|
#ifndef HCPP_HDLCLASSIFIERTRAINRESULT
|
||
|
|
#define HCPP_HDLCLASSIFIERTRAINRESULT
|
||
|
|
|
||
|
|
namespace HalconCpp
|
||
|
|
{
|
||
|
|
|
||
|
|
// Represents an instance of a Deep Neural Network training step result.
|
||
|
|
class LIntExport HDlClassifierTrainResult : public HHandle
|
||
|
|
{
|
||
|
|
|
||
|
|
public:
|
||
|
|
|
||
|
|
// Create an uninitialized instance
|
||
|
|
HDlClassifierTrainResult():HHandle() {}
|
||
|
|
|
||
|
|
// Copy constructor
|
||
|
|
HDlClassifierTrainResult(const HDlClassifierTrainResult& source) : HHandle(source) {}
|
||
|
|
|
||
|
|
// Copy constructor
|
||
|
|
HDlClassifierTrainResult(const HHandle& handle);
|
||
|
|
|
||
|
|
// Create HDlClassifierTrainResult from handle, taking ownership
|
||
|
|
explicit HDlClassifierTrainResult(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 ('dl_classifier_train_result')!
|
||
|
|
virtual void AssertType(Hphandle handle) const;
|
||
|
|
|
||
|
|
public:
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
/*****************************************************************************
|
||
|
|
* Operator-based class constructors
|
||
|
|
*****************************************************************************/
|
||
|
|
|
||
|
|
// train_dl_classifier_batch: Perform a training step of a deep-learning-based classifier on a batch of images.
|
||
|
|
explicit HDlClassifierTrainResult(const HImage& BatchImages, const HDlClassifier& DLClassifierHandle, const HTuple& BatchLabels);
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
/***************************************************************************
|
||
|
|
* Operators *
|
||
|
|
***************************************************************************/
|
||
|
|
|
||
|
|
// Clear the handle of a deep-learning-based classifier training result.
|
||
|
|
static void ClearDlClassifierTrainResult(const HDlClassifierTrainResultArray& DLClassifierTrainResultHandle);
|
||
|
|
|
||
|
|
// Clear the handle of a deep-learning-based classifier training result.
|
||
|
|
void ClearDlClassifierTrainResult() const;
|
||
|
|
|
||
|
|
// Return the results for the single training step of a deep-learning-based classifier.
|
||
|
|
HTuple GetDlClassifierTrainResult(const HTuple& GenParamName) const;
|
||
|
|
|
||
|
|
// Return the results for the single training step of a deep-learning-based classifier.
|
||
|
|
HTuple GetDlClassifierTrainResult(const HString& GenParamName) const;
|
||
|
|
|
||
|
|
// Return the results for the single training step of a deep-learning-based classifier.
|
||
|
|
HTuple GetDlClassifierTrainResult(const char* GenParamName) const;
|
||
|
|
|
||
|
|
#ifdef _WIN32
|
||
|
|
// Return the results for the single training step of a deep-learning-based classifier.
|
||
|
|
HTuple GetDlClassifierTrainResult(const wchar_t* GenParamName) const;
|
||
|
|
#endif
|
||
|
|
|
||
|
|
// Perform a training step of a deep-learning-based classifier on a batch of images.
|
||
|
|
void TrainDlClassifierBatch(const HImage& BatchImages, const HDlClassifier& DLClassifierHandle, const HTuple& BatchLabels);
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
// forward declarations and types for internal array implementation
|
||
|
|
|
||
|
|
template<class T> class HSmartPtr;
|
||
|
|
template<class T> class HHandleBaseArrayRef;
|
||
|
|
|
||
|
|
typedef HHandleBaseArrayRef<HDlClassifierTrainResult> HDlClassifierTrainResultArrayRef;
|
||
|
|
typedef HSmartPtr< HDlClassifierTrainResultArrayRef > HDlClassifierTrainResultArrayPtr;
|
||
|
|
|
||
|
|
|
||
|
|
// Represents multiple tool instances
|
||
|
|
class LIntExport HDlClassifierTrainResultArray : public HHandleBaseArray
|
||
|
|
{
|
||
|
|
|
||
|
|
public:
|
||
|
|
|
||
|
|
// Create empty array
|
||
|
|
HDlClassifierTrainResultArray();
|
||
|
|
|
||
|
|
// Create array from native array of tool instances
|
||
|
|
HDlClassifierTrainResultArray(HDlClassifierTrainResult* classes, Hlong length);
|
||
|
|
|
||
|
|
// Copy constructor
|
||
|
|
HDlClassifierTrainResultArray(const HDlClassifierTrainResultArray &tool_array);
|
||
|
|
|
||
|
|
// Destructor
|
||
|
|
virtual ~HDlClassifierTrainResultArray();
|
||
|
|
|
||
|
|
// Assignment operator
|
||
|
|
HDlClassifierTrainResultArray &operator=(const HDlClassifierTrainResultArray &tool_array);
|
||
|
|
|
||
|
|
// Clears array and all tool instances
|
||
|
|
virtual void Clear();
|
||
|
|
|
||
|
|
// Get array of native tool instances
|
||
|
|
const HDlClassifierTrainResult* 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
|
||
|
|
HDlClassifierTrainResultArrayPtr *mArrayPtr;
|
||
|
|
};
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
#endif
|